mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Adds blood brother teammates to antag info (#64143)
Makes blood brother antag info display the names of their blood brothers.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
var/special_role = ROLE_BROTHER
|
||||
antag_hud_name = "brother"
|
||||
hijack_speed = 0.5
|
||||
ui_name = "AntagInfoBrother"
|
||||
suicide_cry = "FOR MY BROTHER!!"
|
||||
var/datum/team/brother_team/team
|
||||
antag_moodlet = /datum/mood_event/focused
|
||||
@@ -111,6 +112,13 @@
|
||||
message_admins("[key_name_admin(admin)] made [key_name_admin(new_owner)] and [key_name_admin(bro)] into blood brothers.")
|
||||
log_admin("[key_name(admin)] made [key_name(new_owner)] and [key_name(bro)] into blood brothers.")
|
||||
|
||||
/datum/antagonist/brother/ui_static_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["antag_name"] = name
|
||||
data["objectives"] = get_objectives()
|
||||
data["brothers"] = get_brother_names()
|
||||
return data
|
||||
|
||||
/datum/team/brother_team
|
||||
name = "brotherhood"
|
||||
member_name = "blood brother"
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
import { useBackend } from '../backend';
|
||||
import { Section, Stack } from '../components';
|
||||
import { BooleanLike } from 'common/react';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
type Objective = {
|
||||
count: number;
|
||||
name: string;
|
||||
explanation: string;
|
||||
complete: BooleanLike;
|
||||
was_uncompleted: BooleanLike;
|
||||
reward: number;
|
||||
}
|
||||
|
||||
type Info = {
|
||||
antag_name: string;
|
||||
objectives: Objective[];
|
||||
brothers: string;
|
||||
};
|
||||
|
||||
export const AntagInfoBrother = (props, context) => {
|
||||
const { data } = useBackend<Info>(context);
|
||||
const {
|
||||
antag_name,
|
||||
brothers,
|
||||
} = data;
|
||||
return (
|
||||
<Window
|
||||
width={620}
|
||||
height={250}>
|
||||
<Window.Content>
|
||||
<Section scrollable fill>
|
||||
<Stack vertical>
|
||||
<Stack.Item textColor="red" fontSize="20px">
|
||||
You are the {antag_name} of {brothers}!
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<ObjectivePrintout />
|
||||
</Stack.Item>
|
||||
</Stack>
|
||||
</Section>
|
||||
</Window.Content>
|
||||
</Window>
|
||||
);
|
||||
};
|
||||
|
||||
const ObjectivePrintout = (props, context) => {
|
||||
const { data } = useBackend<Info>(context);
|
||||
const {
|
||||
objectives,
|
||||
} = data;
|
||||
return (
|
||||
<Stack vertical>
|
||||
<Stack.Item bold>
|
||||
Your objectives:
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
{!objectives && "None!"
|
||||
|| objectives.map(objective => (
|
||||
<Stack.Item key={objective.count}>
|
||||
#{objective.count}: {objective.explanation}
|
||||
</Stack.Item>
|
||||
)) }
|
||||
</Stack.Item>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user