Cut down on z-level generation for shuttles (#13573)

This commit is contained in:
Wildkins
2022-04-19 11:42:21 +02:00
committed by GitHub
parent a7ad5e2d1a
commit 24f31ef511
6 changed files with 19 additions and 7 deletions
+8 -3
View File
@@ -7,6 +7,7 @@
var/obj/effect/shuttle_landmark/ship/landmark // Record our open space landmark for easy reference.
var/multiz = 0 // Index of multi-z levels, starts at 0
var/status = SHIP_STATUS_LANDED
var/subshuttle = FALSE // TRUE/FALSE: Is this a ship that starts docked to another ship?
icon_state = "shuttle"
moving_state = "shuttle_moving"
@@ -34,8 +35,12 @@
// We autobuild our z levels.
/obj/effect/overmap/visitable/ship/landable/find_z_levels()
for(var/i = 0 to multiz)
world.maxz++
if(isStationLevel(z) || multiz || subshuttle)
// If we're not on station and not multi-z or inside an existing ship, then we already had a z-level generated for us; let's use that
for(var/i = 0 to multiz)
world.maxz++
map_z += world.maxz
else
map_z += world.maxz
var/turf/center_loc = locate(round(world.maxx/2), round(world.maxy/2), world.maxz)
@@ -168,4 +173,4 @@
if(SHIP_STATUS_TRANSIT)
return "Maneuvering under secondary thrust."
if(SHIP_STATUS_OVERMAP)
return "In open space."
return "In open space."
@@ -0,0 +1,6 @@
author: JohnWildkins
delete-after: True
changes:
- refactor: "Cut down on extraneous z-level generation for off-map shuttles."
+2
View File
@@ -7,6 +7,7 @@
spawn_cost = 1
id = "tcfl_peacekeeper_ship"
shuttles_to_initialise = list(/datum/shuttle/autodock/overmap/tcfl_peacekeeper_ship, /datum/shuttle/autodock/overmap/tcfl_shuttle)
template_flags = TEMPLATE_FLAG_SPAWN_GUARANTEED
/obj/effect/overmap/visitable/sector/tcfl_peacekeeper_ship
name = "faint ship activity"
@@ -92,6 +93,7 @@
vessel_mass = 3000 //very inefficient pod
fore_dir = NORTH
vessel_size = SHIP_SIZE_TINY
subshuttle = TRUE
/obj/machinery/computer/shuttle_control/explore/tcfl_shuttle
name = "shuttle control console"
+2
View File
@@ -92,6 +92,7 @@
vessel_mass = 3000 //very inefficient pod
fore_dir = NORTH
vessel_size = SHIP_SIZE_TINY
subshuttle = TRUE
/obj/machinery/computer/shuttle_control/explore/orion_express_shuttle
name = "shuttle control console"
@@ -219,6 +220,7 @@
vessel_mass = 3000 //very inefficient pod
fore_dir = NORTH
vessel_size = SHIP_SIZE_TINY
subshuttle = TRUE
/obj/machinery/computer/shuttle_control/explore/ee_shuttle
name = "shuttle control console"
+1
View File
@@ -92,6 +92,7 @@
vessel_mass = 3000 //very inefficient pod
fore_dir = NORTH
vessel_size = SHIP_SIZE_TINY
subshuttle = TRUE
/obj/machinery/computer/shuttle_control/explore/sfa_shuttle
name = "shuttle control console"
-4
View File
@@ -126,7 +126,3 @@
allow_borgs_to_leave = TRUE
warehouse_basearea = /area/operations/storage
/datum/map/sccv_horizon/finalize_load()
// generate an empty space Z
world.maxz++