Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spy spider detection with detective scanner #1619

Merged
merged 16 commits into from
Dec 30, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions modular_ss220/spy_spider/code/spy_spider.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
return ..()

/obj/item/radio/spy_spider
name = "шпионский жучок"
name = "Шпионский Жучок"
Drsmail marked this conversation as resolved.
Show resolved Hide resolved
desc = "Кажется, ты видел такого в фильмах про шпионов."
icon = 'modular_ss220/spy_spider/icons/spy_spider.dmi'
icon_state = "spy_spider"
Expand Down Expand Up @@ -33,7 +33,7 @@
channels = list("Spy Spider" = TRUE)

/obj/item/storage/lockbox/spy_kit
name = "набор жучков"
name = "Набор Жучков"
desc = "Не самый легальный из способов достать информацию, но какая разница, если никто не узнает?"
storage_slots = 5
req_access = list(ACCESS_FORENSICS_LOCKERS)
Expand Down Expand Up @@ -83,8 +83,8 @@
return TRUE

/obj/item/clothing/proc/remove_spy_spider()
set name = "Снять жучок"
set category = "Object"
// set name = "Снять жучок"
// set category = "Object"
Drsmail marked this conversation as resolved.
Show resolved Hide resolved
set src in range(1, usr)
Drsmail marked this conversation as resolved.
Show resolved Hide resolved

if(!ishuman(usr))
Expand All @@ -97,8 +97,6 @@
spy_spider_attached.forceMove(user_loc)
spy_spider_attached = null

verbs -= /obj/item/clothing/proc/remove_spy_spider

/**
* HUMAN PART
*/
Expand Down Expand Up @@ -138,19 +136,15 @@
// Spy spider detection
/obj/item/detective_scanner/scan(atom/A, mob/user)
. = ..()
var/found_spy_device = FALSE

if(!scanning)
scanning = TRUE

if(istype(A, /obj/item/clothing))
var/obj/item/clothing/scanned_clothing = A
if(scanned_clothing.spy_spider_attached)
found_spy_device = TRUE

if(found_spy_device)
sleep(1 SECONDS)
add_log(span_info("<B>Найдено шпионское устройство!</B>"))
if(!(/obj/item/clothing/proc/remove_spy_spider in A.verbs))
add_verb(A, /obj/item/clothing/proc/remove_spy_spider)
sleep(1 SECONDS)
add_log(span_info("<B>Найдено шпионское устройство!</B>"))
scanned_clothing.remove_spy_spider()
Drsmail marked this conversation as resolved.
Show resolved Hide resolved

scanning = FALSE
Loading