Skip to content

Commit

Permalink
[MIRROR] [Non-Modular] [TM First!] Adds Special Rules and Metaprotect…
Browse files Browse the repository at this point in the history
…ions to Antagonist Objective Panels (#504)

* [Non-Modular] [TM First!] Adds Special Rules and Metaprotections to Antagonist Objective Panels (#24040)

* The Goods

* Turned 'Prettier' back on

* Fixing SKYRAT EDIT tag formatting

* Grammar fixes

* Update tgui/packages/tgui/interfaces/AntagInfoClock.tsx

Co-authored-by: GoldenAlpharex <[email protected]>

* Update tgui/packages/tgui/interfaces/AntagInfoBlob.tsx

Co-authored-by: GoldenAlpharex <[email protected]>

* Update tgui/packages/tgui/interfaces/AntagInfoClock.tsx

Co-authored-by: GoldenAlpharex <[email protected]>

* Update tgui/packages/tgui/interfaces/AntagInfoAssaultops.tsx

Co-authored-by: GoldenAlpharex <[email protected]>

* Update tgui/packages/tgui/interfaces/AntagInfoGeneric.tsx

Co-authored-by: GoldenAlpharex <[email protected]>

* Update tgui/packages/tgui/interfaces/AntagInfoGeneric.tsx

Co-authored-by: GoldenAlpharex <[email protected]>

* Update tgui/packages/tgui/interfaces/AntagInfoGeneric.tsx

Co-authored-by: GoldenAlpharex <[email protected]>

* Update tgui/packages/tgui/interfaces/AntagInfoGeneric.tsx

Co-authored-by: GoldenAlpharex <[email protected]>

* Update tgui/packages/tgui/interfaces/AntagInfoMalf.tsx

Co-authored-by: GoldenAlpharex <[email protected]>

* Update tgui/packages/tgui/interfaces/AntagInfoMalf.tsx

Co-authored-by: GoldenAlpharex <[email protected]>

* Apply suggestions from code review

Co-authored-by: GoldenAlpharex <[email protected]>

* Overhauls to use hyperlinks

* Consolidates Changes into one file (mostly)

- Stack sections with hyperlinks have been condensed into a single file.
- They are now imported where needed.

---------

Co-authored-by: Giz <[email protected]>
Co-authored-by: GoldenAlpharex <[email protected]>

* Update AntagInfoRules.tsx

---------

Co-authored-by: LovliestPlant <[email protected]>
Co-authored-by: Giz <[email protected]>
Co-authored-by: GoldenAlpharex <[email protected]>
Co-authored-by: ReezeBL <[email protected]>
  • Loading branch information
5 people authored Nov 23, 2023
1 parent 219f4f8 commit fbdd283
Show file tree
Hide file tree
Showing 13 changed files with 368 additions and 5 deletions.
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 @@ -63,6 +66,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

0 comments on commit fbdd283

Please sign in to comment.