Testing and bugfixes

This commit is contained in:
Fermi
2021-01-04 15:47:35 +00:00
parent 57cd698994
commit d9047e458c
4 changed files with 82 additions and 72 deletions

View File

@@ -28,6 +28,7 @@
var/amount = 30 var/amount = 30
var/recharge_amount = 10 var/recharge_amount = 10
var/recharge_counter = 0 var/recharge_counter = 0
var/canStore = TRUE//If this can hold reagents or not
var/mutable_appearance/beaker_overlay var/mutable_appearance/beaker_overlay
var/working_state = "dispenser_working" var/working_state = "dispenser_working"
var/nopower_state = "dispenser_nopower" var/nopower_state = "dispenser_nopower"
@@ -198,6 +199,7 @@
data["maxVol"] = reagents.maximum_volume data["maxVol"] = reagents.maximum_volume
data["isBeakerLoaded"] = beaker ? 1 : 0 data["isBeakerLoaded"] = beaker ? 1 : 0
data["stepAmount"] = dispenceUnit data["stepAmount"] = dispenceUnit
data["canStore"] = canStore
var/beakerContents[0] var/beakerContents[0]
var/beakerCurrentVolume = 0 var/beakerCurrentVolume = 0
@@ -563,6 +565,7 @@
working_state = null working_state = null
nopower_state = null nopower_state = null
pass_flags = PASSTABLE pass_flags = PASSTABLE
canStore = FALSE
dispensable_reagents = list( dispensable_reagents = list(
/datum/reagent/water, /datum/reagent/water,
/datum/reagent/consumable/ice, /datum/reagent/consumable/ice,
@@ -695,12 +698,14 @@
dispensable_reagents = list(/datum/reagent/toxin/mutagen) dispensable_reagents = list(/datum/reagent/toxin/mutagen)
upgrade_reagents = null upgrade_reagents = null
emagged_reagents = list(/datum/reagent/toxin/plasma) emagged_reagents = list(/datum/reagent/toxin/plasma)
canStore = FALSE
/obj/machinery/chem_dispenser/mutagensaltpeter /obj/machinery/chem_dispenser/mutagensaltpeter
name = "botanical chemical dispenser" name = "botanical chemical dispenser"
desc = "Creates and dispenses chemicals useful for botany." desc = "Creates and dispenses chemicals useful for botany."
flags_1 = NODECONSTRUCT_1 flags_1 = NODECONSTRUCT_1
canStore = FALSE
dispensable_reagents = list( dispensable_reagents = list(
/datum/reagent/toxin/mutagen, /datum/reagent/toxin/mutagen,
@@ -823,6 +828,7 @@
working_state = "minidispenser_working" working_state = "minidispenser_working"
nopower_state = "minidispenser_nopower" nopower_state = "minidispenser_nopower"
circuit = /obj/item/circuitboard/machine/chem_dispenser/apothecary circuit = /obj/item/circuitboard/machine/chem_dispenser/apothecary
canStore = FALSE
powerefficiency = 0.0833333 powerefficiency = 0.0833333
dispensable_reagents = list( //radium and stable plasma moved to upgrade tier 1 and 2, they've little to do with most medicines anyway. dispensable_reagents = list( //radium and stable plasma moved to upgrade tier 1 and 2, they've little to do with most medicines anyway.
/datum/reagent/hydrogen, /datum/reagent/hydrogen,

View File

@@ -341,7 +341,7 @@ datum/reagent/fermi/nanite_b_gone/reaction_obj(obj/O, reac_volume)
pH = 0 pH = 0
chemical_flags = REAGENT_FORCEONNEW chemical_flags = REAGENT_FORCEONNEW
can_synth = TRUE can_synth = TRUE
var/strength = 1 var/strength = 1.5
//Consumes self on addition and shifts pH //Consumes self on addition and shifts pH
/datum/reagent/fermi/acidic_buffer/on_new(datapH) /datum/reagent/fermi/acidic_buffer/on_new(datapH)
@@ -370,7 +370,7 @@ datum/reagent/fermi/nanite_b_gone/reaction_obj(obj/O, reac_volume)
color = "#fbf344" color = "#fbf344"
pH = 4 pH = 4
can_synth = TRUE can_synth = TRUE
strength = 0.2 strength = 0.25
/datum/reagent/fermi/basic_buffer /datum/reagent/fermi/basic_buffer
name = "Strong basic buffer" name = "Strong basic buffer"
@@ -379,7 +379,7 @@ datum/reagent/fermi/nanite_b_gone/reaction_obj(obj/O, reac_volume)
pH = 14 pH = 14
chemical_flags = REAGENT_FORCEONNEW chemical_flags = REAGENT_FORCEONNEW
can_synth = TRUE can_synth = TRUE
var/strength = 1 var/strength = 1.5
/datum/reagent/fermi/basic_buffer/weak /datum/reagent/fermi/basic_buffer/weak
name = "Basic buffer" name = "Basic buffer"
@@ -387,7 +387,7 @@ datum/reagent/fermi/nanite_b_gone/reaction_obj(obj/O, reac_volume)
color = "#5873c4" color = "#5873c4"
pH = 10 pH = 10
can_synth = TRUE can_synth = TRUE
strength = 0.2 strength = 0.25
/datum/reagent/fermi/basic_buffer/on_new(datapH) /datum/reagent/fermi/basic_buffer/on_new(datapH)
if(!holder) if(!holder)

View File

@@ -35,17 +35,19 @@ export const ChemDispenser = (props, context) => {
return ( return (
<Window <Window
width={565} width={565}
height={720} height={data.canStore ? 720 : 620}
resizable> resizable>
<Window.Content scrollable> <Window.Content scrollable>
<Section <Section
title="Status" title="Status"
buttons={ buttons={
[recording && ( [(recording && (
<Box inline mx={1} color="red"> <Box inline mx={1} color="red">
<Icon name="circle" mr={1} /> <Icon name="circle" mr={1} />
Recording Recording
</Box>), </Box>
)
),
<Button <Button
key="colorButton" key="colorButton"
icon="cog" icon="cog"
@@ -53,8 +55,8 @@ export const ChemDispenser = (props, context) => {
tooltip="Alternate between buttons and radial input" tooltip="Alternate between buttons and radial input"
tooltipPosition="bottom-left" tooltipPosition="bottom-left"
selected={modeToggle} selected={modeToggle}
onClick={() => setModeToggle(!modeToggle)}/> onClick={() => setModeToggle(!modeToggle)} />]
]}> }>
<LabeledList> <LabeledList>
<LabeledList.Item label="Energy"> <LabeledList.Item label="Energy">
<ProgressBar <ProgressBar
@@ -132,8 +134,8 @@ export const ChemDispenser = (props, context) => {
onClick={() => act('amount', { onClick={() => act('amount', {
target: amount, target: amount,
})} /> })} />
))) : (!!data.isBeakerLoaded && ))) : (!!data.isBeakerLoaded
<NumberInput && <NumberInput
key="dispenseInput" key="dispenseInput"
width="65px" width="65px"
unit="u" unit="u"
@@ -145,8 +147,7 @@ export const ChemDispenser = (props, context) => {
maxValue={data.beakerMaxVolume} maxValue={data.beakerMaxVolume}
onDrag={(e, amount) => act('amount', { onDrag={(e, amount) => act('amount', {
target: amount, target: amount,
})} /> })} />),
),
<Button <Button
key="colorButton" key="colorButton"
icon="cog" icon="cog"
@@ -171,6 +172,7 @@ export const ChemDispenser = (props, context) => {
))} ))}
</Box> </Box>
</Section> </Section>
{!!data.canStore && (
<Section <Section
title="Storage" title="Storage"
buttons={ buttons={
@@ -181,8 +183,7 @@ export const ChemDispenser = (props, context) => {
value={data.amount} /> value={data.amount} />
u u
</Box> </Box>
} }>
>
<ProgressBar <ProgressBar
value={data.storedVol / data.maxVol}> value={data.storedVol / data.maxVol}>
{toFixed(data.storedVol) + ' units / ' + data.maxVol + ' units'} {toFixed(data.storedVol) + ' units / ' + data.maxVol + ' units'}
@@ -196,6 +197,7 @@ export const ChemDispenser = (props, context) => {
))} ))}
</ChemicalBuffer> </ChemicalBuffer>
</Section> </Section>
)}
<Section <Section
title="Beaker" title="Beaker"
buttons={( buttons={(
@@ -301,6 +303,7 @@ const ChemicalBeakerEntry = (props, context) => {
initial={0} /> initial={0} />
{` units of ${chemical.name}`} {` units of ${chemical.name}`}
</Table.Cell> </Table.Cell>
{!!data.canStore && (
<Table.Cell collapsing> <Table.Cell collapsing>
<Button <Button
content="Store" content="Store"
@@ -311,6 +314,7 @@ const ChemicalBeakerEntry = (props, context) => {
id: chemical.id, id: chemical.id,
})} /> })} />
</Table.Cell> </Table.Cell>
)}
</Table.Row> </Table.Row>
); );
}; };

File diff suppressed because one or more lines are too long