mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +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:
@@ -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