mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
[MIRROR] Tram signs malfunction during tram malfunction [MDB IGNORE] (#20119)
* Tram signs malfunction during tram malfunction (#74210) ## About The Pull Request Tram signs will now display incorrect information when malfunctioning. ## Why It's Good For The Game For improved Frogger gameplay, no more being crafty and reading the indicator board to know if the tram is coming. ## Changelog 🆑 LT3 add: Tram signs will now malfunction when the tram is malfunctioning /🆑 --------- Co-authored-by: san7890 <the@ san7890.com> * Tram signs malfunction during tram malfunction --------- Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com> Co-authored-by: san7890 <the@ san7890.com>
This commit is contained in:
co-authored by
san7890
lessthanthree
parent
60d2d2ee1a
commit
e787d301ac
@@ -44,6 +44,9 @@
|
||||
for(var/obj/machinery/door/window/tram/door as anything in GLOB.tram_doors)
|
||||
door.start_malfunction()
|
||||
|
||||
for(var/obj/machinery/destination_sign/sign as anything in GLOB.tram_signs)
|
||||
sign.malfunctioning = TRUE
|
||||
|
||||
for(var/obj/structure/industrial_lift/tram as anything in GLOB.lifts)
|
||||
original_lethality = tram.collision_lethality
|
||||
tram.collision_lethality = original_lethality * 1.25
|
||||
@@ -55,10 +58,13 @@
|
||||
for(var/obj/machinery/door/window/tram/door as anything in GLOB.tram_doors)
|
||||
door.end_malfunction()
|
||||
|
||||
for(var/obj/machinery/destination_sign/sign as anything in GLOB.tram_signs)
|
||||
sign.malfunctioning = FALSE
|
||||
|
||||
for(var/obj/structure/industrial_lift/tram as anything in GLOB.lifts)
|
||||
tram.collision_lethality = original_lethality
|
||||
|
||||
priority_announce("We've successfully reset the software of the tram, normal operations are now resuming. Sorry for any inconvienence this may have caused. We hope you have a good rest of your shift.", "CentCom Engineering Division")
|
||||
priority_announce("We've successfully reset the software on the tram, normal operations are now resuming. Sorry for any inconvienence this may have caused.", "CentCom Engineering Division")
|
||||
|
||||
#undef TRAM_MALFUNCTION_TIME_UPPER
|
||||
#undef TRAM_MALFUNCTION_TIME_LOWER
|
||||
|
||||
@@ -579,6 +579,10 @@ GLOBAL_LIST_EMPTY(tram_doors)
|
||||
var/previous_destination
|
||||
/// The light mask overlay we use
|
||||
var/light_mask
|
||||
/// Is this sign malfunctioning?
|
||||
var/malfunctioning = FALSE
|
||||
/// A default list of possible sign states
|
||||
var/static/list/sign_states = list()
|
||||
|
||||
/obj/machinery/destination_sign/north
|
||||
layer = BELOW_OBJ_LAYER
|
||||
@@ -607,6 +611,16 @@ GLOBAL_LIST_EMPTY(tram_doors)
|
||||
RegisterSignal(tram_part, COMSIG_TRAM_SET_TRAVELLING, PROC_REF(on_tram_travelling))
|
||||
GLOB.tram_signs += src
|
||||
|
||||
sign_states = list(
|
||||
"[base_icon_state][DESTINATION_WEST_ACTIVE]",
|
||||
"[base_icon_state][DESTINATION_WEST_IDLE]",
|
||||
"[base_icon_state][DESTINATION_EAST_ACTIVE]",
|
||||
"[base_icon_state][DESTINATION_EAST_IDLE]",
|
||||
"[base_icon_state][DESTINATION_CENTRAL_IDLE]",
|
||||
"[base_icon_state][DESTINATION_CENTRAL_EASTBOUND_ACTIVE]",
|
||||
"[base_icon_state][DESTINATION_CENTRAL_WESTBOUND_ACTIVE]",
|
||||
)
|
||||
|
||||
/obj/machinery/destination_sign/Destroy()
|
||||
GLOB.tram_signs -= src
|
||||
. = ..()
|
||||
@@ -646,6 +660,12 @@ GLOBAL_LIST_EMPTY(tram_doors)
|
||||
|
||||
use_power(active_power_usage)
|
||||
|
||||
if(malfunctioning)
|
||||
icon_state = "[pick(sign_states)]"
|
||||
light_mask = "[pick(sign_states)]_e"
|
||||
update_appearance()
|
||||
return PROCESS_KILL
|
||||
|
||||
if(!tram.travelling)
|
||||
if(istype(tram.idle_platform, /obj/effect/landmark/tram/tramstation/west))
|
||||
icon_state = "[base_icon_state][DESTINATION_WEST_IDLE]"
|
||||
|
||||
Reference in New Issue
Block a user