diff --git a/code/__DEFINES/greyscale_guns.dm b/code/__DEFINES/greyscale_guns.dm index a6396f9350c..fcfeb35e883 100644 --- a/code/__DEFINES/greyscale_guns.dm +++ b/code/__DEFINES/greyscale_guns.dm @@ -6,12 +6,6 @@ #define AMMO_BAND_COLOR_EXPLOSIVE "#3f1111" #define AMMO_BAND_COLOR_SABOT "#663618" -#define GUN_ICONSTATE_LOADED "loaded" -#define GUN_ICONSTATE_UNLOADED "unloaded" -#define GUN_ICONSTATE_UNRACKED "unracked" -#define GUN_ICONSTATE_OPEN "open" -#define GUN_ICONSTATE_PUMP "pump" - #define GUN_PALETTE_TAN "#3F382E#61574A#807360#978872" #define GUN_PALETTE_RED "#421010#601e1e#762525#9b3a28" #define GUN_PALETTE_DARK_RED "#301a1d#422628#5d3839#815150" diff --git a/code/_onclick/hud/screen_objects/screen_objects.dm b/code/_onclick/hud/screen_objects/screen_objects.dm index 8b46ebdf282..6aec3ac2cd9 100644 --- a/code/_onclick/hud/screen_objects/screen_objects.dm +++ b/code/_onclick/hud/screen_objects/screen_objects.dm @@ -99,13 +99,7 @@ ///The tag used by this hand, used for activate_hand() var/hand_tag = "" -/atom/movable/screen/inventory/hand/left - name = "l_hand" - icon_state = "hand_l" - screen_loc = ui_lhand - hand_tag = "l" - -/atom/movable/screen/inventory/hand/left/update_overlays() +/atom/movable/screen/inventory/hand/right/update_overlays() . = ..() if(!hud?.mymob?.hand) return @@ -117,25 +111,24 @@ var/mob/living/carbon/C = usr C.activate_hand(hand_tag) +/atom/movable/screen/inventory/hand/left + name = "l_hand" + icon_state = "hand_l" + screen_loc = ui_lhand + hand_tag = "l" + /atom/movable/screen/inventory/hand/right name = "r_hand" icon_state = "hand_r" screen_loc = ui_rhand hand_tag = "r" -/atom/movable/screen/inventory/hand/right/update_overlays() - . = ..() - if(!hud?.mymob || hud.mymob.hand) - return - . += "hand_active" - /atom/movable/screen/close name = "close" layer = ABOVE_HUD_LAYER plane = ABOVE_HUD_PLANE icon_state = "backpack_close" - /atom/movable/screen/close/Click() if(istype(master, /obj/item/storage)) var/obj/item/storage/S = master diff --git a/code/controllers/subsystem/atoms.dm b/code/controllers/subsystem/atoms.dm index efdaab4d38e..6b0b114555b 100644 --- a/code/controllers/subsystem/atoms.dm +++ b/code/controllers/subsystem/atoms.dm @@ -89,20 +89,22 @@ SUBSYSTEM_DEF(atoms) count = length(atoms) for(var/I in 1 to count) var/atom/A = atoms[I] - if(!(A.flags_atom & INITIALIZED)) - CHECK_TICK - PROFILE_INIT_ATOM_BEGIN() - InitAtom(A, TRUE, mapload_arg) - PROFILE_INIT_ATOM_END(A) + if(A.flags_atom & INITIALIZED) + continue + CHECK_TICK + PROFILE_INIT_ATOM_BEGIN() + InitAtom(A, TRUE, mapload_arg) + PROFILE_INIT_ATOM_END(A) else count = 0 for(var/atom/A in world) - if(!(A.flags_atom & INITIALIZED)) - PROFILE_INIT_ATOM_BEGIN() - InitAtom(A, FALSE, mapload_arg) - PROFILE_INIT_ATOM_END(A) - ++count - CHECK_TICK + if(A.flags_atom & INITIALIZED) + continue + PROFILE_INIT_ATOM_BEGIN() + InitAtom(A, FALSE, mapload_arg) + PROFILE_INIT_ATOM_END(A) + ++count + CHECK_TICK testing("Initialized [count] atoms") pass(count) diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index 06568d24082..a6b95ecbe88 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -41,11 +41,12 @@ SUBSYSTEM_DEF(mapping) //dlete dis once #39770 is resolved /datum/controller/subsystem/mapping/proc/HACK_LoadMapConfig() - if(!configs) - configs = load_map_configs(ALL_MAPTYPES, error_if_missing = FALSE) - for(var/i in GLOB.clients) - var/client/C = i - winset(C, null, "mainwindow.title='[CONFIG_GET(string/title)] - [SSmapping.configs[SHIP_MAP].map_name]'") + if(configs) + return + configs = load_map_configs(ALL_MAPTYPES, error_if_missing = FALSE) + for(var/i in GLOB.clients) + var/client/C = i + winset(C, null, "mainwindow.title='[CONFIG_GET(string/title)] - [SSmapping.configs[SHIP_MAP].map_name]'") /datum/controller/subsystem/mapping/Initialize() HACK_LoadMapConfig() @@ -54,17 +55,19 @@ SUBSYSTEM_DEF(mapping) for(var/i in ALL_MAPTYPES) var/datum/map_config/MC = configs[i] - if(MC.defaulted) - var/old_config = configs[i] - configs[i] = global.config.defaultmaps[i] - if(!configs || configs[i].defaulted) - to_chat(world, span_boldannounce("Unable to load next or default map config, defaulting.")) - configs[i] = old_config + if(!MC.defaulted) + continue + var/old_config = configs[i] + configs[i] = global.config.defaultmaps[i] + if(!configs || configs[i].defaulted) + to_chat(world, span_boldannounce("Unable to load next or default map config, defaulting.")) + configs[i] = old_config if(configs[GROUND_MAP]) for(var/datum/game_mode/M AS in config.votable_modes) - if(!(M.config_tag in configs[GROUND_MAP].gamemodes)) - config.votable_modes -= M // remove invalid modes + if(M.config_tag in configs[GROUND_MAP].gamemodes) + continue + config.votable_modes -= M // remove invalid modes loadWorld() repopulate_sorted_areas() diff --git a/code/datums/greyscale/json_configs/attachments.json b/code/datums/greyscale/json_configs/attachments.json deleted file mode 100644 index 40f151503a0..00000000000 --- a/code/datums/greyscale/json_configs/attachments.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "verticalgrip":[ - { - "type":"hyperscale", - "icon_state":"verticalgrip" - } - ], - "verticalgrip_a":[ - { - "type":"hyperscale", - "icon_state":"verticalgrip_a" - } - ], - "angledgrip":[ - { - "type":"hyperscale", - "icon_state":"angledgrip" - } - ], - "angledgrip_a":[ - { - "type":"hyperscale", - "icon_state":"angledgrip_a" - } - ], - "t60stock_a":[ - { - "type":"hyperscale", - "icon_state":"t60stock_a" - }, - { - "type":"icon_state", - "icon_state":"t60stock_no_color_a", - "blend_mode":"overlay" - } - ], - "tl127stock_a":[ - { - "type":"hyperscale", - "icon_state":"tl127stock_a" - }, - { - "type":"icon_state", - "icon_state":"tl127stock_no_color_a", - "blend_mode":"overlay" - } - ], - "sg29stock_a":[ - { - "type":"hyperscale", - "icon_state":"sg29stock_a" - } - ] -} diff --git a/code/datums/greyscale/json_configs/attachments_64.json b/code/datums/greyscale/json_configs/attachments_64.json deleted file mode 100644 index 34434035f02..00000000000 --- a/code/datums/greyscale/json_configs/attachments_64.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "t35stock":[ - { - "type":"hyperscale", - "icon_state":"t35stock_color" - }, - { - "type":"icon_state", - "icon_state":"t35stock", - "blend_mode":"overlay" - } - ], - "t35stock_a":[ - { - "type":"hyperscale", - "icon_state":"t35stock_color" - }, - { - "type":"icon_state", - "icon_state":"t35stock_a", - "blend_mode":"overlay" - } - ], - "t35stock_open":[ - { - "type":"hyperscale", - "icon_state":"t35stock_color" - }, - { - "type":"icon_state", - "icon_state":"t35stock_open", - "blend_mode":"overlay" - } - ], - "t35stock_open_a":[ - { - "type":"hyperscale", - "icon_state":"t35stock_color" - }, - { - "type":"icon_state", - "icon_state":"t35stock_open_a", - "blend_mode":"overlay" - } - ] -} diff --git a/code/datums/greyscale/json_configs/gun.json b/code/datums/greyscale/json_configs/gun.json deleted file mode 100644 index f36537ef47a..00000000000 --- a/code/datums/greyscale/json_configs/gun.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "loaded":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"loaded", - "blend_mode":"overlay" - } - ], - "loaded_fire":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"fire", - "blend_mode":"overlay" - } - ], - "unloaded":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"unloaded", - "blend_mode":"overlay" - } - ], - "belt":[ - { - "type":"hyperscale", - "icon_state":"belt_color" - }, - { - "type":"icon_state", - "icon_state":"belt_no_color", - "blend_mode":"overlay" - } - ], - "loaded_l":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"linked", - "blend_mode":"overlay" - } - ], - "loaded_a":[ - { - "type":"hyperscale", - "icon_state":"colored_a" - }, - { - "type":"icon_state", - "icon_state":"loaded_a", - "blend_mode":"overlay" - } - ], - "unloaded_a":[ - { - "type":"hyperscale", - "icon_state":"colored_a" - }, - { - "type":"icon_state", - "icon_state":"unloaded_a", - "blend_mode":"overlay" - } - ] -} diff --git a/code/datums/greyscale/json_configs/gun_fire.json b/code/datums/greyscale/json_configs/gun_fire.json deleted file mode 100644 index af62066e45a..00000000000 --- a/code/datums/greyscale/json_configs/gun_fire.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "loaded":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"loaded", - "blend_mode":"overlay" - } - ], - "loaded_fire":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"fire", - "blend_mode":"overlay" - } - ], - "unloaded":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"unloaded", - "blend_mode":"overlay" - } - ] -} diff --git a/code/datums/greyscale/json_configs/gun_hands.json b/code/datums/greyscale/json_configs/gun_hands.json deleted file mode 100644 index 9cdfc6e047a..00000000000 --- a/code/datums/greyscale/json_configs/gun_hands.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "loaded":[ - { - "type":"hyperscale", - "icon_state":"color" - }, - { - "type":"icon_state", - "icon_state":"no_color", - "blend_mode":"overlay" - } - ], - "loaded_w":[ - { - "type":"hyperscale", - "icon_state":"color_w" - }, - { - "type":"icon_state", - "icon_state":"no_color_w", - "blend_mode":"overlay" - } - ] -} diff --git a/code/datums/greyscale/json_configs/gun_mob.json b/code/datums/greyscale/json_configs/gun_mob.json deleted file mode 100644 index ec509495346..00000000000 --- a/code/datums/greyscale/json_configs/gun_mob.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "loaded":[ - { - "type":"hyperscale", - "icon_state":"color" - }, - { - "type":"icon_state", - "icon_state":"no_color", - "blend_mode":"overlay" - } - ] -} diff --git a/code/datums/greyscale/json_configs/gun_revolver.json b/code/datums/greyscale/json_configs/gun_revolver.json deleted file mode 100644 index 68e4f0c4441..00000000000 --- a/code/datums/greyscale/json_configs/gun_revolver.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "loaded":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"loaded", - "blend_mode":"overlay" - } - ], - "unloaded":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"unloaded", - "blend_mode":"overlay" - } - - ], - "open":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"open", - "blend_mode":"overlay" - } - ], - "belt":[ - { - "type":"hyperscale", - "icon_state":"belt_color" - }, - { - "type":"icon_state", - "icon_state":"belt_no_color", - "blend_mode":"overlay" - } - ] -} diff --git a/code/datums/greyscale/json_configs/gun_shotgun.json b/code/datums/greyscale/json_configs/gun_shotgun.json deleted file mode 100644 index 5a52f581fce..00000000000 --- a/code/datums/greyscale/json_configs/gun_shotgun.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "loaded":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"loaded", - "blend_mode":"overlay" - } - ], - "unloaded":[ - { - "type":"hyperscale", - "icon_state":"colored_unloaded" - }, - { - "type":"icon_state", - "icon_state":"unloaded", - "blend_mode":"overlay" - } - ], - "unracked":[ - { - "type":"hyperscale", - "icon_state":"colored" - }, - { - "type":"icon_state", - "icon_state":"unprimed", - "blend_mode":"overlay" - } - ], - "pump":[ - { - "type":"hyperscale", - "icon_state":"colored_pump" - }, - { - "type":"icon_state", - "icon_state":"pump", - "blend_mode":"overlay" - } - ] -} diff --git a/code/game/objects/items/cosmetics.dm b/code/game/objects/items/cosmetics.dm index 6dc713c188a..34f5077f0e6 100644 --- a/code/game/objects/items/cosmetics.dm +++ b/code/game/objects/items/cosmetics.dm @@ -4,8 +4,8 @@ desc = "A kit designed for customizing various pieces of armor and clothing. Comes with facepaint!" icon = 'icons/obj/items/cosmetics.dmi' icon_state = "camo" - var/colour = "green" w_class = WEIGHT_CLASS_TINY + var/colour = "green" var/uses = 100 /obj/item/facepaint/green @@ -46,22 +46,21 @@ return if(H == user) paint_face(H, user) - return 1 + return TRUE else to_chat(user, span_notice("You attempt to apply [src] on [H]...")) to_chat(H, span_notice("[user] is trying to apply [src] on your face...")) - if(tgui_alert(H, "Will you allow [user] to paint your face?", null, list("Sure","No")) == "Sure") - if( user && loc == user && (user in range(1,H)) ) //Have to be close and hold the thing. - paint_face(H, user) - return 1 + if(tgui_alert(H, "Will you allow [user] to paint your face?", null, list("Sure","No")) != "Sure") + return + if(user && loc == user && (user in range(1, H))) //Have to be close and hold the thing. + paint_face(H, user) + return TRUE to_chat(user, span_warning("Foiled!")) - /obj/item/facepaint/proc/paint_face(mob/living/carbon/human/H, mob/user) if(!H || !user) return //In case they're passed as null. - user.visible_message(span_notice("[user] carefully applies [src] on [H]'s face."), \ - span_notice("You apply [src].")) + user.visible_message(span_notice("[user] carefully applies [src] on [H]'s face."), span_notice("You apply [src].")) H.lip_style = colour H.alpha = max(0, initial(H.alpha) - 1) // decreases your alpha by 1 H.update_body() diff --git a/code/game/objects/items/reagent_containers/pill.dm b/code/game/objects/items/reagent_containers/pill.dm index c9ec3fa405d..1f82d994d15 100644 --- a/code/game/objects/items/reagent_containers/pill.dm +++ b/code/game/objects/items/reagent_containers/pill.dm @@ -14,8 +14,9 @@ /obj/item/reagent_containers/pill/Initialize(mapload) . = ..() - if(icon_state == "pill1") - icon_state = pill_id ? GLOB.randomized_pill_icons[pill_id] : pick(GLOB.randomized_pill_icons) + if(icon_state != "pill1") + return + icon_state = pill_id ? GLOB.randomized_pill_icons[pill_id] : pick(GLOB.randomized_pill_icons) /obj/item/reagent_containers/pill/attack_self(mob/user) . = ..() diff --git a/code/game/objects/items/storage/firstaid.dm b/code/game/objects/items/storage/firstaid.dm index bd6d20a34dc..18916cef271 100644 --- a/code/game/objects/items/storage/firstaid.dm +++ b/code/game/objects/items/storage/firstaid.dm @@ -16,6 +16,7 @@ slot_r_hand_str = 'icons/mob/inhands/equipment/medkits_right.dmi', ) icon_state = "firstaid" + base_icon_state = "firstaid" use_sound = 'sound/effects/toolbox.ogg' w_class = WEIGHT_CLASS_BULKY throw_speed = 2 @@ -25,38 +26,28 @@ /obj/item/explosive/grenade, ) var/empty = FALSE //whether the kit starts empty - var/icon_full //icon state to use when kit is full - -/obj/item/storage/firstaid/Initialize(mapload, ...) - . = ..() - icon_full = icon_state - if(empty) - icon_state = icon_state += "_empty" - else - fill_firstaid_kit() - /obj/item/storage/firstaid/update_icon_state() . = ..() if(!length(contents)) icon_state = icon_state += "_empty" else - icon_state = icon_full - - -//to fill medkits with stuff when spawned -/obj/item/storage/firstaid/proc/fill_firstaid_kit() - return + icon_state = base_icon_state +/obj/item/storage/firstaid/PopulateContents() + if(empty) + return + new /obj/item/healthanalyzer(src) /obj/item/storage/firstaid/fire name = "fire first-aid kit" desc = "It's an emergency medical kit for when the toxins lab -spontaneously- burns down." icon_state = "firefirstaid" + base_icon_state = "firefirstaid" item_state = "firefirstaid" -/obj/item/storage/firstaid/fire/fill_firstaid_kit() - new /obj/item/healthanalyzer(src) +/obj/item/storage/firstaid/fire/PopulateContents() + . = ..() new /obj/item/storage/pill_bottle/kelotane(src) new /obj/item/storage/pill_bottle/tramadol(src) new /obj/item/stack/medical/heal_pack/advanced/burn_pack(src) @@ -64,13 +55,13 @@ new /obj/item/storage/pill_bottle/packet/leporazine(src) new /obj/item/storage/syringe_case/burn(src) - /obj/item/storage/firstaid/regular icon_state = "firstaid" + base_icon_state = "firstaid" item_state = "firstaid" -/obj/item/storage/firstaid/regular/fill_firstaid_kit() - new /obj/item/healthanalyzer(src) +/obj/item/storage/firstaid/regular/PopulateContents() + . = ..() new /obj/item/stack/medical/heal_pack/gauze(src) new /obj/item/stack/medical/heal_pack/ointment(src) new /obj/item/reagent_containers/hypospray/autoinjector/combat(src) @@ -78,30 +69,29 @@ new /obj/item/reagent_containers/hypospray/autoinjector/tramadol(src) new /obj/item/stack/medical/splint(src) - /obj/item/storage/firstaid/toxin name = "toxin first aid" desc = "Used to treat when you have a high amount of toxins in your body." icon_state = "antitoxfirstaid" + base_icon_state = "antitoxfirstaid" item_state = "antitoxfirstaid" -/obj/item/storage/firstaid/toxin/fill_firstaid_kit() - new /obj/item/healthanalyzer(src) +/obj/item/storage/firstaid/toxin/PopulateContents() + . = ..() new /obj/item/storage/pill_bottle/dylovene(src) -// new /obj/item/storage/pill_bottle/packet/ryetalyn(src) new /obj/item/reagent_containers/hypospray/autoinjector/hypervene(src) new /obj/item/reagent_containers/hypospray/autoinjector/hypervene(src) new /obj/item/storage/syringe_case/tox(src) - /obj/item/storage/firstaid/o2 name = "oxygen deprivation first aid" desc = "A box full of oxygen goodies." icon_state = "o2firstaid" + base_icon_state = "o2firstaid" item_state = "o2firstaid" -/obj/item/storage/firstaid/o2/fill_firstaid_kit() - new /obj/item/healthanalyzer(src) +/obj/item/storage/firstaid/o2/PopulateContents() + . = ..() new /obj/item/storage/pill_bottle/dexalin(src) new /obj/item/storage/pill_bottle/inaprovaline(src) new /obj/item/reagent_containers/hypospray/autoinjector/dexalinplus(src) @@ -109,15 +99,15 @@ new /obj/item/reagent_containers/hypospray/autoinjector/dexalinplus(src) new /obj/item/storage/syringe_case/oxy(src) - /obj/item/storage/firstaid/adv name = "advanced first-aid kit" desc = "Contains advanced medical treatments." icon_state = "advfirstaid" + base_icon_state = "advfirstaid" item_state = "advfirstaid" -/obj/item/storage/firstaid/adv/fill_firstaid_kit() - new /obj/item/healthanalyzer(src) +/obj/item/storage/firstaid/adv/PopulateContents() + . = ..() new /obj/item/stack/medical/heal_pack/advanced/bruise_pack(src) new /obj/item/stack/medical/heal_pack/advanced/burn_pack(src) new /obj/item/storage/pill_bottle/bicaridine(src) @@ -125,15 +115,15 @@ new /obj/item/storage/pill_bottle/tramadol(src) new /obj/item/stack/medical/splint(src) - /obj/item/storage/firstaid/rad name = "radiation first-aid kit" desc = "Contains treatment for radiation exposure" icon_state = "purplefirstaid" + base_icon_state = "purplefirstaid" item_state = "purplefirstaid" -/obj/item/storage/firstaid/rad/fill_firstaid_kit() - new /obj/item/healthanalyzer(src) +/obj/item/storage/firstaid/rad/PopulateContents() + . = ..() new /obj/item/storage/pill_bottle/dylovene(src) new /obj/item/reagent_containers/hypospray/autoinjector/combat(src) new /obj/item/reagent_containers/hypospray/autoinjector/tricordrazine(src) @@ -141,7 +131,6 @@ new /obj/item/reagent_containers/hypospray/autoinjector/bicaridine(src) new /obj/item/reagent_containers/hypospray/autoinjector/bicaridine(src) - /* * Syringe Case */ @@ -159,9 +148,11 @@ /obj/item/reagent_containers/syringe, ) -/obj/item/storage/syringe_case/empty/Initialize(mapload, ...) - . = ..() +/obj/item/storage/syringe_case/PopulateContents() new /obj/item/reagent_containers/syringe(src) + +/obj/item/storage/syringe_case/empty/PopulateContents() + . = ..() new /obj/item/reagent_containers/glass/bottle/empty(src) new /obj/item/reagent_containers/glass/bottle/empty(src) @@ -171,7 +162,6 @@ /obj/item/storage/syringe_case/regular/PopulateContents() . = ..() - new /obj/item/reagent_containers/syringe(src) new /obj/item/reagent_containers/glass/bottle/inaprovaline(src) new /obj/item/reagent_containers/glass/bottle/tricordrazine(src) @@ -181,7 +171,6 @@ /obj/item/storage/syringe_case/burn/PopulateContents() . = ..() - new /obj/item/reagent_containers/syringe(src) new /obj/item/reagent_containers/glass/bottle/kelotane(src) new /obj/item/reagent_containers/glass/bottle/oxycodone(src) @@ -191,7 +180,6 @@ /obj/item/storage/syringe_case/tox/PopulateContents() . = ..() - new /obj/item/reagent_containers/syringe(src) new /obj/item/reagent_containers/glass/bottle/dylovene(src) new /obj/item/reagent_containers/glass/bottle/hypervene(src) @@ -201,7 +189,6 @@ /obj/item/storage/syringe_case/oxy/PopulateContents() . = ..() - new /obj/item/reagent_containers/syringe(src) new /obj/item/reagent_containers/glass/bottle/inaprovaline(src) new /obj/item/reagent_containers/glass/bottle/dexalin(src) @@ -211,7 +198,6 @@ /obj/item/storage/syringe_case/meralyne/PopulateContents() . = ..() - new /obj/item/reagent_containers/syringe(src) new /obj/item/reagent_containers/glass/bottle/meralyne(src) new /obj/item/reagent_containers/glass/bottle/meralyne(src) @@ -221,7 +207,6 @@ /obj/item/storage/syringe_case/dermaline/PopulateContents() . = ..() - new /obj/item/reagent_containers/syringe(src) new /obj/item/reagent_containers/glass/bottle/dermaline(src) new /obj/item/reagent_containers/glass/bottle/dermaline(src) @@ -231,7 +216,6 @@ /obj/item/storage/syringe_case/meraderm/PopulateContents() . = ..() - new /obj/item/reagent_containers/syringe(src) new /obj/item/reagent_containers/glass/bottle/meraderm(src) new /obj/item/reagent_containers/glass/bottle/meraderm(src) @@ -241,7 +225,6 @@ /obj/item/storage/syringe_case/nanoblood/PopulateContents() . = ..() - new /obj/item/reagent_containers/syringe(src) new /obj/item/reagent_containers/glass/bottle/nanoblood(src) new /obj/item/reagent_containers/glass/bottle/nanoblood(src) @@ -251,16 +234,13 @@ /obj/item/storage/syringe_case/tricordrazine/PopulateContents() . = ..() - new /obj/item/reagent_containers/syringe(src) new /obj/item/reagent_containers/glass/bottle/tricordrazine(src) new /obj/item/reagent_containers/glass/bottle/tricordrazine(src) - /* * Pill Bottles */ - /obj/item/storage/pill_bottle name = "pill bottle" desc = "It's an airtight container for storing medication." @@ -284,18 +264,17 @@ max_storage_space = 16 greyscale_config = /datum/greyscale_config/pillbottle greyscale_colors = "#d9cd07#f2cdbb" //default colors + refill_types = list(/obj/item/storage/pill_bottle) + refill_sound = 'sound/items/pills.ogg' var/pill_type_to_fill //type of pill to use to fill in the bottle in New() /// Short description in overlay var/description_overlay = "" - refill_types = list(/obj/item/storage/pill_bottle) - refill_sound = 'sound/items/pills.ogg' -/obj/item/storage/pill_bottle/Initialize(mapload, ...) - . = ..() - if(pill_type_to_fill) - for(var/i in 1 to max_storage_space) - new pill_type_to_fill(src) - update_icon() +/obj/item/storage/pill_bottle/PopulateContents() + if(!pill_type_to_fill) + return + for(var/i in 1 to max_storage_space) + new pill_type_to_fill(src) /obj/item/storage/pill_bottle/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/hypospray)) @@ -613,9 +592,7 @@ ) var/is_open = FALSE -/obj/item/storage/ai2/Initialize(mapload, ...) - . = ..() - +/obj/item/storage/ai2/PopulateContents() new /obj/item/storage/pill_bottle/penal/meralyne(src) new /obj/item/storage/pill_bottle/penal/dermaline(src) new /obj/item/storage/pill_bottle/penal/hyronalin(src) @@ -625,8 +602,6 @@ new /obj/item/reagent_containers/hypospray/autoinjector/pen/inaprovaline(src) new /obj/item/reagent_containers/hypospray/autoinjector/pen/hypervene(src) - update_icon() - /obj/item/storage/ai2/update_icon_state() cut_overlays() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm index 07777c888d3..580a09e09b8 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm @@ -59,7 +59,6 @@ icon_off = "secure_closed_medical_white" /obj/structure/closet/secure_closet/medical3/PopulateContents() - . = ..() new /obj/item/clothing/glasses/hud/health(src) new /obj/item/storage/belt/lifesaver/full(src) new /obj/item/storage/backpack/marine/satchel(src) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index ba783d10d62..d5c5f485530 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -108,7 +108,7 @@ stack_trace("Incorrect turf deletion") changing_turf = FALSE if(force) - ..() + . = ..() //this will completely wipe turf state var/turf/B = new world.turf(src) for(var/A in B.contents) @@ -120,7 +120,7 @@ DISABLE_BITFIELD(flags_atom, INITIALIZED) soft_armor = null hard_armor = null - ..() + . = ..() return QDEL_HINT_IWILLGC /// WARNING WARNING diff --git a/code/modules/lighting/lighting_turf.dm b/code/modules/lighting/lighting_turf.dm index 71107ca43df..0b610d8aedd 100644 --- a/code/modules/lighting/lighting_turf.dm +++ b/code/modules/lighting/lighting_turf.dm @@ -8,10 +8,12 @@ var/tmp/list/atom/movable/lighting_mask/hybrid_lights_affecting /turf/Destroy(force) - if(hybrid_lights_affecting) - for(var/atom/movable/lighting_mask/mask AS in hybrid_lights_affecting) - LAZYREMOVE(mask.affecting_turfs, src) - hybrid_lights_affecting.Cut() + if(!hybrid_lights_affecting) + return ..() + + for(var/atom/movable/lighting_mask/mask AS in hybrid_lights_affecting) + LAZYREMOVE(mask.affecting_turfs, src) + hybrid_lights_affecting.Cut() return ..() /// Causes any affecting light sources to be queued for a visibility update, for example a door got opened. diff --git a/code/modules/projectiles/gun_system.dm b/code/modules/projectiles/gun_system.dm index 41798b51fe2..30438dd3199 100644 --- a/code/modules/projectiles/gun_system.dm +++ b/code/modules/projectiles/gun_system.dm @@ -520,22 +520,15 @@ . = ..() var/real_icon = current_skin ? current_skin : base_gun_icon if(CHECK_BITFIELD(reciever_flags, AMMO_RECIEVER_TOGGLES_OPEN) && !CHECK_BITFIELD(reciever_flags, AMMO_RECIEVER_CLOSED)) - icon_state = !greyscale_config ? real_icon + "_o" : GUN_ICONSTATE_OPEN + icon_state = real_icon + "_o" else if(CHECK_BITFIELD(reciever_flags, AMMO_RECIEVER_REQUIRES_UNIQUE_ACTION) && !in_chamber && length(chamber_items)) - icon_state = !greyscale_config ? real_icon + "_u" : GUN_ICONSTATE_UNRACKED + icon_state = real_icon + "_u" else if((!length(chamber_items) && max_chamber_items) || (!rounds && !max_chamber_items)) - icon_state = !greyscale_config ? real_icon + "_e" : GUN_ICONSTATE_UNLOADED + icon_state = real_icon + "_e" else if(current_chamber_position <= length(chamber_items) && chamber_items[current_chamber_position] && chamber_items[current_chamber_position].loc != src) icon_state = real_icon + "_l" else - icon_state = !greyscale_config ? real_icon : GUN_ICONSTATE_LOADED - -/obj/item/weapon/gun/color_item(obj/item/facepaint/paint, mob/user) - . = ..() - if(!ishuman(user)) - return - var/mob/living/carbon/human/human = user - human.regenerate_icons() + icon_state = real_icon //manages the overlays for the gun - separate from attachment overlays /obj/item/weapon/gun/update_overlays()