From 46f58058dc5b46d66db3ff663efc347cdec0a579 Mon Sep 17 00:00:00 2001 From: Shroopy <46693163+Shroopy@users.noreply.github.com> Date: Sun, 21 Jul 2024 12:00:19 -0700 Subject: [PATCH] Adds a GPS tracking collar (#1726) ## About The Pull Request Adds a GPS tracking collar to the game. It can be found in the LustWish premium section. The collar broadcasts a GPS signal with the name of the collar. Tracking can be toggled on and off with alt-right-click. The tracking collar can be locked, not only preventing removal but also preventing toggling the tracking. The collar cannot receive GPS signals, only send one. ## Why It's Good For The Game Requested by Aeri on the Discord. Pre-approved by @projectkepler-ru. ## Proof Of Testing https://youtu.be/iFcZotyVUuQ ## Changelog :cl: add: Added a GPS tracking collar to the LustWish /:cl: --------- Co-authored-by: projectkepler-RU <99981766+projectkepler-ru@users.noreply.github.com> Co-authored-by: Waterpig <49160555+Majkl-J@users.noreply.github.com> --- code/__DEFINES/~~bubber_defines/signals.dm | 2 + code/modules/loadout/loadout_items.dm | 1 + .../modules/GAGS/json_configs/collar/gps.json | 22 ++++++ .../json_configs/collar/gps_lefthand.json | 16 +++++ .../json_configs/collar/gps_righthand.json | 16 +++++ .../GAGS/json_configs/collar/gps_worn.json | 16 +++++ .../code/modules/GAGS/greyscale_configs.dm | 19 +++++ .../code/modules/GAGS/icons/collar.dmi | Bin 929 -> 3425 bytes .../code/modules/clothing/neck/collars.dm | 68 ++++++++++++++++++ .../code/modules/loadout/categories/neck.dm | 4 ++ .../code/modules/vending/armadyne.dm | 4 ++ .../code/modules/vending/lustwish.dm | 13 ++-- tgstation.dme | 1 + 13 files changed, 176 insertions(+), 6 deletions(-) create mode 100644 modular_skyrat/modules/GAGS/json_configs/collar/gps.json create mode 100644 modular_skyrat/modules/GAGS/json_configs/collar/gps_lefthand.json create mode 100644 modular_skyrat/modules/GAGS/json_configs/collar/gps_righthand.json create mode 100644 modular_skyrat/modules/GAGS/json_configs/collar/gps_worn.json create mode 100644 modular_zubbers/code/modules/vending/armadyne.dm diff --git a/code/__DEFINES/~~bubber_defines/signals.dm b/code/__DEFINES/~~bubber_defines/signals.dm index 10e6cf57438..023ececaf43 100644 --- a/code/__DEFINES/~~bubber_defines/signals.dm +++ b/code/__DEFINES/~~bubber_defines/signals.dm @@ -1,2 +1,4 @@ // Signal sent when the morgue tray throws its alarm #define COMSIG_MORGUE_ALARM "morgue_alarm" +// Can be sent whenever an object's name is changed so components can be properly updated as well +#define COMSIG_NAME_CHANGED "name_changed" diff --git a/code/modules/loadout/loadout_items.dm b/code/modules/loadout/loadout_items.dm index b4a51206392..79c8012814a 100644 --- a/code/modules/loadout/loadout_items.dm +++ b/code/modules/loadout/loadout_items.dm @@ -297,6 +297,7 @@ GLOBAL_LIST_INIT(all_loadout_categories, init_loadout_categories()) renamed = 1 if(renamed) ADD_TRAIT(equipped_item, TRAIT_WAS_RENAMED, "Loadout") + SEND_SIGNAL(equipped_item, COMSIG_NAME_CHANGED) // BUBBER EDIT // SKYRAT EDIT END if(can_be_reskinned && item_details?[INFO_RESKIN]) diff --git a/modular_skyrat/modules/GAGS/json_configs/collar/gps.json b/modular_skyrat/modules/GAGS/json_configs/collar/gps.json new file mode 100644 index 00000000000..e112f2bc0b2 --- /dev/null +++ b/modular_skyrat/modules/GAGS/json_configs/collar/gps.json @@ -0,0 +1,22 @@ +{ + "gps": [ + + { + "type": "icon_state", + "icon_state": "collar_band_gray", + "blend_mode": "overlay", + "color_ids": [ 1 ] + }, + { + "type": "icon_state", + "icon_state": "collar_tracker_gray", + "blend_mode": "overlay", + "color_ids": [ 2 ] + }, + { + "type": "icon_state", + "icon_state": "collar_screen", + "blend_mode": "overlay" + } + ] +} diff --git a/modular_skyrat/modules/GAGS/json_configs/collar/gps_lefthand.json b/modular_skyrat/modules/GAGS/json_configs/collar/gps_lefthand.json new file mode 100644 index 00000000000..4486fb697fc --- /dev/null +++ b/modular_skyrat/modules/GAGS/json_configs/collar/gps_lefthand.json @@ -0,0 +1,16 @@ +{ + "gps": [ + { + "type": "icon_state", + "icon_state": "collar_inhand_tracker_l_gray", + "blend_mode": "overlay", + "color_ids": [ 2 ] + }, + { + "type": "icon_state", + "icon_state": "collar_inhand_band_l_gray", + "blend_mode": "overlay", + "color_ids": [ 1 ] + } + ] +} diff --git a/modular_skyrat/modules/GAGS/json_configs/collar/gps_righthand.json b/modular_skyrat/modules/GAGS/json_configs/collar/gps_righthand.json new file mode 100644 index 00000000000..14b4568ba2d --- /dev/null +++ b/modular_skyrat/modules/GAGS/json_configs/collar/gps_righthand.json @@ -0,0 +1,16 @@ +{ + "gps": [ + { + "type": "icon_state", + "icon_state": "collar_inhand_tracker_r_gray", + "blend_mode": "overlay", + "color_ids": [ 2 ] + }, + { + "type": "icon_state", + "icon_state": "collar_inhand_band_r_gray", + "blend_mode": "overlay", + "color_ids": [ 1 ] + } + ] +} diff --git a/modular_skyrat/modules/GAGS/json_configs/collar/gps_worn.json b/modular_skyrat/modules/GAGS/json_configs/collar/gps_worn.json new file mode 100644 index 00000000000..4216f213c09 --- /dev/null +++ b/modular_skyrat/modules/GAGS/json_configs/collar/gps_worn.json @@ -0,0 +1,16 @@ +{ + "gps": [ + { + "type": "icon_state", + "icon_state": "collar_mob_tracker_gray", + "blend_mode": "overlay", + "color_ids": [ 2 ] + }, + { + "type": "icon_state", + "icon_state": "collar_mob_band_gray", + "blend_mode": "overlay", + "color_ids": [ 1 ] + } + ] +} diff --git a/modular_zubbers/code/modules/GAGS/greyscale_configs.dm b/modular_zubbers/code/modules/GAGS/greyscale_configs.dm index b137fde1353..1a123b44660 100644 --- a/modular_zubbers/code/modules/GAGS/greyscale_configs.dm +++ b/modular_zubbers/code/modules/GAGS/greyscale_configs.dm @@ -11,6 +11,24 @@ name = "Ring Bell Collar (Worn)" json_config = 'modular_skyrat/modules/GAGS/json_configs/collar/ringbell_worn.json' + +/datum/greyscale_config/collar/gps + name = "GPS Collar" + icon_file = 'modular_zubbers/code/modules/GAGS/icons/collar.dmi' + json_config = 'modular_skyrat/modules/GAGS/json_configs/collar/gps.json' + +/datum/greyscale_config/collar/gps/worn + name = "GPS Collar (Worn)" + json_config = 'modular_skyrat/modules/GAGS/json_configs/collar/gps_worn.json' + +/datum/greyscale_config/collar/gps/lefthand + name = "GPS Collar (Left hand)" + json_config = 'modular_skyrat/modules/GAGS/json_configs/collar/gps_lefthand.json' + +/datum/greyscale_config/collar/gps/righthand + name = "GPS Collar (Right hand)" + json_config = 'modular_skyrat/modules/GAGS/json_configs/collar/gps_righthand.json' + //Bunny stuff, sprites from MonkieStation /datum/greyscale_config/bunnysuit @@ -62,3 +80,4 @@ name = "Worn Playbunny Ears" icon_file = 'modular_zubbers/icons/mob/clothing/head/bunnyears.dmi' json_config = 'modular_skyrat/modules/GAGS/json_configs/bunny_stuff/playbunny_ears_worn.json' + diff --git a/modular_zubbers/code/modules/GAGS/icons/collar.dmi b/modular_zubbers/code/modules/GAGS/icons/collar.dmi index d3c65c9f6ef9262d7a2a17c34d380619d99bb294..0aec642890773622cad2cac64fb14dbba31d3704 100644 GIT binary patch literal 3425 zcmb_fdpr~D9(Rkqy-K3=Qq5&96-xDzOB)$8a(T6yluIJFnwaa@NJVnLwWzFKMJ~D1 zEJk^eOUP|Zxh-bKB-Yq$JL~f~=Z|wf=X5@w^ErP!&-2G~{e8dR=llGgBqs;hj_u0Z z#l*yRz-^$;qIUX60Z5B#WxaqIQL~OgxP(G|&{sqJZ-)8@p~S=@A3w=_i+Xo#7qtI7 zvV7Y0{4XCy@P}V^i{swb(AvX;ulv*DH+Tn~{ix11#PPwVyz$SPO%+r5dc%(rfEgHq zI^bo&uYGBg-ZB#I7akk0kIu~u`R2+?=~5Nr)$`VQ@h4~{GUA%Prp^a;t|aHg)G1qL zTpW)w$FIL8=1+sSjbZPoCUPSlNd>u)D_n!G9eb$&&`B*kIMf0W`FQ!Wo8Kk+fzDOJ{5$E%hnZngf3COJ(z=pX zNIM$tQ&VclidHPEA5eR$kTfo|w3$6kwmadFw85mZetqX3dCDrhcbj;we6L`Y%$HW-psb zaVz#PH8D}1=-+N-B^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NU4&$As^J|~Dx=abWXZ@bfO8)=*%Wsx9 z9T#gVlyT3!9aVnw|Gn4k7VC7pqeDZV=-vOh+ivRhY{u%KX;1qVBpdfD#2=B6`m^$O z=AAe0jMaq}GH?FY&HqyudwmXP8do0Miq}?NlUydL2(JCQU%y+=2X zFXM`MALyT8aH-=nWB+e?(2i?CDvLGq1tSRt3pR#6#)f2u2iTc$d<%fVJ8RkM|C(X5 zmX&pzr~NRgvHZb0|HJhYHmo+9zQL=vPSZ`>uWHz!{WDR5tD4%VdHPb;+WUXA6LiEJ<~?6s zli?g18u;S>q`m6htQ($Lr?&iCCsTdMRe^vH(OvV7`_|Ok(N7(3#RBsjgQu&X%Q~lo FCIEMok!An@ diff --git a/modular_zubbers/code/modules/clothing/neck/collars.dm b/modular_zubbers/code/modules/clothing/neck/collars.dm index edc4614407d..bba571915b5 100644 --- a/modular_zubbers/code/modules/clothing/neck/collars.dm +++ b/modular_zubbers/code/modules/clothing/neck/collars.dm @@ -9,3 +9,71 @@ /obj/item/clothing/neck/human_petcollar/locked/ringbell/Initialize(mapload) . = ..() AddComponent(/datum/component/squeak, list('modular_zubbers/sound/misc/collarbell1.ogg'=1,'modular_zubbers/sound/misc/collarbell2.ogg'=1), 50, 100, 8) + +/obj/item/clothing/neck/kink_collar/locked/gps + name = "tracking collar" + desc = "A collar that lets you find your pet anywhere with GPS!" + var/datum/component/gps/gps + icon_state = "gps" + greyscale_config = /datum/greyscale_config/collar/gps + greyscale_config_worn = /datum/greyscale_config/collar/gps/worn + greyscale_config_inhand_left = /datum/greyscale_config/collar/gps/lefthand + greyscale_config_inhand_right = /datum/greyscale_config/collar/gps/righthand + greyscale_colors = "#8B96B7#505665" + flags_1 = IS_PLAYER_COLORABLE_1 + unique_reskin = null + resistance_flags = FIRE_PROOF + +/obj/item/clothing/neck/kink_collar/locked/gps/Initialize(mapload) + . = ..() + atom_storage.click_alt_open = FALSE + gps = AddComponent(/datum/component/gps, name) + register_context() + update_icon(UPDATE_OVERLAYS) + RegisterSignal(src, COMSIG_NAME_CHANGED, PROC_REF(on_update_name)) + +/obj/item/clothing/neck/kink_collar/locked/gps/proc/on_update_name() + SIGNAL_HANDLER + gps.gpstag = name + +/obj/item/clothing/neck/kink_collar/locked/gps/attack_self(mob/user) + . = ..() + gps.gpstag = tagname + +/obj/item/clothing/neck/kink_collar/locked/gps/examine(mob/user) + . = ..() + . += span_notice("Alt-click to [gps.tracking ? "disable":"enable"] tracking.") + +///Calls toggletracking +/obj/item/clothing/neck/kink_collar/locked/gps/click_alt(mob/user) + if(locked) + balloon_alert(user, "it's locked!") + playsound(src, 'sound/items/click.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE) + else + toggletracking(user) + balloon_alert(user, "tracking [gps.tracking ? "enabled":"disabled"]") + playsound(src, 'sound/machines/click.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE) + return CLICK_ACTION_SUCCESS + +/obj/item/clothing/neck/kink_collar/locked/gps/proc/toggletracking(mob/user) + gps.tracking = !gps.tracking + update_icon(UPDATE_OVERLAYS) + user.update_worn_neck() + +/obj/item/clothing/neck/kink_collar/locked/gps/add_context(atom/source, list/context, obj/item/held_item, mob/user) + . = ..() + if(!locked) + context[SCREENTIP_CONTEXT_ALT_LMB] = "[gps.tracking ? "Disable":"Enable"] tracking" + return CONTEXTUAL_SCREENTIP_SET + +/obj/item/clothing/neck/kink_collar/locked/gps/update_overlays() + . = ..() + if(gps.tracking) + . += mutable_appearance('modular_zubbers/code/modules/GAGS/icons/collar.dmi', "light") + . += emissive_appearance('modular_zubbers/code/modules/GAGS/icons/collar.dmi', "light", src, alpha = src.alpha) + +/obj/item/clothing/neck/kink_collar/locked/gps/worn_overlays(mutable_appearance/standing, isinhands = FALSE) + . = ..() + if(gps.tracking && !isinhands) + . += mutable_appearance('modular_zubbers/code/modules/GAGS/icons/collar.dmi', "collar_mob_tracker_light") + . += emissive_appearance('modular_zubbers/code/modules/GAGS/icons/collar.dmi', "collar_mob_tracker_light", src, alpha = src.alpha) diff --git a/modular_zubbers/code/modules/loadout/categories/neck.dm b/modular_zubbers/code/modules/loadout/categories/neck.dm index 2fa90fad540..1fa456e2d98 100644 --- a/modular_zubbers/code/modules/loadout/categories/neck.dm +++ b/modular_zubbers/code/modules/loadout/categories/neck.dm @@ -7,6 +7,10 @@ name = "Ringing Bell Collar" item_path = /obj/item/clothing/neck/human_petcollar/locked/ringbell +/datum/loadout_item/neck/gps + name = "Tracking Collar" + item_path = /obj/item/clothing/neck/kink_collar/locked/gps + /datum/loadout_item/neck/binary name = "Crow Feather Cloak" item_path = /obj/item/clothing/neck/binary diff --git a/modular_zubbers/code/modules/vending/armadyne.dm b/modular_zubbers/code/modules/vending/armadyne.dm new file mode 100644 index 00000000000..4f5c8fcb681 --- /dev/null +++ b/modular_zubbers/code/modules/vending/armadyne.dm @@ -0,0 +1,4 @@ +/obj/machinery/vending/security + zubbers_contraband = list( + /obj/item/clothing/neck/kink_collar/locked/gps = 3, + ) diff --git a/modular_zubbers/code/modules/vending/lustwish.dm b/modular_zubbers/code/modules/vending/lustwish.dm index 2678f9f644f..4cae04f1aef 100644 --- a/modular_zubbers/code/modules/vending/lustwish.dm +++ b/modular_zubbers/code/modules/vending/lustwish.dm @@ -23,10 +23,11 @@ ) zubbers_premium = list( - /obj/item/holosign_creator/sex = 6, - /obj/item/clothing/under/mikubikini = 3, - /obj/item/clothing/suit/mikujacket = 3, - /obj/item/clothing/head/mikuhair = 3, - /obj/item/clothing/gloves/mikugloves = 3, - /obj/item/clothing/shoes/sneakers/mikuleggings = 3, + /obj/item/clothing/neck/kink_collar/locked/gps = 3, + /obj/item/holosign_creator/sex = 6, + /obj/item/clothing/under/mikubikini = 3, + /obj/item/clothing/suit/mikujacket = 3, + /obj/item/clothing/head/mikuhair = 3, + /obj/item/clothing/gloves/mikugloves = 3, + /obj/item/clothing/shoes/sneakers/mikuleggings = 3, ) diff --git a/tgstation.dme b/tgstation.dme index 9af4ec15383..e5de2fd98e4 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -9052,6 +9052,7 @@ #include "modular_zubbers\code\modules\uplink\uplink_items\dangerous.dm" #include "modular_zubbers\code\modules\uplink\uplink_items\device_tools.dm" #include "modular_zubbers\code\modules\uplink\uplink_items\job.dm" +#include "modular_zubbers\code\modules\vending\armadyne.dm" #include "modular_zubbers\code\modules\vending\clothmate.dm" #include "modular_zubbers\code\modules\vending\comdrobe.dm" #include "modular_zubbers\code\modules\vending\games.dm"