mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +01:00
tube stations can be skipped by holding direction key (#25350)
* tube stations can be skipped by holding direction key * Update code/game/objects/structures/transit_tubes/station.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: warriorstar-orion <orion@snowfrost.garden> * invert/guard clause * add examine text for hints --------- Signed-off-by: warriorstar-orion <orion@snowfrost.garden> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
@@ -52327,12 +52327,6 @@
|
||||
icon_state = "vault"
|
||||
},
|
||||
/area/station/engineering/gravitygenerator)
|
||||
"dCJ" = (
|
||||
/obj/structure/transit_tube/cap{
|
||||
dir = 8
|
||||
},
|
||||
/turf/simulated/floor/plating,
|
||||
/area/station/turret_protected/aisat/interior)
|
||||
"dCM" = (
|
||||
/obj/structure/disposalpipe/segment{
|
||||
dir = 4
|
||||
@@ -57689,10 +57683,12 @@
|
||||
layer = 4;
|
||||
pixel_y = 32
|
||||
},
|
||||
/obj/structure/transit_tube/station,
|
||||
/obj/structure/transit_tube_pod{
|
||||
dir = 4
|
||||
},
|
||||
/obj/structure/transit_tube/station/reverse/flipped{
|
||||
dir = 1
|
||||
},
|
||||
/turf/simulated/floor/plasteel{
|
||||
icon_state = "dark"
|
||||
},
|
||||
@@ -64056,9 +64052,6 @@
|
||||
name = "north bump";
|
||||
pixel_y = 24
|
||||
},
|
||||
/obj/structure/transit_tube/cap{
|
||||
dir = 4
|
||||
},
|
||||
/turf/simulated/floor/plasteel{
|
||||
icon_state = "dark"
|
||||
},
|
||||
@@ -72430,11 +72423,11 @@
|
||||
/turf/simulated/floor/plasteel,
|
||||
/area/station/supply/storage)
|
||||
"nrh" = (
|
||||
/obj/structure/transit_tube/station,
|
||||
/obj/structure/transit_tube_pod{
|
||||
dir = 8
|
||||
},
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/yellow,
|
||||
/obj/structure/transit_tube/station/reverse,
|
||||
/turf/simulated/floor/plating,
|
||||
/area/station/turret_protected/aisat/interior)
|
||||
"nrD" = (
|
||||
@@ -131948,7 +131941,7 @@ aab
|
||||
aaa
|
||||
cQp
|
||||
wza
|
||||
dCJ
|
||||
dnW
|
||||
dnv
|
||||
dnW
|
||||
diz
|
||||
|
||||
@@ -87549,9 +87549,6 @@
|
||||
/area/station/maintenance/starboard)
|
||||
"rjL" = (
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
/obj/structure/transit_tube/cap{
|
||||
dir = 8
|
||||
},
|
||||
/obj/item/radio/intercom{
|
||||
name = "south bump";
|
||||
pixel_y = -28
|
||||
@@ -97341,9 +97338,7 @@
|
||||
/obj/machinery/ai_status_display{
|
||||
pixel_y = -32
|
||||
},
|
||||
/obj/structure/transit_tube/station{
|
||||
dir = 1
|
||||
},
|
||||
/obj/structure/transit_tube/station/reverse/flipped,
|
||||
/turf/simulated/floor/plasteel{
|
||||
dir = 8;
|
||||
icon_state = "vault"
|
||||
|
||||
@@ -19446,10 +19446,12 @@
|
||||
/turf/simulated/floor/wood,
|
||||
/area/station/command/office/captain/bedroom)
|
||||
"bsI" = (
|
||||
/obj/structure/transit_tube/station,
|
||||
/obj/structure/sign/securearea{
|
||||
pixel_y = 32
|
||||
},
|
||||
/obj/structure/transit_tube/station/reverse/flipped{
|
||||
dir = 1
|
||||
},
|
||||
/turf/simulated/floor/plasteel{
|
||||
dir = 4;
|
||||
icon_state = "darkbluecorners"
|
||||
@@ -53883,9 +53885,6 @@
|
||||
},
|
||||
/area/station/medical/virology)
|
||||
"hkm" = (
|
||||
/obj/structure/transit_tube/cap{
|
||||
dir = 4
|
||||
},
|
||||
/obj/machinery/status_display{
|
||||
layer = 4;
|
||||
pixel_y = 32
|
||||
|
||||
@@ -33,6 +33,11 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/transit_tube/station/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>While in transit, hold the directional key matching the pod's direction to skip a station.</span>"
|
||||
. += "<span class='notice'>While at a station, press a directional key to quickly leave the station in that direction.</span>"
|
||||
|
||||
/obj/structure/transit_tube/station/init_tube_dirs()
|
||||
// Tube station directions are simply 90 to either side of
|
||||
// the exit.
|
||||
@@ -47,7 +52,19 @@
|
||||
tube_dirs = list(NORTH, SOUTH)
|
||||
boarding_dir = reverse_direction(dir)
|
||||
|
||||
/obj/structure/transit_tube/station/should_stop_pod(pod, from_dir)
|
||||
/obj/structure/transit_tube/station/should_stop_pod(obj/structure/transit_tube_pod/pod, from_dir)
|
||||
for(var/atom/atom in pod.contents)
|
||||
var/client/client = CLIENT_FROM_VAR(atom)
|
||||
if(!client)
|
||||
return
|
||||
|
||||
for(var/held_key in client.input_data.keys_held)
|
||||
if(held_key in client.movement_kb_dirs)
|
||||
var/held_dir = client.movement_kb_dirs[held_key]
|
||||
// if they're holding a different direction down,
|
||||
// stop to let them get out/change direction
|
||||
return held_dir != from_dir
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/structure/transit_tube/station/Bumped(mob/living/L)
|
||||
@@ -187,6 +204,9 @@
|
||||
reverse_launch = TRUE
|
||||
uninstalled_type = /obj/structure/transit_tube_construction/terminus
|
||||
|
||||
/obj/structure/transit_tube/station/reverse/should_stop_pod(obj/structure/transit_tube_pod/pod, from_dir)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/transit_tube/station/reverse/init_tube_dirs()
|
||||
tube_dirs = list(turn(dir, -90))
|
||||
boarding_dir = reverse_direction(dir)
|
||||
@@ -260,6 +280,9 @@
|
||||
base_icon_state = "terminusdispenser0"
|
||||
uninstalled_type = /obj/structure/transit_tube_construction/terminus/dispenser
|
||||
|
||||
/obj/structure/transit_tube/station/dispenser/reverse/should_stop_pod(obj/structure/transit_tube_pod/pod, from_dir)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/transit_tube/station/dispenser/reverse/init_tube_dirs()
|
||||
tube_dirs = list(turn(dir, -90))
|
||||
boarding_dir = reverse_direction(dir)
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
return
|
||||
|
||||
// Called to check if a pod should stop upon entering this tube.
|
||||
/obj/structure/transit_tube/proc/should_stop_pod(pod, from_dir)
|
||||
/obj/structure/transit_tube/proc/should_stop_pod(obj/structure/transit_tube_pod/pod, from_dir)
|
||||
return FALSE
|
||||
|
||||
// Called when a pod stops in this tube section.
|
||||
@@ -274,18 +274,3 @@
|
||||
tube_dirs = list(EAST, NORTHWEST, SOUTHWEST)
|
||||
if(WEST)
|
||||
tube_dirs = list(WEST, SOUTHEAST, NORTHEAST)
|
||||
|
||||
|
||||
// cosmetic "cap" for tubes. Note that tubes can't enter this.
|
||||
/obj/structure/transit_tube/cap
|
||||
icon_state = "cap"
|
||||
|
||||
/obj/structure/transit_tube/cap/init_tube_dirs()
|
||||
tube_dirs = list(turn(dir, 180)) // back the way we came
|
||||
|
||||
/obj/structure/transit_tube/cap/has_entrance(from_dir)
|
||||
return FALSE
|
||||
|
||||
/obj/structure/transit_tube/cap/create_tube_overlay()
|
||||
// cap sprites already have overlays
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user