- Adds generic action and action buttons system

This commit is contained in:
AnturK
2015-04-08 16:23:25 +02:00
parent c925e8019e
commit e2c869bc77
31 changed files with 485 additions and 211 deletions
+2 -3
View File
@@ -24,6 +24,7 @@
//If this is set, The item will make an action button on the player's HUD when picked up.
var/action_button_name //It is also the text which gets displayed on the action button. If not set it defaults to 'Use [name]'. If it's not set, there'll be no button.
var/action_button_is_hands_free = 0 //If 1, bypass the restrained, lying, and stunned checks action buttons normally test for
var/datum/action/item_action/action = null
//Since any item can now be a piece of clothing, this has to be put here so all items share it.
var/flags_inv //This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc.
@@ -307,9 +308,7 @@
//The default action is attack_self().
//Checks before we get to here are: mob is alive, mob is not restrained, paralyzed, asleep, resting, laying, item is on the mob.
/obj/item/proc/ui_action_click()
if(src in usr)
attack_self(usr)
attack_self(usr)
/obj/item/proc/IsShield()
return 0