Falcata Fixes (#21144)

* Fixes Falcata sprite handling and emissives.

Fixes https://github.com/Aurorastation/Aurora.3/issues/21141
This commit is contained in:
Geeves
2025-08-12 16:29:52 +00:00
committed by GitHub
parent ceb492cee0
commit ca693d0bc1
4 changed files with 46 additions and 7 deletions
+17 -6
View File
@@ -159,7 +159,7 @@
for(var/obj/item/clothing/piece in list(gloves,helmet,boots,chest))
if(!istype(piece))
continue
piece.canremove = 0
piece.canremove = FALSE
piece.name = "[suit_type] [initial(piece.name)]"
piece.desc = "It seems to be part of a [src.name]."
piece.icon = icon
@@ -167,8 +167,7 @@
piece.item_state = "[initial(icon_state)]"
piece.contained_sprite = TRUE
if(length(icon_supported_species_tags))
piece.icon_auto_adapt = TRUE
piece.icon_supported_species_tags = icon_supported_species_tags
set_piece_adaptation(piece)
piece.min_cold_protection_temperature = min_cold_protection_temperature
piece.max_heat_protection_temperature = max_heat_protection_temperature
if(piece.siemens_coefficient > siemens_coefficient) //So that insulated gloves keep their insulation.
@@ -189,6 +188,11 @@
set_vision(!offline)
update_icon(1)
/// Sets the icon adaptation and species supported tags equal to parent, can be overriden for custom functionality
/obj/item/rig/proc/set_piece_adaptation(var/obj/item/clothing/piece)
piece.icon_auto_adapt = TRUE
piece.icon_supported_species_tags = icon_supported_species_tags
/obj/item/rig/Destroy()
for(var/obj/item/piece in list(gloves,boots,helmet,chest))
qdel(piece)
@@ -305,8 +309,7 @@
if(seal_delay && !instant && !do_after(wearer, seal_delay, src, do_flags = DO_DEFAULT & ~DO_USER_SAME_HAND))
failed_to_seal = 1
piece.icon_state = "[initial(icon_state)][!seal_target ? "_sealed" : ""]_[piece.clothing_class()]"
piece.item_state = "[initial(icon_state)][!seal_target ? "_sealed" : ""]"
update_sealed_piece_icon(piece, seal_target)
switch(msg_type)
if("boots")
to_chat(wearer, SPAN_NOTICE("\The [piece] [!seal_target ? "seal around your feet" : "relax their grip on your legs"]."))
@@ -379,6 +382,11 @@
initiator.loc.update_icon()
SSstatpanels.set_action_tabs(initiator.client, initiator)
/// Sets the piece's icon and item state based on the seal target, can be overriden for custom functionality
/obj/item/rig/proc/update_sealed_piece_icon(var/obj/item/clothing/piece, var/seal_target)
piece.icon_state = "[initial(icon_state)][!seal_target ? "_sealed" : ""]_[piece.clothing_class()]"
piece.item_state = "[initial(icon_state)][!seal_target ? "_sealed" : ""]"
/obj/item/rig/proc/update_component_sealed()
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(canremove)
@@ -392,7 +400,6 @@
update_icon(1)
/obj/item/rig/process()
// If we've lost any parts, grab them back.
var/mob/living/M
for(var/obj/item/piece in list(gloves,boots,helmet,chest))
@@ -403,6 +410,7 @@
else
piece.forceMove(src)
var/previous_offline_status = offline
if(!istype(wearer) || loc != wearer || wearer.back != src || canremove || !cell || cell.charge <= 0)
if(!cell || cell.charge <= 0)
if(electrified > 0)
@@ -430,6 +438,9 @@
slowdown = initial(slowdown)
wearer?.update_equipment_speed_mods()
if(offline != previous_offline_status)
update_icon(TRUE)
set_vision(!offline)
if(offline)
crushing = FALSE
@@ -348,17 +348,38 @@
I.AddOverlays(emissive_overlay)
return I
/obj/item/rig/light/falcata/set_vision(var/active)
if(helmet)
// don't tint the vision if the suit isn't sealed, the sprite doesn't cover the face
// this does however still tint the vision if it's sealed and the battery dies though
helmet.tint = (active || canremove ? vision_restriction : offline_vision_restriction)
/obj/item/rig/light/falcata/set_piece_adaptation(var/obj/item/clothing/piece)
// the suit doesn't need to differ by-species
if(istype(piece, /obj/item/clothing/suit/space/rig/light/falcata))
return
return ..()
/obj/item/rig/light/falcata/update_sealed_piece_icon(var/obj/item/clothing/piece, var/seal_target)
if(istype(piece, /obj/item/clothing/head/helmet/space/rig/light/falcata))
if(!seal_target)
piece.flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|BLOCKHAIR // if we're sealing the helmet, hide the hair
else
piece.flags_inv = 0 // otherwise, show it all
return ..()
/obj/item/clothing/suit/space/rig/light/falcata
name = "myomer frame"
body_parts_covered = null
breach_threshold = 45 // We aren't a real hardsuit, rather a very thick torso plate.
flags_inv = 0 // Don't hide jumpsuit or tail
/obj/item/clothing/suit/space/rig/light/falcata/get_mob_overlay(mob/living/carbon/human/H, mob_icon, mob_state, slot)
var/image/I = ..()
if(slot != slot_wear_suit_str)
return I
var/obj/item/rig/rigcontroller = H.get_equipped_item(slot_wear_suit)
var/obj/item/rig/rigcontroller = H.get_equipped_item(slot_back)
if(!istype(rigcontroller, /obj/item/rig) || rigcontroller.offline)
return I
@@ -378,3 +399,4 @@
BOMB = ARMOR_BOMB_RESISTANT,
BIO = ARMOR_BIO_SHIELDED,
)
flags_inv = 0 // before being sealed, ears eyes etc should not be hidden