Skip to content

Commit

Permalink
high-risk items pinpointer (#13519)
Browse files Browse the repository at this point in the history
* be

* rev

* 111

* Update pinpointer.dm
  • Loading branch information
simb11 authored Sep 24, 2024
1 parent 794137e commit 24f40c1
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 18 deletions.
7 changes: 7 additions & 0 deletions code/datums/uplinks_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,13 @@
/datum/uplink_item/device_tools
category = "Devices and Tools"

/datum/uplink_item/device_tools/pinpointer
name = "Improved Pinpointer"
desc = "A artisanally modified pinpointer for searching for items that your employers are interested in."
item = /obj/item/weapon/pinpointer/highriskitems
cost = 2
uplink_types = list("traitor")

/datum/uplink_item/device_tools/disk
name = "Diskette With Virus"
desc = "A floppy disk containing a virus to sabotage R&D systems. Insert this diskette into the R&D Server Controller to destroy scientific data."
Expand Down
70 changes: 69 additions & 1 deletion code/game/gamemodes/modes_gameplays/nuclear/pinpointer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@
mode = SEARCH_FOR_OBJECT
for (var/obj/machinery/nuclearbomb/N in poi_list)
if(N.nuketype == "Syndi")
target = locate(N)
target = N
to_chat(usr, "<span class='notice'>Nuclear Warhead Locator active.</span>")
break

playsound(src, 'sound/machines/twobeep.ogg', VOL_EFFECTS_MASTER)

Expand Down Expand Up @@ -245,5 +246,72 @@

return attack_self(usr)

/obj/item/weapon/pinpointer/highriskitems
desc = "A pinpointer designed and configured to search for specific items using a network of quantum signals."
origin_tech = "programming=5;bluespace=5"
item_action_types = list(/datum/action/item_action/hands_free/toggle_pinpointer_mode)

/datum/action/item_action/hands_free/toggle_pinpointer_mode
name = "Toggle pinpointer"

/datum/action/item_action/hands_free/toggle_pinpointer_mode/Activate()
var/obj/item/weapon/pinpointer/highriskitems/P = target
P.toggle_mode()

/obj/item/weapon/pinpointer/highriskitems/proc/toggle_mode()
reset_target()

var/obj/item/targetitem = input("Select item to search for.", "Item Mode Select","") as null|anything in global.possible_items_for_steal
if(!targetitem)
return
for(var/obj/item/I in global.possible_items_for_steal)
if(!istype(I, targetitem))
continue
var/turf/T = get_turf(I)
if(is_centcom_level(T.z))
continue
target = I
break
if(!target)
to_chat(usr, "Failed to locate [targetitem]!")
return
to_chat(usr, "You set the pinpointer to locate [targetitem]")

return attack_self(usr)

/obj/item/weapon/pinpointer/highriskitems/process()
if(!active)
return
if(!target && !mode)
target = locate(/obj/item/weapon/disk/nuclear)
if(!target)
icon_state = "pinonnull"
return
if(target)
var/turf/self_turf = get_turf(src)
var/turf/target_turf = get_turf(target)
if(target_turf.z != self_turf.z)
icon_state = "alterpinfaralert"
else if(target_turf == self_turf)
icon_state = "alterpindirect"
else
switch(get_dist(target_turf, self_turf))
if(1 to 10)
icon_state = "alterpin10"
if(11 to 25)
icon_state = "alterpin25"
if(26 to 50)
icon_state = "alterpin50"
if(51 to 75)
icon_state = "alterpin75"
if(76 to 100)
icon_state = "alterpin100"
if(101 to 150)
icon_state = "alterpin150"
if(151 to 200)
icon_state = "alterpin200"
if(201 to INFINITY)
icon_state = "pinonfar"

#undef SEARCH_FOR_DISK
#undef SEARCH_FOR_OBJECT
21 changes: 4 additions & 17 deletions code/game/gamemodes/objectives/steal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,14 @@ var/global/list/possible_items_for_steal = list()
ADD_TO_POIFS_LIST(/obj/item/weapon/gun/energy/laser/selfcharging/captain)
ADD_TO_POIFS_LIST(/obj/item/weapon/hand_tele)
ADD_TO_POIFS_LIST(/obj/item/weapon/tank/jetpack/oxygen)
ADD_TO_POIFS_LIST(/obj/item/clothing/under/rank/captain)
ADD_TO_POIFS_LIST(/obj/item/device/aicard)
ADD_TO_POIFS_LIST(/obj/item/blueprints)
ADD_TO_POIFS_LIST(/obj/item/weapon/tank)
ADD_TO_POIFS_LIST(/obj/item/slime_extract)
ADD_TO_POIFS_LIST(/obj/item/clothing/glasses/hud/hos_aug)
ADD_TO_POIFS_LIST(/obj/item/weapon/reagent_containers/food/snacks/meat/corgi/ian)
ADD_TO_POIFS_LIST(/obj/item/clothing/under/rank/research_director)
ADD_TO_POIFS_LIST(/obj/item/clothing/under/rank/chief_engineer)
ADD_TO_POIFS_LIST(/obj/item/clothing/under/rank/chief_medical_officer)
ADD_TO_POIFS_LIST(/obj/item/clothing/under/rank/head_of_security)
ADD_TO_POIFS_LIST(/obj/item/clothing/under/rank/head_of_personnel)
ADD_TO_POIFS_LIST(/obj/item/weapon/reagent_containers/hypospray/cmo)
ADD_TO_POIFS_LIST(/obj/item/weapon/pinpointer)
ADD_TO_POIFS_LIST(/obj/item/weapon/pinpointer/advpinpointer)
ADD_TO_POIFS_LIST(/obj/item/clothing/suit/armor/vest/reactive)
ADD_TO_POIFS_LIST(/obj/item/weapon/reagent_containers/spray/extinguisher/golden)
ADD_TO_POIFS_LIST(/obj/item/weapon/gun/energy/gun/nuclear)
ADD_TO_POIFS_LIST(/obj/item/weapon/pickaxe/drill/diamond_drill)
ADD_TO_POIFS_LIST(/obj/item/weapon/storage/backpack/holding)
ADD_TO_POIFS_LIST(/obj/item/weapon/stock_parts/cell/hyper)
ADD_TO_POIFS_LIST(/obj/item/stack/sheet/mineral/diamond)
ADD_TO_POIFS_LIST(/obj/item/stack/sheet/mineral/gold)
ADD_TO_POIFS_LIST(/obj/item/stack/sheet/mineral/uranium)
#undef ADD_TO_POIFS_LIST

/datum/objective/steal
Expand All @@ -41,7 +28,7 @@ ADD_TO_POIFS_LIST(/obj/item/stack/sheet/mineral/uranium)
"a piece of Ian's meat" = /obj/item/weapon/reagent_containers/food/snacks/meat/corgi/ian,
"the hypospray" = /obj/item/weapon/reagent_containers/hypospray/cmo,
"a Research Director's teleport armor" = /obj/item/clothing/suit/armor/vest/reactive,
"the captain's pinpointer" = /obj/item/weapon/pinpointer,
"the captain's pinpointer" = /obj/item/weapon/pinpointer/advpinpointer,
"the golden fire extinguisher" = /obj/item/weapon/reagent_containers/spray/extinguisher/golden,
)

Expand Down
Binary file modified icons/obj/weapons.dmi
Binary file not shown.

0 comments on commit 24f40c1

Please sign in to comment.