Subspace RPED 
An admin-only bluespace RPED that manufactures stock parts on the fly.
Whenever it is used on a machine or an unbuilt frame it reads the required components off the target's circuit and tops itself up first, so nothing is ever short a part. Admins can also manufacture parts on demand, in bulk or by browsing subtypes, through the Alt-RMB menu.
Vars | |
| auto_clear | Whether leftovers pulled out of an upgraded machine are destroyed rather than kept. |
|---|---|
| batch_size | How many of a given type the manufacture menu produces per selection. |
| browse_manufacture_options | Manufacture menu entries that open the subtype browser at the given root. Roots must pass valid_stock_part_types. |
| bulk_manufacture_options | Manufacture menu entries that batch out a fixed set of types. Add an entry here rather than another else-if. |
| valid_stock_part_types | Roots that pick_stock_part() is allowed to browse. Anything outside this list is rejected. |
Procs | |
| click_alt_secondary | BSTs' special Bluespace RPED can manufacture parts on Alt-RMB, either cables, glass, machine boards, or stock parts. |
| count_stored | Count stored items whose type is in valid_types, stopping once we've seen enough. |
| interact_with_atom | An extension to the default RPED part replacement action - if you don't have the requisite parts in the RPED already, it will spawn T4 versions to use. |
| manufacture_and_insert | Creates an item outside the RPED and destroys it if storage insertion rejects it. |
| on_interacting_with_atom | Tops the RPED up with whatever an unbuilt machine frame is still asking for. |
| pick_stock_part | Asks the user to pick a subtype to manufacture, one level of the type tree at a time. |
| restock_items | Spawn one item per unit still missing after counting what we already hold. |
| restock_stack | Top a stack up to the required amount. Stacks auto-split on Initialize, so a single spawn covers whatever's short. |
| restock_stock_part | Stock parts are datums mapped onto physical objects, sometimes at a specific tier. |
| spawn_parts_for_components | Fills the RPED with whatever a recipe asks for and it is not already holding. |
| spawn_shortfall | Insert amount freshly-spawned copies of atom_type. A non-positive amount inserts nothing. |
Var Details
auto_clear 
Whether leftovers pulled out of an upgraded machine are destroyed rather than kept.
batch_size 
How many of a given type the manufacture menu produces per selection.
browse_manufacture_options 
Manufacture menu entries that open the subtype browser at the given root. Roots must pass valid_stock_part_types.
bulk_manufacture_options 
Manufacture menu entries that batch out a fixed set of types. Add an entry here rather than another else-if.
valid_stock_part_types 
Roots that pick_stock_part() is allowed to browse. Anything outside this list is rejected.
Proc Details
click_alt_secondary
BSTs' special Bluespace RPED can manufacture parts on Alt-RMB, either cables, glass, machine boards, or stock parts.
count_stored
Count stored items whose type is in valid_types, stopping once we've seen enough.
interact_with_atom
An extension to the default RPED part replacement action - if you don't have the requisite parts in the RPED already, it will spawn T4 versions to use.
manufacture_and_insert
Creates an item outside the RPED and destroys it if storage insertion rejects it.
on_interacting_with_atom
Tops the RPED up with whatever an unbuilt machine frame is still asking for.
Returns NONE unconditionally so the frame's own interaction still runs and installs the parts. Arguments:
- source - the RPED itself
- user - the mob holding the RPED
- target - what is being clicked; only machine frames are handled
- modifiers - click modifiers, unused
pick_stock_part
Asks the user to pick a subtype to manufacture, one level of the type tree at a time.
Only the immediate children of the given root are listed, each labelled with how many subtypes it has of its own. Picking an entry that still has subtypes recurses into it rather than spawning, so an admin can walk down to the exact part they want; picking anything else fills the RPED with a batch of it. Arguments:
- user - the mob operating the RPED
- recurse - TRUE when this is a nested call, which makes the root itself selectable so it can be spawned directly
- subtype - the root typepath to browse. Must pass valid_stock_part_types or nothing is listed
restock_items
Spawn one item per unit still missing after counting what we already hold.
restock_stack
Top a stack up to the required amount. Stacks auto-split on Initialize, so a single spawn covers whatever's short.
restock_stock_part
Stock parts are datums mapped onto physical objects, sometimes at a specific tier.
spawn_parts_for_components
Fills the RPED with whatever a recipe asks for and it is not already holding.
req_components lists either item typepaths (materials, beakers) or /datum/stock_part subtypes, so every entry is handed off to whichever helper knows how to count and spawn that flavour of component. Arguments:
- user - the mob operating the RPED, credited as the inserter for storage messages
- required_components - assoc list of typepath to how many of it the recipe wants
spawn_shortfall
Insert amount freshly-spawned copies of atom_type. A non-positive amount inserts nothing.