diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index f6e7d797fd9..7854e4ae383 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -282,8 +282,9 @@ GLOBAL_LIST_INIT(bananium_recipes, list ( \ walltype = /turf/closed/wall/mineral/titanium GLOBAL_LIST_INIT(titanium_recipes, list ( \ - new/datum/stack_recipe("Titanium tile", /obj/item/stack/tile/mineral/titanium, 1, 4, 20, crafting_flags = NONE, category = CAT_TILES), \ - new/datum/stack_recipe("Shuttle seat", /obj/structure/chair/comfy/shuttle, 2, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_FURNITURE), \ + new /datum/stack_recipe("Titanium tile", /obj/item/stack/tile/mineral/titanium, 1, 4, 20, crafting_flags = NONE, category = CAT_TILES), \ + new /datum/stack_recipe("Shuttle seat", /obj/structure/chair/comfy/shuttle, 2, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_FURNITURE), \ + new /datum/stack_recipe("Material tram door assembly", /obj/structure/door_assembly/multi_tile/door_assembly_tram, 8, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_DOORS), \ )) /obj/item/stack/sheet/mineral/titanium/get_main_recipes() diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index 5daf96a01b8..86d8e01f98e 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -44,6 +44,7 @@ multi_tile = TRUE glass = TRUE nomineral = TRUE + material_amt = 8 /obj/structure/door_assembly/Initialize(mapload) . = ..() diff --git a/code/game/objects/structures/door_assembly_types.dm b/code/game/objects/structures/door_assembly_types.dm index dd06f7e42a9..d62fb1bec76 100644 --- a/code/game/objects/structures/door_assembly_types.dm +++ b/code/game/objects/structures/door_assembly_types.dm @@ -271,6 +271,18 @@ name = "large public airlock assembly" base_name = "large public airlock" +/obj/structure/door_assembly/multi_tile/door_assembly_tram + name = "tram door assembly" + icon = 'icons/obj/doors/airlocks/tram/tram.dmi' + base_name = "tram door" + overlays_file = 'icons/obj/doors/airlocks/tram/tram-overlays.dmi' + glass_type = /obj/machinery/door/airlock/tram + airlock_type = /obj/machinery/door/airlock/tram + glass = FALSE + noglass = TRUE + mineral = "titanium" + material_type = /obj/item/stack/sheet/mineral/titanium + /obj/structure/door_assembly/door_assembly_material/atom_deconstruct(disassembled = TRUE) var/turf/target_turf = get_turf(src) for(var/datum/material/material_datum as anything in custom_materials) diff --git a/code/modules/transport/tram/tram_doors.dm b/code/modules/transport/tram/tram_doors.dm index 644f45def4a..653b5cbabb5 100644 --- a/code/modules/transport/tram/tram_doors.dm +++ b/code/modules/transport/tram/tram_doors.dm @@ -1,7 +1,7 @@ -#define TRAM_DOOR_WARNING_TIME (1.4 SECONDS) -#define TRAM_DOOR_CYCLE_TIME (0.4 SECONDS) +#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 (3 SECONDS) +#define TRAM_DOOR_RECYCLE_TIME (2.7 SECONDS) /obj/machinery/door/airlock/tram name = "tram door" @@ -9,7 +9,7 @@ overlays_file = 'icons/obj/doors/airlocks/tram/tram-overlays.dmi' multi_tile = TRUE opacity = FALSE - assemblytype = null + assemblytype = /obj/structure/door_assembly/multi_tile/door_assembly_tram airlock_material = "glass" air_tight = TRUE req_access = list(ACCESS_TCOMMS) @@ -55,7 +55,7 @@ update_freelook_sight() flags_1 &= ~PREVENT_CLICK_UNDER_1 air_update_turf(TRUE, FALSE) - sleep(TRAM_DOOR_CYCLE_TIME) + sleep(TRAM_DOOR_WARNING_TIME) layer = OPEN_DOOR_LAYER update_icon(ALL, AIRLOCK_OPEN, TRUE) operating = FALSE @@ -64,7 +64,7 @@ /obj/machinery/door/airlock/tram/close(forced = DEFAULT_DOOR_CHECKS, force_crush = FALSE) retry_counter++ - if(retry_counter >= 4 || force_crush || forced == BYPASS_DOOR_CHECKS) + if(retry_counter >= 3 || force_crush || forced == BYPASS_DOOR_CHECKS) try_to_close(forced = BYPASS_DOOR_CHECKS) return @@ -116,7 +116,7 @@ air_update_turf(TRUE, TRUE) crush() crushing_in_progress = FALSE - sleep(TRAM_DOOR_CYCLE_TIME) + sleep(TRAM_DOOR_WARNING_TIME) update_icon(ALL, AIRLOCK_CLOSED, 1) operating = FALSE retry_counter = 0 @@ -163,7 +163,7 @@ if(airlock_state == AIRLOCK_CLOSED) return - if(retry_counter < 3) + if(retry_counter < 2) close() return @@ -205,6 +205,9 @@ * Tram doors can be opened with hands when unpowered */ /obj/machinery/door/airlock/tram/try_safety_unlock(mob/user) + if(DOING_INTERACTION_WITH_TARGET(user, src)) + return + if(!hasPower() && density) balloon_alert(user, "pulling emergency exit...") if(do_after(user, 4 SECONDS, target = src)) @@ -215,10 +218,20 @@ * If you pry (bump) the doors open midtravel, open quickly so you can jump out and make a daring escape. */ /obj/machinery/door/airlock/tram/bumpopen(mob/user, forced = BYPASS_DOOR_CHECKS) + if(DOING_INTERACTION_WITH_TARGET(user, src)) + return + if(operating || !density) return + + if(!hasPower()) + try_safety_unlock(user) + return + var/datum/transport_controller/linear/tram/tram_part = transport_ref?.resolve() add_fingerprint(user) + if(!tram_part.controller_active) + return if((tram_part.travel_remaining < DEFAULT_TRAM_LENGTH || tram_part.travel_remaining > tram_part.travel_trip_length - DEFAULT_TRAM_LENGTH) && tram_part.controller_active) return // we're already animating, don't reset that open(forced = BYPASS_DOOR_CHECKS)