mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Merge pull request #9111 from PsiOmegaDelta/AreaContentsConcat
Cloning vats and DNA scanners are again located by cloning computers.
This commit is contained in:
@@ -94,8 +94,9 @@ var/list/delayed_garbage = list()
|
|||||||
if(!istype(A))
|
if(!istype(A))
|
||||||
//warning("qdel() passed object of type [A.type]. qdel() can only handle /datum types.")
|
//warning("qdel() passed object of type [A.type]. qdel() can only handle /datum types.")
|
||||||
del(A)
|
del(A)
|
||||||
garbage_collector.dels++
|
if(garbage_collector)
|
||||||
garbage_collector.hard_dels++
|
garbage_collector.dels++
|
||||||
|
garbage_collector.hard_dels++
|
||||||
else if(isnull(A.gcDestroyed))
|
else if(isnull(A.gcDestroyed))
|
||||||
// Let our friend know they're about to get collected
|
// Let our friend know they're about to get collected
|
||||||
. = !A.Destroy()
|
. = !A.Destroy()
|
||||||
|
|||||||
@@ -30,6 +30,12 @@
|
|||||||
power_change() // all machines set to current power level, also updates lighting icon
|
power_change() // all machines set to current power level, also updates lighting icon
|
||||||
InitializeLighting()
|
InitializeLighting()
|
||||||
|
|
||||||
|
/area/proc/get_contents()
|
||||||
|
var/list/concat_contents = list()
|
||||||
|
for (var/area/RA in related)
|
||||||
|
concat_contents |= RA.contents
|
||||||
|
return concat_contents
|
||||||
|
|
||||||
/area/proc/get_cameras()
|
/area/proc/get_cameras()
|
||||||
var/list/cameras = list()
|
var/list/cameras = list()
|
||||||
for (var/area/RA in related)
|
for (var/area/RA in related)
|
||||||
|
|||||||
@@ -14,20 +14,18 @@
|
|||||||
var/obj/item/weapon/disk/data/diskette = null //Mostly so the geneticist can steal everything.
|
var/obj/item/weapon/disk/data/diskette = null //Mostly so the geneticist can steal everything.
|
||||||
var/loading = 0 // Nice loading text
|
var/loading = 0 // Nice loading text
|
||||||
|
|
||||||
/obj/machinery/computer/cloning/New()
|
/obj/machinery/computer/cloning/initialize()
|
||||||
|
..()
|
||||||
|
updatemodules()
|
||||||
|
|
||||||
|
/obj/machinery/computer/cloning/Destroy()
|
||||||
|
releasecloner()
|
||||||
..()
|
..()
|
||||||
spawn(5)
|
|
||||||
updatemodules()
|
|
||||||
return
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/computer/cloning/proc/updatemodules()
|
/obj/machinery/computer/cloning/proc/updatemodules()
|
||||||
src.scanner = findscanner()
|
src.scanner = findscanner()
|
||||||
|
releasecloner()
|
||||||
findcloner()
|
findcloner()
|
||||||
var/num = 1
|
|
||||||
for (var/obj/machinery/clonepod/pod in pods)
|
|
||||||
pod.connected = src
|
|
||||||
pod.name = "[initial(pod.name)] #[num++]"
|
|
||||||
|
|
||||||
/obj/machinery/computer/cloning/proc/findscanner()
|
/obj/machinery/computer/cloning/proc/findscanner()
|
||||||
var/obj/machinery/dna_scannernew/scannerf = null
|
var/obj/machinery/dna_scannernew/scannerf = null
|
||||||
@@ -40,18 +38,26 @@
|
|||||||
|
|
||||||
//Then look for a free one in the area
|
//Then look for a free one in the area
|
||||||
if(!scannerf)
|
if(!scannerf)
|
||||||
for(var/obj/machinery/dna_scannernew/S in get_area(src))
|
var/area/A = get_area(src)
|
||||||
|
for(var/obj/machinery/dna_scannernew/S in A.get_contents())
|
||||||
return S
|
return S
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/computer/cloning/proc/findcloner()
|
/obj/machinery/computer/cloning/proc/releasecloner()
|
||||||
|
for(var/obj/machinery/clonepod/P in pods)
|
||||||
|
P.connected = null
|
||||||
|
P.name = initial(P.name)
|
||||||
pods.Cut()
|
pods.Cut()
|
||||||
for(var/obj/machinery/clonepod/P in get_area(src))
|
|
||||||
|
/obj/machinery/computer/cloning/proc/findcloner()
|
||||||
|
var/num = 1
|
||||||
|
var/area/A = get_area(src)
|
||||||
|
for(var/obj/machinery/clonepod/P in A.get_contents())
|
||||||
if(!P.connected)
|
if(!P.connected)
|
||||||
pods += P
|
pods += P
|
||||||
|
P.connected = src
|
||||||
return
|
P.name = "[initial(P.name)] #[num++]"
|
||||||
|
|
||||||
/obj/machinery/computer/cloning/attackby(obj/item/W as obj, mob/user as mob)
|
/obj/machinery/computer/cloning/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
if (istype(W, /obj/item/weapon/disk/data)) //INSERT SOME DISKETTES
|
if (istype(W, /obj/item/weapon/disk/data)) //INSERT SOME DISKETTES
|
||||||
|
|||||||
4
html/changelogs/PsiOmegaDelta-AreaContentsConcat.yml
Normal file
4
html/changelogs/PsiOmegaDelta-AreaContentsConcat.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
author: PsiOmegaDelta
|
||||||
|
delete-after: True
|
||||||
|
changes:
|
||||||
|
- bugfix: "The cloning computer can again successfully locate nearby cloning vats and DNA scanners at round start."
|
||||||
Reference in New Issue
Block a user