[TWEAK] Bio-Chip Pad Renaming Tracker Bio-Cips (#25617)

* Allows the biochip pad to change the GPS tag on the tracker implant. No more standard 'TRACK0' on everything.

Updates the UI for the biochip pad.
Adds the biochip pad to the protolathe under the medical tab

* Prettier!!! :)

* Moves the "tag" property below the general blurbs.

* Update code/game/objects/items/weapons/bio_chips/bio_chip_pad.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Spaghetti-bit <60483458+Spaghetti-bit@users.noreply.github.com>

* Merge Conflict Fix (1/2)

* MC (1.5/2)

* Merge Conflict Resolution (Hopefully)

---------

Signed-off-by: Spaghetti-bit <60483458+Spaghetti-bit@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
Spaghetti-bit
2024-06-25 21:29:45 +00:00
committed by GitHub
co-authored by Luc
parent 6b70c59c96
commit 457f9ff04f
5 changed files with 111 additions and 54 deletions
@@ -90,6 +90,18 @@
"function" = implant_data.function,
"image" = "[icon2base64(icon(initial(case.imp.icon), initial(case.imp.icon_state), SOUTH, 1))]",
)
if(istype(case.imp, /obj/item/bio_chip/tracking))
var/obj/item/bio_chip/tracking/T = case.imp
data["gps"] = T
data["tag"] = T.gpstag
else
data["gps"] = null
data["tag"] = null
else
// Sanity check in the case that a pad is used for multiple types of implants.
data["gps"] = null
data["tag"] = null
return data
/obj/item/bio_chip_pad/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
@@ -99,3 +111,10 @@
switch(action)
if("eject_case")
eject_case(ui.user)
if("tag")
var/obj/item/bio_chip/tracking/T = case.imp
var/newtag = params["newtag"] || ""
newtag = uppertext(paranoid_sanitize(copytext_char(newtag, 1, 5)))
if(!length(newtag) || T.gpstag == newtag)
return
T.gpstag = newtag
@@ -7,6 +7,7 @@
implant_state = "implant-nanotrasen"
var/warn_cooldown = 0
var/obj/item/gps/internal_gps
var/gpstag = "TRACK0"
var/internal_gps_path = /obj/item/gps/internal/tracking_implant
/obj/item/bio_chip/tracking/Initialize(mapload)
@@ -23,6 +24,8 @@
if(!.)
return
internal_gps = new internal_gps_path(src)
if(gpstag)
internal_gps.gpstag = gpstag
/obj/item/bio_chip/tracking/removed(mob/target)
. = ..()
@@ -30,7 +33,6 @@
QDEL_NULL(internal_gps)
/obj/item/gps/internal/tracking_implant
gpstag = "TRACK0"
local = FALSE
/obj/item/bio_chip_implanter/tracking
@@ -660,6 +660,16 @@
////////////Regular Implants/////////////
/////////////////////////////////////////
/datum/design/bio_chip_pad
name = "Bio-chip Pad"
desc = "Used to modify bio-chips."
id = "biochip_pad"
req_tech = list("materials" = 3, "biotech" = 4, "programming" = 3)
build_type = PROTOLATHE
materials = list(MAT_METAL = 2000, MAT_GLASS = 1000)
build_path = /obj/item/bio_chip_pad
category = list("Medical")
/datum/design/bio_chip_implanter
name = "Bio-chip Implanter"
desc = "A sterile automatic bio-chip injector."