diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index a20eeea361..0bd074e96b 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -881,6 +881,8 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
// Movement based on lower left corner. Tiles that do not fit
// into the new area will not be moved.
+ // Does *not* affect gases etc; copied turfs will be changed via ChangeTurf, and the dir, icon, and icon_state copied. All other vars will remain default.
+
if(!A || !src) return 0
var/list/turfs_src = get_area_turfs(src.type)
@@ -934,7 +936,8 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
if(istype(B, /turf/space))
continue moving
- var/turf/X = new T.type(B)
+ var/turf/X = B
+ X.ChangeTurf(T.type)
X.set_dir(old_dir1)
X.icon_state = old_icon_state1
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
@@ -974,12 +977,6 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
copiedobjs += newobjs
copiedobjs += newmobs
-
-
- for(var/V in T.vars)
- if(!(V in list("type","loc","locs","vars", "parent", "parent_type","verbs","ckey","key","x","y","z","contents", "luminosity")))
- X.vars[V] = T.vars[V]
-
// var/area/AR = X.loc
// if(AR.lighting_use_dynamic)
@@ -995,22 +992,9 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
- var/list/doors = new/list()
-
if(toupdate.len)
for(var/turf/simulated/T1 in toupdate)
- for(var/obj/machinery/door/D2 in T1)
- doors += D2
- /*if(T1.parent)
- air_master.groups_to_rebuild += T1.parent
- else
- air_master.tiles_to_update += T1*/
-
- for(var/obj/O in doors)
- O:update_nearby_tiles(1)
-
-
-
+ air_master.mark_for_update(T1)
return copiedobjs
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index ef9c5c6376..2ae2a5d495 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -64,6 +64,28 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null
if(!procname) return
+
+ if(targetselected)
+ if(!target)
+ usr << "Your target no longer exists."
+ return
+ if(!hascall(target,procname))
+ usr << "Error: callproc(): target has no such call [procname]."
+ return
+ else
+ if(copytext(procname, 1, 7) == "/proc/")
+ // nothing
+ else if(copytext(procname, 1, 6) == "proc/")
+ procname = "/[procname]"
+ else if(copytext(procname, 1, 2) == "/")
+ procname = "/proc[procname]"
+ else
+ procname = "/proc/[procname]"
+ // Procs have the strange property that text2path will return non-null, but ispath() will return false.
+ var/path = text2path(procname)
+ if(!path || ispath(path))
+ usr << "Invalid proc [procname]"
+ return
var/argnum = input("Number of arguments","Number:",0) as num|null
if(!argnum && (argnum!=0)) return
@@ -117,13 +139,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(!target)
usr << "Error: callproc(): owner of proc no longer exists."
return
- if(!hascall(target,procname))
- usr << "Error: callproc(): target has no such call [procname]."
- return
log_admin("[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
returnval = call(target,procname)(arglist(lst)) // Pass the lst as an argument list to the proc
else
- //this currently has no hascall protection. wasn't able to get it working.
log_admin("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
returnval = call(procname)(arglist(lst)) // Pass the lst as an argument list to the proc