Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 3a76e3a

Browse files
committed
Helmet light respects sprites
1 parent 8994341 commit 3a76e3a

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

code/modules/clothing/chameleon.dm

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,16 @@
275275
if(istype(atom_target, /obj/item/clothing/suit/space/hardsuit/infiltration)) //YOGS START
276276
var/obj/item/clothing/suit/space/hardsuit/infiltration/I = target
277277
var/obj/item/clothing/suit/space/hardsuit/HS = picked_item
278-
var/obj/item/clothing/head/helmet/helmet = initial(HS.helmettype)
278+
var/obj/item/clothing/head/helmet/space/hardsuit/helmet = initial(HS.helmettype)
279279
I.head_piece.initial_state = initial(helmet.icon_state)
280280
I.head_piece.update_appearance(UPDATE_ICON)
281+
I.head_piece.current_disguise = picked_item
282+
I.head_piece.new_type = helmet.hardsuit_type
283+
var/datum/action/A
284+
for(var/X in I.actions)
285+
A = X
286+
A.build_all_button_icons()
287+
281288
qdel(helmet)
282289
//YOGS END
283290

yogstation/code/modules/antagonists/infiltrator/items/hardsuit.dm

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,48 @@
44
item_state = "eng_helm"
55
armor = list(MELEE = 35, BULLET = 15, LASER = 30,ENERGY = 10, BOMB = 10, BIO = 100, RAD = 50, FIRE = 75, ACID = 75)
66
syndicate = TRUE
7+
var/current_disguise = /obj/item/clothing/suit/space/hardsuit/infiltration
8+
var/new_type = "engineering"
9+
var/list/bad_hardsuits = list(
10+
/obj/item/clothing/suit/space/hardsuit/darktemplar,
11+
/obj/item/clothing/suit/space/hardsuit/darktemplar/chap,
12+
/obj/item/clothing/suit/space/hardsuit/cult,
13+
/obj/item/clothing/suit/space/hardsuit/syndi,
14+
/obj/item/clothing/suit/space/hardsuit/syndi/elite,
15+
/obj/item/clothing/suit/space/hardsuit/syndi/owl,
16+
/obj/item/clothing/suit/space/hardsuit/syndi/debug,
17+
/obj/item/clothing/suit/space/hardsuit/carp,
18+
/obj/item/clothing/suit/space/hardsuit/carp/dragon,
19+
/obj/item/clothing/suit/space/hardsuit/swat,
20+
/obj/item/clothing/suit/space/hardsuit/swat/captain,
21+
/obj/item/clothing/suit/space/hardsuit/ert/paranormal,
22+
/obj/item/clothing/suit/space/hardsuit/ert/paranormal/inquisitor,
23+
/obj/item/clothing/suit/space/hardsuit/ert/paranormal/beserker,
24+
/obj/item/clothing/suit/space/hardsuit/shielded/swat,
25+
/obj/item/clothing/suit/space/hardsuit/shielded/swat/honk,
26+
/obj/item/clothing/suit/space/hardsuit/deathsquad
27+
)
728

829
/obj/item/clothing/head/helmet/space/hardsuit/infiltration/Initialize(mapload)
930
. = ..()
1031
if(istype(loc, /obj/item/clothing/suit/space/hardsuit/infiltration))
1132
var/obj/item/clothing/suit/space/hardsuit/infiltration/I = loc
1233
I.head_piece = src
1334

35+
/obj/item/clothing/head/helmet/space/hardsuit/infiltration/attack_self(mob/user)
36+
if(bad_hardsuits.Find(current_disguise))
37+
to_chat(user, span_warning("You can't use the hardsuit's helmet light with this current disguise, change to another one!"))
38+
else //Copied from original hardsuit attack_self and modified slightly
39+
on = !on
40+
icon_state = "[basestate][on]-[new_type]"
41+
user.update_inv_head() //so our mob-overlays update
42+
43+
set_light_on(on)
44+
45+
for(var/X in actions)
46+
var/datum/action/A = X
47+
A.build_all_button_icons()
48+
1449
/obj/item/clothing/suit/space/hardsuit/infiltration
1550
name = "engineering hardsuit"
1651
icon_state = "hardsuit-engineering"

0 commit comments

Comments
 (0)