mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 00:21:11 +01:00
Area fixes (#2875)
changes: Fixes copy_contents_to not working. Fixes elevators attempting to spawn roofs when it didn't really make sense. Minor efficiency tweaks in move_contents_to and elevators.
This commit is contained in:
@@ -34,8 +34,8 @@
|
||||
ASSERT(z != -1)
|
||||
|
||||
// Now use our information to build an *ordered* list of turfs.
|
||||
for (var/x = xmin; x <= xmax; x++)
|
||||
for (var/y = ymin; y <= ymax; y++)
|
||||
for (var/x = xmin to xmax)
|
||||
for (var/y = ymin to ymax)
|
||||
var/turf/T = locate(x, y, z)
|
||||
if (T.loc != src || T.type == ignore_type)
|
||||
// Not ours or ignored type, we don't give a crap.
|
||||
@@ -54,9 +54,7 @@
|
||||
|
||||
ASSERT(source_turfs.len == target_turfs.len)
|
||||
|
||||
var/list/simulated_turfs = list()
|
||||
|
||||
for (var/i = 1; i <= source_turfs.len; i++)
|
||||
for (var/i = 1 to source_turfs.len)
|
||||
var/turf/ST = source_turfs[i]
|
||||
if (!ST) // Excluded turfs are null to keep the list ordered.
|
||||
continue
|
||||
@@ -69,15 +67,8 @@
|
||||
|
||||
ST.ChangeTurf(ST.baseturf)
|
||||
|
||||
if (istype(TT, /turf/simulated))
|
||||
simulated_turfs += TT
|
||||
|
||||
for (var/thing in simulated_turfs)
|
||||
var/turf/simulated/T = thing
|
||||
|
||||
T.update_icon()
|
||||
if (istype(T.above))
|
||||
T.above.queue_icon_update()
|
||||
TT.update_icon()
|
||||
TT.update_above()
|
||||
|
||||
// Called when a movable area wants to move this object.
|
||||
/atom/movable/proc/shuttle_move(turf/loc)
|
||||
@@ -108,10 +99,10 @@
|
||||
|
||||
baseturf = T.baseturf
|
||||
|
||||
for (var/i = 1; i <= source_turfs.len; i++)
|
||||
for (var/i = 1 to source_turfs.len)
|
||||
var/turf/ST = source_turfs[i]
|
||||
var/turf/TTi = target_turfs[i]
|
||||
if (!ST || (plating_required && TTi.type != baseturf)) // Excluded turfs are null to keep the list ordered.
|
||||
if (!ST || (plating_required && TTi.type == baseturf)) // Excluded turfs are null to keep the list ordered.
|
||||
continue
|
||||
|
||||
var/turf/TT = ST.copy_turf(TTi, ignore_air = TRUE)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
var/global/global_uid = 0
|
||||
var/uid
|
||||
var/holomap_color // Color of this area on the holomap. Must be a hex color (as string) or null.
|
||||
var/no_roof
|
||||
|
||||
/area/Initialize(mapload)
|
||||
icon_state = "white"
|
||||
|
||||
@@ -297,8 +297,9 @@ var/const/enterloopsanity = 100
|
||||
return FALSE
|
||||
|
||||
var/turf/simulated/open/above = GetAbove(src)
|
||||
var/area/A = loc
|
||||
|
||||
if ((istype(above) || (flags & ROOF_FORCE_SPAWN)) && roof_type)
|
||||
if (((istype(above) && !A.no_roof) || (flags & ROOF_FORCE_SPAWN)) && roof_type && above)
|
||||
above.ChangeTurf(roof_type)
|
||||
roof_flags |= flags
|
||||
return TRUE
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
requires_power = 0
|
||||
station_area = 1
|
||||
sound_env = SMALL_ENCLOSED
|
||||
no_roof = TRUE
|
||||
|
||||
var/lift_floor_label = null
|
||||
var/lift_floor_name = null
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
for(var/i = 1, i < uz, i++)
|
||||
lift.floors += null // This silly hack allows lifts to not start on the first zlevel
|
||||
|
||||
for(var/cz = uz;cz<=ez;cz++)
|
||||
for(var/cz = uz to ez)
|
||||
|
||||
var/datum/turbolift_floor/cfloor = new()
|
||||
lift.floors += cfloor
|
||||
|
||||
Reference in New Issue
Block a user