Skip to content

Commit

Permalink
Merge pull request #4809 from MistakeNot4892/scav/refit
Browse files Browse the repository at this point in the history
Allows refitting suits to skip name.
  • Loading branch information
out-of-phaze authored Jan 28, 2025
2 parents cbb7c74 + 8d1a4a7 commit 0bd0461
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
3 changes: 0 additions & 3 deletions code/game/machinery/suit_cycler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,8 @@
if(helmet)
target_modification.RefitItem(helmet)
helmet.refit_for_bodytype(target_bodytype)
helmet.SetName("refitted [helmet.name]")
if(suit)
target_modification.RefitItem(suit)
suit.refit_for_bodytype(target_bodytype)
suit.SetName("refitted [suit.name]")
if(boots)
boots.refit_for_bodytype(target_bodytype)
boots.SetName("refitted [initial(boots.name)]")
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/modkit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

user.visible_message("<span class='notice'>\The [user] opens \the [src] and modifies \the [O].</span>","<span class='notice'>You open \the [src] and modify \the [O].</span>")

I.refit_for_bodytype(target_bodytype)
I.refit_for_bodytype(target_bodytype, skip_rename = TRUE)

if (istype(I, /obj/item/clothing/head/helmet))
parts &= ~MODKIT_HELMET
Expand Down
5 changes: 4 additions & 1 deletion code/modules/clothing/_clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
update_wearer_vision()
return ..()

/obj/item/clothing/proc/refit_for_bodytype(var/target_bodytype)
/obj/item/clothing/proc/refit_for_bodytype(target_bodytype, skip_rename = FALSE)

bodytype_equip_flags = 0
decls_repository.get_decls_of_subtype(/decl/bodytype) // Make sure they're prefetched so the below list is populated
Expand All @@ -297,6 +297,9 @@
if(species_icon && (check_state_in_icon(ICON_STATE_INV, species_icon) || check_state_in_icon(ICON_STATE_WORLD, species_icon)))
icon = species_icon

if(!skip_rename)
SetName("refitted [initial(name)]")

if(last_icon != icon)
reconsider_single_icon()
update_clothing_icon()
Expand Down
12 changes: 6 additions & 6 deletions code/modules/clothing/spacesuits/void/station.dm
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,9 @@

//Pilot
/obj/item/clothing/head/helmet/space/void/expedition
desc = "An atmos resistant helmet for space and planet exploration."
name = "pilot voidsuit helmet"
icon = 'icons/clothing/spacesuit/void/pilot/helmet.dmi'
desc = "An atmos-resistant helmet for space and planet exploration."
name = "expedition voidsuit helmet"
icon = 'icons/clothing/spacesuit/void/expedition/helmet.dmi'
armor = list(
ARMOR_MELEE = ARMOR_MELEE_KNIVES,
ARMOR_BULLET = ARMOR_BALLISTIC_MINOR,
Expand All @@ -400,9 +400,9 @@
)

/obj/item/clothing/suit/space/void/expedition
desc = "An atmos resistant voidsuit for space and planet exploration."
name = "pilot voidsuit"
icon = 'icons/clothing/spacesuit/void/pilot/suit.dmi'
desc = "An atmos-resistant voidsuit for space and planet exploration."
name = "expedition voidsuit"
icon = 'icons/clothing/spacesuit/void/expedition/suit.dmi'
armor = list(
ARMOR_MELEE = ARMOR_MELEE_KNIVES,
ARMOR_BULLET = ARMOR_BALLISTIC_MINOR,
Expand Down
6 changes: 3 additions & 3 deletions code/modules/clothing/spacesuits/void/void.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ else if(##equipment_var) {\
if(tank && distance <= 1)
to_chat(user, "<span class='notice'>The wrist-mounted pressure gauge reads [max(round(tank.air_contents.return_pressure()),0)] kPa remaining in \the [tank].</span>")

/obj/item/clothing/suit/space/void/refit_for_bodytype(var/target_bodytype)
/obj/item/clothing/suit/space/void/refit_for_bodytype(target_bodytype, skip_rename = FALSE)
..()
if(istype(helmet))
helmet.refit_for_bodytype(target_bodytype)
helmet.refit_for_bodytype(target_bodytype, skip_rename)
if(istype(boots))
boots.refit_for_bodytype(target_bodytype)
boots.refit_for_bodytype(target_bodytype, skip_rename)

/obj/item/clothing/suit/space/void/equipped(mob/M)
..()
Expand Down
Binary file modified mods/species/neoavians/icons/clothing/feet/shoes.dmi
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions mods/species/neoavians/machinery/suit_cycler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@

//pilot
/obj/item/clothing/head/helmet/space/void/expedition
_avian_onmob_icon = 'mods/species/neoavians/icons/clothing/spacesuit/void/pilot/helmet.dmi'
_avian_onmob_icon = 'mods/species/neoavians/icons/clothing/spacesuit/void/expedition/helmet.dmi'

/obj/item/clothing/suit/space/void/expedition
_avian_onmob_icon = 'mods/species/neoavians/icons/clothing/spacesuit/void/pilot/suit.dmi'
_avian_onmob_icon = 'mods/species/neoavians/icons/clothing/spacesuit/void/expedition/suit.dmi'

//merc
/obj/item/clothing/head/helmet/space/void/merc
Expand Down

0 comments on commit 0bd0461

Please sign in to comment.