Action Button Update

- Refactors action button backend
   - Action buttons are no longer checked on Life(), items are responsible
     for adding/removing/updating them.
   - Item action buttons are no longer a static action_button_name define,
     items define actions_types, which is a list of paths.
   - Items can now have multiple action buttons.
     - This is handled by new arguments to ui_action_click, the first
       parameter is the user, the second is the path of the action datum
       that was invoked.
 - Refactored how internals function
   - You may now directly switch internals without breaking anything.
   - The internals icon has been updated to be more consistent.
 - Added action buttons for jetpacks
 - Added action buttons for oxygen tanks
 - Uses-based implants now qdel() themselves when they run out of uses.
   This is somewhat a buff to traitor implants, but it's such a minor
   change. The actual reasoning is so that the action buttons are properly
   removed.
 - Fixed a bug with the "Boo" spell which resulted in IsAvailable failing
   for certain ghosts.
 - You can now shift-click on movable HUD elements to reset them to the
   proper position (thank fucking christ)
This commit is contained in:
Tigercat2000
2016-07-18 13:23:01 -07:00
parent 00558bd109
commit 56a09db739
97 changed files with 1230 additions and 1022 deletions
@@ -8,7 +8,7 @@
flags = CONDUCT
slot_flags = SLOT_BELT
materials = list(MAT_METAL=50, MAT_GLASS=20)
action_button_name = "Flashlight"
actions_types = list(/datum/action/item_action/toggle_light)
var/on = 0
var/brightness_on = 4 //luminosity when on
@@ -36,6 +36,9 @@
return 0
on = !on
update_brightness(user)
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
return 1