GPS to tgui (#19263)

* GPS to tgui

* dead code

* lol

* default should always work
This commit is contained in:
Kashargul
2026-03-09 00:36:28 +01:00
committed by GitHub
parent b63ebfc772
commit 63f3e35744
16 changed files with 365 additions and 385 deletions
@@ -89,7 +89,7 @@
return PAI_DEFAULT_CHASSIS
/datum/preference/text/pai_chassis/is_valid(value)
if(!(value in SSpai.get_chassis_list()))
if(!(value in SSpai.get_chassis_list()) && value != PAI_DEFAULT_CHASSIS)
return FALSE
. = ..()
+1 -1
View File
@@ -61,7 +61,7 @@
rebuild_overlay_lists(TRUE)
/obj/compass_holder/Destroy()
QDEL_NULL_LIST(compass_waypoints)
QDEL_LIST_ASSOC_VAL(compass_waypoints)
. = ..()
/obj/compass_holder/proc/get_heading()
@@ -36,6 +36,11 @@
src.modules += new /obj/item/dogborg/sleeper/lost(src)
src.modules += new /obj/item/dogborg/pounce(src)
/obj/item/robot_module/robot/lost/adjust_gps(obj/item/gps/robot/robot_gps)
robot_gps.long_range = TRUE
robot_gps.hide_signal = TRUE
robot_gps.can_hide_signal = TRUE
/obj/item/robot_module/robot/gravekeeper
name = "gravekeeper robot module"
hide_on_manifest = TRUE
@@ -174,7 +174,9 @@
// Cyborgs (non-drones), default loadout. This will be given to every module.
/obj/item/robot_module/robot/create_equipment(var/mob/living/silicon/robot/robot)
..()
src.modules += new /obj/item/gps/robot(src)
var/obj/item/gps/robot/robot_gps = new /obj/item/gps/robot(src)
adjust_gps(robot_gps)
src.modules += robot_gps
src.modules += new /obj/item/boop_module(src)
src.modules += new /obj/item/robot_tongue(src)
src.modules += new /obj/item/flash/robot(src)
@@ -184,6 +186,9 @@
src.modules += new /obj/item/gripper/scene(src)
src.modules += new /obj/item/robo_dice(src)
/obj/item/robot_module/robot/proc/adjust_gps(obj/item/gps/robot/robot_gps)
return
/obj/item/robot_module/robot/standard
name = "standard robot module"
pto_type = PTO_CIVILIAN
@@ -38,6 +38,11 @@
id.forceMove(src)
src.modules += id
/obj/item/robot_module/robot/syndicate/adjust_gps(obj/item/gps/robot/robot_gps)
robot_gps.long_range = TRUE
robot_gps.hide_signal = TRUE
robot_gps.can_hide_signal = TRUE
/obj/item/robot_module/robot/syndicate/Destroy()
src.modules -= id
id = null
@@ -65,11 +65,13 @@
has_eye_light_sprites = TRUE
/datum/robot_sprite/dogborg/tall/command
sprite_hud_icon_state = "clerical"
module_type = "Command"
sprite_icon = 'icons/mob/robot/tallrobot/tallrobots.dmi'
pixel_x = 0
/datum/robot_sprite/dogborg/raptor/command
sprite_hud_icon_state = "clerical"
module_type = "Command"
sprite_icon = 'icons/mob/robot/raptor.dmi'
-77
View File
@@ -1,77 +0,0 @@
// DEPRECATED - The normal GPS has the advanced features, now. This is obsolete.
// These are distinguished from the ordinary "Relay Position Devices" that just print your location
// In that they are also all networked with each other to show each other's locations.
/obj/item/gps/advanced
name = "global positioning system"
desc = "Helping lost spacemen find their way through the planets since 1995."
icon = 'icons/obj/telescience.dmi'
icon_state = "gps-c"
w_class = ITEMSIZE_SMALL
slot_flags = SLOT_BELT
origin_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2)
gps_tag = "COM0"
emped = 0
special_handling = TRUE
/obj/item/gps/advanced/Initialize(mapload)
. = ..()
add_overlay("working")
/obj/item/gps/advanced/emp_act(severity, recursive)
emped = TRUE
cut_overlay("working")
add_overlay("emp")
spawn(300)
emped = FALSE
cut_overlay("emp")
add_overlay("working")
/obj/item/gps/advanced/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
var/obj/item/gps/advanced/t = ""
if(emped)
t += "ERROR"
else
t += "<BR><A href='byond://?src=\ref[src];advtag=1'>Set Tag</A> "
t += "<BR>Tag: [gps_tag]"
for(var/obj/item/gps/advanced/G in GLOB.GPS_list)
var/turf/pos = get_turf(G)
var/area/gps_area = get_area(G)
var/tracked_gpstag = G.gps_tag
if(G.emped == 1)
t += "<BR>[tracked_gpstag]: ERROR"
else
t += "<BR>[tracked_gpstag]: [strip_improper(gps_area.name)] ([pos.x], [pos.y], [pos.z])"
var/datum/browser/popup = new(user, "GPS", name, 600, 450)
popup.set_content(t)
popup.open()
/obj/item/gps/advanced/Topic(href, href_list)
..()
if(href_list["advtag"] )
var/a = tgui_input_text(usr, "Please enter desired tag.", name, gps_tag, 4)
a = uppertext(copytext(a, 1, 5))
if(src.loc == usr)
gps_tag = a
name = "global positioning system ([gps_tag])"
attack_self(usr)
/obj/item/gps/advanced/science
icon_state = "gps-s"
gps_tag = "SCI0"
/obj/item/gps/advanced/engineering
icon_state = "gps-e"
gps_tag = "ENG0"
/obj/item/gps/advanced/security
icon_state = "gps-sec"
gps_tag = "SEC0"