From e90920398445872ef1259911f8f622ea3d6d4a24 Mon Sep 17 00:00:00 2001 From: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Date: Mon, 16 Oct 2023 19:00:53 +0100 Subject: [PATCH] Removes progression from midround and latejoin traitor, renames reputation to threat level (#79020) Reputation has been renamed to 'Threat Level' to more accurately represent what it means. Midround and latejoin traitors no longer have access to secondary objectives, the ones which give TC and objectives. Midround antagonists, like traitor, shouldn't really have the progression system that is meant for roundstart. Final objectives in particular are only suited for traitors who have worked towards it from the start. Reputation wasn't really a good name for the player-facing progression system of traitors as you'd passively gain progression which didn't make since if it was supposed to be your reputation. :cl: balance: Removed secondary objectives from midround and latejoin traitors. grammar: Renamed reputation to threat level. /:cl: --------- Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com> --- .../dynamic/dynamic_rulesets_latejoin.dm | 2 +- .../dynamic/dynamic_rulesets_midround.dm | 4 +-- .../antagonists/traitor/datum_traitor.dm | 17 +++++++-- .../tgui/interfaces/TraitorObjectiveDebug.tsx | 4 +-- .../tgui/interfaces/Uplink/ObjectiveMenu.tsx | 26 +++++++------- .../Uplink/PrimaryObjectiveMenu.tsx | 2 +- ...tionLevel.tsx => calculateDangerLevel.tsx} | 36 +++++++++---------- .../packages/tgui/interfaces/Uplink/index.tsx | 31 ++++++++-------- 8 files changed, 69 insertions(+), 53 deletions(-) rename tgui/packages/tgui/interfaces/Uplink/{calculateReputationLevel.tsx => calculateDangerLevel.tsx} (82%) diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm index 0981cabac877..040a2397bfab 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm @@ -52,7 +52,7 @@ /datum/dynamic_ruleset/latejoin/infiltrator name = "Syndicate Infiltrator" - antag_datum = /datum/antagonist/traitor + antag_datum = /datum/antagonist/traitor/infiltrator antag_flag = ROLE_SYNDICATE_INFILTRATOR antag_flag_override = ROLE_TRAITOR protected_roles = list( diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm index 38b7062217af..286fc3d3d843 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm @@ -211,7 +211,7 @@ /datum/dynamic_ruleset/midround/from_living/autotraitor name = "Syndicate Sleeper Agent" midround_ruleset_style = MIDROUND_RULESET_STYLE_LIGHT - antag_datum = /datum/antagonist/traitor + antag_datum = /datum/antagonist/traitor/infiltrator/sleeper_agent antag_flag = ROLE_SLEEPER_AGENT antag_flag_override = ROLE_TRAITOR protected_roles = list( @@ -257,7 +257,7 @@ var/mob/M = pick(candidates) assigned += M candidates -= M - var/datum/antagonist/traitor/newTraitor = new + var/datum/antagonist/traitor/infiltrator/sleeper_agent/newTraitor = new M.mind.add_antag_datum(newTraitor) message_admins("[ADMIN_LOOKUPFLW(M)] was selected by the [name] ruleset and has been made into a midround traitor.") log_dynamic("[key_name(M)] was selected by the [name] ruleset and has been made into a midround traitor.") diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm index 70d598cdcbb3..b150289f2e4d 100644 --- a/code/modules/antagonists/traitor/datum_traitor.dm +++ b/code/modules/antagonists/traitor/datum_traitor.dm @@ -15,6 +15,8 @@ suicide_cry = "FOR THE SYNDICATE!!" preview_outfit = /datum/outfit/traitor var/give_objectives = TRUE + /// Whether to give secondary objectives to the traitor, which aren't necessary but can be completed for a progression and TC boost. + var/give_secondary_objectives = TRUE var/should_give_codewords = TRUE ///give this traitor an uplink? var/give_uplink = TRUE @@ -42,6 +44,16 @@ ///the final objective the traitor has to accomplish, be it escaping, hijacking, or just martyrdom. var/datum/objective/ending_objective +/datum/antagonist/traitor/infiltrator + // Used to denote traitors who have joined midround and therefore have no access to secondary objectives. + // Progression elements are best left to the roundstart antagonists + // There will still be a timelock on uplink items + name = "\improper Infiltrator" + give_secondary_objectives = TRUE // Changed from FALSE to TRUE - MONKEYSTATION EDIT CHANGE + +/datum/antagonist/traitor/infiltrator/sleeper_agent + name = "\improper Syndicate Sleeper Agent" + /datum/antagonist/traitor/New(give_objectives = TRUE) . = ..() src.give_objectives = give_objectives @@ -64,8 +76,9 @@ uplink_handler.has_progression = TRUE SStraitor.register_uplink_handler(uplink_handler) - uplink_handler.has_objectives = TRUE - uplink_handler.generate_objectives() + if(give_secondary_objectives) + uplink_handler.has_objectives = TRUE + uplink_handler.generate_objectives() if(uplink_handler.progression_points < SStraitor.current_global_progression) uplink_handler.progression_points = SStraitor.current_global_progression * SStraitor.newjoin_progression_coeff diff --git a/tgui/packages/tgui/interfaces/TraitorObjectiveDebug.tsx b/tgui/packages/tgui/interfaces/TraitorObjectiveDebug.tsx index 584e8136fbd9..4a980ca7a456 100644 --- a/tgui/packages/tgui/interfaces/TraitorObjectiveDebug.tsx +++ b/tgui/packages/tgui/interfaces/TraitorObjectiveDebug.tsx @@ -1,7 +1,7 @@ import { useBackend, useLocalState } from '../backend'; import { Box, LabeledList, Stack, Tabs, Tooltip } from '../components'; import { Window } from '../layouts'; -import { getReputation } from './Uplink/calculateReputationLevel'; +import { getDangerLevel } from './Uplink/calculateDangerLevel'; import type { InfernoNode } from 'inferno'; type Objective = { @@ -272,7 +272,7 @@ export const TraitorObjectiveDebug = (props, context) => { ))} {player_data.map((value) => { - const rep = getReputation(value.progression_points); + const rep = getDangerLevel(value.progression_points); return ( void, grow: boolean = false ) => { - const reputation = getReputation(objective.progression_minimum); + const dangerLevel = getDangerLevel(objective.progression_minimum); return ( { handleObjectiveAction(objective, value.action); }} @@ -335,7 +335,7 @@ const ObjectiveFunction = ( type ObjectiveElementProps = { name: string; - reputation: Rank; + dangerLevel: Rank; description: string; telecrystalReward: number; progressionReward: number; @@ -355,7 +355,7 @@ type ObjectiveElementProps = { export const ObjectiveElement = (props: ObjectiveElementProps, context) => { const { name, - reputation, + dangerLevel, description, uiButtons = null, telecrystalReward, @@ -400,7 +400,7 @@ export const ObjectiveElement = (props: ObjectiveElementProps, context) => { @@ -452,13 +452,13 @@ export const ObjectiveElement = (props: ObjectiveElementProps, context) => { 'border-right': 'none', 'border-bottom': objectiveFinished ? 'none' : undefined, }} - className={reputation.gradient} + className={dangerLevel.gradient} py={0.5} width="100%" textAlign="center"> {telecrystalReward} TC, - {calculateProgression(progressionReward)} Reputation + {calculateProgression(progressionReward)} Threat Level {Math.abs(progressionDiff) > 10 && ( { as="span"> {Math.abs(progressionDiff)}% - {progressionDiff > 0 ? 'less' : 'more'} reputation - from this objective. This is because your - reputation is{' '} + {progressionDiff > 0 ? 'less' : 'more'} threat + from this objective. This is because your threat + level is{' '} {progressionDiff > 0 ? 'ahead ' : 'behind '} where it normally should be at. @@ -505,7 +505,7 @@ export const ObjectiveElement = (props: ObjectiveElementProps, context) => { {objectiveFinished ? ( {ranks.map((value) => { @@ -104,7 +104,7 @@ export const reputationLevelsTooltip = ( ); -export const getReputation = (progression_points: number) => { +export const getDangerLevel = (progression_points: number) => { const minutes = progression_points / 600; for (let index = 0; index < ranks.length; index++) { @@ -117,31 +117,31 @@ export const getReputation = (progression_points: number) => { return ranks[ranks.length - 1]; }; -export const calculateReputationLevel = ( +export const calculateDangerLevel = ( progression_points: number, textOnly: boolean ) => { const minutes = progression_points / 600; const displayedProgression = calculateProgression(progression_points); - const reputation = getReputation(progression_points); + const dangerLevel = getDangerLevel(progression_points); if (textOnly) { return ( - {reputation.title} ({displayedProgression}) + {dangerLevel.title} ({displayedProgression}) ); } return ( - {reputation.title} ({displayedProgression}) + {dangerLevel.title} ({displayedProgression}) ); }; diff --git a/tgui/packages/tgui/interfaces/Uplink/index.tsx b/tgui/packages/tgui/interfaces/Uplink/index.tsx index 51aad617fb70..24cbb734d885 100644 --- a/tgui/packages/tgui/interfaces/Uplink/index.tsx +++ b/tgui/packages/tgui/interfaces/Uplink/index.tsx @@ -8,7 +8,7 @@ import { BooleanLike } from 'common/react'; import { Box, Tabs, Button, Stack, Section, Tooltip, Dimmer } from '../../components'; import { PrimaryObjectiveMenu } from './PrimaryObjectiveMenu'; import { Objective, ObjectiveMenu } from './ObjectiveMenu'; -import { calculateProgression, calculateReputationLevel, reputationDefault, reputationLevelsTooltip } from './calculateReputationLevel'; +import { calculateProgression, calculateDangerLevel, dangerDefault, dangerLevelsTooltip } from './calculateDangerLevel'; type UplinkItem = { id: string; @@ -223,7 +223,7 @@ export class Uplink extends Component<{}, UplinkState> { <> ,  - {calculateReputationLevel(item.progression_minimum, true)} + {calculateDangerLevel(item.progression_minimum, true)} ) : ( @@ -273,12 +273,15 @@ export class Uplink extends Component<{}, UplinkState> { (!!has_progression && ( - Your current level of reputation.  - Reputation determines what quality of objective - you get and what items you can purchase.  + Your current level of threat. Threat + determines + {has_objectives + ? ' the severity of secondary objectives you get and ' + : ' '} + what items you can purchase.  {/* A minute in deciseconds */} - Reputation passively increases by{' '} + Threat passively increases by{' '} {calculateProgression( current_progression_scaling @@ -288,10 +291,10 @@ export class Uplink extends Component<{}, UplinkState> { {Math.abs(progressionPercentage) > 0 && ( - Because your reputation is{' '} + Because your threat level is {progressionPercentage < 0 - ? 'ahead ' - : 'behind '} + ? ' ahead ' + : ' behind '} of where it should be, you are getting { {progressionPercentage < 0 ? 'less' : 'more'}{' '} - reputation every minute + threat every minute )} - {reputationLevelsTooltip} + {dangerLevelsTooltip} )) || - 'Your current level of reputation. You are a respected elite and do not need to improve your reputation.' + "Your current threat level. You are a killing machine and don't need to improve your threat level." }> {/* If we have no progression, just give them a generic title */} {has_progression - ? calculateReputationLevel(progression_points, false) - : calculateReputationLevel(reputationDefault, false)} + ? calculateDangerLevel(progression_points, false) + : calculateDangerLevel(dangerDefault, false)}