diff --git a/_maps/map_files/Birdshot/birdshot.dmm b/_maps/map_files/Birdshot/birdshot.dmm index a4a6e8345d6..d6ae0288489 100644 --- a/_maps/map_files/Birdshot/birdshot.dmm +++ b/_maps/map_files/Birdshot/birdshot.dmm @@ -69977,7 +69977,7 @@ /obj/effect/turf_decal/siding/brown{ dir = 1 }, -/obj/machinery/incident_display/dual/directional/north, +/obj/machinery/incident_display/bridge/directional/north, /turf/open/floor/iron/smooth, /area/station/command/bridge) "wLd" = ( diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index 36ed6f1f93f..75011169106 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -16232,7 +16232,7 @@ /obj/structure/table/reinforced, /obj/item/paper_bin, /obj/effect/turf_decal/tile/neutral/fourcorners, -/obj/machinery/incident_display/delam/directional/south, +/obj/machinery/incident_display/bridge/directional/south, /turf/open/floor/iron/dark, /area/station/command/bridge) "dXO" = ( diff --git a/_maps/map_files/IceBoxStation/IceBoxStation.dmm b/_maps/map_files/IceBoxStation/IceBoxStation.dmm index c5ddd225cdf..ab3ce10a93e 100644 --- a/_maps/map_files/IceBoxStation/IceBoxStation.dmm +++ b/_maps/map_files/IceBoxStation/IceBoxStation.dmm @@ -1688,10 +1688,6 @@ }, /turf/open/floor/plating, /area/station/science/robotics/lab) -"aAf" = ( -/obj/machinery/incident_display/delam, -/turf/closed/wall/r_wall, -/area/station/command/bridge) "aAi" = ( /obj/structure/window/reinforced/spawner/directional/north, /obj/structure/table/wood/fancy/red, @@ -41645,6 +41641,7 @@ /obj/effect/turf_decal/tile/blue/half/contrasted{ dir = 1 }, +/obj/machinery/incident_display/bridge/directional/north, /turf/open/floor/iron, /area/station/hallway/primary/central) "mDw" = ( @@ -48144,6 +48141,7 @@ "oxe" = ( /obj/machinery/computer/cargo/request, /obj/effect/turf_decal/tile/brown/half/contrasted, +/obj/machinery/incident_display/bridge/directional/north, /turf/open/floor/iron, /area/station/command/bridge) "oxh" = ( @@ -242658,7 +242656,7 @@ xwC utR pAZ bln -aAf +qWZ oxe vmj aqB diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index 4d41b26a817..796751bc80e 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -35009,7 +35009,7 @@ /obj/effect/turf_decal/tile/blue/half/contrasted{ dir = 1 }, -/obj/machinery/incident_display/delam/directional/south, +/obj/machinery/incident_display/bridge/directional/south, /turf/open/floor/iron/dark, /area/station/command/bridge) "mwj" = ( diff --git a/_maps/map_files/NorthStar/north_star.dmm b/_maps/map_files/NorthStar/north_star.dmm index 8f7285e09da..081edcaf677 100644 --- a/_maps/map_files/NorthStar/north_star.dmm +++ b/_maps/map_files/NorthStar/north_star.dmm @@ -42273,7 +42273,7 @@ pixel_x = -22 }, /obj/effect/turf_decal/tile/blue/fourcorners, -/obj/machinery/incident_display/delam/directional/north, +/obj/machinery/incident_display/bridge/directional/north, /turf/open/floor/iron/dark, /area/station/command/bridge) "kWJ" = ( diff --git a/_maps/map_files/tramstation/tramstation.dmm b/_maps/map_files/tramstation/tramstation.dmm index 7df8f7ebb46..f7d2f203ba1 100644 --- a/_maps/map_files/tramstation/tramstation.dmm +++ b/_maps/map_files/tramstation/tramstation.dmm @@ -27279,7 +27279,7 @@ dir = 4 }, /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, -/obj/machinery/incident_display/dual/directional/south, +/obj/machinery/incident_display/tram/directional/south, /turf/open/floor/iron, /area/station/hallway/primary/tram/center) "iOC" = ( @@ -29067,7 +29067,7 @@ /obj/machinery/camera/directional/north{ c_tag = "Command - Bridge North" }, -/obj/machinery/incident_display/dual/directional/north, +/obj/machinery/incident_display/bridge/directional/north, /turf/open/floor/iron, /area/station/command/bridge) "jsW" = ( @@ -31671,6 +31671,7 @@ /obj/effect/spawner/random/vending/snackvend{ pixel_x = -5 }, +/obj/machinery/incident_display/delam/directional/south, /turf/open/floor/iron, /area/station/hallway/primary/tram/center) "kkg" = ( @@ -59126,7 +59127,7 @@ c_tag = "Civilian - Recreational Area North-West" }, /obj/item/toy/plush/lizard_plushie/space/green, -/obj/machinery/incident_display/dual/directional/north, +/obj/machinery/incident_display/tram/directional/north, /turf/open/floor/iron, /area/station/commons/fitness/recreation) "tRo" = ( diff --git a/_maps/map_files/wawastation/wawastation.dmm b/_maps/map_files/wawastation/wawastation.dmm index 771b7f2d6a0..d57ce84f183 100644 --- a/_maps/map_files/wawastation/wawastation.dmm +++ b/_maps/map_files/wawastation/wawastation.dmm @@ -41571,8 +41571,8 @@ /area/station/command/bridge) "oOP" = ( /obj/structure/cable, -/obj/structure/fireaxecabinet/directional/south, /obj/effect/turf_decal/tile/dark_blue/half/contrasted, +/obj/machinery/incident_display/bridge/directional/south, /turf/open/floor/iron, /area/station/command/bridge) "oOR" = ( @@ -62046,6 +62046,7 @@ /obj/effect/turf_decal/tile/dark_blue/half/contrasted{ dir = 4 }, +/obj/structure/fireaxecabinet/directional/east, /turf/open/floor/iron, /area/station/command/bridge) "vQT" = ( diff --git a/_maps/shuttles/pirate_grey.dmm b/_maps/shuttles/pirate_grey.dmm index 22356be732c..db02acbdd48 100644 --- a/_maps/shuttles/pirate_grey.dmm +++ b/_maps/shuttles/pirate_grey.dmm @@ -1495,9 +1495,6 @@ /obj/effect/spawner/random/trash/garbage, /turf/open/floor/plating, /area/shuttle/pirate) -"ZU" = ( -/turf/closed/wall, -/area/shuttle/pirate) (1,1,1) = {" je @@ -1671,7 +1668,7 @@ qm Ti "} (10,1,1) = {" -ZU +Pn Ut kw CH @@ -1686,7 +1683,7 @@ Yj rV Tq uE -ZU +Pn HD "} (11,1,1) = {" @@ -1705,7 +1702,7 @@ wX Oa Tq Lo -ZU +Pn ei "} (12,1,1) = {" @@ -1714,7 +1711,7 @@ sB GE Yj Nu -ZU +Pn am Eq yN @@ -1731,7 +1728,7 @@ HD HD XX vJ -ZU +Pn SB Nm Vw @@ -1743,14 +1740,14 @@ Sh gQ dd xy -ZU +Pn HD "} (14,1,1) = {" pk pS pU -ZU +Pn QO Ac Wc @@ -1766,10 +1763,10 @@ Sh zB "} (15,1,1) = {" -ZU +Pn dI Sv -ZU +Pn Bu xO yf @@ -1788,7 +1785,7 @@ zB zB vM lO -ZU +Pn tJ xO ax @@ -1852,17 +1849,17 @@ sm CY fj DG -ZU +Pn Ci Sh Gb xm -ZU +Pn je "} (20,1,1) = {" je -ZU +Pn ia NI yU @@ -1871,18 +1868,18 @@ bv aD cJ tU -ZU +Pn xl Sh AR lO -ZU +Pn je "} (21,1,1) = {" je -ZU -ZU +Pn +Pn xm yU OG @@ -1890,30 +1887,30 @@ qo pT De sh -ZU +Pn Zc -ZU +Pn pB -ZU -ZU +Pn +Pn je "} (22,1,1) = {" je je -ZU +Pn EA ll FI Hh -ZU -ZU +Pn +Pn Hh -ZU +Pn gz -ZU +Pn RX -ZU +Pn je je "} @@ -1930,8 +1927,8 @@ ti Yf FI aV -ZU -ZU +Pn +Pn je je je @@ -1949,7 +1946,7 @@ Am FT pk pk -ZU +Pn je je je @@ -1962,8 +1959,8 @@ je je pk zB -ZU -ZU +Pn +Pn zB pk pk diff --git a/code/controllers/subsystem/persistence/counter_delamination.dm b/code/controllers/subsystem/persistence/counter_delamination.dm index 81dca300c7e..dba683bc929 100644 --- a/code/controllers/subsystem/persistence/counter_delamination.dm +++ b/code/controllers/subsystem/persistence/counter_delamination.dm @@ -8,7 +8,7 @@ rounds_since_engine_exploded = text2num(file2text(DELAMINATION_COUNT_FILEPATH)) if(fexists(DELAMINATION_HIGHSCORE_FILEPATH)) delam_highscore = text2num(file2text(DELAMINATION_HIGHSCORE_FILEPATH)) - for(var/obj/machinery/incident_display/sign as anything in GLOB.map_delamination_counters) + for(var/obj/machinery/incident_display/sign as anything in GLOB.map_incident_displays) sign.update_delam_count(rounds_since_engine_exploded, delam_highscore) /datum/controller/subsystem/persistence/proc/save_delamination_counter() diff --git a/code/game/machinery/incident_display.dm b/code/game/machinery/incident_display.dm index b8452675c71..77194a26dd7 100644 --- a/code/game/machinery/incident_display.dm +++ b/code/game/machinery/incident_display.dm @@ -1,4 +1,8 @@ -GLOBAL_LIST_EMPTY(map_delamination_counters) +/** + * List of incident displays on the map + * Required as persistence subsystem loads after the ones present at mapload, and to reset to 0 upon explosion. + */ +GLOBAL_LIST_EMPTY(map_incident_displays) /// Display days since last delam on incident sign #define DISPLAY_DELAM (1<<0) @@ -13,25 +17,28 @@ DEFINE_BITFIELD(sign_features, list( #define TREND_RISING "rising" #define TREND_FALLING "falling" -#define NAME_DUAL "safety incident display" #define NAME_DELAM "delamination incident display" #define NAME_TRAM "tram incident display" -#define DESC_DUAL "A display that provides information on the station's safety record. Features an advert for SAFETY MOTH." #define DESC_DELAM "A signs describe how long it's been since the last delamination incident. Features an advert for SAFETY MOTH." -#define DESC_TRAM "A display that provides the number of tram related safety incidents this shift. Features an advert for SAFETY MOTH." +#define DESC_TRAM "A display that provides the number of tram related safety incidents this shift." -/** - * List of safety statistic signs on the map that have delam counting enabled. - * Required as persistence subsystem loads after the ones present at mapload, and to reset to 0 upon explosion. - */ +#define DISPLAY_PIXEL_1_W 21 +#define DISPLAY_PIXEL_1_Z -2 +#define DISPLAY_PIXEL_2_W 16 +#define DISPLAY_PIXEL_2_Z -2 +#define DISPLAY_BASE_ALPHA 64 +#define DISPLAY_PIXEL_ALPHA 96 + +#define LIGHT_COLOR_NORMAL "#4b4290" +#define LIGHT_COLOR_SHAME "#e24e76" /obj/machinery/incident_display name = NAME_DELAM desc = DESC_DELAM icon = 'icons/obj/machines/incident_display.dmi' - icon_preview = "stat_display_delam" - icon_state = "stat_display_delam" + icon_preview = "display_normal" + icon_state = "display_normal" verb_say = "beeps" verb_ask = "bloops" verb_exclaim = "blares" @@ -41,6 +48,10 @@ DEFINE_BITFIELD(sign_features, list( custom_materials = list(/datum/material/titanium = SHEET_MATERIAL_AMOUNT * 4, /datum/material/alloy/titaniumglass = SHEET_MATERIAL_AMOUNT * 4) /// What statistics we want the sign to display var/sign_features = DISPLAY_DELAM + /// Delam digits color + var/delam_display_color = COLOR_DISPLAY_YELLOW + /// Tram hits digits color + var/tram_display_color = COLOR_DISPLAY_BLUE /// Tram hits before hazard warning var/hit_threshold = 0 /// Tram hits @@ -49,49 +60,88 @@ DEFINE_BITFIELD(sign_features, list( var/last_delam = 0 /// Delam record high-score var/delam_record = 0 + /// If the display is currently running live updated content + var/live_display = FALSE + /// The default advert to show on this display + var/configured_advert + /// Duration of the advert set on this display + var/configured_advert_duration + /// How often to show an advert + var/advert_frequency = 30 SECONDS + /// Timer for sign currently showing an advert + COOLDOWN_DECLARE(active_advert) + /// Cooldown until next advert + COOLDOWN_DECLARE(advert_cooldown) -/obj/machinery/incident_display/dual - name = NAME_DUAL - desc = DESC_DUAL - icon_preview = "stat_display_dual" - icon_state = "stat_display_dual" - sign_features = DISPLAY_DELAM | DISPLAY_TRAM +/obj/machinery/incident_display/bridge /obj/machinery/incident_display/delam name = NAME_DELAM desc = DESC_DELAM - icon_preview = "stat_display_delam" - icon_state = "stat_display_delam" sign_features = DISPLAY_DELAM + configured_advert = "advert_meson" + configured_advert_duration = 7 SECONDS /obj/machinery/incident_display/tram name = NAME_TRAM desc = DESC_TRAM - icon_preview = "stat_display_tram" - icon_state = "stat_display_tram" sign_features = DISPLAY_TRAM -MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/incident_display, 32) +MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/incident_display/bridge, 32) MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/incident_display/delam, 32) -MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/incident_display/dual, 32) MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/incident_display/tram, 32) /obj/machinery/incident_display/Initialize(mapload) ..() + register_context() return INITIALIZE_HINT_LATELOAD /obj/machinery/incident_display/post_machine_initialize() . = ..() - GLOB.map_delamination_counters += src + GLOB.map_incident_displays += src update_delam_count(SSpersistence.rounds_since_engine_exploded, SSpersistence.delam_highscore) RegisterSignal(SStransport, COMSIG_TRAM_COLLISION, PROC_REF(update_tram_count)) update_appearance() /obj/machinery/incident_display/Destroy() - GLOB.map_delamination_counters -= src + GLOB.map_incident_displays -= src return ..() +/obj/machinery/incident_display/process() + if(!isnull(configured_advert) && COOLDOWN_FINISHED(src, advert_cooldown))// time to show an advert + show_advert(advert = configured_advert, duration = configured_advert_duration) + COOLDOWN_START(src, advert_cooldown, rand(advert_frequency - 5 SECONDS, advert_frequency + 5 SECONDS)) + return + + if(!live_display) // displaying static content, no processing required + return + + if(machine_stat & (NOPOWER|BROKEN|MAINT)) + return + + if(COOLDOWN_FINISHED(src, active_advert)) // advert finished, revert to static content + COOLDOWN_RESET(src, active_advert) + live_display = FALSE + update_appearance() + +/obj/machinery/incident_display/add_context(atom/source, list/context, obj/item/held_item, mob/user) + if(!isliving(user)) + return + + var/mob/living/living_user = user + + if(held_item?.tool_behaviour == TOOL_WELDER && !living_user.combat_mode && atom_integrity < max_integrity) + context[SCREENTIP_CONTEXT_LMB] = "repair display" + + if(held_item?.tool_behaviour == TOOL_MULTITOOL && !living_user.combat_mode) + if(sign_features == DISPLAY_TRAM) + context[SCREENTIP_CONTEXT_LMB] = "change to delam mode" + else + context[SCREENTIP_CONTEXT_LMB] = "change to tram mode" + + return CONTEXTUAL_SCREENTIP_SET + /obj/machinery/incident_display/welder_act(mob/living/user, obj/item/tool) if(user.combat_mode) return FALSE @@ -101,7 +151,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/incident_display/tram, 32) return TRUE balloon_alert(user, "repairing display...") - if(!tool.use_tool(src, user, 4 SECONDS, amount = 0, volume=50)) + if(!tool.use_tool(src, user, 4 SECONDS, amount = 0, volume = 50)) return TRUE balloon_alert(user, "repaired") @@ -117,35 +167,22 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/incident_display/tram, 32) if(sign_features == DISPLAY_TRAM) tool.play_tool_sound(src) - balloon_alert(user, "set to dual") - name = NAME_DUAL - desc = DESC_DUAL - icon_state = "stat_display_dual" - sign_features = DISPLAY_DELAM | DISPLAY_TRAM + balloon_alert(user, "set to delam") + name = NAME_DELAM + desc = DESC_DELAM + sign_features = DISPLAY_DELAM update_delam_count(SSpersistence.rounds_since_engine_exploded, SSpersistence.delam_highscore) - update_tram_count(src, SSpersistence.tram_hits_this_round) update_appearance() return TRUE - else if(sign_features == DISPLAY_DELAM) + else tool.play_tool_sound(src) balloon_alert(user, "set to tram") name = NAME_TRAM desc = DESC_TRAM - icon_state = "stat_display_tram" sign_features = DISPLAY_TRAM update_tram_count(src, SSpersistence.tram_hits_this_round) update_appearance() return TRUE - else if(sign_features == (DISPLAY_DELAM + DISPLAY_TRAM)) - tool.play_tool_sound(src) - balloon_alert(user, "set to delam") - name = NAME_DELAM - desc = DESC_DELAM - icon_state = "stat_display_delam" - sign_features = DISPLAY_DELAM - update_delam_count(SSpersistence.rounds_since_engine_exploded, SSpersistence.delam_highscore) - update_appearance() - return TRUE // EMP causes the display to display random numbers or outright break. /obj/machinery/incident_display/emp_act(severity) @@ -154,14 +191,17 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/incident_display/tram, 32) set_machine_stat(machine_stat | BROKEN) update_appearance() return - name = NAME_DUAL - desc = DESC_DUAL - icon_state = "stat_display_dual" - sign_features = DISPLAY_DELAM | DISPLAY_TRAM + hit_threshold = rand(1,99) hit_count = rand(1,99) - last_delam = rand(1,99) - delam_record = rand(1,99) + + if(prob(33)) + last_delam = 0 + delam_record = 0 + else + last_delam = rand(1,99) + delam_record = rand(1,99) + update_appearance() /obj/machinery/incident_display/on_deconstruction(disassembled) @@ -169,159 +209,165 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/incident_display/tram, 32) new /obj/item/shard(drop_location()) new /obj/item/shard(drop_location()) +/** + * Update the delamination count on the display + * + * Use the provided args to update the incident display when in delam mode. + * Arguments: + * * new_count - number of shifts without a delam + * * record - current high score for the delam count + */ /obj/machinery/incident_display/proc/update_delam_count(new_count, record) delam_record = record last_delam = min(new_count, 199) update_appearance() +/** + * Update the tram hit count on the display + * + * Sign receives a signal from SStransport that the tram has hit someone, and updates the count. + * Arguments: + * * source - hopefully is the transport subsystem + * * tram_collisions - current number of tram hits + */ /obj/machinery/incident_display/proc/update_tram_count(source, tram_collisions) SIGNAL_HANDLER hit_count = min(tram_collisions, 199) update_appearance() -/obj/machinery/incident_display/update_appearance(updates=ALL) +/** + * Run an animated advert on the display + * + * Arguments: + * * advert - icon state to flick to + * * duration - length of the advert animation + */ +/obj/machinery/incident_display/proc/show_advert(advert, duration = 7 SECONDS) + COOLDOWN_START(src, active_advert, duration) + live_display = TRUE + update_appearance() + flick(advert, src) + +/obj/machinery/incident_display/update_appearance(updates = ALL) . = ..() if(machine_stat & NOPOWER) - icon_state = "stat_display_blank" + icon_state = "display_normal" set_light(l_on = FALSE) return - - if(machine_stat & BROKEN) - icon_state = "stat_display_broken" - else if(sign_features == (DISPLAY_DELAM + DISPLAY_TRAM)) - icon_state = "stat_display_dual" - else if(sign_features == DISPLAY_DELAM) - icon_state = "stat_display_delam" - else if(sign_features == DISPLAY_TRAM) - icon_state = "stat_display_tram" - - set_light(l_range = 1.7, l_power = 1.5, l_color = LIGHT_COLOR_FAINT_CYAN, l_on = TRUE) + else if(machine_stat & BROKEN) + icon_state = "display_broken" + set_light(l_range = 1.7, l_power = 1.5, l_color = LIGHT_COLOR_NORMAL, l_on = TRUE) + else if((sign_features & DISPLAY_DELAM) && last_delam <= 0) // you done fucked up + icon_state = "display_shame" + set_light(l_range = 1.7, l_power = 1.5, l_color = LIGHT_COLOR_SHAME, l_on = TRUE) + else + icon_state = "display_normal" + set_light(l_range = 1.7, l_power = 1.5, l_color = LIGHT_COLOR_NORMAL, l_on = TRUE) /obj/machinery/incident_display/update_overlays() . = ..() if(machine_stat & (NOPOWER|BROKEN)) return - var/mutable_appearance/moff_base_emissive = emissive_appearance(icon, "moff_base_emissive", src, alpha = src.alpha) - . += moff_base_emissive + . += emissive_appearance(icon, "display_emissive", src, alpha = DISPLAY_BASE_ALPHA) + + if(COOLDOWN_STARTED(src, active_advert)) // we don't show the static content during adverts + return if(sign_features & DISPLAY_DELAM) - var/mutable_appearance/delam_base_emissive = emissive_appearance(icon, "delam_base_emissive", src, alpha = src.alpha) - var/delam_display_color - . += delam_base_emissive - if(last_delam <= 0) - delam_display_color = COLOR_DISPLAY_RED - else - delam_display_color = COLOR_DISPLAY_YELLOW + . += mutable_appearance(icon, "overlay_delam") + . += emissive_appearance(icon, "overlay_delam", src, alpha = DISPLAY_PIXEL_ALPHA) var/delam_pos1 = clamp(last_delam, 0, 199) % 10 var/mutable_appearance/delam_pos1_overlay = mutable_appearance(icon, "num_[delam_pos1]") - var/mutable_appearance/delam_pos1_emissive = emissive_appearance(icon, "num_[delam_pos1]_e", src, alpha = src.alpha) + var/mutable_appearance/delam_pos1_emissive = emissive_appearance(icon, "num_[delam_pos1]", src, alpha = DISPLAY_PIXEL_ALPHA) delam_pos1_overlay.color = delam_display_color - delam_pos1_overlay.pixel_w = 9 - delam_pos1_emissive.pixel_w = 9 - delam_pos1_overlay.pixel_z = 4 - delam_pos1_emissive.pixel_z = 4 + delam_pos1_overlay.pixel_w = DISPLAY_PIXEL_1_W + delam_pos1_emissive.pixel_w = DISPLAY_PIXEL_1_W + delam_pos1_overlay.pixel_z = DISPLAY_PIXEL_1_Z + delam_pos1_emissive.pixel_z = DISPLAY_PIXEL_1_Z . += delam_pos1_overlay . += delam_pos1_emissive var/delam_pos2 = (clamp(last_delam, 0, 199) / 10) % 10 var/mutable_appearance/delam_pos2_overlay = mutable_appearance(icon, "num_[delam_pos2]") - var/mutable_appearance/delam_pos2_emissive = emissive_appearance(icon, "num_[delam_pos2]_e", src, alpha = src.alpha) + var/mutable_appearance/delam_pos2_emissive = emissive_appearance(icon, "num_[delam_pos2]", src, alpha = DISPLAY_PIXEL_ALPHA) delam_pos2_overlay.color = delam_display_color - delam_pos2_overlay.pixel_w = 4 - delam_pos2_emissive.pixel_w = 4 - delam_pos2_overlay.pixel_z = 4 - delam_pos2_emissive.pixel_z = 4 + delam_pos2_overlay.pixel_w = DISPLAY_PIXEL_2_W + delam_pos2_emissive.pixel_w = DISPLAY_PIXEL_2_W + delam_pos2_overlay.pixel_z = DISPLAY_PIXEL_2_Z + delam_pos2_emissive.pixel_z = DISPLAY_PIXEL_2_Z . += delam_pos2_overlay . += delam_pos2_emissive if(last_delam >= 100) - var/mutable_appearance/there_i_fixed_it_overlay = mutable_appearance(icon, "num_100_red") - var/mutable_appearance/there_i_fixed_it_emissive = emissive_appearance(icon, "num_100_red", src, alpha = src.alpha) - . += there_i_fixed_it_overlay - . += there_i_fixed_it_emissive + . += mutable_appearance(icon, "num_100_red") + . += emissive_appearance(icon, "num_100_red", src, alpha = DISPLAY_BASE_ALPHA) if(last_delam == delam_record) var/mutable_appearance/delam_trend_overlay = mutable_appearance(icon, TREND_RISING) - var/mutable_appearance/delam_trend_emissive = emissive_appearance(icon, "[TREND_RISING]_e", src, alpha = src.alpha) + var/mutable_appearance/delam_trend_emissive = emissive_appearance(icon, "[TREND_RISING]", src, alpha = DISPLAY_PIXEL_ALPHA) delam_trend_overlay.color = COLOR_DISPLAY_GREEN - delam_trend_overlay.pixel_w = 1 - delam_trend_emissive.pixel_w = 1 - delam_trend_overlay.pixel_z = 6 - delam_trend_emissive.pixel_z = 6 . += delam_trend_overlay . += delam_trend_emissive else var/mutable_appearance/delam_trend_overlay = mutable_appearance(icon, TREND_FALLING) - var/mutable_appearance/delam_trend_emissive = emissive_appearance(icon, "[TREND_FALLING]_e", src, alpha = src.alpha) + var/mutable_appearance/delam_trend_emissive = emissive_appearance(icon, "[TREND_FALLING]", src, alpha = DISPLAY_PIXEL_ALPHA) delam_trend_overlay.color = COLOR_DISPLAY_RED - delam_trend_overlay.pixel_w = 1 - delam_trend_emissive.pixel_w = 1 - delam_trend_overlay.pixel_z = 6 - delam_trend_emissive.pixel_z = 6 . += delam_trend_overlay . += delam_trend_emissive if(sign_features & DISPLAY_TRAM) - var/mutable_appearance/tram_base_emissive = emissive_appearance(icon, "tram_base_emissive", src, alpha = src.alpha) - var/tram_display_color = COLOR_DISPLAY_BLUE + . += mutable_appearance(icon, "overlay_tram") + . += emissive_appearance(icon, "overlay_tram", src, alpha = DISPLAY_PIXEL_ALPHA) var/tram_pos1 = hit_count % 10 var/mutable_appearance/tram_pos1_overlay = mutable_appearance(icon, "num_[tram_pos1]") - var/mutable_appearance/tram_pos1_emissive = emissive_appearance(icon, "num_[tram_pos1]_e", src, alpha = src.alpha) - . += tram_base_emissive + var/mutable_appearance/tram_pos1_emissive = emissive_appearance(icon, "num_[tram_pos1]", src, alpha = DISPLAY_PIXEL_ALPHA) tram_pos1_overlay.color = tram_display_color - tram_pos1_overlay.pixel_w = 9 - tram_pos1_emissive.pixel_w = 9 - tram_pos1_overlay.pixel_z = -6 - tram_pos1_emissive.pixel_z = -6 + tram_pos1_overlay.pixel_w = DISPLAY_PIXEL_1_W + tram_pos1_emissive.pixel_w = DISPLAY_PIXEL_1_W + tram_pos1_overlay.pixel_z = DISPLAY_PIXEL_1_Z + tram_pos1_emissive.pixel_z = DISPLAY_PIXEL_1_Z . += tram_pos1_overlay . += tram_pos1_emissive var/tram_pos2 = (hit_count / 10) % 10 var/mutable_appearance/tram_pos2_overlay = mutable_appearance(icon, "num_[tram_pos2]") - var/mutable_appearance/tram_pos2_emissive = emissive_appearance(icon, "num_[tram_pos2]_e", src, alpha = src.alpha) + var/mutable_appearance/tram_pos2_emissive = emissive_appearance(icon, "num_[tram_pos2]", src, alpha = DISPLAY_PIXEL_ALPHA) tram_pos2_overlay.color = tram_display_color - tram_pos2_overlay.pixel_w = 4 - tram_pos2_emissive.pixel_w = 4 - tram_pos2_overlay.pixel_z = -6 - tram_pos2_emissive.pixel_z = -6 + tram_pos2_overlay.pixel_w = DISPLAY_PIXEL_2_W + tram_pos2_emissive.pixel_w = DISPLAY_PIXEL_2_W + tram_pos2_overlay.pixel_z = DISPLAY_PIXEL_2_Z + tram_pos2_emissive.pixel_z = DISPLAY_PIXEL_2_Z . += tram_pos2_overlay . += tram_pos2_emissive if(hit_count >= 100) - var/mutable_appearance/there_i_fixed_it_overlay = mutable_appearance(icon, "num_100_blue") - var/mutable_appearance/there_i_fixed_it_emissive = emissive_appearance(icon, "num_100_blue", src, alpha = src.alpha) - . += there_i_fixed_it_overlay - . += there_i_fixed_it_emissive + . += mutable_appearance(icon, "num_100_blue") + . += emissive_appearance(icon, "num_100_blue", src, alpha = DISPLAY_BASE_ALPHA) if(hit_count > SSpersistence.tram_hits_last_round) var/mutable_appearance/tram_trend_overlay = mutable_appearance(icon, TREND_RISING) - var/mutable_appearance/tram_trend_emissive = emissive_appearance(icon, "[TREND_RISING]_e", src, alpha = src.alpha) + var/mutable_appearance/tram_trend_emissive = emissive_appearance(icon, "[TREND_RISING]", src, alpha = DISPLAY_PIXEL_ALPHA) tram_trend_overlay.color = COLOR_DISPLAY_RED - tram_trend_overlay.pixel_w = 1 - tram_trend_emissive.pixel_w = 1 - tram_trend_overlay.pixel_z = -4 - tram_trend_emissive.pixel_z = -4 . += tram_trend_overlay . += tram_trend_emissive else var/mutable_appearance/tram_trend_overlay = mutable_appearance(icon, TREND_FALLING) - var/mutable_appearance/tram_trend_emissive = emissive_appearance(icon, "[TREND_FALLING]_e", src, alpha = src.alpha) + var/mutable_appearance/tram_trend_emissive = emissive_appearance(icon, "[TREND_FALLING]", src, alpha = DISPLAY_PIXEL_ALPHA) tram_trend_overlay.color = COLOR_DISPLAY_GREEN - tram_trend_overlay.pixel_w = 1 - tram_trend_emissive.pixel_w = 1 - tram_trend_overlay.pixel_z = -4 - tram_trend_emissive.pixel_z = -4 . += tram_trend_overlay . += tram_trend_emissive /obj/machinery/incident_display/examine(mob/user) . = ..() + if(atom_integrity < max_integrity) + . += span_notice("It can be repaired with a [EXAMINE_HINT("welder")].") if(sign_features & DISPLAY_DELAM) + . += span_notice("It can be changed to display tram hits with a [EXAMINE_HINT("multitool")].") if(last_delam >= 0) . += span_info("It has been [last_delam] shift\s since the last delamination event at this Nanotrasen facility.") switch(last_delam) @@ -339,6 +385,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/incident_display/tram, 32) . += span_info("The supermatter crystal has delaminated, in case you didn't notice.") if(sign_features & DISPLAY_TRAM) + . += span_notice("It can be changed to display delam-free shifts with a [EXAMINE_HINT("multitool")].") . += span_info("The station has had [hit_count] tram incident\s this shift.") switch(hit_count) if(0) @@ -357,13 +404,21 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/incident_display/tram, 32) #undef DISPLAY_DELAM #undef DISPLAY_TRAM -#undef NAME_DUAL #undef NAME_DELAM #undef NAME_TRAM -#undef DESC_DUAL #undef DESC_DELAM #undef DESC_TRAM #undef TREND_RISING #undef TREND_FALLING + +#undef DISPLAY_PIXEL_1_W +#undef DISPLAY_PIXEL_1_Z +#undef DISPLAY_PIXEL_2_W +#undef DISPLAY_PIXEL_2_Z +#undef DISPLAY_BASE_ALPHA +#undef DISPLAY_PIXEL_ALPHA + +#undef LIGHT_COLOR_NORMAL +#undef LIGHT_COLOR_SHAME diff --git a/code/modules/power/supermatter/supermatter_delamination/_sm_delam.dm b/code/modules/power/supermatter/supermatter_delamination/_sm_delam.dm index 2e4d0671a9d..862cdb02435 100644 --- a/code/modules/power/supermatter/supermatter_delamination/_sm_delam.dm +++ b/code/modules/power/supermatter/supermatter_delamination/_sm_delam.dm @@ -23,7 +23,7 @@ GLOBAL_LIST_INIT(sm_delam_list, list( if (sm.is_main_engine) SSpersistence.delam_highscore = SSpersistence.rounds_since_engine_exploded SSpersistence.rounds_since_engine_exploded = ROUNDCOUNT_ENGINE_JUST_EXPLODED - for (var/obj/machinery/incident_display/sign as anything in GLOB.map_delamination_counters) + for (var/obj/machinery/incident_display/sign as anything in GLOB.map_incident_displays) sign.update_delam_count(ROUNDCOUNT_ENGINE_JUST_EXPLODED) qdel(sm) diff --git a/icons/obj/machines/incident_display.dmi b/icons/obj/machines/incident_display.dmi index 80d63134f1d..863a5001315 100644 Binary files a/icons/obj/machines/incident_display.dmi and b/icons/obj/machines/incident_display.dmi differ diff --git a/tools/UpdatePaths/Scripts/84812_incident_display_repath.txt b/tools/UpdatePaths/Scripts/84812_incident_display_repath.txt new file mode 100644 index 00000000000..5aa0be39c2d --- /dev/null +++ b/tools/UpdatePaths/Scripts/84812_incident_display_repath.txt @@ -0,0 +1,4 @@ +# convert 'dual' style incident displays to delam mode + +/obj/machinery/incident_display/dual : /obj/machinery/incident_display/delam{@OLD} +/obj/machinery/incident_display/dual/@SUBTYPES : /obj/machinery/incident_display/delam/@SUBTYPES{@OLD} \ No newline at end of file