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] [Non-Modular] [TM First!] Adds Special Rules and Metaprotections to Antagonist Objective Panels #504

Merged
merged 2 commits into from
Nov 23, 2023
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
8 changes: 8 additions & 0 deletions tgui/packages/tgui/interfaces/AntagInfoAssaultops.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { useBackend, useLocalState } from '../backend';
import { LabeledList, Stack, Button, Section, ProgressBar, Box, Tabs, Divider } from '../components';
import { BooleanLike } from 'common/react';
import { Window } from '../layouts';
// SKYRAT EDIT BEGIN
import { Rules } from './AntagInfoRules';
// SKYRAT EDIT END

type Objectives = {
count: number;
Expand Down Expand Up @@ -117,6 +120,11 @@ export const AntagInfoAssaultops = (props, context) => {
{tab === 1 && <TargetPrintout />}
{tab === 2 && <KeyPrintout />}
</Stack.Item>
{/* SKYRAT EDIT ADDITION START */}
<Stack.Item>
<Rules />
</Stack.Item>
{/* SKYRAT EDIT ADDITION END */}
</Stack>
</Window.Content>
</Window>
Expand Down
4 changes: 4 additions & 0 deletions tgui/packages/tgui/interfaces/AntagInfoBlob.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { useBackend } from '../backend';
import { Box, Collapsible, Divider, LabeledList, Section, Stack } from '../components';
import { Objective } from './common/Objectives';
// SKYRAT EDIT BEGIN
import { Rules } from './AntagInfoRules';
// SKYRAT EDIT END

import { Window } from '../layouts';

Expand All @@ -25,6 +28,7 @@ export const AntagInfoBlob = (props, context) => {
<Structures />
<Minions />
<ObjectiveDisplay />
<Rules /* SKYRAT EDIT ADDITION */ />
</Section>
</Window.Content>
</Window>
Expand Down
11 changes: 10 additions & 1 deletion tgui/packages/tgui/interfaces/AntagInfoChangeling.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { useBackend, useSharedState } from '../backend';
import { Button, Dimmer, Dropdown, Section, Stack, NoticeBox } from '../components';
import { Window } from '../layouts';
import { ObjectivePrintout, Objective, ReplaceObjectivesButton } from './common/Objectives';
// SKYRAT EDIT BEGIN
import { Rules } from './AntagInfoRules';
// SKYRAT EDIT END

const hivestyle = {
fontWeight: 'bold',
Expand Down Expand Up @@ -54,9 +57,10 @@ type Info = {
can_change_objective: BooleanLike;
};

// SKYRAT EDIT change height from 750 to 900
export const AntagInfoChangeling = (props, context) => {
return (
<Window width={720} height={750}>
<Window width={720} height={900}>
<Window.Content
style={{
'backgroundImage': 'none',
Expand All @@ -65,6 +69,11 @@ export const AntagInfoChangeling = (props, context) => {
<Stack.Item maxHeight={16}>
<IntroductionSection />
</Stack.Item>
{/* SKYRAT EDIT ADDITION START */}
<Stack.Item>
<Rules />
</Stack.Item>
{/* SKYRAT EDIT ADDITION END */}
<Stack.Item grow={4}>
<AbilitiesSection />
</Stack.Item>
Expand Down
11 changes: 10 additions & 1 deletion tgui/packages/tgui/interfaces/AntagInfoClock.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import { useBackend } from '../backend';
import { Icon, Section, Stack } from '../components';
import { Window } from '../layouts';
// SKYRAT EDIT BEGIN
import { Rules } from './AntagInfoRules';
// SKYRAT EDIT END

type Info = {
antag_name: string;
};

// SKYRAT EDIT change height from 250 to 350
export const AntagInfoClock = (props, context) => {
const { data } = useBackend<Info>(context);
const { antag_name } = data;
return (
<Window width={620} height={250} theme="clockwork">
<Window width={620} height={350} theme="clockwork">
<Window.Content>
<Section scrollable fill>
<Stack vertical>
Expand All @@ -19,6 +23,11 @@ export const AntagInfoClock = (props, context) => {
{' You are the ' + antag_name + '! '}
<Icon name={'cog'} rotation={35} spin />
</Stack.Item>
{/* SKYRAT EDIT ADDITION START */}
<Stack.Item>
<Rules />
</Stack.Item>
{/* SKYRAT EDIT ADDITION END */}
<Stack.Item>
<ObjectivePrintout />
</Stack.Item>
Expand Down
11 changes: 10 additions & 1 deletion tgui/packages/tgui/interfaces/AntagInfoGeneric.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,32 @@ import { useBackend } from '../backend';
import { Section, Stack } from '../components';
import { Window } from '../layouts';
import { ObjectivePrintout, Objective } from './common/Objectives';
// SKYRAT EDIT BEGIN
import { Rules } from './AntagInfoRules';
// SKYRAT EDIT END

type Info = {
antag_name: string;
objectives: Objective[];
};

// SKYRAT EDIT increase height from 250 to 500
export const AntagInfoGeneric = (props, context) => {
const { data } = useBackend<Info>(context);
const { antag_name, objectives } = data;
return (
<Window width={620} height={250}>
<Window width={620} height={500}>
<Window.Content>
<Section scrollable fill>
<Stack vertical>
<Stack.Item textColor="red" fontSize="20px">
You are the {antag_name}!
</Stack.Item>
{/* SKYRAT EDIT ADDITION START */}
<Stack.Item>
<Rules />
</Stack.Item>
{/* SKYRAT EDIT ADDITION END */}
<Stack.Item>
<ObjectivePrintout objectives={objectives} />
</Stack.Item>
Expand Down
9 changes: 9 additions & 0 deletions tgui/packages/tgui/interfaces/AntagInfoHeretic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { Section, Stack, Box, Tabs, Button, BlockQuote } from '../components';
import { Window } from '../layouts';
import { BooleanLike } from 'common/react';
import { ObjectivePrintout, Objective, ReplaceObjectivesButton } from './common/Objectives';
// SKYRAT EDIT BEGIN
import { Rules } from './AntagInfoRules';
// SKYRAT EDIT END

const hereticRed = {
color: '#e03c3c',
Expand Down Expand Up @@ -64,6 +67,12 @@ const IntroductionSection = (props, context) => {
<Stack vertical>
<FlavorSection />
<Stack.Divider />
{/* SKYRAT EDIT ADDITION START */}
<Stack.Item>
<Rules />
</Stack.Item>
{/* SKYRAT EDIT ADDITION END */}
<Stack.Divider />
<GuideSection />
<Stack.Divider />
<InformationSection />
Expand Down
4 changes: 4 additions & 0 deletions tgui/packages/tgui/interfaces/AntagInfoMalf.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { BlockQuote, Button, Section, Stack, Tabs } from '../components';
import { BooleanLike } from 'common/react';
import { Window } from '../layouts';
import { ObjectivePrintout, Objective, ReplaceObjectivesButton } from './common/Objectives';
// SKYRAT EDIT BEGIN
import { Rules } from './AntagInfoRules';
// SKYRAT EDIT END

const allystyle = {
fontWeight: 'bold',
Expand Down Expand Up @@ -55,6 +58,7 @@ const IntroductionSection = (props, context) => {
/>
}
/>
<Rules /* SKYRAT EDIT ADDITION */ />
</Stack.Item>
</Stack>
</Section>
Expand Down
8 changes: 8 additions & 0 deletions tgui/packages/tgui/interfaces/AntagInfoMorph.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { BlockQuote, Stack } from '../components';
import { Window } from '../layouts';
// SKYRAT EDIT BEGIN
import { Rules } from './AntagInfoRules';
// SKYRAT EDIT END

const goodstyle = {
color: 'lightgreen',
Expand Down Expand Up @@ -48,6 +51,11 @@ export const AntagInfoMorph = (props, context) => {
</span>{' '}
</BlockQuote>
</Stack.Item>
{/* SKYRAT EDIT ADDITION START */}
<Stack.Item>
<Rules />
</Stack.Item>
{/* SKYRAT EDIT ADDITION END */}
</Stack>
</Window.Content>
</Window>
Expand Down
8 changes: 8 additions & 0 deletions tgui/packages/tgui/interfaces/AntagInfoNightmare.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { BlockQuote, LabeledList, Section, Stack } from '../components';
import { Window } from '../layouts';
// SKYRAT EDIT BEGIN
import { Rules } from './AntagInfoRules';
// SKYRAT EDIT END

const tipstyle = {
color: 'white',
Expand Down Expand Up @@ -68,6 +71,11 @@ export const AntagInfoNightmare = (props, context) => {
</LabeledList>
</Section>
</Stack.Item>
{/* SKYRAT EDIT ADDITION START */}
<Stack.Item>
<Rules />
</Stack.Item>
{/* SKYRAT EDIT ADDITION END */}
</Stack>
</Window.Content>
</Window>
Expand Down
8 changes: 8 additions & 0 deletions tgui/packages/tgui/interfaces/AntagInfoNinja.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { useBackend } from '../backend';
import { Icon, Section, Stack } from '../components';
import { Window } from '../layouts';
import { ObjectivePrintout, Objective, ReplaceObjectivesButton } from './common/Objectives';
// SKYRAT EDIT BEGIN
import { Rules } from './AntagInfoRules';
// SKYRAT EDIT END

const ninja_emphasis = {
color: 'red',
Expand Down Expand Up @@ -48,6 +51,11 @@ export const AntagInfoNinja = (props, context) => {
what you can do!
</Section>
</Stack.Item>
{/* SKYRAT EDIT ADDITION START */}
<Stack.Item>
<Rules />
</Stack.Item>
{/* SKYRAT EDIT ADDITION END */}
<Stack.Item>
<ObjectivePrintout
objectives={objectives}
Expand Down
Loading
Loading