Skip to content

Commit

Permalink
Added Button for Thermoregulator to hardsuits (#2322)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePooba authored Jun 22, 2024
1 parent 705159a commit b677547
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// How much damage you take from an emp when wearing a hardsuit
#define HARDSUIT_EMP_BURN 2 // a very orange number
#define THERMAL_REGULATOR_COST 6 // this runs out fast if 18

/obj/item/clothing/suit/space/hardsuit
name = "hardsuit"
Expand All @@ -12,7 +13,7 @@
armor_type = /datum/armor/hardsuit
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/t_scanner, /obj/item/construction/rcd, /obj/item/pipe_dispenser)
siemens_coefficient = 0
actions_types = list(/datum/action/item_action/toggle_helmet)
actions_types = list(/datum/action/item_action/toggle_helmet, /datum/action/item_action/toggle_spacesuit)

var/obj/item/clothing/head/helmet/space/hardsuit/helmet
var/helmettype = /obj/item/clothing/head/helmet/space/hardsuit
Expand Down Expand Up @@ -80,8 +81,12 @@
else
RemoveHelmet()

/obj/item/clothing/suit/space/hardsuit/ui_action_click()
ToggleHelmet()
/// implements button for thermoregulamators, checks if helmet or regulator is being toggled
/obj/item/clothing/suit/space/hardsuit/ui_action_click(mob/user, actiontype)
if(istype(actiontype, /datum/action/item_action/toggle_spacesuit))
toggle_spacesuit(user)
else if(istype(actiontype, /datum/action/item_action/toggle_helmet))
ToggleHelmet()

/obj/item/clothing/suit/space/hardsuit/attack_self(mob/user)
user.changeNext_move(CLICK_CD_MELEE)
Expand Down

0 comments on commit b677547

Please sign in to comment.