mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
Testing and bugfixes
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -35,26 +35,28 @@ 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
|
)
|
||||||
key="colorButton"
|
),
|
||||||
icon="cog"
|
<Button
|
||||||
disabled={!data.isBeakerLoaded}
|
key="colorButton"
|
||||||
tooltip="Alternate between buttons and radial input"
|
icon="cog"
|
||||||
tooltipPosition="bottom-left"
|
disabled={!data.isBeakerLoaded}
|
||||||
selected={modeToggle}
|
tooltip="Alternate between buttons and radial input"
|
||||||
onClick={() => setModeToggle(!modeToggle)}/>
|
tooltipPosition="bottom-left"
|
||||||
]}>
|
selected={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,15 +147,14 @@ 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"
|
||||||
tooltip="Color code the reagents by pH"
|
tooltip="Color code the reagents by pH"
|
||||||
tooltipPosition="bottom-left"
|
tooltipPosition="bottom-left"
|
||||||
selected={hasCol}
|
selected={hasCol}
|
||||||
onClick={() => setHasCol(!hasCol)} />]
|
onClick={() => setHasCol(!hasCol)} />]
|
||||||
)}>
|
)}>
|
||||||
<Box mr={-1}>
|
<Box mr={-1}>
|
||||||
{data.chemicals.map(chemical => (
|
{data.chemicals.map(chemical => (
|
||||||
@@ -163,7 +164,7 @@ export const ChemDispenser = (props, context) => {
|
|||||||
width="129.5px"
|
width="129.5px"
|
||||||
lineHeight={1.75}
|
lineHeight={1.75}
|
||||||
content={chemical.title}
|
content={chemical.title}
|
||||||
tooltip={"pH: "+chemical.pH}
|
tooltip={"pH: " + chemical.pH}
|
||||||
backgroundColor={hasCol ? chemical.pHCol : "blue"}
|
backgroundColor={hasCol ? chemical.pHCol : "blue"}
|
||||||
onClick={() => act('dispense', {
|
onClick={() => act('dispense', {
|
||||||
reagent: chemical.id,
|
reagent: chemical.id,
|
||||||
@@ -171,31 +172,32 @@ export const ChemDispenser = (props, context) => {
|
|||||||
))}
|
))}
|
||||||
</Box>
|
</Box>
|
||||||
</Section>
|
</Section>
|
||||||
<Section
|
{!!data.canStore && (
|
||||||
title="Storage"
|
<Section
|
||||||
buttons={
|
title="Storage"
|
||||||
<Box>
|
buttons={
|
||||||
Transfer amount:
|
<Box>
|
||||||
<AnimatedNumber
|
Transfer amount:
|
||||||
initial={5}
|
<AnimatedNumber
|
||||||
value={data.amount} />
|
initial={5}
|
||||||
u
|
value={data.amount} />
|
||||||
</Box>
|
u
|
||||||
}
|
</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'}
|
||||||
</ProgressBar>
|
</ProgressBar>
|
||||||
<ChemicalBuffer>
|
<ChemicalBuffer>
|
||||||
{storedContents.map(chemical => (
|
{storedContents.map(chemical => (
|
||||||
<ChemicalBufferEntry
|
<ChemicalBufferEntry
|
||||||
key={chemical.id}
|
key={chemical.id}
|
||||||
chemical={chemical}
|
chemical={chemical}
|
||||||
transferTo="beaker" />
|
transferTo="beaker" />
|
||||||
))}
|
))}
|
||||||
</ChemicalBuffer>
|
</ChemicalBuffer>
|
||||||
</Section>
|
</Section>
|
||||||
|
)}
|
||||||
<Section
|
<Section
|
||||||
title="Beaker"
|
title="Beaker"
|
||||||
buttons={(
|
buttons={(
|
||||||
@@ -221,14 +223,14 @@ export const ChemDispenser = (props, context) => {
|
|||||||
{recording
|
{recording
|
||||||
&& 'Virtual beaker'
|
&& 'Virtual beaker'
|
||||||
|| data.isBeakerLoaded
|
|| data.isBeakerLoaded
|
||||||
&& (
|
&& (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<AnimatedNumber
|
<AnimatedNumber
|
||||||
initial={0}
|
initial={0}
|
||||||
value={data.beakerCurrentVolume} />
|
value={data.beakerCurrentVolume} />
|
||||||
/{data.beakerMaxVolume} units
|
/{data.beakerMaxVolume} units
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)
|
)
|
||||||
|| 'No beaker'}
|
|| 'No beaker'}
|
||||||
</LabeledList.Item>
|
</LabeledList.Item>
|
||||||
<LabeledList.Item
|
<LabeledList.Item
|
||||||
@@ -301,16 +303,18 @@ const ChemicalBeakerEntry = (props, context) => {
|
|||||||
initial={0} />
|
initial={0} />
|
||||||
{` units of ${chemical.name}`}
|
{` units of ${chemical.name}`}
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell collapsing>
|
{!!data.canStore && (
|
||||||
<Button
|
<Table.Cell collapsing>
|
||||||
content="Store"
|
<Button
|
||||||
icon="upload"
|
content="Store"
|
||||||
disabled={!!data.recordingRecipe}
|
icon="upload"
|
||||||
mt={0.5}
|
disabled={!!data.recordingRecipe}
|
||||||
onClick={() => act('store', {
|
mt={0.5}
|
||||||
id: chemical.id,
|
onClick={() => act('store', {
|
||||||
})} />
|
id: chemical.id,
|
||||||
</Table.Cell>
|
})} />
|
||||||
|
</Table.Cell>
|
||||||
|
)}
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user