Skip to content

Commit

Permalink
Merge pull request #1082 from CSDSP/ShuttleToCentcom
Browse files Browse the repository at this point in the history
Allow custom shuttles to get to centcom
  • Loading branch information
MosleyTheMalO authored Feb 28, 2024
2 parents d6224bc + a7ae549 commit c5ccf94
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion code/controllers/subsystem/shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ SUBSYSTEM_DEF(shuttle)
wait = 10
init_order = INIT_ORDER_SHUTTLE
flags = SS_KEEP_TIMING|SS_NO_TICK_CHECK
runlevels = RUNLEVEL_SETUP | RUNLEVEL_GAME

var/list/mobile = list()
var/list/stationary = list()
Expand Down Expand Up @@ -79,6 +78,9 @@ SUBSYSTEM_DEF(shuttle)
var/problem_computer_charge_time = 90 SECONDS
var/problem_computer_next_charge_time = 0
//END SKYRAT CHANGE
//SPLURT CHANGE
var/list/navigation_locked_traits = list(ZTRAIT_RESERVED, ZTRAIT_CENTCOM, ZTRAIT_AWAY, ZTRAIT_REEBE) //traits forbided for custom docking
//END SPLURT CHANGE

/datum/controller/subsystem/shuttle/Initialize(timeofday)
ordernum = rand(1, 9000)
Expand Down
5 changes: 2 additions & 3 deletions code/modules/shuttle/navigation_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
var/list/jumpto_ports = list() //hashset of ports to jump to and ignore for collision purposes
var/obj/docking_port/stationary/my_port //the custom docking port placed by this console
var/obj/docking_port/mobile/shuttle_port //the mobile docking port of the connected shuttle
var/list/locked_traits = list(ZTRAIT_RESERVED, ZTRAIT_CENTCOM, ZTRAIT_AWAY, ZTRAIT_REEBE) //traits forbided for custom docking
var/view_range = 0
var/x_offset = 0
var/y_offset = 0
Expand Down Expand Up @@ -201,7 +200,7 @@
var/turf/eyeturf = get_turf(the_eye)
if(!eyeturf)
return SHUTTLE_DOCKER_BLOCKED
if(!eyeturf.z || SSmapping.level_has_any_trait(eyeturf.z, locked_traits))
if(!eyeturf.z || SSmapping.level_has_any_trait(eyeturf.z, SSshuttle.navigation_locked_traits))
return SHUTTLE_DOCKER_BLOCKED

. = SHUTTLE_DOCKER_LANDING_CLEAR
Expand Down Expand Up @@ -352,7 +351,7 @@
stack_trace("SSshuttle.beacons have null entry!")
continue
var/obj/machinery/spaceship_navigation_beacon/nav_beacon = V
if(!nav_beacon.z || SSmapping.level_has_any_trait(nav_beacon.z, console.locked_traits))
if(!nav_beacon.z || SSmapping.level_has_any_trait(nav_beacon.z, SSshuttle.navigation_locked_traits))
break
if(!nav_beacon.locked)
L["([L.len]) [nav_beacon.name] located: [nav_beacon.x] [nav_beacon.y] [nav_beacon.z]"] = nav_beacon
Expand Down
6 changes: 6 additions & 0 deletions modular_splurt/code/controllers/subsystem/shuttle.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/datum/controller/subsystem/shuttle/Initialize(timeofday)
. = ..(timeofday)
SSticker.OnRoundend(CALLBACK(src, .proc/roundend_callback))

/datum/controller/subsystem/shuttle/proc/roundend_callback()
SSshuttle.navigation_locked_traits.Remove(ZTRAIT_CENTCOM)
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -4426,6 +4426,7 @@
#include "modular_splurt\code\controllers\subsystem\afk.dm"
#include "modular_splurt\code\controllers\subsystem\discord.dm"
#include "modular_splurt\code\controllers\subsystem\redbot.dm"
#include "modular_splurt\code\controllers\subsystem\shuttle.dm"
#include "modular_splurt\code\controllers\subsystem\ticker.dm"
#include "modular_splurt\code\controllers\subsystem\processing\quirks.dm"
#include "modular_splurt\code\controllers\subsystem\processing\station.dm"
Expand Down

0 comments on commit c5ccf94

Please sign in to comment.