Minor Spy fixes, plus some bonus logging and feedback (#81781)

## About The Pull Request

Fixes #81776 

- Ensures machinery not sent to the black market dump what must be
dumped first
- Adds feedback messages to sentient bots being stolen
- Adds a few combat log messages to spies stealing things

## Changelog

🆑 Melbert
fix: Fixed spy stolen machines not dumping everything that needed to be
dumped
/🆑
This commit is contained in:
MrMelbert
2024-03-03 18:07:14 -06:00
committed by GitHub
parent bb716d774e
commit d35a73bf4e
2 changed files with 23 additions and 2 deletions
+20 -1
View File
@@ -141,7 +141,15 @@
if(isitem(stealing) && ((stealing.resistance_flags & INDESTRUCTIBLE) || prob(black_market_prob)))
addtimer(CALLBACK(src, PROC_REF(send_to_black_market), stealing), 0.5 SECONDS)
else
QDEL_IN(stealing, 0.5 SECONDS)
addtimer(CALLBACK(src, PROC_REF(finish_cleanup), stealing), 0.5 SECONDS)
/**
* Called when cleaning up a stolen atom that was NOT sent to the black market.
*
* * stealing - The item that was stolen.
*/
/datum/spy_bounty/proc/finish_cleanup(atom/movable/stealing)
qdel(stealing)
/**
* Handles putting the passed movable up on the black market.
@@ -311,6 +319,10 @@
return TRUE
/datum/spy_bounty/machine/finish_cleanup(obj/machinery/stealing)
stealing.dump_inventory_contents()
return ..()
/datum/spy_bounty/machine/init_bounty(datum/spy_bounty_handler/handler)
if(isnull(target_type))
return FALSE
@@ -626,6 +638,13 @@
/datum/spy_bounty/some_bot/get_dupe_protection_key(atom/movable/stealing)
return bot_type
/datum/spy_bounty/some_bot/finish_cleanup(mob/living/simple_animal/bot/stealing)
if(stealing.client)
to_chat(stealing, span_deadsay("You've been stolen! You are shipped off to the black market and taken apart for spare parts..."))
stealing.investigate_log("stole by a spy (and deleted)", INVESTIGATE_DEATHS)
stealing.ghostize()
return ..()
/datum/spy_bounty/some_bot/init_bounty(datum/spy_bounty_handler/handler)
for(var/datum/spy_bounty/some_bot/existing_bounty in handler.get_all_bounties())
var/mob/living/simple_animal/bot/existing_bot_type = existing_bounty.bot_type
+3 -1
View File
@@ -97,6 +97,7 @@
to_chat(spy, span_warning("Your uplinks blinks red: [stealing] cannot be extracted from there."))
return FALSE
log_combat(spy, stealing, "started stealing", parent, "(spy bounty)")
playsound(stealing, 'sound/items/pshoom.ogg', 33, vary = TRUE, extrarange = SILENCED_SOUND_EXTRARANGE, frequency = 0.33, ignore_walls = FALSE)
var/obj/effect/scan_effect/active_scan_effect = new(stealing.loc)
@@ -160,7 +161,8 @@
playsound(parent, 'sound/machines/wewewew.ogg', 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
log_spy("[key_name(spy)] completed the bounty [bounty.name] of difficulty [bounty.difficulty] for \a [reward].")
log_combat(spy, stealing, "stole", parent, "(spy bounty)")
log_spy("[key_name(spy)] completed the bounty [bounty.name] of difficulty [bounty.difficulty] by stealing [stealing] for \a [reward].")
SSblackbox.record_feedback("nested tally", "spy_bounty", 1, list("[stealing.type]", "[bounty.type]", "[bounty.difficulty]", "[bounty.reward_item.type]"))
var/datum/antagonist/spy/spy_datum = spy_ref?.resolve()