Update area_copy.dm
This commit is contained in:
@@ -4,6 +4,10 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars,list(
|
||||
"power_supply", "contents", "reagents", "stat", "x", "y", "z", "group", "atmos_adjacent_turfs", "comp_lookup"
|
||||
))
|
||||
|
||||
GLOBAL_list_INIT(duplicate_forbidden_vars_by_type, typecacheof_assoc_list(list(
|
||||
/obj/item/gun/energy = "ammo_type"
|
||||
)))
|
||||
|
||||
/proc/DuplicateObject(atom/original, perfectcopy = TRUE, sameloc = FALSE, atom/newloc = null, nerf = FALSE, holoitem=FALSE)
|
||||
RETURN_TYPE(original.type)
|
||||
if(!original)
|
||||
@@ -16,7 +20,7 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars,list(
|
||||
O = new original.type(newloc)
|
||||
|
||||
if(perfectcopy && O && original)
|
||||
for(var/V in original.vars - GLOB.duplicate_forbidden_vars)
|
||||
for(var/V in original.vars - GLOB.duplicate_forbidden_vars - duplicate_forbidden_vars_by_type[O.type])
|
||||
if(islist(original.vars[V]))
|
||||
var/list/L = original.vars[V]
|
||||
O.vars[V] = L.Copy()
|
||||
|
||||
Reference in New Issue
Block a user