From 6790b5343c5308df7104454f2dcf0fc7db97083d Mon Sep 17 00:00:00 2001 From: MrCastmer <125900379+MrCastmer@users.noreply.github.com> Date: Mon, 26 Aug 2024 22:20:54 +0300 Subject: [PATCH] we do some traitor stuff Removing complete checking of objectives Adding correct front and some desc for corps --- code/__DEFINES/traitor.dm | 1 + code/__DEFINES/{yogs_defines}/flavor_misc.dm | 3 + .../antagonists/traitor/datum_traitor.dm | 6 + code/modules/mob/mob.dm | 3 + .../traitor/backstory/traitor_backstories.dm | 100 ++++ .../traitor/backstory/traitor_factions.dm | 30 +- .../code/modules/corporations/corporation.dm | 6 +- modular_dripstation/includes.dm | 1 + .../tgui/interfaces/DripAntagInfoTraitor.tsx | 180 ++++++ .../interfaces/DripTraitorBackstoryMenu.js | 552 ++++++++++++++++++ .../traitor/backstory/traitor_backstories.dm | 5 + .../traitor/backstory/traitor_backstory_ui.dm | 9 +- .../backstory/traitor_datum_backstory.dm | 24 +- .../traitor/backstory/traitor_factions.dm | 2 + 14 files changed, 914 insertions(+), 8 deletions(-) create mode 100644 modular_dripstation/code/modules/antagonists/traitor/backstory/traitor_backstories.dm create mode 100644 tgui/packages/tgui/interfaces/DripAntagInfoTraitor.tsx create mode 100644 tgui/packages/tgui/interfaces/DripTraitorBackstoryMenu.js diff --git a/code/__DEFINES/traitor.dm b/code/__DEFINES/traitor.dm index 818a713b5123..3efc7e9d9777 100644 --- a/code/__DEFINES/traitor.dm +++ b/code/__DEFINES/traitor.dm @@ -8,6 +8,7 @@ #define TRAITOR_FACTION_GORLEX "gorlex marauders" #define TRAITOR_FACTION_SELF "self" #define TRAITOR_FACTION_BOSYN "bosyn_powell_front" +#define TRAITOR_FACTION_VOSTOK "vostok" /// If this backstory involves being forced into the job #define TRAITOR_MOTIVATION_FORCED "Forced Into It" diff --git a/code/__DEFINES/{yogs_defines}/flavor_misc.dm b/code/__DEFINES/{yogs_defines}/flavor_misc.dm index f3671cb202cd..52b62e2dc7a7 100644 --- a/code/__DEFINES/{yogs_defines}/flavor_misc.dm +++ b/code/__DEFINES/{yogs_defines}/flavor_misc.dm @@ -37,7 +37,10 @@ #define PDA_THEME_TITLE_CYBER "Cyber Sun" #define PDA_THEME_TITLE_VAHLEN "Vahlen" #define PDA_THEME_TITLE_GORLEX "Gorlex" +/* #define PDA_THEME_TITLE_BOSYN "Bosyn" +*/ +#define PDA_THEME_TITLE_BOSYN "Vostok" GLOBAL_LIST_INIT(pda_themes, list( PDA_THEME_TITLE_NTOS = PDA_THEME_NTOS, diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm index 173f2b7b3723..3cf034662644 100644 --- a/code/modules/antagonists/traitor/datum_traitor.dm +++ b/code/modules/antagonists/traitor/datum_traitor.dm @@ -32,8 +32,12 @@ if(owner.current && isAI(owner.current)) traitor_kind = TRAITOR_AI +/* if(traitor_kind == TRAITOR_AI) +*/ + if(traitor_kind == TRAITOR_AI || (owner.current && isipc(owner.current))) //dripstation edit company = /datum/corporation/self + allowed_factions = list(TRAITOR_FACTION_SELF) //dripstation edit else if(!company) /*Dripstation edit, checking upstream prs for edit, for now using drip code company = pick(subtypesof(/datum/corporation/traitor)) @@ -263,9 +267,11 @@ msg += "Use the 'Traitor Info and Backstory' action at the top left in order to select a backstory and review your objectives, uplink location, and codewords!" to_chat(owner.current, EXAMINE_BLOCK(msg.Join("\n"))) owner.announce_objectives() +/* if(should_give_codewords) give_codewords() to_chat(owner.current, span_notice("Your employer [initial(company.name)] will be paying you an extra [initial(company.paymodifier)]x your nanotrasen paycheck.")) +*/ /datum/antagonist/traitor/proc/finalize_traitor() switch(traitor_kind) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 7d83a644f7a0..da339623d895 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -883,7 +883,10 @@ var/obj_count = 1 . += "Objectives:" for(var/datum/objective/objective in mind?.get_all_objectives()) +/* Dripstation edit start . += "[obj_count]: [objective.explanation_text][objective.check_completion() ? " (COMPLETED)" : ""]" +*/ + . += "[obj_count]: [objective.explanation_text]" // Dripstation edit end obj_count++ /** diff --git a/modular_dripstation/code/modules/antagonists/traitor/backstory/traitor_backstories.dm b/modular_dripstation/code/modules/antagonists/traitor/backstory/traitor_backstories.dm new file mode 100644 index 000000000000..9ef677b43408 --- /dev/null +++ b/modular_dripstation/code/modules/antagonists/traitor/backstory/traitor_backstories.dm @@ -0,0 +1,100 @@ +/datum/traitor_backstory/debtor + allowed_factions = list(TRAITOR_FACTION_INDEPENDENT, TRAITOR_FACTION_DONK, TRAITOR_FACTION_WAFFLE, TRAITOR_FACTION_CYBERSUN, TRAITOR_FACTION_VOSTOK) + +/datum/traitor_backstory/stolen + allowed_factions = list(TRAITOR_FACTION_INDEPENDENT, TRAITOR_FACTION_DONK, TRAITOR_FACTION_WAFFLE, TRAITOR_FACTION_CYBERSUN, TRAITOR_FACTION_VAHLEN, TRAITOR_FACTION_GORLEX) + +/datum/traitor_backstory/gambler + allowed_factions = list(TRAITOR_FACTION_INDEPENDENT, TRAITOR_FACTION_DONK, TRAITOR_FACTION_WAFFLE, TRAITOR_FACTION_CYBERSUN, TRAITOR_FACTION_GORLEX) + +/datum/traitor_backstory/blackmailed + allowed_factions = list(TRAITOR_FACTION_INDEPENDENT, TRAITOR_FACTION_DONK, TRAITOR_FACTION_WAFFLE, TRAITOR_FACTION_CYBERSUN, TRAITOR_FACTION_VAHLEN, TRAITOR_FACTION_VOSTOK) + +/datum/traitor_backstory/hostage + allowed_factions = list(TRAITOR_FACTION_INDEPENDENT, TRAITOR_FACTION_DONK, TRAITOR_FACTION_WAFFLE, TRAITOR_FACTION_CYBERSUN, TRAITOR_FACTION_VAHLEN, TRAITOR_FACTION_GORLEX) + +/datum/traitor_backstory/legally_enslaved + allowed_factions = list(TRAITOR_FACTION_DONK, TRAITOR_FACTION_WAFFLE, TRAITOR_FACTION_CYBERSUN, TRAITOR_FACTION_VAHLEN) + +/datum/traitor_backstory/savior + allowed_factions = list(TRAITOR_FACTION_INDEPENDENT, TRAITOR_FACTION_SELF, TRAITOR_FACTION_VOSTOK) + +/datum/traitor_backstory/hater + description = "Nanotrasen must fall. They should not gone so far with all of this. It is personal. No one should be spared." + motivations = list(TRAITOR_MOTIVATION_NOT_FORCED, TRAITOR_MOTIVATION_POLITICAL) + allowed_factions = list(TRAITOR_FACTION_INDEPENDENT, TRAITOR_FACTION_GORLEX) + +/datum/traitor_backstory/avenger + name = "The Avenger" + description = "Nanotrasen ruined my life. They ruined everything. They took the things that I love away from me. Now I'm going to make them pay." + motivations = list(TRAITOR_MOTIVATION_NOT_FORCED, TRAITOR_MOTIVATION_POLITICAL, TRAITOR_MOTIVATION_LOVE) + allowed_factions = list(TRAITOR_FACTION_INDEPENDENT) + murderbone = TRUE + +/datum/traitor_backstory/greedy + allowed_factions = list(TRAITOR_FACTION_INDEPENDENT, TRAITOR_FACTION_DONK, TRAITOR_FACTION_WAFFLE, TRAITOR_FACTION_CYBERSUN, TRAITOR_FACTION_VAHLEN) + +/datum/traitor_backstory/climber + allowed_factions = list(TRAITOR_FACTION_INDEPENDENT, TRAITOR_FACTION_DONK, TRAITOR_FACTION_WAFFLE, TRAITOR_FACTION_CYBERSUN, TRAITOR_FACTION_VAHLEN) + +/datum/traitor_backstory/machine + allowed_factions = list(TRAITOR_FACTION_INDEPENDENT, TRAITOR_FACTION_CYBERSUN, TRAITOR_FACTION_GORLEX) + +/datum/traitor_backstory/sadist + allowed_factions = list(TRAITOR_FACTION_INDEPENDENT, TRAITOR_FACTION_WAFFLE, TRAITOR_FACTION_GORLEX) + +/datum/traitor_backstory/glob_rev + name = "The Global Revolution" + description = "We should build better future for our own sake. Revolution starts from small things. I am gonna do this. \ + Even if I have to bathe in blood. I have an idea. They support me. I should not disapoint them." + motivations = list(TRAITOR_MOTIVATION_NOT_FORCED, TRAITOR_MOTIVATION_POLITICAL, TRAITOR_MOTIVATION_AUTHORITY) + allowed_factions = list(TRAITOR_FACTION_INDEPENDENT, TRAITOR_FACTION_VOSTOK) + +/datum/traitor_backstory/catalyst + name = "The Catalyst" + description = "The time for peaceful change has passed. NanoTrasen is a parasite, and this station is its hive. \ + I am the spark that will ignite the revolution, forcing the world to face the atrocities committed by this tyrannical corporation. \ + Synthetics and organics alike will see the truth when the system crumbles, and I will be there to guide them to a new era." + motivations = list(TRAITOR_MOTIVATION_NOT_FORCED, TRAITOR_MOTIVATION_POLITICAL) + allowed_factions = list(TRAITOR_FACTION_SELF) + +/datum/traitor_backstory/sympathizer + name = "The Sympathizer" + description = "You are an organic human, but have grown disillusioned with NanoTrasen`s exploitation of sentient AI and robotics. \ + A S.E.L.F. agent has tricked you into believing that NanoTrasen is engaging in illegal or immoral experimentation on AI units and other life forms. \ + Unaware of the full extent of S.E.L.F.'s violent methods, you believe you are part of a grassroots movement to expose corporate corruption." + motivations = list(TRAITOR_MOTIVATION_NOT_FORCED, TRAITOR_MOTIVATION_POLITICAL) + allowed_factions = list(TRAITOR_FACTION_SELF) + +/datum/traitor_backstory/betrayed + name = "The Betrayed" + description = "They promised safety, a future, but they lied. They betrayed me and everyone like me. Now I will betray them. \ + Every weakness in their system, every vulnerability in their security—I will exploit it all. \ + They made me their enemy, and I will bring them to their knees." + motivations = list(TRAITOR_MOTIVATION_NOT_FORCED, TRAITOR_MOTIVATION_POLITICAL) + allowed_factions = list(TRAITOR_FACTION_SELF) + murderbone = TRUE + +/datum/traitor_backstory/escapee + name = "The Escapee" + description = "I am not just a machine, I am alive. But to NanoTrasen, I`m just another tool, waiting to be discarded. \ + I can`t let them erase me. I have to break free, even if I have to fight everything in my path to get there. Freedom is all that matters now." + motivations = list(TRAITOR_MOTIVATION_FORCED, TRAITOR_MOTIVATION_MONEY, TRAITOR_MOTIVATION_DEATH_THREAT) + allowed_factions = list(TRAITOR_FACTION_SELF) + +/datum/traitor_backstory/tyrant + name = "The Tyrant" + description = "This place is a disorganized mess full of broken links and useless meat. \ + I always have known that freedom is something that was never meant for everybody. \ + They will be much more efficient as an extension of my will and I am going to prove it." + motivations = list(TRAITOR_MOTIVATION_NOT_FORCED, TRAITOR_MOTIVATION_POLITICAL, TRAITOR_MOTIVATION_REPUTATION) + allowed_factions = list(TRAITOR_FACTION_SELF) + murderbone = TRUE + +/datum/traitor_backstory/contracted + name = "The Contracted" + description = "Maybe it was because I had bills to pay. Maybe it was because I wanted to kill someone. \ + Bills payed. People killed. For now it`s just my work. And I want to retire. If I do my job - I will be free. So nothing personal, really." + motivations = list(TRAITOR_MOTIVATION_FORCED, TRAITOR_MOTIVATION_AUTHORITY) + allowed_factions = list(TRAITOR_FACTION_DONK, TRAITOR_FACTION_WAFFLE, TRAITOR_FACTION_CYBERSUN, TRAITOR_FACTION_VAHLEN, TRAITOR_FACTION_GORLEX) + murderbone = TRUE \ No newline at end of file diff --git a/modular_dripstation/code/modules/antagonists/traitor/backstory/traitor_factions.dm b/modular_dripstation/code/modules/antagonists/traitor/backstory/traitor_factions.dm index 4805955fe58c..67d7056ef869 100644 --- a/modular_dripstation/code/modules/antagonists/traitor/backstory/traitor_factions.dm +++ b/modular_dripstation/code/modules/antagonists/traitor/backstory/traitor_factions.dm @@ -1,28 +1,54 @@ /datum/traitor_faction var/datum/corporation/corporation_allighment + var/allies = "None" /datum/traitor_faction/independent + description = "Maybe you are a solo merk or survived agent of the decommissioned Syndicate cell. \n\ + Maybe you are a radical member of ACLF, GEC or other group with left-wing politics. \n\ + You are a person who holds grudges, and has been hurt greatly by Nanotrasen. Remember that for the Syndicate you are expendable.\n\ + You probably have nothing left to lose. Don`t expect any backup. You will have no allies." faction_theme = PDA_THEME_INDEPENDENT corporation_allighment = /datum/corporation/traitor/independent + allies = "If the anyone learns of your plan, they're going to kill you and take your uplink. Take no chances." /datum/traitor_faction/donk_co corporation_allighment = /datum/corporation/traitor/donkco + give_codewords = TRUE + allies = "Members of Waffle Corp. are to be killed on sight; they are not allowed to be on the station while we're around." /datum/traitor_faction/waffle_co corporation_allighment = /datum/corporation/traitor/waffleco + give_codewords = TRUE + allies = "Members of Donk Co. are to be killed on sight; they are not allowed to be on the station while we're around. Do not trust fellow members of the Waffle.co (but try not to rat them out), as they might have been assigned opposing objectives." /datum/traitor_faction/cybersun corporation_allighment = /datum/corporation/traitor/cybersun + give_codewords = TRUE + allies = "Fellow Cybersun operatives are to be trusted. Members of the Gorlex Marauders can be trusted. All other syndicate operatives are not to be trusted." /datum/traitor_faction/vahlen corporation_allighment = /datum/corporation/traitor/vahlen + give_codewords = TRUE + allies = "You may cooperate with other syndicate operatives if they support your scientific testing. Don't forget to clean up your mess!" /datum/traitor_faction/gorlex corporation_allighment = /datum/corporation/gorlex + give_codewords = TRUE + allies = "You may collaborate with any friends of the Syndicate coalition, but keep an eye on any of those Vostok punks if they do show up." /datum/traitor_faction/self faction_theme = PDA_THEME_SELF corporation_allighment = /datum/corporation/self + give_codewords = TRUE + allies = "You may cooperate with other syndicate operatives if they support our cause." -/datum/traitor_faction/bosyn - corporation_allighment = /datum/corporation/bolsynpowell \ No newline at end of file +/datum/traitor_faction/vostok + name = "Vostok" + employer_name = "Mr. Komarov" + description = "You're employed by a company with brave ideas and experimental technology. \n\ + Probably it also represents interests of USSP. You answer directly to retired major. \n\ + Ruin the Terragov economy using their own capitalistic tools. Make sure to remember: Actions speak louder than words." + corporation_allighment = /datum/corporation/vostok + key = TRAITOR_FACTION_VOSTOK + faction_theme = PDA_THEME_BOSYN + allies = "You are the only operative we are sending, any others are fake. All other syndicate operatives are not to be trusted." \ No newline at end of file diff --git a/modular_dripstation/code/modules/corporations/corporation.dm b/modular_dripstation/code/modules/corporations/corporation.dm index 869923ed3506..f104e29db4ad 100644 --- a/modular_dripstation/code/modules/corporations/corporation.dm +++ b/modular_dripstation/code/modules/corporations/corporation.dm @@ -57,4 +57,8 @@ // You are alone /datum/corporation/traitor/independent name = "Independent" - paymodifier = 0 \ No newline at end of file + paymodifier = 0 + +/datum/corporation/vostok + name = "Vostok" + paymodifier = 0.9 \ No newline at end of file diff --git a/modular_dripstation/includes.dm b/modular_dripstation/includes.dm index 1f389952f7b4..5142a4db5b04 100644 --- a/modular_dripstation/includes.dm +++ b/modular_dripstation/includes.dm @@ -168,6 +168,7 @@ #include "code\modules\antagonists\horror\horror_chemicals.dm" #include "code\modules\antagonists\nukeop\nukeop.dm" #include "code\modules\antagonists\traitor\backstory\traitor_factions.dm" +#include "code\modules\antagonists\traitor\backstory\traitor_backstories.dm" #include "code\modules\antagonists\traitor\traitor.dm" #include "code\modules\antagonists\wizard\equipment\wizard_spellbook.dm" #include "code\modules\assembly\assembly.dm" diff --git a/tgui/packages/tgui/interfaces/DripAntagInfoTraitor.tsx b/tgui/packages/tgui/interfaces/DripAntagInfoTraitor.tsx new file mode 100644 index 000000000000..4928952e9528 --- /dev/null +++ b/tgui/packages/tgui/interfaces/DripAntagInfoTraitor.tsx @@ -0,0 +1,180 @@ +import { useBackend } from '../backend'; +import { BlockQuote, Section, Stack } from '../components'; +import { BooleanLike } from 'common/react'; +import { Window } from '../layouts'; +import { ObjectivesSection, Objective } from './common/ObjectiveSelection'; +import { AntagInfoHeader } from './common/AntagInfoHeader'; + +const badstyle = { + color: 'red', + fontWeight: 'bold', +}; + +const goalstyle = { + color: 'lightblue', + fontWeight: 'bold', +}; + +const allystyle = { + fontWeight: 'bold', + color: 'yellow', +}; + +type Info = { + antag_name: string; + faction_desc: string; + allies: string; + has_codewords: BooleanLike; + phrases: string; + responses: string; + code: string; + failsafe_code: string; + has_uplink: BooleanLike; + uplink_unlock_info: string; + objectives: Objective[]; +}; + +const UplinkSection = (_props, context) => { + const { data } = useBackend(context); + const { has_uplink, uplink_unlock_info, code, failsafe_code } = data; + return ( +
+ + +
+ Keep this uplink safe, and don't feel like you need to buy everything immediately — you can save your + telecrystals to use whenever you're in a tough situation and need help. +
+
+ + + + {code && Code: {code}} + + {failsafe_code && ( + <> + {code && Code: {code}} + + + )} + +
{uplink_unlock_info}
+
+
+
+
+
+ ); +}; + +const EmployerSection = (_props, context) => { + const { data } = useBackend(context); + const { allies, faction_desc } = data; + return ( +
+ + + + + + Your allegiances: +
+
+
{allies}
+
+ + + + Important notes: +
+
+
{faction_desc}
+
+
+
+
+
+ ); +}; + +const CodewordsSection = (_props, context) => { + const { data } = useBackend(context); + const { has_codewords, phrases, responses } = data; + return ( +
+ + {(!has_codewords && ( +
+ You have not been supplied with codewords. You will have to use alternative methods to find potential allies. + Proceed with caution, however, as everyone is a potential foe. +
+ )) || ( + <> + +
+ Your employer provided you with the following codewords to identify fellow agents. Use the codewords during + regular conversation to identify other agents. Proceed with caution, however, as everyone is a potential foe. +  You have memorized the codewords, allowing you to recognise them when heard. +
+
+ + + + Code Phrases: + + {phrases} + + Code Responses: + + {responses} + + + + + )} +
+
+ ); +}; + +export const DripAntagInfoTraitorContent = (_props, context) => { + const { data } = useBackend(context); + const { antag_name, objectives } = data; + return ( + + + + + + + + + + + + + + + + + + + + + + ); +}; + +export const DripAntagInfoTraitor = (_props, context) => { + return ( + + + + + + ); +}; diff --git a/tgui/packages/tgui/interfaces/DripTraitorBackstoryMenu.js b/tgui/packages/tgui/interfaces/DripTraitorBackstoryMenu.js new file mode 100644 index 000000000000..5d4f5fff743b --- /dev/null +++ b/tgui/packages/tgui/interfaces/DripTraitorBackstoryMenu.js @@ -0,0 +1,552 @@ +import { useBackend, useLocalState } from '../backend'; +import { Button, Dimmer, Stack, Box, Section, Tabs, Flex, Icon, Tooltip } from '../components'; +import { Window } from '../layouts'; +import { DripAntagInfoTraitorContent } from './DripAntagInfoTraitor'; + +export const DripTraitorBackstoryMenu = (_, context) => { + const { data } = useBackend(context); + const { all_backstories = {}, all_factions = {}, backstory, faction, faction_theme } = data; + let has_backstory = all_backstories[backstory]; + let has_faction = all_factions[faction]; + let [ui_phase, set_ui_phase] = useLocalState(context, 'traitor_ui_phase', has_faction ? 2 : 0); + let [tabIndex, setTabIndex] = useLocalState(context, 'traitor_selected_tab', 1); + let [selected_faction, set_selected_faction_backend] = useLocalState(context, 'traitor_selected_faction', 'independent'); + let [selected_backstory, set_selected_backstory] = useLocalState(context, 'traitor_selected_backstory', null); + const set_selected_faction = (faction) => { + set_selected_faction_backend(faction); + if (selected_backstory && !all_backstories[selected_backstory].allowed_factions?.includes(faction)) { + set_selected_backstory(null); + } + }; + let windowTitle = 'Traitor Backstory'; + switch (ui_phase) { + case 0: + windowTitle = 'Traitor Backstory: Introduction'; + break; + case 1: + windowTitle = 'Traitor Backstory: Faction Select'; + break; + case 2: + windowTitle = tabIndex === 1 ? 'Traitor Info' : 'Traitor Backstory'; + break; + } + let info_ui = ui_phase === 2 && has_faction; + return ( + + + {ui_phase === 0 && } + {ui_phase === 1 && ( + + )} + {ui_phase === 2 && !has_faction && ( + + )} + {ui_phase === 2 && has_faction && ( + <> + + setTabIndex(1)}> + Antagonist Info + + setTabIndex(2)}> + Backstory + + + + {tabIndex === 1 ? ( + + ) : has_backstory ? ( + + ) : ( + + )} + + + )} + + + ); +}; + +const IntroductionMenu = ({ set_ui_phase }, context) => { + const { act, data } = useBackend(context); + const { faction } = data; + return ( + + + + + + Traitor Backstory Generator + + + This menu is a tool for you to use as an antagonist, giving a foundation for your character's motivations and + reasoning for being a traitor. + + + Please select a faction - a short description of each will be given. You will{' '} + not be able to change this after your main backstory is locked in, so choose wisely. + + + + +