/obj/item/gps name = "global positioning system" desc = "Helping lost spacemen find their way through the planets since 2016." icon = 'icons/obj/telescience.dmi' icon_state = "gps-c" w_class = WEIGHT_CLASS_SMALL slot_flags = ITEM_SLOT_BELT obj_flags = UNIQUE_RENAME var/gpstag = "COM0" var/starton = TRUE /obj/item/gps/Initialize() . = ..() AddComponent(/datum/component/gps/item, gpstag, starton) /obj/item/gps/science icon_state = "gps-s" gpstag = "SCI0" /obj/item/gps/engineering icon_state = "gps-e" gpstag = "ENG0" /obj/item/gps/mining icon_state = "gps-m" gpstag = "MINE0" desc = "A positioning system helpful for rescuing trapped or injured miners, keeping one on you at all times while mining might just save your life." /obj/item/gps/mining/off starton = FALSE /obj/item/gps/cyborg icon_state = "gps-b" gpstag = "BORG0" desc = "A mining cyborg internal positioning system. Used as a recovery beacon for damaged cyborg assets, or a collaboration tool for mining teams." /obj/item/gps/cyborg/Initialize() . = ..() ADD_TRAIT(src, TRAIT_NODROP, CYBORG_ITEM_TRAIT) /obj/item/gps/internal icon_state = null item_flags = ABSTRACT gpstag = "Eerie Signal" desc = "Report to a coder immediately." invisibility = INVISIBILITY_MAXIMUM var/obj/item/implant/gps/implant /obj/item/gps/internal/Initialize(mapload, obj/item/implant/gps/_implant) . = ..() implant = _implant /obj/item/gps/internal/Destroy() if(implant?.imp_in) qdel(implant) else return ..() /obj/item/gps/internal/mining icon_state = "gps-m" gpstag = "MINER" desc = "A positioning system helpful for rescuing trapped or injured miners, keeping one on you at all times while mining might just save your life." /obj/item/gps/internal/base gpstag = "NT_AUX" desc = "A homing signal from Nanotrasen's mining base." /obj/item/gps/visible_debug name = "visible GPS" gpstag = "ADMIN" desc = "This admin-spawn GPS unit leaves the coordinates visible \ on any turf that it passes over, for debugging. Especially useful \ for marking the area around the transition edges." var/list/turf/tagged /obj/item/gps/visible_debug/Initialize() . = ..() tagged = list() START_PROCESSING(SSfastprocess, src) /obj/item/gps/visible_debug/process() var/turf/T = get_turf(src) if(T) // I assume it's faster to color,tag and OR the turf in, rather // then checking if its there T.color = RANDOM_COLOUR T.maptext = "[T.x],[T.y],[T.z]" tagged |= T /obj/item/gps/visible_debug/proc/clear() while(tagged.len) var/turf/T = pop(tagged) T.color = initial(T.color) T.maptext = initial(T.maptext) /obj/item/gps/visible_debug/Destroy() if(tagged) clear() tagged = null STOP_PROCESSING(SSfastprocess, src) . = ..()