Skip to content

Commit

Permalink
triumph fixes (#5714)
Browse files Browse the repository at this point in the history
Co-authored-by: silicons <[email protected]>
  • Loading branch information
silicons and silicons authored Jul 16, 2023
1 parent 9d7f150 commit 0119df4
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
13 changes: 9 additions & 4 deletions code/game/turfs/change_turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,24 @@ GLOBAL_LIST_INIT(multiz_hole_baseturfs, typecacheof(list(
// Creates a new turf
// new_baseturfs can be either a single type or list of types, formated the same as baseturfs. see turf.dm
/turf/proc/ChangeTurf(path, list/new_baseturfs, flags)
// todo: hopefully someday we can get simulated/open to just be turf/open or something once
// we refactor ZAS
// then we can skip all this bullshit and have proper space zmimic
// as long as zm overhead isn't too high.
switch(path)
if(null)
return
if(/turf/baseturf_bottom)
path = SSmapping.level_baseturf(z) || /turf/space
if(!ispath(path))
path = text2path(path)
if (!ispath(path))
warning("Z-level [z] has invalid baseturf '[SSmapping.level_baseturf(z)]'")
path = /turf/space
stack_trace("Z-level [z] has invalid baseturf '[SSmapping.level_baseturf(z)]'")
path = /turf/space
if(path == /turf/space) // no space/basic check, if you use space/basic in a map honestly get bent
if(istype(GetBelow(src), /turf/simulated))
path = /turf/simulated/open
else if(path == /turf/simulated/open)
if(istype(GetBelow(src), /turf/space))
path = /turf/space
if(/turf/space/basic)
// basic doesn't initialize and this will cause issues
// no warning though because this can happen naturaly as a result of it being built on top of
Expand Down
3 changes: 1 addition & 2 deletions code/modules/admin/verbs/buildmode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,7 @@ GLOBAL_LIST_EMPTY(buildholders)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
WIN.setDir(WEST)
if(NORTHWEST)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
WIN.setDir(NORTHWEST)
new /obj/spawner/window/reinforced/full(get_turf(object))
var/turf/TC = get_turf(object)
log_admin("[key_name(usr)] made a window at [COORD(TC)]")
if(2) // Adv. Build
Expand Down
5 changes: 5 additions & 0 deletions code/modules/overmap/legacy/spacetravel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ var/list/cached_space = list()
ny = TRANSITIONEDGE + 2
nx = rand(TRANSITIONEDGE + 2, world.maxx - TRANSITIONEDGE - 2)

nz = SAFEPICK(M.map_z)
if(!isnull(nz))
A.forceMove(locate(nx, ny, nz))
return

testing("[A] spacemoving from [M] ([M.x], [M.y]).")

var/turf/map = locate(M.x,M.y,(LEGACY_MAP_DATUM).overmap_z)
Expand Down
13 changes: 6 additions & 7 deletions code/modules/rogueminer_vr/controller.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ var/datum/controller/rogue/rm_controller
oldest_zone = ZM
oldest_time = ZM.prepared_at

return oldest_zone
return oldest_zone || SAFEINDEXACCESS(all_zones, 1)

/datum/controller/rogue/proc/mark_clean(var/datum/rogue/zonemaster/ZM)
if(!(ZM in all_zones)) //What? Who?
Expand Down Expand Up @@ -183,6 +183,11 @@ var/datum/controller/rogue/rm_controller
/datum/controller/rogue/proc/prepare_new_zone()
var/datum/rogue/zonemaster/ZM_target

if(clean_zones.len <= 1) //Need to clean the oldest one, too.
rm_controller.dbg("RMC(pnz): Cleaning up oldest zone.")
var/datum/rogue/zonemaster/ZM_oldest = get_oldest_zone()
ZM_oldest.clean_zone()

if(clean_zones.len)
ZM_target = pick(clean_zones)

Expand All @@ -196,10 +201,4 @@ var/datum/controller/rogue/rm_controller
else
rm_controller.dbg("RMC(pnz): I was asked for a new zone but there's no space.")

if(clean_zones.len <= 1) //Need to clean the oldest one, too.
rm_controller.dbg("RMC(pnz): Cleaning up oldest zone.")
spawn(0) //Detatch it so we can return the new zone for now.
var/datum/rogue/zonemaster/ZM_oldest = get_oldest_zone()
ZM_oldest.clean_zone()

return ZM_target
2 changes: 1 addition & 1 deletion code/modules/shuttles/shuttle_console.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
desc = "Used to control a linked shuttle."
icon_keyboard = "atmos_key"
icon_screen = "shuttle"
circuit = null
circuit = /obj/item/circuitboard/shuttle_console

var/shuttle_tag // Used to coordinate data in shuttle controller.
var/hacked = 0 // Has been emagged, no access restrictions.
Expand Down
2 changes: 2 additions & 0 deletions maps/triumph/triumph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
/datum/map/sector/tradeport_140,
/datum/map/sector/lavaland_140,
/datum/map/sector/roguemining_140/one,
/datum/map/sector/mining_140,
)

//* LEGACY BELOW *//
Expand All @@ -34,6 +35,7 @@
/datum/shuttle/autodock/overmap/mining/triumph,
/datum/shuttle/autodock/overmap/civvie/triumph,
/datum/shuttle/autodock/overmap/courser/triumph,
/datum/shuttle/autodock/ferry/belter,
)

full_name = "NSV Triumph"
Expand Down

0 comments on commit 0119df4

Please sign in to comment.