mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 08:03:43 +01:00
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:
@@ -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)
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user