diff --git a/_maps/RandomRuins/SpaceRuins/shuttlerelic.dmm b/_maps/RandomRuins/SpaceRuins/shuttlerelic.dmm index 2d8e721f93e..ff04fe2c4eb 100644 --- a/_maps/RandomRuins/SpaceRuins/shuttlerelic.dmm +++ b/_maps/RandomRuins/SpaceRuins/shuttlerelic.dmm @@ -33,7 +33,8 @@ "i" = ( /obj/structure/closet{ icon_state = "oldcloset"; - name = "strange closet" + name = "strange closet"; + enable_door_overlay = 0 }, /turf/open/floor/oldshuttle, /area/ruin/powered) diff --git a/code/controllers/subsystem/overlays.dm b/code/controllers/subsystem/overlays.dm index 7e36b865df1..e99fe9e912b 100644 --- a/code/controllers/subsystem/overlays.dm +++ b/code/controllers/subsystem/overlays.dm @@ -64,7 +64,7 @@ SUBSYSTEM_DEF(overlays) stringbro.icon = icon stringbro.icon_state = iconstate return stringbro.appearance - + /proc/icon2appearance(icon) var/static/image/iconbro = new() iconbro.icon = icon @@ -79,6 +79,14 @@ SUBSYSTEM_DEF(overlays) if(!overlay) continue if (istext(overlay)) +#ifdef UNIT_TESTS + // This is too expensive to run normally but running it during CI is a good test + var/list/icon_states_available = icon_states(icon) + if(!(overlay in icon_states_available)) + var/icon_file = "[icon]" || "Unknown Generated Icon" + stack_trace("Invalid overlay: Icon object '[icon_file]' [REF(icon)] used in '[src]' [type] is missing icon state [overlay].") + continue +#endif new_overlays += iconstate2appearance(icon, overlay) else if(isicon(overlay)) new_overlays += icon2appearance(overlay) diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index a3423724680..da0bbdc2a3f 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -252,6 +252,7 @@ desc = "Used for watching an empty arena." icon = 'icons/obj/stationobjs.dmi' icon_state = "telescreen" + icon_keyboard = null layer = SIGN_LAYER network = list("thunder") density = FALSE diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 146a2372eb9..44becda2de4 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -16,6 +16,7 @@ GLOBAL_LIST_EMPTY(cryopod_computers) desc = "An interface between crew and the cryogenic storage oversight systems." icon = 'modular_skyrat/modules/cryosleep/icons/cryogenics.dmi' //SKYRAT EDIT CHANGE - ORIGINAL: 'icons/obj/machines/cryopod.dmi' icon_state = "cellconsole_1" + icon_keyboard = null // circuit = /obj/item/circuitboard/cryopodcontrol density = FALSE interaction_flags_machine = INTERACT_MACHINE_OFFLINE diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index 9f0693df664..a33edea27d2 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -765,7 +765,8 @@ GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window()) . = ..() if(has_ammobar) var/ratio = CEILING((matter / max_matter) * ammo_sections, 1) - . += "[icon_state]_charge[ratio]" + if(ratio > 0) + . += "[icon_state]_charge[ratio]" /obj/item/construction/rcd/Initialize() . = ..() diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 7defed9e935..b2b38a54261 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -26,6 +26,16 @@ var/obj/item/stock_parts/cell/high/cell var/combat = FALSE //if true, revive through hardsuits, allow for combat shocking var/cooldown_duration = 5 SECONDS//how long does it take to recharge + /// The icon state for the paddle overlay, not applied if null + var/paddle_state = "defibunit-paddles" + /// The icon state for the powered on overlay, not applied if null + var/powered_state = "defibunit-powered" + /// The icon state for the charge bar overlay, not applied if null + var/charge_state = "defibunit-charge" + /// The icon state for the missing cell overlay, not applied if null + var/nocell_state = "defibunit-nocell" + /// The icon state for the emagged overlay, not applied if null + var/emagged_state = "defibunit-emagged" /obj/item/defibrillator/get_cell() return cell @@ -74,18 +84,18 @@ /obj/item/defibrillator/update_overlays() . = ..() - if(!on) - . += "[initial(icon_state)]-paddles" - if(powered) - . += "[initial(icon_state)]-powered" - if(!QDELETED(cell)) + if(!on && paddle_state) + . += paddle_state + if(powered && powered_state) + . += powered_state + if(!QDELETED(cell) && charge_state) var/ratio = cell.charge / cell.maxcharge ratio = CEILING(ratio*4, 1) * 25 - . += "[initial(icon_state)]-charge[ratio]" - if(!cell) - . += "[initial(icon_state)]-nocell" - if(!safety) - . += "[initial(icon_state)]-emagged" + . += "[charge_state][ratio]" + if(!cell && nocell_state) + . += "[nocell_state]" + if(!safety && emagged_state) + . += emagged_state /obj/item/defibrillator/CheckParts(list/parts_list) ..() @@ -257,6 +267,11 @@ worn_icon_state = "defibcompact" w_class = WEIGHT_CLASS_NORMAL slot_flags = ITEM_SLOT_BELT + paddle_state = "defibcompact-paddles" + powered_state = "defibcompact-powered" + charge_state = "defibcompact-charge" + nocell_state = "defibcompact-nocell" + emagged_state = "defibcompact-emagged" /obj/item/defibrillator/compact/item_action_slot_check(slot, mob/user) if(slot == user.getBeltSlot()) @@ -277,6 +292,9 @@ safety = FALSE cooldown_duration = 2.5 SECONDS paddle_type = /obj/item/shockpaddles/syndicate + paddle_state = "defibcombat-paddles" + powered_state = null + emagged_state = null /obj/item/defibrillator/compact/combat/loaded/Initialize() . = ..() @@ -295,6 +313,7 @@ inhand_icon_state = "defibnt" worn_icon_state = "defibnt" paddle_type = /obj/item/shockpaddles/syndicate/nanotrasen + paddle_state = "defibnt-paddles" //paddles diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index ebf77b222aa..5d0b4f12e58 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -714,6 +714,7 @@ pickup_sound = 'sound/items/handling/matchbox_pickup.ogg' custom_price = PAYCHECK_ASSISTANT * 0.4 base_icon_state = "matchbox" + illustration = null /obj/item/storage/box/matches/ComponentInitialize() . = ..() diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 33cef809950..deeb48bcdcf 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -12,6 +12,10 @@ armor = list(MELEE = 20, BULLET = 10, LASER = 10, ENERGY = 0, BOMB = 10, BIO = 0, RAD = 0, FIRE = 70, ACID = 60) blocks_emissive = EMISSIVE_BLOCK_UNIQUE + /// Controls whether a door overlay should be applied using the icon_door value as the icon state + var/enable_door_overlay = TRUE + var/has_opened_overlay = TRUE + var/has_closed_overlay = TRUE var/icon_door = null var/icon_door_override = FALSE //override to have open overlay use icon different to its base's var/secure = FALSE //secure locker or not, also used if overriding a non-secure locker with a secure door overlay to add fancy lights @@ -80,14 +84,18 @@ /obj/structure/closet/proc/closet_update_overlays(list/new_overlays) . = new_overlays + if(enable_door_overlay) + if(opened && has_opened_overlay) + . += "[icon_door_override ? icon_door : icon_state]_open" + var/mutable_appearance/door_blocker = mutable_appearance(icon, "[icon_door || icon_state]_open", plane = EMISSIVE_PLANE) + door_blocker.color = GLOB.em_block_color + . += door_blocker // If we don't do this the door doesn't block emissives and it looks weird. + else if(has_closed_overlay) + . += "[icon_door || icon_state]_door" + if(opened) - . += "[icon_door_override ? icon_door : icon_state]_open" - var/mutable_appearance/door_blocker = mutable_appearance(icon, "[icon_door || icon_state]_open", plane = EMISSIVE_PLANE) - door_blocker.color = GLOB.em_block_color - . += door_blocker // If we don't do this the door doesn't block emissives and it looks weird. return - . += mutable_appearance(icon, "[icon_door || icon_state]_door") if(welded) . += icon_welded diff --git a/code/game/objects/structures/crates_lockers/closets/bodybag.dm b/code/game/objects/structures/crates_lockers/closets/bodybag.dm index a738699b026..876c1ea81bc 100644 --- a/code/game/objects/structures/crates_lockers/closets/bodybag.dm +++ b/code/game/objects/structures/crates_lockers/closets/bodybag.dm @@ -16,6 +16,7 @@ anchorable = FALSE mouse_drag_pointer = MOUSE_ACTIVE_POINTER drag_slowdown = 0 + has_closed_overlay = FALSE var/foldedbag_path = /obj/item/bodybag var/obj/item/bodybag/foldedbag_instance = null var/tagged = FALSE // so closet code knows to put the tag overlay back diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm index 2c38cbeeb21..1ecf762c69e 100644 --- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm +++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm @@ -16,6 +16,7 @@ close_sound = 'sound/machines/cardboard_box.ogg' open_sound_volume = 35 close_sound_volume = 35 + enable_door_overlay = FALSE var/move_speed_multiplier = 1 var/move_delay = FALSE var/egged = 0 diff --git a/code/game/objects/structures/showcase.dm b/code/game/objects/structures/showcase.dm index 7172c8ddfb8..a817dff093d 100644 --- a/code/game/objects/structures/showcase.dm +++ b/code/game/objects/structures/showcase.dm @@ -28,10 +28,10 @@ icon = 'icons/obj/computer.dmi' icon_state = "computer" -/obj/structure/showcase/fakesec/Initialize() +/obj/structure/showcase/fakesec/update_overlays() . = ..() - add_overlay("security") - add_overlay("security_key") + . += "security" + . += "security_key" /obj/structure/showcase/horrific_experiment name = "horrific experiment" diff --git a/code/modules/antagonists/abductor/machinery/camera.dm b/code/modules/antagonists/abductor/machinery/camera.dm index 6c14c277b72..252d2dceabc 100644 --- a/code/modules/antagonists/abductor/machinery/camera.dm +++ b/code/modules/antagonists/abductor/machinery/camera.dm @@ -13,6 +13,7 @@ icon = 'icons/obj/abductor.dmi' icon_state = "camera" + icon_keyboard = null resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/machinery/computer/camera_advanced/abductor/CreateEye() diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index b1ea07b9380..cb3ea7e37dd 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -24,10 +24,6 @@ ///Directly relates to the 'knockdown' duration. Lowered by armor (i.e. helmets) var/bottle_knockdown_duration = 1.3 SECONDS -/obj/item/reagent_containers/food/drinks/bottle/update_overlays() - . = ..() - . += "[initial(icon_state)]shine" - /obj/item/reagent_containers/food/drinks/bottle/small name = "small glass bottle" desc = "This blank bottle is unyieldingly anonymous, offering no clues to its contents." diff --git a/code/modules/mining/aux_base.dm b/code/modules/mining/aux_base.dm index c7adb9851e7..dce4174b11d 100644 --- a/code/modules/mining/aux_base.dm +++ b/code/modules/mining/aux_base.dm @@ -16,6 +16,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also deployed." icon = 'icons/obj/terminals.dmi' icon_state = "dorm_available" + icon_keyboard = null req_one_access = list(ACCESS_AUX_BASE, ACCESS_HEADS) circuit = /obj/item/circuitboard/computer/auxiliary_base /// Shuttle ID of the base diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 87c54a8686e..7118ad54089 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -747,6 +747,7 @@ SKYRAT REMOVAL EDIT END*/ name = "quantum entanglement stasis warp field" desc = "You can hardly comprehend this thing... which is why you can't see it." icon_state = null //This shouldn't even be visible, so if it DOES show up, at least nobody will notice + enable_door_overlay = FALSE //For obvious reasons density = TRUE anchored = TRUE resistance_flags = FIRE_PROOF | ACID_PROOF | INDESTRUCTIBLE diff --git a/code/modules/projectiles/guns/ballistic/toy.dm b/code/modules/projectiles/guns/ballistic/toy.dm index 192ee873800..48fd614fe49 100644 --- a/code/modules/projectiles/guns/ballistic/toy.dm +++ b/code/modules/projectiles/guns/ballistic/toy.dm @@ -66,6 +66,7 @@ fire_sound = 'sound/items/syringeproj.ogg' slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_SMALL + gun_flags = NONE /obj/item/gun/ballistic/automatic/c20r/toy //This is the syndicate variant with syndicate firing pin and riot darts. name = "donksoft SMG" diff --git a/code/modules/projectiles/guns/energy/energy_gun.dm b/code/modules/projectiles/guns/energy/energy_gun.dm index 5ac35a2d0f1..988377485f9 100644 --- a/code/modules/projectiles/guns/energy/energy_gun.dm +++ b/code/modules/projectiles/guns/energy/energy_gun.dm @@ -5,7 +5,7 @@ w_class = WEIGHT_CLASS_BULKY inhand_icon_state = null //so the human update icon uses the icon_state instead. ammo_type = list(/obj/item/ammo_casing/energy/disabler, /obj/item/ammo_casing/energy/laser) - modifystate = 1 + modifystate = TRUE can_flashlight = TRUE ammo_x_offset = 3 flight_x_offset = 15 @@ -71,6 +71,7 @@ righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi' cell_type = /obj/item/stock_parts/cell //SKYRAT EDIT ADDITION - GUNSGALORE ammo_type = list(/obj/item/ammo_casing/energy/net, /obj/item/ammo_casing/energy/trap) + modifystate = FALSE w_class = WEIGHT_CLASS_NORMAL can_flashlight = FALSE ammo_x_offset = 1 diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm index 0bf770954b0..2839404720f 100644 --- a/code/modules/reagents/chemistry/machinery/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -7,6 +7,7 @@ density = TRUE icon = 'icons/obj/chemical.dmi' icon_state = "mixer0" + icon_keyboard = null base_icon_state = "mixer" use_power = TRUE idle_power_usage = 20 diff --git a/code/modules/research/nanites/nanite_cloud_controller.dm b/code/modules/research/nanites/nanite_cloud_controller.dm index 4579239f6b6..fcfe181c607 100644 --- a/code/modules/research/nanites/nanite_cloud_controller.dm +++ b/code/modules/research/nanites/nanite_cloud_controller.dm @@ -5,6 +5,7 @@ icon_state = "nanite_cloud_controller" circuit = /obj/item/circuitboard/computer/nanite_cloud_controller icon_screen = "nanite_cloud_controller_screen" + icon_keyboard = null var/obj/item/disk/nanite_program/disk var/list/datum/nanite_cloud_backup/cloud_backups = list() diff --git a/code/modules/shuttle/syndicate.dm b/code/modules/shuttle/syndicate.dm index 94902141ebc..11548ad16de 100644 --- a/code/modules/shuttle/syndicate.dm +++ b/code/modules/shuttle/syndicate.dm @@ -39,6 +39,7 @@ desc = "Controls the drop pod's launch system." icon = 'icons/obj/terminals.dmi' icon_state = "dorm_available" + icon_keyboard = null light_color = LIGHT_COLOR_BLUE req_access = list(ACCESS_SYNDICATE) shuttleId = "steel_rain" diff --git a/icons/obj/defib.dmi b/icons/obj/defib.dmi index 68a1f232114..c376cb5f902 100644 Binary files a/icons/obj/defib.dmi and b/icons/obj/defib.dmi differ diff --git a/icons/obj/guns/energy.dmi b/icons/obj/guns/energy.dmi index 7f5a11ee167..2549e2adbc9 100644 Binary files a/icons/obj/guns/energy.dmi and b/icons/obj/guns/energy.dmi differ