diff --git a/code/datums/action.dm b/code/datums/action.dm index 2743fd5f0fb..59b1021b579 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -252,17 +252,20 @@ /datum/action/item_action/organ_action check_flags = AB_CHECK_CONSCIOUS -/datum/action/item_action/organ_action/New(Target) - ..() - name = "Toggle [target.name]" - button.name = name - /datum/action/item_action/organ_action/IsAvailable() var/obj/item/organ/internal/I = target if(!I.owner) return 0 return ..() +/datum/action/item_action/organ_action/toggle + +/datum/action/item_action/organ_action/toggle/New(Target) + ..() + name = "Toggle [target.name]" + button.name = name + + //Preset for spells diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 8a6634f35c1..b793fd05fc8 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -47,7 +47,7 @@ implant_color = "#DE7E00" slot = "brain_antidrop" origin_tech = "materials=5;programming=4;biotech=4" - actions_types = list(/datum/action/item_action/organ_action) + actions_types = list(/datum/action/item_action/organ_action/toggle) /obj/item/organ/internal/cyberimp/brain/anti_drop/ui_action_click() active = !active @@ -260,7 +260,7 @@ implant_color = "#007ACC" slot = "shoulders" origin_tech = "materials=5;biotech=4;powerstorage=4" - actions_types = list(/datum/action/item_action/organ_action) + actions_types = list(/datum/action/item_action/organ_action/toggle) var/obj/holder//is defined as the retractable item itself. ensure this is defined somewhere! var/out = 0//determines if the item is in the owner's hand or not var/overloaded = 0//is set to 1 when owner gets EMPed. if set to 1, implant doesn't work. @@ -309,7 +309,7 @@ desc = "A variant of the arm cannon implant that fires electrodes and disabler shots. The cannon emerges from the subject's arms and remains in the shoulders when not in use." icon_state = "armcannon_tase_implant" origin_tech = "materials=5;combat=5;biotech=4;powerstorage=4" - actions_types = list(/datum/action/item_action/organ_action) + actions_types = list(/datum/action/item_action/organ_action/toggle) /obj/item/organ/internal/cyberimp/chest/arm_mod/tase/New()//when the implant is created... holder = new /obj/item/weapon/gun/energy/gun/advtaser/mounted(src)//assign a brand new item to it. (in this case, a gun) @@ -319,7 +319,7 @@ desc = "A variant of the arm cannon implant that fires lethal laser beams. The cannon emerges from the subject's arms and remains in the shoulders when not in use." icon_state = "armcannon_lase_implant" origin_tech = "materials=5;combat=5;biotech=4;powerstorage=4;syndicate=5"//this is kinda nutty and i might lower it - actions_types = list(/datum/action/item_action/organ_action) + actions_types = list(/datum/action/item_action/organ_action/toggle) /obj/item/organ/internal/cyberimp/chest/arm_mod/lase/New() holder = new /obj/item/weapon/gun/energy/laser/mounted(src)