TPH's Adaptive Crosshair

In-game crosshair changes depending on what they're holding - or what they're looking at and its functionality

HUD

Download (12 KB)
For Luanti 5.5 and above

How do I install this?

HEAVILY INSPIRED BY SURV'S ADAPTIVE CROSSHAIR (https://content.luanti.org/packages/SURV/adaptive_crosshair/) and intends to do the same things. Basically wanted to do my own rendition of it and see how well I'd do lol

Depends on https://content.luanti.org/packages/TPH/tph_wielditem/ for detecting wielded item changes

Shows whether or not held item is:

  • edible
  • a weapon (sword)
  • a ranged weapon (bows, guns if they have the proper groups)
  • tool (a part of registered_tools)

Shows whether or not a pointed thing is:

  • an entity (even for players or tamed)
  • dropped item
  • node
  • falling node
  • liquid (if holding liquids_pointable item)
  • formspec (nodes that have formspec functions such as the chest)

If held item has a tool_capabilities with a groupcaps (basically most tools including the hand), and if pointing at a node with groups - it will show a checkmark or cross depending on whether or not your tool is adequate for the job

TODO:

  • set up a system for events and callbacks (e.g. callback for a node being pointed at and off, maybe even an on_step)
  • show a mouse icon depending on if node or item can be clicked with
  • permit custom type (image relating to wield item) and pointable (image relating to what is being pointed at) mechanics
  • maybe see about using entity armour groups with tool capabilities???

Reviews

Review

Do you recommend this mod?

  • No reviews, yet.