diff --git a/code/game/objects/structures/plaques/static_plaques.dm b/code/game/objects/structures/plaques/static_plaques.dm index 230b15b549da1..1cc489e6b3068 100644 --- a/code/game/objects/structures/plaques/static_plaques.dm +++ b/code/game/objects/structures/plaques/static_plaques.dm @@ -32,6 +32,8 @@ icon_state = "commission_tram" custom_materials = list(/datum/material/titanium = SHEET_MATERIAL_AMOUNT) layer = SIGN_LAYER + pixel_y = -29 + pixel_z = 29 /obj/structure/plaque/static_plaque/tram/Initialize(mapload) . = ..() diff --git a/code/modules/transport/tram/tram_controls.dm b/code/modules/transport/tram/tram_controls.dm index 0bfce56aa5c96..e91d848676480 100644 --- a/code/modules/transport/tram/tram_controls.dm +++ b/code/modules/transport/tram/tram_controls.dm @@ -35,11 +35,13 @@ dir = SOUTH pixel_x = -8 pixel_y = 32 + pixel_z = 0 /obj/machinery/computer/tram_controls/split/directional/south dir = NORTH pixel_x = 8 pixel_y = -32 + pixel_z = 0 /obj/machinery/computer/tram_controls/split/directional/east dir = WEST diff --git a/code/modules/transport/tram/tram_doors.dm b/code/modules/transport/tram/tram_doors.dm index 0c3944ac93d62..d95fa8f8f6079 100644 --- a/code/modules/transport/tram/tram_doors.dm +++ b/code/modules/transport/tram/tram_doors.dm @@ -1,6 +1,3 @@ -#define TRAM_DOOR_WARNING_TIME (0.9 SECONDS) -#define TRAM_DOOR_CYCLE_TIME (0.6 SECONDS) -#define TRAM_DOOR_CRUSH_TIME (0.7 SECONDS) #define TRAM_DOOR_RECYCLE_TIME (2.7 SECONDS) /obj/machinery/door/airlock/tram @@ -17,6 +14,8 @@ doorOpen = 'sound/machines/tramopen.ogg' doorClose = 'sound/machines/tramclose.ogg' autoclose = FALSE + greyscale_config = null + greyscale_colors = null /// Weakref to the tram we're attached var/datum/weakref/transport_ref var/retry_counter @@ -28,6 +27,28 @@ if(!id_tag) id_tag = assign_random_name() +/obj/machinery/door/airlock/tram/animation_length(animation) + switch(animation) + if(DOOR_OPENING_ANIMATION) + return 1.3 SECONDS + if(DOOR_CLOSING_ANIMATION) + return 2 SECONDS + +/obj/machinery/door/airlock/tram/animation_segment_delay(animation) + switch(animation) + if(AIRLOCK_OPENING_TRANSPARENT) + return 0.6 SECONDS + if(AIRLOCK_OPENING_PASSABLE) + return 0.9 SECONDS + if(AIRLOCK_OPENING_FINISHED) + return 0.9 SECONDS + if(AIRLOCK_CLOSING_UNPASSABLE) + return 0.9 SECONDS + if(AIRLOCK_CLOSING_OPAQUE) + return 0.7 SECONDS + if(AIRLOCK_CLOSING_FINISHED) + return 0.9 SECONDS + /obj/machinery/door/airlock/tram/open(forced = DEFAULT_DOOR_CHECKS) if(operating || welded || locked || seal) return FALSE @@ -38,16 +59,16 @@ if(forced == DEFAULT_DOOR_CHECKS && (!hasPower() || wires.is_cut(WIRE_OPEN))) return FALSE - SEND_SIGNAL(src, COMSIG_AIRLOCK_OPEN, FALSE) + SEND_SIGNAL(src, COMSIG_AIRLOCK_OPEN, forced) operating = TRUE update_icon(ALL, AIRLOCK_OPENING) if(forced >= BYPASS_DOOR_CHECKS) playsound(src, 'sound/machines/airlockforced.ogg', vol = 40, vary = FALSE) - sleep(TRAM_DOOR_CYCLE_TIME) + sleep(animation_segment_delay(AIRLOCK_OPENING_TRANSPARENT)) else playsound(src, doorOpen, vol = 40, vary = FALSE) - sleep(TRAM_DOOR_WARNING_TIME) + sleep(animation_segment_delay(AIRLOCK_OPENING_PASSABLE)) set_density(FALSE) if(!isnull(filler)) @@ -55,7 +76,7 @@ update_freelook_sight() flags_1 &= ~PREVENT_CLICK_UNDER_1 air_update_turf(TRUE, FALSE) - sleep(TRAM_DOOR_WARNING_TIME) + sleep(animation_segment_delay(AIRLOCK_OPENING_FINISHED)) layer = OPEN_DOOR_LAYER operating = FALSE update_icon(ALL, AIRLOCK_OPEN) @@ -95,7 +116,7 @@ operating = TRUE layer = CLOSED_DOOR_LAYER update_icon(ALL, AIRLOCK_CLOSING) - sleep(TRAM_DOOR_WARNING_TIME) + sleep(animation_segment_delay(AIRLOCK_CLOSING_UNPASSABLE)) if(!hungry_door) for(var/turf/checked_turf in locs) for(var/atom/movable/blocker in checked_turf) @@ -107,7 +128,7 @@ update_icon(ALL, AIRLOCK_OPEN) return FALSE SEND_SIGNAL(src, COMSIG_AIRLOCK_CLOSE) - sleep(TRAM_DOOR_CRUSH_TIME) + sleep(animation_segment_delay(AIRLOCK_CLOSING_OPAQUE)) set_density(TRUE) if(!isnull(filler)) filler.set_density(TRUE) @@ -116,7 +137,7 @@ air_update_turf(TRUE, TRUE) crush() crushing_in_progress = FALSE - sleep(TRAM_DOOR_WARNING_TIME) + sleep(animation_segment_delay(AIRLOCK_CLOSING_FINISHED)) operating = FALSE update_icon(ALL, AIRLOCK_CLOSED) retry_counter = 0 @@ -237,7 +258,4 @@ open(forced = BYPASS_DOOR_CHECKS) return -#undef TRAM_DOOR_WARNING_TIME -#undef TRAM_DOOR_CYCLE_TIME -#undef TRAM_DOOR_CRUSH_TIME #undef TRAM_DOOR_RECYCLE_TIME diff --git a/icons/obj/doors/airlocks/tram/tram.dmi b/icons/obj/doors/airlocks/tram/tram.dmi index 43d30b58a6f45..d9a795b9ee4c4 100644 Binary files a/icons/obj/doors/airlocks/tram/tram.dmi and b/icons/obj/doors/airlocks/tram/tram.dmi differ