mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Holodeck fix
This commit is contained in:
@@ -949,6 +949,8 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
|
|||||||
// Movement based on lower left corner. Tiles that do not fit
|
// Movement based on lower left corner. Tiles that do not fit
|
||||||
// into the new area will not be moved.
|
// 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
|
if(!A || !src) return 0
|
||||||
|
|
||||||
var/list/turfs_src = get_area_turfs(src.type)
|
var/list/turfs_src = get_area_turfs(src.type)
|
||||||
@@ -1002,7 +1004,8 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
|
|||||||
if(istype(B, /turf/space))
|
if(istype(B, /turf/space))
|
||||||
continue moving
|
continue moving
|
||||||
|
|
||||||
var/turf/X = new T.type(B)
|
var/turf/X = B
|
||||||
|
X.ChangeTurf(T.type)
|
||||||
X.set_dir(old_dir1)
|
X.set_dir(old_dir1)
|
||||||
X.icon_state = old_icon_state1
|
X.icon_state = old_icon_state1
|
||||||
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
|
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
|
||||||
@@ -1042,12 +1045,6 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
|
|||||||
copiedobjs += newobjs
|
copiedobjs += newobjs
|
||||||
copiedobjs += newmobs
|
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
|
// var/area/AR = X.loc
|
||||||
|
|
||||||
// if(AR.lighting_use_dynamic)
|
// if(AR.lighting_use_dynamic)
|
||||||
@@ -1063,22 +1060,9 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
var/list/doors = new/list()
|
|
||||||
|
|
||||||
if(toupdate.len)
|
if(toupdate.len)
|
||||||
for(var/turf/simulated/T1 in toupdate)
|
for(var/turf/simulated/T1 in toupdate)
|
||||||
for(var/obj/machinery/door/D2 in T1)
|
air_master.mark_for_update(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)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return copiedobjs
|
return copiedobjs
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user