From c6d5a44269b396fd5fccf43d1a77b5d4223729f0 Mon Sep 17 00:00:00 2001 From: tkdrg Date: Mon, 13 Oct 2014 19:55:30 -0300 Subject: [PATCH 1/3] Makes transit tubes a lot faster --- .../structures/transit_tubes/station.dm | 4 ++-- .../structures/transit_tubes/transit_tube.dm | 9 ++++++--- .../transit_tubes/transit_tube_pod.dm | 19 +++++++++++++++++-- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm index 1f75c11e42b..48a0dacaa8e 100644 --- a/code/game/objects/structures/transit_tubes/station.dm +++ b/code/game/objects/structures/transit_tubes/station.dm @@ -6,8 +6,8 @@ name = "station tube station" icon = 'icons/obj/pipes/transit_tube_station.dmi' icon_state = "closed" - exit_delay = 2 - enter_delay = 3 + exit_delay = 1 + enter_delay = 2 tube_construction = /obj/structure/c_transit_tube/station var/pod_moving = 0 var/automatic_launch_time = 100 diff --git a/code/game/objects/structures/transit_tubes/transit_tube.dm b/code/game/objects/structures/transit_tubes/transit_tube.dm index 152820d77dc..a170353f1ce 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube.dm @@ -10,8 +10,8 @@ anchored = 1.0 var/tube_construction = /obj/structure/c_transit_tube var/list/tube_dirs = null - var/exit_delay = 2 - var/enter_delay = 1 + var/exit_delay = 1 + var/enter_delay = 0 // alldirs in global.dm is the same list of directions, but since // the specific order matters to get a usable icon_state, it is @@ -51,7 +51,7 @@ obj/structure/transit_tube/ex_act(severity) /obj/structure/transit_tube/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/weapon/wrench)) if(copytext(icon_state, 1, 3) != "D-") //decorative diagonals cannot be unwrenched directly - for(var/obj/structure/transit_tube_pod/pod in loc) + for(var/obj/structure/transit_tube_pod/pod in src.loc) user << "Remove the pod first." return user.visible_message("[user] starts to deattach the [src]!", "You start deattaching the [name]...") @@ -64,6 +64,9 @@ obj/structure/transit_tube/ex_act(severity) R.add_fingerprint(user) src.destroy_diagonals() qdel(src) + if(istype(W, /obj/item/weapon/crowbar)) + for(var/obj/structure/transit_tube_pod/pod in src.loc) + pod.attackby(W, user) //destroys disconnected decorative diagonals /obj/structure/transit_tube/proc/destroy_diagonals() diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm index 0f3fbc65760..2c9ba8ba448 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -32,8 +32,7 @@ return if(src.contents.len) user.visible_message("[user] empties the [src].", "You empty the [src].") - for(var/atom/movable/M in src.contents) - M.loc = src.loc + src.empty() return else user << "You free the [src]." @@ -42,6 +41,22 @@ R.add_fingerprint(user) qdel(src) +/obj/structure/transit_tube_pod/container_resist() + var/mob/living/user = usr + if(!moving) + user.changeNext_move(100) + user.last_special = world.time + 100 + user << "You start trying to escape from the pod." + if(do_after(user, 600)) + if(!user || user.stat != CONSCIOUS) + return + user << "You manage to open the pod." + src.empty() + +/obj/structure/transit_tube_pod/proc/empty() + for(var/atom/movable/M in src.contents) + M.loc = src.loc + /obj/structure/transit_tube_pod/proc/follow_tube(var/reverse_launch) if(moving) return From c6ba2b5c225903a4d84f4dbbe5814b469b470458 Mon Sep 17 00:00:00 2001 From: tkdrg Date: Tue, 14 Oct 2014 14:14:58 -0300 Subject: [PATCH 2/3] Shortens stopped tube time and cleans up a bit --- code/game/objects/structures/transit_tubes/station.dm | 7 +++---- .../objects/structures/transit_tubes/transit_tube_pod.dm | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm index 48a0dacaa8e..553f8f8aead 100644 --- a/code/game/objects/structures/transit_tubes/station.dm +++ b/code/game/objects/structures/transit_tubes/station.dm @@ -10,8 +10,7 @@ enter_delay = 2 tube_construction = /obj/structure/c_transit_tube/station var/pod_moving = 0 - var/automatic_launch_time = 100 - var/cooldown_delay = 200 + var/cooldown_delay = 50 var/launch_cooldown = 0 var/reverse_launch = 0 @@ -67,7 +66,7 @@ else if(icon_state == "open") if(pod.contents.len && user.loc != pod) user.visible_message("[user] starts emptying [pod]'s contents onto the floor!") - if(do_after(user, 40)) //So it doesn't default to close_animation() on fail + if(do_after(user, 10)) //So it doesn't default to close_animation() on fail if(pod.loc == loc) for(var/atom/movable/AM in pod) AM.loc = get_turf(user) @@ -87,7 +86,7 @@ var/mob/GM = G.affecting for(var/obj/structure/transit_tube_pod/pod in loc) pod.visible_message("[user] starts putting [GM] into the [pod]!") - if(do_after(user, 60) && GM && G && G.affecting == GM) + if(do_after(user, 15) && GM && G && G.affecting == GM) GM.Weaken(5) src.Bumped(GM) qdel(G) diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm index 2c9ba8ba448..0a653c18c24 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -48,8 +48,6 @@ user.last_special = world.time + 100 user << "You start trying to escape from the pod." if(do_after(user, 600)) - if(!user || user.stat != CONSCIOUS) - return user << "You manage to open the pod." src.empty() From 1ed1c6f40b5d4d0a315a457317972dbd1fca5211 Mon Sep 17 00:00:00 2001 From: tkdrg Date: Wed, 15 Oct 2014 11:40:25 -0300 Subject: [PATCH 3/3] Changed breakout times to use the new constants --- .../game/objects/structures/transit_tubes/transit_tube_pod.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm index 0a653c18c24..ed395cc19e5 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -44,8 +44,8 @@ /obj/structure/transit_tube_pod/container_resist() var/mob/living/user = usr if(!moving) - user.changeNext_move(100) - user.last_special = world.time + 100 + user.changeNext_move(CLICK_CD_BREAKOUT) + user.last_special = world.time + CLICK_CD_BREAKOUT user << "You start trying to escape from the pod." if(do_after(user, 600)) user << "You manage to open the pod."