A red spy has entered the base: Adds Spies, a roundstart antagonist inspired by Goonstation's Spy-Thief (#81231)

# Disclaimer: No Goon code was referenced or used in the making of this
PR

## About The Pull Request

[Design Document (Read this for more
information)](https://hackmd.io/@L9JPMsZhRO2wI25rNI6GYg/rkYKM9Yc6)

This PR adds Spies as a new roundstart antagonist type, inspired by
Spy-Thiefs from Goonstation.

Spies are tasked with stealing various objects around the station, from
insulated gloves to the black box, from the clown's left leg to the
bridge's communications console.

For every item stolen, the Spy is rewarded with a random item from the
Syndicate Uplink, plus some items uniquely available to the Spy. Stolen
items are then shipped off and sold on the Black Market Uplink, allowing
the crew - or maybe some other evil-doers - to get their hands on them.


![image](https://github.com/tgstation/tgstation/assets/51863163/f057d480-4545-44da-b8fe-a8d09a5d2dcf)

More ideas for theft items and bounties are welcome. 

## Why It's Good For The Game

See the design document for more information. 

In short: Adds a solo antagonist which has less impact than your
Traitors and Heretics, but more impact than Paradox Clones and Thieves.
In other words: On the same tier as old traitors.

Seeks to embrace the sandbox aspect of antagonists more by having no
precise greentext objective, and instead some suggestions for chaos you
can embark in. Have fun with it!

## Changelog

🆑 Melbert
add: Spies may now roam the halls of Space Station 13. Watch your
belongings closely.
/🆑
This commit is contained in:
MrMelbert
2024-03-01 04:41:57 +00:00
committed by GitHub
parent 9f1c7e4352
commit 977799a2e7
56 changed files with 2474 additions and 164 deletions
@@ -698,3 +698,45 @@ GLOBAL_VAR_INIT(revolutionary_win, FALSE)
create_separatist_nation(department_type, announcement = FALSE, dangerous = FALSE, message_admins = FALSE)
GLOB.round_default_lawset = /datum/ai_laws/united_nations
/datum/dynamic_ruleset/roundstart/spies
name = "Spies"
antag_flag = ROLE_SPY
antag_datum = /datum/antagonist/spy
minimum_required_age = 0
protected_roles = list(
JOB_CAPTAIN,
JOB_DETECTIVE,
JOB_HEAD_OF_PERSONNEL, // AA = bad
JOB_HEAD_OF_SECURITY,
JOB_PRISONER,
JOB_SECURITY_OFFICER,
JOB_WARDEN,
)
restricted_roles = list(
JOB_AI,
JOB_CYBORG,
)
required_candidates = 3 // lives or dies by there being a few spies
weight = 5
cost = 8
scaling_cost = 101 // see below
minimum_players = 8
antag_cap = list("denominator" = 8, "offset" = 1) // should have quite a few spies to work against each other
requirements = list(8, 8, 8, 8, 8, 8, 8, 8, 8, 8)
/datum/dynamic_ruleset/roundstart/spies/pre_execute(population)
for(var/i in 1 to get_antag_cap(population) * (scaled_times + 1))
if(length(candidates) <= 0)
break
var/mob/picked_player = pick_n_take(candidates)
assigned += picked_player.mind
picked_player.mind.special_role = ROLE_SPY
picked_player.mind.restricted_roles = restricted_roles
GLOB.pre_setup_antags += picked_player.mind
return TRUE
/datum/dynamic_ruleset/roundstart/spies/scale_up(population, max_scale)
// Disabled (at least until dynamic can handle scaling this better)
// Because spies have a very low demoninator, this can easily spawn like 30 of them
return 0