Get max 1 power from the DNA vaults (#15197)

Co-authored-by: joep van der velden <15887760+farie82@users.noreply.github.com>
This commit is contained in:
Farie82
2020-12-30 12:13:07 +01:00
committed by GitHub
parent b37ec95dd3
commit cb72bbe0bc
3 changed files with 37 additions and 26 deletions
+3 -1
View File
@@ -164,7 +164,7 @@ GLOBAL_LIST_INIT(non_simple_animals, typecacheof(list(/mob/living/carbon/human/m
var/list/dna = list()
var/completed = FALSE
var/list/power_lottery = list()
var/static/list/power_lottery = list()
var/list/obj/structure/fillers = list()
@@ -254,6 +254,8 @@ GLOBAL_LIST_INIT(non_simple_animals, typecacheof(list(/mob/living/carbon/human/m
data["used"] = FALSE
data["choiceA"] = L[1]
data["choiceB"] = L[2]
else if(L)
data["used"] = TRUE
return data
/obj/machinery/dna_vault/ui_act(action, params)
+33 -24
View File
@@ -6,13 +6,12 @@ export const DnaVault = (props, context) => {
const { act, data } = useBackend(context);
const {
completed,
used,
} = data;
return (
<Window>
<Window.Content>
<DnaVaultDataBase />
{!!(completed && !used) && (
{!!completed && (
<GeneTherapySelection />
)}
</Window.Content>
@@ -78,6 +77,7 @@ const GeneTherapySelection = (props, context) => {
const {
choiceA,
choiceB,
used,
} = data;
return (
<Section title="Personal Gene Therapy">
@@ -87,28 +87,37 @@ const GeneTherapySelection = (props, context) => {
mb={1}>
Applicable Gene Therapy Treatments
</Box>
<Grid>
<Grid.Column>
<Button
fluid
bold
content={choiceA}
textAlign="center"
onClick={() => act('gene', {
choice: choiceA,
})} />
</Grid.Column>
<Grid.Column>
<Button
fluid
bold
content={choiceB}
textAlign="center"
onClick={() => act('gene', {
choice: choiceB,
})} />
</Grid.Column>
</Grid>
{(!used && (
<Grid>
<Grid.Column>
<Button
fluid
bold
content={choiceA}
textAlign="center"
onClick={() => act('gene', {
choice: choiceA,
})} />
</Grid.Column>
<Grid.Column>
<Button
fluid
bold
content={choiceB}
textAlign="center"
onClick={() => act('gene', {
choice: choiceB,
})} />
</Grid.Column>
</Grid>
)) || (
<Box
bold
textAlign="center"
mb={1}>
Users DNA deemed unstable. Unable to provide more upgrades.
</Box>
)}
</Section>
);
};
File diff suppressed because one or more lines are too long