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.
+
+ 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.
+
+
+
+
+
+
+
+ );
+};
+
+const get_surrounding_factions = (faction_keys, selected_faction) => {
+ let max_index = faction_keys.length - 1;
+ let current_index = faction_keys.indexOf(selected_faction);
+ let next_faction = current_index + 1;
+ let prev_faction = current_index - 1;
+ if (next_faction > max_index) {
+ next_faction = 0;
+ }
+ if (prev_faction < 0) {
+ prev_faction = max_index;
+ }
+ next_faction = faction_keys[next_faction];
+ prev_faction = faction_keys[prev_faction];
+ return [prev_faction, next_faction];
+};
+
+const SelectFactionMenu = ({ set_ui_phase, set_selected_faction, selected_faction }, context) => {
+ const { data } = useBackend(context);
+ const { allowed_factions = [], all_factions = {}, faction, recommended_factions = [] } = data;
+ let faction_keys = Object.keys(all_factions);
+
+ if (faction_keys.length === 0 || faction_keys.filter((key) => allowed_factions.includes(key)).length === 0) {
+ return No valid factions found. This is likely a bug. Please reload or reopen the menu.;
+ }
+
+ let current_faction = all_factions[faction] || all_factions[selected_faction];
+ let current_faction_key = faction || selected_faction;
+
+ return (
+
+
+ Faction Select
+
+
+ );
+};
+
+const FactionNavigationButtons = ({ faction_keys, selected_faction, left, right, top, size, set_selected_faction }, _) => {
+ let [prev_faction, next_faction] = get_surrounding_factions(faction_keys, selected_faction);
+ return (
+ <>
+ set_selected_faction(prev_faction)}
+ />
+ set_selected_faction(next_faction)}
+ />
+ >
+ );
+};
+
+const BackstoryInfo = ({ data, titleColor }) => {
+ return (
+ <>
+
+ {data?.name}
+
+ {data?.description?.split('\n').map((value, index) => (
+
+ ))}
+ >
+ );
+};
+
+const MOTIVATION_ICONS = {
+ 'Forced Into It': 'user-alt-slash',
+ 'Not Forced Into It': 'user-check',
+ 'Money': 'dollar-sign',
+ 'Political': 'peace',
+ 'Love': 'heart',
+ 'Reputation': 'comments-dollar',
+ 'Death Threat': 'skull',
+ 'Authority': 'users',
+ 'Fun': 'grin-tongue-wink',
+};
+
+const SelectBackstoryMenu = (
+ { set_ui_phase, selected_faction, set_selected_faction, selected_backstory, set_selected_backstory, show_nav },
+ context
+) => {
+ const { act, data } = useBackend(context);
+ const {
+ allowed_backstories = [],
+ all_backstories = {},
+ recommended_backstories = [],
+ all_motivations = [],
+ all_factions = {},
+ allowed_factions = [],
+ faction,
+ backstory,
+ } = data;
+
+ let [motivations, set_motivations] = useLocalState(context, 'traitor_motivations', []);
+
+ const toggle_motivation = (name) =>
+ set_motivations((motivations) => {
+ if (motivations.includes(name)) {
+ let index = motivations.indexOf(name);
+ if (index > -1) {
+ motivations.splice(index, 1);
+ }
+ } else {
+ if (name === 'Not Forced Into It' && motivations.includes('Forced Into It')) {
+ toggle_motivation('Forced Into It');
+ }
+ if (name === 'Forced Into It' && motivations.includes('Not Forced Into It')) {
+ toggle_motivation('Not Forced Into It');
+ }
+ motivations.push(name);
+ }
+ return motivations;
+ });
+
+ let current_faction = all_factions[faction] || all_factions[selected_faction];
+ let current_faction_key = faction || selected_faction;
+
+ let allowed_backstories_filtered = Object.values(all_backstories)
+ .filter((value) => value.allowed_factions?.includes(current_faction_key) && allowed_backstories.includes(value.path))
+ .map((value) => value.path);
+ if (allowed_backstories_filtered.length === 0) {
+ return No valid backstories found. This is likely a bug. Please reload or reopen the menu.;
+ }
+
+ let current_backstory = all_backstories[backstory] || all_backstories[selected_backstory];
+ let current_backstory_key = backstory || selected_backstory;
+
+ return (
+
+
+
+
+ {!faction && (
+ allowed_factions.includes(v))}
+ selected_faction={current_faction_key}
+ set_selected_faction={set_selected_faction}
+ left="28%"
+ right="28%"
+ top="8px"
+ size="13px"
+ />
+ )}
+ {current_faction.name}
+
+ {show_nav && (
+ {
+ set_ui_phase((phase) => phase - 1);
+ }}
+ />
+ )}
+ >
+ }>
+
+ What motivates your character?
+
+ {all_motivations.map((motivation) => (
+ toggle_motivation(motivation)}
+ checked={motivations?.includes(motivation)}
+ />
+ ))}
+
+
+ {/* Don't ask me why height: 0 somehow fixes the flow layout scrollability, but it does. */}
+
+
+
+
+
+ {Object.values(all_backstories)
+ .filter((v) => allowed_backstories_filtered?.includes(v.path))
+ .map((backstory) => (
+ motivations?.includes(r)).length}
+ matches_all_recommendations={motivations.filter((r) => !backstory.motivations?.includes(r)).length === 0}
+ />
+ ))}
+
+
+
+
+ {current_backstory ? (
+
+ ) : (
+
+ No backstory selected
+
+ )}
+
+
+
+
+ );
+};
+
+const BackstorySection = (
+ { backstory, backstory_locked, show_button, backstory_key, faction_key, set_ui_phase, fill },
+ context
+) => {
+ const { act } = useBackend(context);
+ return (
+
+ {backstory.name}
+
+ }
+ fontSize={1.25}
+ buttons={
+ <>
+ {Object.entries(MOTIVATION_ICONS)
+ .filter(([k, v]) => backstory.motivations?.includes(k))
+ .map(([motivation, icon]) => (
+
+
+
+ ))}
+ {show_button ? (
+ backstory_locked ? (
+ set_ui_phase((phase) => phase + 1)}
+ />
+ ) : (
+
+ act('select_backstory', {
+ faction: faction_key,
+ backstory: backstory_key,
+ })
+ }
+ />
+ )
+ ) : null}
+ >
+ }>
+
+
+ );
+};
+
+const BackstoryTab = ({
+ path,
+ name,
+ selected,
+ is_recommended_objectives,
+ recommendation_count,
+ matches_all_recommendations,
+ set_selected_backstory,
+}) => {
+ return (
+ set_selected_backstory(selected ? null : path)}>
+ {name}
+ {is_recommended_objectives && (
+
+
+
+ )}
+ {recommendation_count > 0 && (
+
+ 1 ? 'silver' : 'brown'}
+ ml={1}
+ />
+
+ {recommendation_count}
+
+
+ )}
+
+ );
+};
+
+const BackstoryDetails = (_, context) => {
+ const { data } = useBackend(context);
+ const { backstory, all_backstories = {} } = data;
+ return ;
+};
diff --git a/yogstation/code/modules/antagonists/traitor/backstory/traitor_backstories.dm b/yogstation/code/modules/antagonists/traitor/backstory/traitor_backstories.dm
index 52d866e3b571..0114dc7b4f34 100644
--- a/yogstation/code/modules/antagonists/traitor/backstory/traitor_backstories.dm
+++ b/yogstation/code/modules/antagonists/traitor/backstory/traitor_backstories.dm
@@ -12,8 +12,11 @@
TRAITOR_FACTION_VAHLEN,
TRAITOR_FACTION_GORLEX,
TRAITOR_FACTION_SELF,
+ TRAITOR_FACTION_VOSTOK)
+/*Dripstation edit
TRAITOR_FACTION_BOSYN
)
+*/
/// A list of motivation types for this backstory, used for filtering and searching
var/list/motivations = list()
/// If this backstory suggested for murderboning or hijacking
@@ -70,7 +73,9 @@
/datum/traitor_backstory/hater
name = "The Hater"
+/*
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)
murderbone = TRUE
diff --git a/yogstation/code/modules/antagonists/traitor/backstory/traitor_backstory_ui.dm b/yogstation/code/modules/antagonists/traitor/backstory/traitor_backstory_ui.dm
index 86d7cc8735e8..852a64bc93af 100644
--- a/yogstation/code/modules/antagonists/traitor/backstory/traitor_backstory_ui.dm
+++ b/yogstation/code/modules/antagonists/traitor/backstory/traitor_backstory_ui.dm
@@ -1,5 +1,8 @@
/datum/antagonist/traitor
+/*
ui_name = "TraitorBackstoryMenu"
+*/
+ ui_name = "DripTraitorBackstoryMenu" //dripstation edit
/// We will handle this ourselves, thank you.
/datum/antagonist/traitor/make_info_button()
@@ -42,7 +45,9 @@
/*dripstation edit start
data["antag_name"] = name
*/
- data["antag_name"] = faction ? "[faction.name] [name]" : "[name]" //dripstation edit end
+ data["antag_name"] = faction ? "[faction.name] [name]" : "[name]" //dripstation edit
+ data["faction_desc"] = faction?.description //dripstation edit
+ data["allies"] = faction?.allies //dripstation edit end
data["has_codewords"] = has_codewords
if(has_codewords)
data["phrases"] = jointext(GLOB.syndicate_code_phrase, ", ")
@@ -60,6 +65,8 @@
var/list/data = list()
var/list/all_factions = list()
for(var/key in GLOB.traitor_factions_to_datum)
+ if(!(key in allowed_factions)) //yeah, it is shitcode, i know. I don`t wanna to rewrite entire interface
+ continue //dripstation edit
var/datum/traitor_faction/faction = GLOB.traitor_factions_to_datum[key]
all_factions[key] = list(
"name" = faction.name,
diff --git a/yogstation/code/modules/antagonists/traitor/backstory/traitor_datum_backstory.dm b/yogstation/code/modules/antagonists/traitor/backstory/traitor_datum_backstory.dm
index a23405d92368..858eece44124 100644
--- a/yogstation/code/modules/antagonists/traitor/backstory/traitor_datum_backstory.dm
+++ b/yogstation/code/modules/antagonists/traitor/backstory/traitor_datum_backstory.dm
@@ -1,5 +1,6 @@
/datum/antagonist/traitor
/// A list of factions the traitor can pick from freely.
+/* dripstation edit start
var/list/allowed_factions = list(
TRAITOR_FACTION_SYNDICATE,
TRAITOR_FACTION_BLACK_MARKET,
@@ -10,6 +11,16 @@
TRAITOR_FACTION_VAHLEN,
TRAITOR_FACTION_GORLEX,
TRAITOR_FACTION_SELF)
+*/
+ var/list/allowed_factions = list(
+ TRAITOR_FACTION_INDEPENDENT,
+ TRAITOR_FACTION_DONK,
+ TRAITOR_FACTION_WAFFLE,
+ TRAITOR_FACTION_CYBERSUN,
+ TRAITOR_FACTION_VAHLEN,
+ TRAITOR_FACTION_GORLEX,
+ TRAITOR_FACTION_SELF,
+ TRAITOR_FACTION_VOSTOK) //dripstation edit end
/// A list of factions the traitor can pick from freely.
var/list/recommended_factions = list()
/// A list of backstories that are allowed for this traitor.
@@ -23,7 +34,10 @@
/datum/antagonist/traitor/proc/setup_backstories(murderbone, hijack)
if(murderbone || hijack)
+/*
recommended_factions = list(TRAITOR_FACTION_SYNDICATE, TRAITOR_FACTION_INDEPENDENT)
+*/
+ recommended_factions = list(TRAITOR_FACTION_GORLEX, TRAITOR_FACTION_INDEPENDENT) //dripstation edit
allowed_backstories = list()
recommended_backstories = list()
for(var/datum/traitor_backstory/path as anything in subtypesof(/datum/traitor_backstory))
@@ -49,10 +63,12 @@
var/no_faction = isnull(faction)
faction = new_faction
employer = new_faction.employer_name
- if(company)
- owner.remove_employee(company)
- company = new_faction.corporation_allighment
- owner.add_employee(company)
+ if(company) //dripstation edit
+ owner.remove_employee(company) //dripstation edit
+ company = new_faction.corporation_allighment //dripstation edit
+ owner.add_employee(company) //dripstation edit
+ if(initial(company.paymodifier)) //dripstation edit
+ to_chat(owner.current, span_notice("Your employer within [initial(company.name)] will be paying you an extra [initial(company.paymodifier)]x your nanotrasen paycheck.")) //dripstation edit
if(no_faction)
if(new_faction.give_codewords)
give_codewords()
diff --git a/yogstation/code/modules/antagonists/traitor/backstory/traitor_factions.dm b/yogstation/code/modules/antagonists/traitor/backstory/traitor_factions.dm
index f9cfe8263543..c7448d5427f3 100644
--- a/yogstation/code/modules/antagonists/traitor/backstory/traitor_factions.dm
+++ b/yogstation/code/modules/antagonists/traitor/backstory/traitor_factions.dm
@@ -16,9 +16,11 @@
/datum/traitor_faction/independent
name = "Independent"
employer_name = "You"
+/* Dripstation edit
description = "Not for the faint of heart, being an independent traitor requires superior roleplay abilities, and superior traitor skills. \n\
You are a person who holds grudges, and has been hurt greatly by Nanotrasen.\n\
You will have no allies."
+*/
key = TRAITOR_FACTION_INDEPENDENT
/* Dripstation edit
faction_theme = PDA_THEME_RETRO