mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
[NO GBP] Lazy Template Cordoning | Double Runtime Fix (#72709)
## About The Pull Request Adds automatic cordoning to block reservations. Also fixes an issue where ChangeTurf would cause SSicon_smoothing to throw runtimes by calling QUEUE_SMOOTH regardless of initialization completion ## Why It's Good For The Game ## Changelog --------- Signed-off-by: GitHub <noreply@github.com> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
This commit is contained in:
@@ -590,16 +590,24 @@ SUBSYSTEM_DEF(explosions)
|
||||
var/highest_y = our_y + i
|
||||
// top left to one before top right
|
||||
if(highest_y <= max_y)
|
||||
outlist += block(locate(max(lowest_x, 1), highest_y, our_z), locate(min(highest_x - 1, max_x), highest_y, our_z))
|
||||
outlist += block(
|
||||
locate(max(lowest_x, 1), highest_y, our_z),
|
||||
locate(min(highest_x - 1, max_x), highest_y, our_z))
|
||||
// top right to one before bottom right
|
||||
if(highest_x <= max_x)
|
||||
outlist += block(locate(highest_x, min(highest_y, max_y), our_z), locate(highest_x, max(lowest_y + 1, 1), our_z))
|
||||
outlist += block(
|
||||
locate(highest_x, min(highest_y, max_y), our_z),
|
||||
locate(highest_x, max(lowest_y + 1, 1), our_z))
|
||||
// bottom right to one before bottom left
|
||||
if(lowest_y >= 1)
|
||||
outlist += block(locate(min(highest_x, max_x), lowest_y, our_z), locate(max(lowest_x + 1, 1), lowest_y, our_z))
|
||||
outlist += block(
|
||||
locate(min(highest_x, max_x), lowest_y, our_z),
|
||||
locate(max(lowest_x + 1, 1), lowest_y, our_z))
|
||||
// bottom left to one before top left
|
||||
if(lowest_x >= 1)
|
||||
outlist += block(locate(lowest_x, max(lowest_y, 1), our_z), locate(lowest_x, min(highest_y - 1, max_y), our_z))
|
||||
outlist += block(
|
||||
locate(lowest_x, max(lowest_y, 1), our_z),
|
||||
locate(lowest_x, min(highest_y - 1, max_y), our_z))
|
||||
|
||||
return outlist
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ SUBSYSTEM_DEF(minor_mapping)
|
||||
|
||||
var/list/all_turfs
|
||||
for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
|
||||
all_turfs += block(locate(1,1,z), locate(world.maxx,world.maxy,z))
|
||||
all_turfs += Z_TURFS(z)
|
||||
for(var/turf/open/floor/plating/T in all_turfs)
|
||||
if(T.is_blocked_turf())
|
||||
continue
|
||||
@@ -65,7 +65,7 @@ SUBSYSTEM_DEF(minor_mapping)
|
||||
var/list/suitable = list()
|
||||
|
||||
for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
|
||||
for(var/turf/detected_turf as anything in block(locate(1,1,z), locate(world.maxx,world.maxy,z)))
|
||||
for(var/turf/detected_turf as anything in Z_TURFS(z))
|
||||
if(isfloorturf(detected_turf) && detected_turf.underfloor_accessibility == UNDERFLOOR_HIDDEN)
|
||||
suitable += detected_turf
|
||||
|
||||
|
||||
@@ -634,7 +634,7 @@ SUBSYSTEM_DEF(spatial_grid)
|
||||
turfs = GLOB.station_turfs
|
||||
|
||||
else
|
||||
turfs = block(locate(1,1,z), locate(world.maxx, world.maxy, z))
|
||||
turfs = Z_TURFS(z)
|
||||
|
||||
for(var/client_to_insert in 0 to insert_clients)
|
||||
var/turf/random_turf = pick(turfs)
|
||||
|
||||
Reference in New Issue
Block a user