forked from Aurorastation/Aurora.3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matt Atlas
committed
Aug 22, 2024
1 parent
42ffa6b
commit 2effb67
Showing
11 changed files
with
223 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/singleton/role | ||
/// The role's name. | ||
var/name = "Generic Goon" | ||
/// The role's description. It should contain the information on what it's supposed to do. | ||
var/desc = "Your job is to be a generic goon in this scenario. Nothing special." | ||
/// The /obj/outfit this role equips you with. | ||
var/outfit = /obj/outfit/admin/generic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { useBackend } from '../backend'; | ||
import { Button, NoticeBox, Section } from '../components'; | ||
import { Window } from '../layouts'; | ||
|
||
export type OdysseyData = { | ||
scenario_name: string; | ||
scenario_desc: string; | ||
scenario_canonicity: string; | ||
|
||
scenario_roles: Role[]; | ||
}; | ||
|
||
type Role = { | ||
name: string; | ||
desc: string; | ||
outfit: string; | ||
}; | ||
|
||
export const OdysseyPanel = (props, context) => { | ||
const { act, data } = useBackend<OdysseyData>(context); | ||
|
||
return ( | ||
<Window resizable theme="malfunction" width={500} height={600}> | ||
<Window.Content scrollable> | ||
<Section title={data.scenario_name}> | ||
<NoticeBox>{data.scenario_desc}</NoticeBox> | ||
This is a {data.scenario_canonicity} scenario. | ||
</Section> | ||
{data.scenario_roles && data.scenario_roles.length ? ( | ||
<RoleDisplay /> | ||
) : ( | ||
<NoticeBox>There are no roles for this scenario.</NoticeBox> | ||
)} | ||
</Window.Content> | ||
</Window> | ||
); | ||
}; | ||
|
||
export const RoleDisplay = (props, context) => { | ||
const { act, data } = useBackend<OdysseyData>(context); | ||
|
||
return ( | ||
<Section title="Roles"> | ||
<NoticeBox> | ||
Remember that you are not beholden to following the role names and | ||
descriptions. You can use their equipment and change up the premises or | ||
what your objective is as you like! These are just guidelines in the | ||
end, or how the developer envisioned the story. Your creativity is the | ||
limit! | ||
</NoticeBox> | ||
{data.scenario_roles.map((role) => ( | ||
<Section | ||
title={role.name} | ||
key={role.name} | ||
buttons={ | ||
<Button | ||
name="Equip" | ||
color="green" | ||
icon="star" | ||
onClick={() => act('equip_outfit', { outfit_type: role.outfit })} | ||
/> | ||
}> | ||
{role.desc} | ||
</Section> | ||
))} | ||
</Section> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters