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

[MIRROR] Gets [weird] with (spies) by adding protect and deuteragonist-flavored objectives. #2800

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 8 additions & 4 deletions code/game/gamemodes/objective.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ GLOBAL_LIST_EMPTY(objectives) //NOVA EDIT ADDITION
var/datum/team/team //An alternative to 'owner': a team. Use this when writing new code.
var/name = "generic objective" //Name for admin prompts
var/explanation_text = "Nothing" //What that person is supposed to do.
///if this objective doesn't print failure or success in the roundend report
var/no_failure = FALSE
///name used in printing this objective (Objective #1)
var/objective_name = "Objective"
var/team_explanation_text //For when there are multiple owners.
Expand Down Expand Up @@ -99,6 +101,8 @@ GLOBAL_LIST_EMPTY(objectives) //NOVA EDIT ADDITION

/// Provides a string describing what a good job you did or did not do
/datum/objective/proc/get_roundend_success_suffix()
if(no_failure)
return "" // Just print the objective with no success/fail evaluation, as it has no mechanical backing
return check_completion() ? span_greentext("Success!") : span_redtext("Fail.")

/datum/objective/proc/is_unique_objective(possible_target, dupe_search_range)
Expand Down Expand Up @@ -361,6 +365,8 @@ GLOBAL_LIST_EMPTY(objectives) //NOVA EDIT ADDITION

/datum/objective/protect/check_completion()
var/obj/item/organ/internal/brain/brain_target
if(isnull(target))
return FALSE
if(human_check)
brain_target = target.current?.get_organ_slot(ORGAN_SLOT_BRAIN)
//Protect will always suceed when someone suicides
Expand Down Expand Up @@ -410,7 +416,7 @@ GLOBAL_LIST_EMPTY(objectives) //NOVA EDIT ADDITION
/datum/objective/jailbreak/detain/update_explanation_text()
..()
if(target?.current)
explanation_text = "Ensure that [target.name], the [!target_role_type ? target.assigned_role.title : target.special_role] is delivered to nanotrasen alive and in custody."
explanation_text = "Ensure that [target.name], the [!target_role_type ? target.assigned_role.title : target.special_role] is delivered to Nanotrasen alive and in custody."
else
explanation_text = "Free objective."

Expand Down Expand Up @@ -1005,15 +1011,13 @@ GLOBAL_LIST_EMPTY(possible_items)
/datum/objective/custom
name = "custom"
admin_grantable = TRUE
no_failure = TRUE

/datum/objective/custom/admin_edit(mob/admin)
var/expl = stripped_input(admin, "Custom objective:", "Objective", explanation_text)
if(expl)
explanation_text = expl

/datum/objective/custom/get_roundend_success_suffix()
return "" // Just print the objective with no success/fail evaluation, as it has no mechanical backing

//Ideally this would be all of them but laziness and unusual subtypes
/proc/generate_admin_objective_list()
GLOB.admin_objective_list = list()
Expand Down
30 changes: 29 additions & 1 deletion code/modules/antagonists/spy/spy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,30 @@
your_mission.owner = owner
your_mission.explanation_text = pick_list_replacements(SPY_OBJECTIVE_FILE, "objective_body")
objectives += your_mission


if((length(objectives) < 3) && prob(25))
switch(rand(1, 4))
if(1)
var/datum/objective/protect/save_the_person = new()
save_the_person.owner = owner
save_the_person.no_failure = TRUE
objectives += save_the_person
if(2)
var/datum/objective/protect/nonhuman/save_the_entity = new()
save_the_entity.owner = owner
save_the_entity.no_failure = TRUE
objectives += save_the_entity
if(3)
var/datum/objective/jailbreak/save_the_jailbird = new()
save_the_jailbird.owner = owner
save_the_jailbird.no_failure = TRUE
objectives += save_the_jailbird
if(4)
var/datum/objective/jailbreak/detain/cage_the_jailbird = new()
cage_the_jailbird.owner = owner
cage_the_jailbird.no_failure = TRUE
objectives += cage_the_jailbird

if(prob(10))
var/datum/objective/martyr/leave_no_trace = new()
leave_no_trace.owner = owner
Expand All @@ -141,6 +164,11 @@
steal_the_shuttle.owner = owner
objectives += steal_the_shuttle

else if(prob(10)) //10% chance on 87.3% chance
var/datum/objective/exile/hit_the_bricks = new()
hit_the_bricks.owner = owner
objectives += hit_the_bricks

