Skip to content

Commit

Permalink
blueprint fixes and odyssey panel is now prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Atlas committed Aug 23, 2024
1 parent c8615bf commit 2ffa732
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 40 deletions.
1 change: 1 addition & 0 deletions code/datums/scenarios/roles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
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

2 changes: 2 additions & 0 deletions code/modules/mob/abstract/freelook/blueprints/blueprints.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@
var/obj/effect/overmap/visitable/sector/exoplanet/exoplanet = sector
if(istype(exoplanet))
background_area = exoplanet.planetary_area
if(SSodyssey.scenario && owner.z == SSodyssey.scenario_zlevel)
background_area = SSodyssey.scenario.base_area
for(var/turf/T in A.contents)
ChangeArea(T, background_area)
if(!locate(/turf) in A)
Expand Down
99 changes: 59 additions & 40 deletions tgui/packages/tgui/interfaces/OdysseyPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BooleanLike } from 'common/react';
import { useBackend } from '../backend';
import { Box, Button, NoticeBox, Section } from '../components';
import { Box, Button, LabeledList, NoticeBox, Section } from '../components';
import { Window } from '../layouts';

export type OdysseyData = {
Expand All @@ -23,28 +23,40 @@ export const OdysseyPanel = (props, context) => {
const { act, data } = useBackend<OdysseyData>(context);

return (
<Window resizable theme="malfunction" width={500} height={600}>
<Window resizable theme="admin" width={500} height={600}>
<Window.Content scrollable>
<Section
title={data.scenario_name}
buttons={
title={
<Button
content={data.scenario_name}
icon="pencil"
color="green"
tooltip="Edit Name"
disabled={!data.is_storyteller}
onClick={() => act('edit_scenario_name')}
/>
}>
<NoticeBox>
{data.scenario_desc}{' '}
<Button
icon="pencil"
color="green"
disabled={!data.is_storyteller}
onClick={() => act('edit_scenario_desc')}
/>
{data.scenario_desc}{' '}
<Button
icon="pencil"
color="green"
tooltip="Edit Description"
disabled={!data.is_storyteller}
onClick={() => act('edit_scenario_desc')}
/>
<NoticeBox danger>
This is a{' '}
<Box
as="span"
color={
data.scenario_canonicity == 'Non-Canon' ? 'orange' : 'green'
}>
{data.scenario_canonicity}
</Box>{' '}
scenario. Please remember that the one thing you cannot change about
the round is its canonicity! Stay within the bounds of the
scenario's intended canon status.
</NoticeBox>
This is a {data.scenario_canonicity} scenario.
</Section>
{data.scenario_roles && data.scenario_roles.length ? (
<RoleDisplay />
Expand All @@ -61,16 +73,30 @@ export const RoleDisplay = (props, 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 info>
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}
title={
data.is_storyteller ? (
<Button
content={role.name}
icon="pencil"
color="red"
tooltip="Edit Role Name"
disabled={!data.is_storyteller}
onClick={() =>
act('edit_role', { new_name: 1, role_type: role.type })
}
/>
) : (
''
)
}
key={role.name}
buttons={
!data.is_storyteller ? (
Expand All @@ -84,14 +110,7 @@ export const RoleDisplay = (props, context) => {
}
/>
) : (
<Button
icon="pencil"
color="green"
disabled={!data.is_storyteller}
onClick={() =>
act('edit_role', { new_name: 1, role_type: role.type })
}
/>
''
)
}>
{role.desc}{' '}
Expand All @@ -108,18 +127,18 @@ export const RoleDisplay = (props, context) => {
''
)}
{data.is_storyteller ? (
<Box>
{' '}
Current Outfit: {role.outfit}{' '}
<Button
content="Edit"
icon="pencil"
color="red"
onClick={() =>
act('edit_role', { edit_outfit: 1, role_type: role.type })
}
/>{' '}
</Box>
<LabeledList>
<LabeledList.Item label="Outfit">
<Button
content={role.outfit}
icon="pencil"
color="blue"
onClick={() =>
act('edit_role', { edit_outfit: 1, role_type: role.type })
}
/>
</LabeledList.Item>
</LabeledList>
) : (
''
)}
Expand Down

0 comments on commit 2ffa732

Please sign in to comment.