From 54d2078b79668afddae176d887b0118b6b5ceca7 Mon Sep 17 00:00:00 2001 From: MrCastmer <125900379+MrCastmer@users.noreply.github.com> Date: Mon, 15 Jan 2024 16:40:56 +0300 Subject: [PATCH 1/3] Devices tweak Advance pinpointer adding Laser pointer faster recharge Teleporter dispel speed tweak --- .../objects/items/devices/advpinpointer.dm | 135 ++++++++++++++++++ .../objects/items/devices/laserpointer.dm | 3 + .../code/game/objects/items/teleportation.dm | 12 ++ modular_dripstation/includes.dm | 2 + 4 files changed, 152 insertions(+) create mode 100644 modular_dripstation/code/game/objects/items/devices/advpinpointer.dm create mode 100644 modular_dripstation/code/game/objects/items/devices/laserpointer.dm diff --git a/modular_dripstation/code/game/objects/items/devices/advpinpointer.dm b/modular_dripstation/code/game/objects/items/devices/advpinpointer.dm new file mode 100644 index 000000000000..abb8a975288a --- /dev/null +++ b/modular_dripstation/code/game/objects/items/devices/advpinpointer.dm @@ -0,0 +1,135 @@ +#define SETTING_DISK 0 +#define SETTING_OBJECT 1 +#define SETTING_PERSON 2 +GLOBAL_LIST_INIT(HIGHRISK, typecacheof(list(/obj/item/disk/nuclear, + /obj/item/gun/energy/laser/captain, + /obj/item/hand_tele, + /obj/item/clothing/accessory/medal/gold/captain, + /obj/item/melee/sabre, + /obj/item/gun/energy/e_gun/hos, + /obj/item/card/id/captains_spare, + /obj/item/tank/jetpack/oxygen/captain, + /obj/item/aicard, + /obj/item/hypospray/deluxe/cmo, + /obj/item/clothing/suit/armor/reactive/teleport, + /obj/item/clothing/suit/armor/laserproof, + /obj/item/blackbox, + /obj/item/holotool, + /obj/item/areaeditor/blueprints))) + ///obj/item/clothing/gloves/krav_maga/sec, + ///obj/item/cargo_teleporter, +/obj/item/pinpointer/adv + var/modelocked = FALSE // If true, user cannot change mode. + var/obj/item/highrisk_rem = null + var/remember_target = null + var/setting = SETTING_DISK + +/obj/item/pinpointer/adv/examine(mob/user) + . = ..() + var/msg = "Its tracking indicator reads " + if(is_syndicate(user)) + switch(setting) + if(SETTING_DISK) + msg += "\"nuclear_disk\"." + if(SETTING_OBJECT) + msg += "\"target\"." + if(SETTING_PERSON) + msg += "\"person\"." + else + msg = "Its tracking indicator is blank." + else + msg += "\"nuclear_disk\"." + . += msg + +/obj/item/pinpointer/adv/toggle_on() + active = !active + playsound(src, 'sound/items/screwdriver2.ogg', 50, 1) + if(active) + if(!is_syndicate(usr)) + setting = SETTING_DISK + START_PROCESSING(SSfastprocess, src) + else + target = null + highrisk_rem = null + remember_target = null + setting = SETTING_DISK + STOP_PROCESSING(SSfastprocess, src) + update_appearance(UPDATE_ICON) + +/obj/item/pinpointer/adv/scan_for_target() + target = null + switch(setting) + if(SETTING_DISK) + var/obj/item/disk/nuclear/N = locate() in GLOB.poi_list + target = N + if(SETTING_OBJECT) + if(!highrisk_rem) + setting = SETTING_DISK + playsound(src, 'sound/machines/triple_beep.ogg', 50, 1) + return + var/obj/item/H = highrisk_rem + target = H + if(SETTING_PERSON) + if(!remember_target) + setting = SETTING_DISK + playsound(src, 'sound/machines/triple_beep.ogg', 50, 1) + return + target = remember_target + ..() + +/obj/item/pinpointer/adv/AltClick(mob/user) + if(isliving(user)) + if(is_syndicate(user)) + var/mob/living/L = user + to_chat(L, span_danger("Your [name] beeps as it reconfigures it's tracking algorithms.")) + playsound(src, 'sound/machines/boop.ogg', 50, 1) + switch_mode_to() + else + setting = SETTING_DISK + +/obj/item/pinpointer/adv/proc/switch_mode_to(mob/user) + switch(alert("Please select the mode you want to put the pinpointer in.", "Pinpointer Mode Select", "Disk Recovery", "High Risk", "DNA RSS")) + if("Disk Recovery") + setting = SETTING_DISK + if("High Risk") + to_chat(user, "Where are you working?") + setting = SETTING_OBJECT + var/list/item_names[0] + var/list/item_paths[0] + for(var/objective in GLOB.HIGHRISK) + var/datum/objective_item/steal/T = objective + var/name = initial(T.name) + item_names += name + item_paths[name] = initial(T.targetitem) + var/targetitem = input("Select item to search for.", "Item Mode Select","") as null|anything in item_names + if(!targetitem) + return + var/list/target_candidates = get_all_of_type(item_paths[targetitem], subtypes = TRUE) + to_chat(user, "You fucking work here?.") + for(var/obj/item/candidate in target_candidates) + if(!is_centcom_level((get_turf(candidate)).z)) + highrisk_rem = candidate + playsound(src, get_sfx("terminal_type"), 25, 1) + to_chat(user, "You set the pinpointer to locate [targetitem].") + return + if(!highrisk_rem) + to_chat(user, "Failed to locate [targetitem]!") + return + to_chat(user, "The fuck are you doing here?.") + + if("DNA RSS") + setting = SETTING_PERSON + var/DNAstring = input("Input DNA string to search for." , "Please Enter String." , "") + if(!DNAstring) + return + for(var/mob/living/carbon/C in GLOB.mob_list) + if(!C.dna) + continue + if(C.dna.unique_enzymes == DNAstring) + if(!is_centcom_level((get_turf(C)).z)) + remember_target = C + playsound(src, get_sfx("terminal_type"), 25, 1) + to_chat(user, "You set the pinpointer to locate somebody.") + else + playsound(src, 'sound/machines/triple_beep.ogg', 50, 1) + to_chat(user, "Malfunction detected.") diff --git a/modular_dripstation/code/game/objects/items/devices/laserpointer.dm b/modular_dripstation/code/game/objects/items/devices/laserpointer.dm new file mode 100644 index 000000000000..806e7a276612 --- /dev/null +++ b/modular_dripstation/code/game/objects/items/devices/laserpointer.dm @@ -0,0 +1,3 @@ +/obj/item/laser_pointer/RefreshParts() + ///The rate at which the laser regenerates charge. Clamped between 20 seconds and basically instantly just in case of weirdness. Knock off 5 seconds per diode rating + recharge_rate = clamp((20 SECONDS - (5 SECONDS * diode.rating)), 1, 20 SECONDS) \ No newline at end of file diff --git a/modular_dripstation/code/game/objects/items/teleportation.dm b/modular_dripstation/code/game/objects/items/teleportation.dm index 21423c5c0685..4c89e3968b4c 100644 --- a/modular_dripstation/code/game/objects/items/teleportation.dm +++ b/modular_dripstation/code/game/objects/items/teleportation.dm @@ -1,2 +1,14 @@ /obj/item/hand_tele icon = 'modular_dripstation/icons/obj/device.dmi' + +/obj/item/hand_tele/try_dispel_portal(atom/target, mob/user) + if(is_parent_of_portal(target)) //dispel me from this horrid realm + var/dispel_time = 2 - (manipulator.rating/2) + if(dispel_time == 0) + qdel(target) + to_chat(user, span_notice("You dispel [target] with \the [src]!")) + return + balloon_alert(user, "Dispelling portal...") + if(do_after(user, dispel_time SECONDS, target)) + qdel(target) + to_chat(user, span_notice("You dispel [target] with \the [src]!")) \ No newline at end of file diff --git a/modular_dripstation/includes.dm b/modular_dripstation/includes.dm index 6135890de8f6..dfba4de915f9 100644 --- a/modular_dripstation/includes.dm +++ b/modular_dripstation/includes.dm @@ -65,6 +65,8 @@ #include "code\game\objects\items\devices\radio\encryptionkey.dm" #include "code\game\objects\items\devices\radio\radio.dm" #include "code\game\objects\items\devices\powersink.dm" +#include "code\game\objects\items\devices\laserpointer.dm" +#include "code\game\objects\items\devices\advpinpointer.dm" #include "code\game\objects\items\stacks\cash.dm" #include "code\game\objects\items\implants\implant.dm" #include "code\game\objects\items\implants\implanter.dm" From b092a3c72a152eaa409dc93ece66af21fc43b4be Mon Sep 17 00:00:00 2001 From: MrCastmer <125900379+MrCastmer@users.noreply.github.com> Date: Mon, 15 Jan 2024 20:08:34 +0300 Subject: [PATCH 2/3] Update advpinpointer.dm --- .../code/game/objects/items/devices/advpinpointer.dm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/modular_dripstation/code/game/objects/items/devices/advpinpointer.dm b/modular_dripstation/code/game/objects/items/devices/advpinpointer.dm index abb8a975288a..89d5131f3c95 100644 --- a/modular_dripstation/code/game/objects/items/devices/advpinpointer.dm +++ b/modular_dripstation/code/game/objects/items/devices/advpinpointer.dm @@ -83,7 +83,7 @@ GLOBAL_LIST_INIT(HIGHRISK, typecacheof(list(/obj/item/disk/nuclear, var/mob/living/L = user to_chat(L, span_danger("Your [name] beeps as it reconfigures it's tracking algorithms.")) playsound(src, 'sound/machines/boop.ogg', 50, 1) - switch_mode_to() + switch_mode_to(user) else setting = SETTING_DISK @@ -92,20 +92,18 @@ GLOBAL_LIST_INIT(HIGHRISK, typecacheof(list(/obj/item/disk/nuclear, if("Disk Recovery") setting = SETTING_DISK if("High Risk") - to_chat(user, "Where are you working?") setting = SETTING_OBJECT var/list/item_names[0] var/list/item_paths[0] for(var/objective in GLOB.HIGHRISK) - var/datum/objective_item/steal/T = objective - var/name = initial(T.name) + var/obj/item/I = objective + var/name = initial(I.name) item_names += name - item_paths[name] = initial(T.targetitem) + item_paths[name] = objective var/targetitem = input("Select item to search for.", "Item Mode Select","") as null|anything in item_names if(!targetitem) return var/list/target_candidates = get_all_of_type(item_paths[targetitem], subtypes = TRUE) - to_chat(user, "You fucking work here?.") for(var/obj/item/candidate in target_candidates) if(!is_centcom_level((get_turf(candidate)).z)) highrisk_rem = candidate @@ -115,7 +113,6 @@ GLOBAL_LIST_INIT(HIGHRISK, typecacheof(list(/obj/item/disk/nuclear, if(!highrisk_rem) to_chat(user, "Failed to locate [targetitem]!") return - to_chat(user, "The fuck are you doing here?.") if("DNA RSS") setting = SETTING_PERSON From 7e95fa62f49ef491cbd60f7b89a07bfe6b63be72 Mon Sep 17 00:00:00 2001 From: MrCastmer <125900379+MrCastmer@users.noreply.github.com> Date: Mon, 15 Jan 2024 20:36:47 +0300 Subject: [PATCH 3/3] Update advpinpointer.dm --- .../code/game/objects/items/devices/advpinpointer.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modular_dripstation/code/game/objects/items/devices/advpinpointer.dm b/modular_dripstation/code/game/objects/items/devices/advpinpointer.dm index 89d5131f3c95..5e19b0c8efdb 100644 --- a/modular_dripstation/code/game/objects/items/devices/advpinpointer.dm +++ b/modular_dripstation/code/game/objects/items/devices/advpinpointer.dm @@ -80,6 +80,9 @@ GLOBAL_LIST_INIT(HIGHRISK, typecacheof(list(/obj/item/disk/nuclear, /obj/item/pinpointer/adv/AltClick(mob/user) if(isliving(user)) if(is_syndicate(user)) + if(!user.is_holding(src)) + to_chat(user, span_notice("You should be able to press the change mode button to interact with interface.")) + return var/mob/living/L = user to_chat(L, span_danger("Your [name] beeps as it reconfigures it's tracking algorithms.")) playsound(src, 'sound/machines/boop.ogg', 50, 1)