Skip to content

Commit

Permalink
duct tape it & walk along
Browse files Browse the repository at this point in the history
At this point I do not know how we manage to misplace overmap zs all the time, so lets just have a failsafe for if we manage to achieve it!
  • Loading branch information
DeltaFire15 committed Aug 18, 2023
1 parent 200b170 commit d64a6e0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nsv13/code/__DEFINES/overmap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,6 @@ GLOBAL_LIST_INIT(overmap_impact_sounds, list('nsv13/sound/effects/ship/freespace
#define INTERIOR_READY 2
#define INTERIOR_DELETING 3
#define INTERIOR_DELETED 4

//Overmap flags
#define OVERMAP_FLAG_ZLEVEL_CARRIER (1<<0) //! This overmap is meant to carry a z with it, prompting restoration in certain cases.
6 changes: 6 additions & 0 deletions nsv13/code/modules/overmap/FTL/ftl_jump.dm
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
/datum/star_system/proc/add_ship(obj/structure/overmap/OM, turf/target_turf)
if(!system_contents.Find(OM))
system_contents += OM //Lets be safe while I cast some black magic.
var/did_restore_system = FALSE
if(!occupying_z && OM.z) //Does this system have a physical existence? if not, we'll set this now so that any inbound ships jump to the same Z-level that we're on.
if(!SSmapping.level_trait(OM.z, ZTRAIT_OVERMAP))
occupying_z = OM.get_reserved_z()
else
occupying_z = OM.z
did_restore_system = TRUE
else if(!occupying_z && ((OM.overmap_flags & OVERMAP_FLAG_ZLEVEL_CARRIER) || length(OM.mobs_in_ship))) //If someone is inside, or we always want it loaded, load it.
occupying_z = OM.get_reserved_z()
did_restore_system = TRUE
if(did_restore_system)
if(fleets.len)
for(var/datum/fleet/F in fleets)
if(!F.current_system)
Expand Down
2 changes: 2 additions & 0 deletions nsv13/code/modules/overmap/ai-skynet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1610,6 +1610,8 @@ Seek a ship thich we'll station ourselves around
var/ai_can_launch_fighters = FALSE //AI variable. Allows your ai ships to spawn fighter craft
var/list/ai_fighter_type = list()
var/ai_flags = AI_FLAG_DESTROYER
///Overmap bitflags
var/overmap_flags = NONE

var/list/holding_cargo = list() // list of objective datums. This station has cargo to deliver to the players as part of a courier objective
var/list/expecting_cargo = list() // list of objective datums. This station is expecting cargo delivered to them by the players as a part of a courier objective
Expand Down
1 change: 1 addition & 0 deletions nsv13/code/modules/overmap/overmap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ Proc to spool up a new Z-level for a player ship and assign it a treadmill.
var/turf/exit = get_turf(locate(round(world.maxx * 0.5, 1), round(world.maxy * 0.5, 1), world.maxz)) //Plop them bang in the center of the system.
var/obj/structure/overmap/OM = new _path(exit) //Ship'll pick up the info it needs, so just domp eet at the exit turf.
OM.reserved_z = world.maxz
OM.overmap_flags |= OVERMAP_FLAG_ZLEVEL_CARRIER
OM.current_system = SSstar_system.find_system(OM)
if(OM.role == MAIN_OVERMAP) //If we're the main overmap, we'll cheat a lil' and apply our status to all of the Zs under "station"
for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
Expand Down

0 comments on commit d64a6e0

Please sign in to comment.