mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-06 23:42:27 +00:00
Merge pull request #3979 from Anewbe/tracking_implant
Improves tracking implant code, adds a tracking implant variant to the loadout
This commit is contained in:
@@ -352,6 +352,8 @@ var/global/datum/controller/occupations/job_master
|
||||
H << "<span class='warning'>Your current species, job or whitelist status does not permit you to spawn with [thing]!</span>"
|
||||
continue
|
||||
|
||||
H.amend_exploitable(G.path)
|
||||
|
||||
if(G.slot == "implant")
|
||||
H.implant_loadout(G)
|
||||
continue
|
||||
|
||||
@@ -69,8 +69,37 @@
|
||||
/obj/item/weapon/implant/tracking
|
||||
name = "tracking implant"
|
||||
desc = "Track with this."
|
||||
var/id = 1.0
|
||||
var/id = 1
|
||||
var/degrade_time = 10 MINUTES //How long before the implant stops working outside of a living body.
|
||||
|
||||
/obj/item/weapon/implant/tracking/weak //This is for the loadout
|
||||
degrade_time = 2.5 MINUTES
|
||||
|
||||
/obj/item/weapon/implant/tracking/New()
|
||||
id = rand(1, 1000)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/implant/tracking/implanted(var/mob/source)
|
||||
processing_objects.Add(src)
|
||||
listening_objects |= src
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/implant/tracking/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/implant/tracking/process()
|
||||
var/implant_location = src.loc
|
||||
if(ismob(implant_location))
|
||||
var/mob/living/L = implant_location
|
||||
if(L.stat == DEAD)
|
||||
if(world.time >= L.timeofdeath + degrade_time)
|
||||
name = "melted implant"
|
||||
desc = "Charred circuit in melted plastic case. Wonder what that used to be..."
|
||||
icon_state = "implant_melted"
|
||||
malfunction = MALFUNCTION_PERMANENT
|
||||
processing_objects.Remove(src)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/implant/tracking/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
if (href_list["tracking_id"])
|
||||
var/obj/item/weapon/implant/tracking/T = src.case.imp
|
||||
T.id += text2num(href_list["tracking_id"])
|
||||
T.id = min(100, T.id)
|
||||
T.id = min(1000, T.id)
|
||||
T.id = max(1, T.id)
|
||||
|
||||
if (istype(src.loc, /mob))
|
||||
|
||||
@@ -79,13 +79,8 @@ Frequency:
|
||||
|
||||
src.temp += "<B>Extranneous Signals:</B><BR>"
|
||||
for (var/obj/item/weapon/implant/tracking/W in world)
|
||||
if (!W.implanted || !(istype(W.loc,/obj/item/organ/external) || ismob(W.loc)))
|
||||
if (!W.implanted || !(istype(W.loc,/obj/item/organ/external) || ismob(W.loc) || W.malfunction))
|
||||
continue
|
||||
else
|
||||
var/mob/M = W.loc
|
||||
if (M.stat == 2)
|
||||
if (M.timeofdeath + 6000 < world.time)
|
||||
continue
|
||||
|
||||
var/turf/tr = get_turf(W)
|
||||
if (tr.z == sr.z && tr)
|
||||
|
||||
Reference in New Issue
Block a user