Skip to content

Ports TG's action datums/action button system(mostly for objects)

Rob Nelson requested to merge pull/11606/actionman into Bleeding-Edge

Created by: JustSumBody

If you ever thought I knew what I was doing prepare to be proven wrong with this PR

Instead of being restricted to one action per item, you can now have multiple by setting them in the item's actions_types list and overriding the object's ui_action_click to do a different thing depending on which button you're clicking. You can give them different icons/names/descriptions, and there's probably some neat things you can do now that we also have tooltips.

While /tg/ uses these for most actions(spells, mechs, and other such things) this is currently just being done with items in mind. Also removes the 5 action button limit we apparently had. You can have a lot of action buttons As it is now, this compiles/runs and works pretty nicely now

Moving them is pretty nifty actionbutton

Current things that are actually broken:

  • The "hide actions" button isn't showing up, can't collapse/reveal the icons
  • Ghosting and reentering body/disconnecting and reconnecting causes action buttons to disappear until everything is re-equipped. They also act really weird when they do null the linked action when they reappear from this whoops Removing the item from its equipped slot and placing it into your hand causes the action button overlay to clear and reappear after a short duration. It's worth noting that it previously disappeared entirely and reappeared, so at least that's consistent. It just looks weirder now since the box stays behind I'm not sure if this is fixable without changing some more stuff with our HUD code Or even that it's that big of a deal, but it really bothers me

Things to do that probably won't break anything:

  • Prune remnants of their codebase specific things
  • Replace their icons in the .dmi with relevant stuff (new icons for differentiating jetpack's toggle stabilization button and power on button for instance)
  • Convert some more right click object verbs to actions
  • find more things to do with this besides objects
  • actually figure out what any of this stuff does

Merge request reports