mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
Merge pull request #11816 from Jalleo/ImplantTrackingFix
Improves implant tracking by using a list instead of world
This commit is contained in:
@@ -14,4 +14,5 @@ var/global/list/chemical_reagents_list //list of all /datum/reagent datums in
|
||||
var/global/list/surgeries_list = list() //list of all surgeries by name, associated with their path.
|
||||
var/global/list/table_recipes = list() //list of all table craft recipes
|
||||
var/global/list/rcd_list = list() //list of Rapid Construction Devices.
|
||||
var/global/list/apcs_list = list() //list of all Area Power Controller machines, seperate from machines for powernet speeeeeeed.
|
||||
var/global/list/apcs_list = list() //list of all Area Power Controller machines, seperate from machines for powernet speeeeeeed.
|
||||
var/global/list/tracking_implants = list() //list of all tracking implants to work out what treks everyone are on. Sadly not on lavaworld not implemented...
|
||||
@@ -33,7 +33,7 @@
|
||||
dat += "<H3>Prisoner Implant Management</H3>"
|
||||
dat += "<HR>Chemical Implants<BR>"
|
||||
var/turf/Tr = null
|
||||
for(var/obj/item/weapon/implant/chem/C in world)
|
||||
for(var/obj/item/weapon/implant/chem/C in tracking_implants)
|
||||
Tr = get_turf(C)
|
||||
if((Tr) && (Tr.z != src.z)) continue//Out of range
|
||||
if(!C.implanted) continue
|
||||
@@ -43,7 +43,7 @@
|
||||
dat += "<A href='?src=\ref[src];inject10=\ref[C]'>(<font class='bad'>(10)</font>)</A><BR>"
|
||||
dat += "********************************<BR>"
|
||||
dat += "<HR>Tracking Implants<BR>"
|
||||
for(var/obj/item/weapon/implant/tracking/T in world)
|
||||
for(var/obj/item/weapon/implant/tracking/T in tracking_implants)
|
||||
if(!iscarbon(T.imp_in))
|
||||
continue
|
||||
if(!T.implanted)
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
areaindex[tmpname] = 1
|
||||
L[tmpname] = R
|
||||
|
||||
for (var/obj/item/weapon/implant/tracking/I in world)
|
||||
for (var/obj/item/weapon/implant/tracking/I in tracking_implants)
|
||||
if (!I.implanted || !ismob(I.loc))
|
||||
continue
|
||||
else
|
||||
|
||||
@@ -87,6 +87,15 @@
|
||||
origin_tech = "materials=2;magnets=2;programming=2;biotech=2"
|
||||
var/id = 1
|
||||
|
||||
|
||||
/obj/item/weapon/implant/tracking/New()
|
||||
..()
|
||||
tracking_implants += src
|
||||
|
||||
/obj/item/weapon/implant/tracking/Destroy()
|
||||
..()
|
||||
tracking_implants -= src
|
||||
|
||||
/obj/item/weapon/implant/tracking/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Tracking Beacon<BR>
|
||||
|
||||
@@ -24,6 +24,14 @@
|
||||
/obj/item/weapon/implant/chem/New()
|
||||
..()
|
||||
create_reagents(50)
|
||||
tracking_implants += src
|
||||
|
||||
/obj/item/weapon/implant/chem/Destroy()
|
||||
..()
|
||||
tracking_implants -= src
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/implant/chem/trigger(emote, mob/source)
|
||||
if(emote == "deathgasp")
|
||||
|
||||
@@ -78,7 +78,7 @@ Frequency:
|
||||
src.temp += "[W.code]-[dir2text(get_dir(sr, tr))]-[direct]<BR>"
|
||||
|
||||
src.temp += "<B>Extranneous Signals:</B><BR>"
|
||||
for (var/obj/item/weapon/implant/tracking/W in world)
|
||||
for (var/obj/item/weapon/implant/tracking/W in tracking_implants)
|
||||
if (!W.implanted || !ismob(W.loc))
|
||||
continue
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user