mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-02-03 21:00:19 +00:00
Allows you to define a base turf for an area which overrides the z-level's base turf in unsorted.dm.
It will first check to see if the turf is set, and if not it will still use the z-level default. This means we can mark areas as having a base of space to override the z-level base of asteroid that we're using. As a result, we can ensure the bombs, shuttles moving, etc. leave behind an space turf by defining shuttles, solars/"external" areas as using space as a base. Areas will need to be updated to check with base_turf = /turf/space and references to the old get_base_turf proc updated so all calls (bombs, Nar'Sie, deconstruction, etc.) have the correct effect, but it's tired and I want to commit this now so I'm committed to finishing it tomorrow.
This commit is contained in:
@@ -229,14 +229,14 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
#define LOCATE_COORDS(X, Y, Z) locate(between(1, X, world.maxx), between(1, Y, world.maxy), Z)
|
||||
/proc/getcircle(turf/center, var/radius) //Uses a fast Bresenham rasterization algorithm to return the turfs in a thin circle.
|
||||
if(!radius) return list(center)
|
||||
|
||||
|
||||
var/x = 0
|
||||
var/y = radius
|
||||
var/p = 3 - 2 * radius
|
||||
|
||||
|
||||
. = list()
|
||||
while(y >= x) // only formulate 1/8 of circle
|
||||
|
||||
|
||||
. += LOCATE_COORDS(center.x - x, center.y - y, center.z) //upper left left
|
||||
. += LOCATE_COORDS(center.x - y, center.y - x, center.z) //upper upper left
|
||||
. += LOCATE_COORDS(center.x + y, center.y - x, center.z) //upper upper right
|
||||
@@ -247,7 +247,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
. += LOCATE_COORDS(center.x + x, center.y + y, center.z) //lower right right
|
||||
|
||||
if(p < 0)
|
||||
p += 4*x++ + 6;
|
||||
p += 4*x++ + 6;
|
||||
else
|
||||
p += 4*(x++ - y--) + 10;
|
||||
|
||||
@@ -875,7 +875,7 @@ proc/GaussRandRound(var/sigma,var/roundto)
|
||||
if(turftoleave)
|
||||
fromupdate += T.ChangeTurf(turftoleave)
|
||||
else
|
||||
T.ChangeTurf(get_base_turf(T.z))
|
||||
T.ChangeTurf(get_base_turf_by_area(T))
|
||||
|
||||
refined_src -= T
|
||||
refined_trg -= B
|
||||
|
||||
Reference in New Issue
Block a user