mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
woo (#12533)
This commit is contained in:
@@ -30,5 +30,9 @@
|
||||
#define UNSEALED_COVER "unsealed_cover"
|
||||
#define SEALED_COVER "sealed_cover"
|
||||
|
||||
//Defines used to override MOD clothing's icon and worn icon files in the skin.
|
||||
#define MOD_ICON_OVERRIDE "mod_icon_override"
|
||||
#define MOD_WORN_ICON_OVERRIDE "mod_worn_icon_override"
|
||||
|
||||
/// Global list of all /datum/mod_theme
|
||||
GLOBAL_LIST_INIT(mod_themes, setup_mod_themes())
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -22,47 +22,6 @@
|
||||
/obj/item/mod/module/baton_holster/preloaded,
|
||||
)
|
||||
|
||||
// For the record: modularity makes me want to die
|
||||
/obj/item/mod/control/pre_equipped/contractor/Initialize(mapload, new_theme, new_skin, new_core)
|
||||
. = ..()
|
||||
mod_parts = list()
|
||||
helmet.mod = null
|
||||
chestplate.mod = null
|
||||
gauntlets.mod = null
|
||||
boots.mod = null
|
||||
qdel(helmet)
|
||||
qdel(chestplate)
|
||||
qdel(gauntlets)
|
||||
qdel(boots)
|
||||
helmet = new /obj/item/clothing/head/mod/contractor(src)
|
||||
helmet.mod = src
|
||||
mod_parts += helmet
|
||||
chestplate = new /obj/item/clothing/suit/mod/contractor(src)
|
||||
chestplate.mod = src
|
||||
chestplate.allowed = theme.allowed_suit_storage.Copy()
|
||||
mod_parts += chestplate
|
||||
gauntlets = new /obj/item/clothing/gloves/mod/contractor(src)
|
||||
gauntlets.mod = src
|
||||
mod_parts += gauntlets
|
||||
boots = new /obj/item/clothing/shoes/mod/contractor(src)
|
||||
boots.mod = src
|
||||
mod_parts += boots
|
||||
var/list/all_parts = mod_parts.Copy() + src
|
||||
for(var/obj/item/piece as anything in all_parts)
|
||||
piece.name = "[theme.name] [piece.name]"
|
||||
piece.desc = "[piece.desc] [theme.desc]"
|
||||
piece.armor = getArmor(arglist(theme.armor))
|
||||
piece.resistance_flags = theme.resistance_flags
|
||||
piece.flags_1 |= theme.atom_flags //flags like initialization or admin spawning are here, so we cant set, have to add
|
||||
piece.heat_protection = NONE
|
||||
piece.cold_protection = NONE
|
||||
piece.max_heat_protection_temperature = theme.max_heat_protection_temperature
|
||||
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()
|
||||
|
||||
/obj/item/mod/control/update_appearance(updates)
|
||||
for(var/obj/item/mod/module/chameleon/module as anything in modules)
|
||||
if(!istype(module))
|
||||
@@ -73,23 +32,6 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
// I absolutely fuckin hate having to do this
|
||||
/obj/item/clothing/head/mod/contractor
|
||||
worn_icon = 'modular_skyrat/modules/contractor/icons/worn_modsuit.dmi'
|
||||
icon = 'modular_skyrat/modules/contractor/icons/modsuit.dmi'
|
||||
|
||||
/obj/item/clothing/suit/mod/contractor
|
||||
worn_icon = 'modular_skyrat/modules/contractor/icons/worn_modsuit.dmi'
|
||||
icon = 'modular_skyrat/modules/contractor/icons/modsuit.dmi'
|
||||
|
||||
/obj/item/clothing/gloves/mod/contractor
|
||||
worn_icon = 'modular_skyrat/modules/contractor/icons/worn_modsuit.dmi'
|
||||
icon = 'modular_skyrat/modules/contractor/icons/modsuit.dmi'
|
||||
|
||||
/obj/item/clothing/shoes/mod/contractor
|
||||
worn_icon = 'modular_skyrat/modules/contractor/icons/worn_modsuit.dmi'
|
||||
icon = 'modular_skyrat/modules/contractor/icons/modsuit.dmi'
|
||||
|
||||
// For the prefs menu
|
||||
/obj/item/mod/control/pre_equipped/syndicate_empty/contractor
|
||||
theme = /datum/mod_theme/contractor
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
)
|
||||
skins = list(
|
||||
"contractor" = list(
|
||||
MOD_ICON_OVERRIDE = 'modular_skyrat/modules/contractor/icons/modsuit.dmi',
|
||||
MOD_WORN_ICON_OVERRIDE = 'modular_skyrat/modules/contractor/icons/worn_modsuit.dmi',
|
||||
HELMET_LAYER = NECK_LAYER,
|
||||
HELMET_FLAGS = list(
|
||||
UNSEALED_CLOTHING = SNUG_FIT,
|
||||
|
||||
Reference in New Issue
Block a user