Just deleted about 400 bot accounts and a bunch of spam. To mitigate this in the future, we've enabled reCaptcha on signup. Let me know if someone got caught in the crossfire.

Commit 19128f20 authored by unid15's avatar unid15 Committed by ComicIronic
Browse files

Add set_area proc (#12616)

* Add set_area proc

* fix

100% tested
parent 5bb9eb0e
......@@ -139,14 +139,12 @@ move an amendment</a> to the drawing.</p>
to_chat(usr, "<span class='warning'>Name too long.</span>")
return
var/area/station/custom/newarea = new
var/area/oldarea = get_area(usr)
newarea.name = str
newarea.tag = "[newarea.type]/[md5(str)]"
newarea.contents.Add(turfs)
for(var/turf/T in turfs)
T.change_area(oldarea,newarea)
for(var/atom/allthings in T.contents)
allthings.change_area(oldarea,newarea)
T.set_area(newarea)
newarea.addSorted()
ghostteleportlocs[newarea.name] = newarea
......
......@@ -687,3 +687,22 @@
return A.has_gravity
return 1
/turf/proc/set_area(area/A)
if(ispath(A))
var/path = A
A = locate(path)
if(!A)
A = new path
else if(!isarea(A))
return FALSE
var/area/old_area = loc
A.contents.Add(src)
if(old_area)
change_area(old_area, A)
for(var/atom/AM in contents)
AM.change_area(old_area, A)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment