mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
MODSuit clothing icon files can be overridden by its skin (#65733)
This allows the MODSuit skin to change the icon and worn icon files of the modsuit pieces.
This commit is contained in:
@@ -100,7 +100,6 @@
|
||||
slowdown_inactive = theme.slowdown_inactive
|
||||
slowdown_active = theme.slowdown_active
|
||||
complexity_max = theme.complexity_max
|
||||
skin = new_skin || theme.default_skin
|
||||
ui_theme = theme.ui_theme
|
||||
charge_drain = theme.charge_drain
|
||||
initial_modules += theme.inbuilt_modules
|
||||
@@ -134,8 +133,7 @@
|
||||
piece.min_cold_protection_temperature = theme.min_cold_protection_temperature
|
||||
piece.permeability_coefficient = theme.permeability_coefficient
|
||||
piece.siemens_coefficient = theme.siemens_coefficient
|
||||
piece.icon_state = "[skin]-[initial(piece.icon_state)]"
|
||||
update_flags()
|
||||
set_mod_skin(new_skin || theme.default_skin)
|
||||
update_speed()
|
||||
for(var/obj/item/mod/module/module as anything in initial_modules)
|
||||
module = new module(src)
|
||||
@@ -618,7 +616,12 @@
|
||||
/obj/item/mod/control/proc/set_mod_skin(new_skin)
|
||||
skin = new_skin
|
||||
var/list/skin_updating = mod_parts.Copy() + src
|
||||
var/list/selected_skin = theme.skins[new_skin]
|
||||
for(var/obj/item/piece as anything in skin_updating)
|
||||
if(selected_skin[MOD_ICON_OVERRIDE])
|
||||
piece.icon = selected_skin[MOD_ICON_OVERRIDE]
|
||||
if(selected_skin[MOD_WORN_ICON_OVERRIDE])
|
||||
piece.worn_icon = selected_skin[MOD_WORN_ICON_OVERRIDE]
|
||||
piece.icon_state = "[skin]-[initial(piece.icon_state)]"
|
||||
update_flags()
|
||||
wearer?.regenerate_icons()
|
||||
|
||||
Reference in New Issue
Block a user