diff --git a/code/__DEFINES/colours.dm b/code/__DEFINES/colours.dm index 93d1e082c66a..309dd7bcff11 100644 --- a/code/__DEFINES/colours.dm +++ b/code/__DEFINES/colours.dm @@ -112,6 +112,8 @@ #define LIGHT_COLOR_HOLY_MAGIC "#FFF743" /// deep crimson #define LIGHT_COLOR_BLOOD_MAGIC "#D00000" +/// Warm red color rgb(250, 66, 66) +#define LIGHT_COLOR_RED "#ff3b3b" /* These ones aren't a direct color like the ones above, because nothing would fit */ /// Warm orange color, leaning strongly towards yellow. rgb(250, 160, 25) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index d8bf3d9d8f79..7fd82aeb9c10 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -4,6 +4,7 @@ mouse_drag_pointer = MOUSE_ACTIVE_POINTER layer = ITEM_LAYER light_system = MOVABLE_LIGHT + blocks_emissive = EMISSIVE_BLOCK_GENERIC /// this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite var/image/blood_overlay = null var/randpixel = 6 diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 77da397b7b0a..50057cc746a4 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -5,6 +5,7 @@ icon_state = "closed" density = TRUE layer = BELOW_OBJ_LAYER + blocks_emissive = EMISSIVE_BLOCK_GENERIC var/icon_closed = "closed" var/icon_opened = "open" var/opened = 0 diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index e44106d90abb..0bb446bf5f02 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -1,6 +1,7 @@ /mob/living/carbon/human light_system = MOVABLE_LIGHT rotate_on_lying = TRUE + blocks_emissive = EMISSIVE_BLOCK_UNIQUE //Hair color and style var/r_hair = 0 var/g_hair = 0 diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 297ff47c731c..c04a745ea126 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -3,6 +3,7 @@ layer = MOB_LAYER animate_movement = 2 rebounds = TRUE + blocks_emissive = EMISSIVE_BLOCK_GENERIC var/mob_flags = NO_FLAGS var/datum/mind/mind diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 21ff73ab859e..8ff67fa4b91c 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -118,6 +118,8 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( var/printout = FALSE power_machine = TRUE + light_range = 1 + light_power = 0.5 appearance_flags = TILE_BOUND @@ -426,6 +428,8 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( //2 if we need to update the overlays if(!update) return + + set_light(0) if(update & 1) //Updating the icon state if(update_state & UPSTATE_ALLGOOD) @@ -457,12 +461,32 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( overlays = 0 if(!(stat & (BROKEN|MAINT)) && update_state & UPSTATE_ALLGOOD) - overlays += status_overlays_lock[locked + 1] - overlays += status_overlays_charging[charging + 1] + var/image/_lock = status_overlays_lock[locked + 1] + var/image/_charging = status_overlays_charging[charging + 1] + var/image/_equipment = status_overlays_equipment[equipment + 1] + var/image/_lighting = status_overlays_lighting[lighting + 1] + var/image/_environ = status_overlays_environ[environ + 1] + + overlays += emissive_appearance(_lock.icon, _lock.icon_state) + overlays += mutable_appearance(_lock.icon, _lock.icon_state) + overlays += emissive_appearance(_charging.icon, _charging.icon_state) + overlays += mutable_appearance(_charging.icon, _charging.icon_state) if(operating) - overlays += status_overlays_equipment[equipment + 1] - overlays += status_overlays_lighting[lighting + 1] - overlays += status_overlays_environ[environ + 1] + overlays += emissive_appearance(_equipment.icon, _equipment.icon_state) + overlays += mutable_appearance(_equipment.icon, _equipment.icon_state) + overlays += emissive_appearance(_lighting.icon, _lighting.icon_state) + overlays += mutable_appearance(_lighting.icon, _lighting.icon_state) + overlays += emissive_appearance(_environ.icon, _environ.icon_state) + overlays += mutable_appearance(_environ.icon, _environ.icon_state) + + switch(charging) + if(APC_NOT_CHARGING) + set_light_color(LIGHT_COLOR_RED) + if(APC_CHARGING) + set_light_color(LIGHT_COLOR_BLUE) + if(APC_FULLY_CHARGED) + set_light_color(LIGHT_COLOR_GREEN) + set_light(initial(light_range)) /obj/structure/machinery/power/apc/proc/check_updates() diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index c78be6fa57ec..b7f29da67fe7 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -6,6 +6,7 @@ anchored = TRUE animate_movement = 1 can_buckle = TRUE + blocks_emissive = EMISSIVE_BLOCK_GENERIC // The mobs that are in each position/seat of the vehicle var/list/mob/seats = list(