-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📦 add docs for chemical oxidizer and chemical tank
- Loading branch information
Showing
4 changed files
with
208 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<script setup> | ||
import { data as metrics } from './common/metrics.data.ts' | ||
</script> | ||
|
||
# Mekanism Chemical Oxidizer Input <RepoLink path="lib/input/mekanism/ChemicalOxidizerInputAdapter.lua" /> | ||
|
||
```lua | ||
telem.input.mekanism.chemicalOxidizer ( | ||
peripheralID: string, | ||
categories?: string[] | '*' | ||
) | ||
``` | ||
|
||
::: warning Mod Dependencies | ||
Requires **Mekanism**. | ||
::: | ||
|
||
See the Usage section for a complete list of the metrics in each category. | ||
|
||
<PropertiesTable | ||
:properties="[ | ||
{ | ||
name: 'peripheralID', | ||
type: 'string', | ||
default: 'nil', | ||
description: 'Peripheral ID of the Chemical Oxidizer' | ||
}, | ||
{ | ||
name: 'categories', | ||
type: 'string[] | "*"', | ||
default: '{ "basic" }' | ||
} | ||
]" | ||
> | ||
<template v-slot:categories> | ||
List of metric categories to query. The value `"*"` can be used to include all categories, which are listed below. | ||
|
||
```lua | ||
{ "basic", "advanced", "output", "energy", "recipe" } | ||
``` | ||
</template> | ||
</PropertiesTable> | ||
|
||
## Usage | ||
|
||
```lua{4} | ||
local telem = require 'telem' | ||
local backplane = telem.backplane() | ||
:addInput('my_oxidizer', telem.input.mekanism.chemicalOxidizer('right', '*')) | ||
:cycleEvery(5)() | ||
``` | ||
|
||
Given a Chemical Oxidizer peripheral on the `right` side of the computer, this appends the following metrics to the backplane (grouped by category here for clarity): | ||
|
||
### Basic | ||
|
||
<MetricTable | ||
prefix="mekchemoxidizer:" | ||
:metrics="[ | ||
{ name: 'input_count', value: '0 - inf', unit: 'item' }, | ||
{ name: 'output_filled_percentage', value: '0.0 - 1.0' }, | ||
{ name: 'output_item_count', value: '0 - inf', unit: 'item' }, | ||
{ name: 'energy_usage', value: '0.0 - inf', unit: 'FE/t' }, | ||
...metrics.genericMachine.basic | ||
]" | ||
/> | ||
|
||
### Advanced | ||
|
||
<MetricTable | ||
prefix="mekchemoxidizer:" | ||
:metrics="[ | ||
...metrics.genericMachine.advanced | ||
]" | ||
/> | ||
|
||
### Output | ||
|
||
<MetricTable | ||
prefix="mekchemoxidizer:" | ||
:metrics="[ | ||
{ name: 'output', value: '0.0 - inf', unit: 'B' }, | ||
{ name: 'output_capacity', value: '0.0 - inf', unit: 'B' }, | ||
{ name: 'output_needed', value: '0.0 - inf', unit: 'B' } | ||
]" | ||
/> | ||
|
||
### Energy | ||
|
||
<MetricTable | ||
prefix="mekchemoxidizer:" | ||
:metrics="[ | ||
...metrics.genericMachine.energy | ||
]" | ||
/> | ||
|
||
### Recipe | ||
|
||
<MetricTable | ||
prefix="mekchemoxidizer:" | ||
:metrics="[ | ||
...metrics.recipeProgress.recipe | ||
]" | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# Mekanism Chemical Tank Input <RepoLink path="lib/input/mekanism/ChemicalTankInputAdapter.lua" /> | ||
|
||
```lua | ||
telem.input.mekanism.chemicalTank ( | ||
peripheralID: string, | ||
categories?: string[] | '*' | ||
) | ||
``` | ||
|
||
::: warning Mod Dependencies | ||
Requires **Mekanism**. | ||
::: | ||
|
||
See the Usage section for a complete list of the metrics in each category. | ||
|
||
<PropertiesTable | ||
:properties="[ | ||
{ | ||
name: 'peripheralID', | ||
type: 'string', | ||
default: 'nil', | ||
description: 'Peripheral ID of the Chemical Tank' | ||
}, | ||
{ | ||
name: 'categories', | ||
type: 'string[] | "*"', | ||
default: '{ "basic" }' | ||
} | ||
]" | ||
> | ||
<template v-slot:categories> | ||
List of metric categories to query. The value `"*"` can be used to include all categories, which are listed below. | ||
|
||
```lua | ||
{ "basic", "advanced", "storage" } | ||
``` | ||
</template> | ||
</PropertiesTable> | ||
|
||
## Usage | ||
|
||
```lua{4} | ||
local telem = require 'telem' | ||
local backplane = telem.backplane() | ||
:addInput('my_chemtank', telem.input.mekanism.chemicalTank('right', '*')) | ||
:cycleEvery(5)() | ||
``` | ||
|
||
Given a Chemical Tank peripheral on the `right` side of the computer, this appends the following metrics to the backplane (grouped by category here for clarity): | ||
|
||
### Basic | ||
|
||
<MetricTable | ||
prefix="mekchemtank:" | ||
:metrics="[ | ||
{ name: 'fill_item_count', value: '0 - inf', unit: 'item' }, | ||
{ name: 'filled_percentage', value: '0.0 - 1.0' }, | ||
{ name: 'drain_item_count', value: '0 - inf', unit: 'item' } | ||
]" | ||
/> | ||
|
||
### Advanced | ||
|
||
```lua | ||
DUMPING_MODES = { IDLE = 1, DUMPING_EXCESS = 2, DUMPING = 3 } | ||
``` | ||
|
||
<MetricTable | ||
prefix="mekchemtank:" | ||
:metrics="[ | ||
{ name: 'dumping_mode', value: 'DUMPING_MODES value' } | ||
]" | ||
/> | ||
|
||
### Storage | ||
|
||
<MetricTable | ||
prefix="mekchemtank:" | ||
:metrics="[ | ||
{ name: 'stored', value: '0.0 - inf', unit: 'B' }, | ||
{ name: 'capacity', value: '0.0 - inf', unit: 'B' }, | ||
{ name: 'needed', value: '0.0 - inf', unit: 'B' } | ||
]" | ||
/> | ||
|
||
## Storage | ||
If the tank contains a chemical, a storage metric is added for the chemical. Given a chemical tank with the following contents: | ||
|
||
![Mekanism Basic Chemical Tank with contents](/assets/mekanism-chem-tank.webp) | ||
|
||
The following metric would be added: | ||
|
||
<MetricTable | ||
prefix="storage:" | ||
:metrics="[ | ||
{ name: 'mekanism:ethene', value: '47', unit: 'B' } | ||
]" | ||
/> |