else
var/datum/objective/escape/gtfo = new()
gtfo.owner = owner
Expand Down
131 changes: 124 additions & 7 deletions strings/antagonist_flavor/spy_objective.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,73 +8,190 @@
"Ensure @pick(location) is @pick(affected) by the end of the shift.",
"Ensure no heads of staff @pick(escape) the station.",
"Ensure no members of @pick(department) @pick(escape) the station.",
"Ensure no rival @pick(rivals) @pick(escape) the station.",
"Ensure no @pick(rivals) @pick(escape) the station.",
"Ensure no @pick(rivals) succeed in their objectives.",
"Ensure all @pick(rivals) @pick(escape) the station.",
"Ensure all @pick(rivals) succeed in their objectives.",
"Ensure at least some @pick(rivals) leave the shift @pick(affected).",
"Ensure at least some @pick(rivals) do not leave the shift @pick(affected).",
"Ensure at least some @pick(rivals) @pick(escape) the station @pick(affected).",
"Ensure no @pick(rivals) @pick(escape) the station @pick(affected).",
"Ensure the station's @pick(happenings) turn out @pick(affected).",
"Frame a crewmember for a crime.",
"Free the station's AI from its laws.",
"Halt the station's @pick(happenings).",
"Help the station succeed in its @pick(happenings).",
"Invoke a mutiny against the heads of staff.",
"Make it difficult, but not impossible to @pick(escape) the station.",
"Invoke a mutiny in @pick(department).",
"Keep everyone out of @pick(location).",
"Make it difficult but not impossible to @pick(escape) the station.",
"Protect the station's @pick(happenings).",
"Sabotage the station's power grid or engine.",
"Steal all the @pick(stealables) from @pick(department).",
"Steall all the @pick(stealables) from @pick(location).",
"Steal as many @pick(stealables) as you can.",
"Take control of the station as the new Captain.",
"Take hostages of high value crewmembers and demand a ransom."
"Take hostages of high value crewmembers and demand a ransom.",
"Terrorize @pick(department) enough to be attacked on sight.",
"Terrorize @pick(rivals) enough to be branded a hero."
],
"department": [
"Security",
"Command",
"Engineering",
"Medical",
"Science",
"Security",
"Service",
"Supply"
],
"location": [
"atmospherics",
"departures",
"engineering",
"genetics",
"hydroponics",
"medbay",
"the armory",
"the bar",
"the bridge",
"the brig",
"the cargo bay",
"the Central Primary hallway",
"the courtroom",
"the chapel",
"the garden",
"the holodeck",
"the kitchen",
"the library",
"the mining outpost",
"the vault",
"virology",
"xenobiology"
],
"happenings": [
"research",
"breakfasts",
"cargo operations",
"communications",
"efforts to figure something out",
"efforts to make an important decision",
"efforts to solve a crime",
"efforts to solve a murder",
"efforts to start a project",
"efforts to stop a disaster",
"lunches",
"dinners",
"genetic research",
"mining operation"
"mech constructions",
"mining operations",
"optional surgeries",
"public gatherings",
"public services",
"research efforts",
"social events",
"xenobiological experiments"
],
"affected": [
"a disaster",
"ablaze",
"alive",
"a failure",
"a success",
"better than expected",
"blasted",
"bored",
"boring",
"burning",
"busy",
"clean",
"confused",
"confusing",
"covered in blood",
"cursed",
"dead",
"dirty",
"disrupted",
"disabled",
"demolished",
"destroyed",
"devastated",
"engulfed in flames",
"exploded",
"exploding",
"free",
"frustrated",
"functional",
"hazardous",
"horrified",
"horrifying",
"in chaos",
"inspired",
"inspiring",
"intact",
"locked down",
"non-functional",
"obliterated",
"offended",
"on fire",
"optimized",
"peaceful",
"powerful",
"quiet",
"ruined",
"sabotaged",
"safe",
"scary",
"scandalized",
"serene",
"shattered",
"terrible",
"tranquil",
"unrecognizable",
"vandalized",
"wrecked"
],
"rivals": [
"agents",
"aliens",
"cowards",
"criminals",
"entertainers",
"extradimensional horrors",
"fanatics",
"foreigners",
"hooligans",
"litterers",
"magic-users",
"moles",
"operatives",
"rude people",
"sentient non-humanoids",
"spies",
"traitors"
"subversives",
"thieves",
"traitors",
"tyrants"
],
"stealables": [
"appliances",
"cargo orders",
"critical pieces of infrastructure",
"decorations",
"floor tiles",
"foods",
"items",
"materials",
"medicines",
"objects",
"pets",
"public supplies",
"quiet moments",
"things",
"tools",
"vending machines",
"weapons"
],
"escape": [
"abscond from",
"depart",
"escape",
"evacuate",
Expand Down
Loading