-
-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lathe/Design/Materials refactoring + misc changes (#5123)
## About The Pull Request rewrites lathes they are now embeddable within other interfaces, have unified controls + queue management, and have support for using - materials - reagents - even using / transforming existing items rewrites /datum/design to be semi-singletons adds SSresearch to hold designs rewrites atom material system a bit also: - adds MIT license identifiers to some of my old TGUI work of which I am the only one on the git history. i'd like to keep the tgui section and my own code samples in there as MIT instead of AGPL. - removes vorestation id restorers from maps because they're unused nowadays - removes partslathe as they're basically just unused - Revamps sheetmaterials stylesheet as it really didn't need to just be stacks.dmi ## Why It's Good For The Game lathes sorely needed a redo we want good materials support ontop of that. also fixes autolathes :) the "also" part is already covered above. ## Changelog :cl: refactor: lathes are completely rewritten fix: autolathe x5 and x10 buttons del: autolathes can no longer be hacked. all hacked recipes are instead accessible as normal recipes. del: partslathes - redundant del: id restoration consoles - unused / prohibited by server rules /:cl: --------- Co-authored-by: silicons <[email protected]>
- Loading branch information
Showing
406 changed files
with
8,175 additions
and
8,089 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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,41 @@ | ||
//? lathe_type bitfield | ||
|
||
#define LATHE_TYPE_AUTOLATHE (1<<0) | ||
#define LATHE_TYPE_PROTOLATHE (1<<1) | ||
#define LATHE_TYPE_CIRCUIT (1<<2) | ||
#define LATHE_TYPE_PROSTHETICS (1<<3) | ||
#define LATHE_TYPE_MECHA (1<<4) | ||
#define LATHE_TYPE_BIOPRINTER (1<<5) | ||
|
||
DEFINE_BITFIELD(lathe_type, list( | ||
BITFIELD(LATHE_TYPE_AUTOLATHE), | ||
BITFIELD(LATHE_TYPE_PROTOLATHE), | ||
BITFIELD(LATHE_TYPE_CIRCUIT), | ||
BITFIELD(LATHE_TYPE_PROSTHETICS), | ||
BITFIELD(LATHE_TYPE_MECHA), | ||
BITFIELD(LATHE_TYPE_BIOPRINTER), | ||
)) | ||
|
||
//? design_unlock bitfield | ||
|
||
/// any lathe that can print us should have us always | ||
#define DESIGN_UNLOCK_INTRINSIC (1<<0) | ||
/// any lathe that can print us can have us uploaded | ||
#define DESIGN_UNLOCK_UPLOAD (1<<1) | ||
|
||
DEFINE_BITFIELD(design_unlock, list( | ||
BITFIELD(DESIGN_UNLOCK_INTRINSIC), | ||
BITFIELD(DESIGN_UNLOCK_UPLOAD), | ||
)) | ||
|
||
//? design_flags bitfield | ||
|
||
/// do not scale with efficiency | ||
#define DESIGN_NO_SCALE (1<<0) | ||
/// unit tests should ignore the lack of materials | ||
#define DESIGN_IGNORE_RESOURCE_SANITY (1<<2) | ||
|
||
DEFINE_BITFIELD(design_flags, list( | ||
BITFIELD(DESIGN_NO_SCALE), | ||
BITFIELD(DESIGN_IGNORE_RESOURCE_SANITY), | ||
)) |
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,36 @@ | ||
//? types; sync to tgui when modifying. | ||
|
||
#define INGREDIENT_DATA_TYPE "type" //! type of ingredient | ||
#define INGREDIENT_DATA_AMOUNT "amt" //! amount to use; what this means depends on type | ||
#define INGREDIENT_DATA_ALLOW "allow" //! what to allow; data depends on type | ||
#define INGREDIENT_DATA_NAME "name" //! name in selection uis | ||
#define INGREDIENT_DATA_KEY "key" //! what's passed back from use ingredients | ||
|
||
/** | ||
* select: material id | ||
* amount: sheets | ||
* allowed: null for any, otherwise list of material ids | ||
* return: material id | ||
*/ | ||
#define INGREDIENT_TYPE_MATERIAL "material" | ||
/** | ||
* select: reagent id | ||
* amount: units | ||
* allowed: null for any, otherwise list of reagent ids | ||
* return: reagent id | ||
*/ | ||
#define INGREDIENT_TYPE_REAGENT "reagent" | ||
/** | ||
* select: stack path | ||
* amount: stack amount | ||
* allowed: null for any, otherwise list of typepaths | ||
* return: stack path | ||
*/ | ||
#define INGREDIENT_TYPE_STACK "stack" | ||
/** | ||
* select: item ref | ||
* amount: item count | ||
* allowed: null for any, otherwise list of typepaths, associate TRUE to enforce exact, otherwise subtypes work | ||
* return: list of item instances; all selected items are deleted if unkeyed | ||
*/ | ||
#define INGREDIENT_TYPE_ITEM "item" |
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,6 @@ | ||
//? master file for balancing / efficiency tuning | ||
|
||
//* efficiency | ||
|
||
/// scale a lathe's efficiency to upgrade level | ||
#define MATERIAL_EFFICIENCY_LATHE_SCALE(tier) max(0, 1.1 - tier * 0.1) |
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,60 @@ | ||
|
||
// Material Defines | ||
#define MAT_BANANIUM "bananium" | ||
#define MAT_CARBON "carbon" | ||
#define MAT_CHITIN "chitin" | ||
#define MAT_COPPER "copper" | ||
#define MAT_DIAMOND "diamond" | ||
#define MAT_DURASTEEL "durasteel" | ||
#define MAT_DURASTEELHULL "durasteel hull" | ||
#define MAT_GLASS "glass" | ||
#define MAT_GOLD "gold" | ||
#define MAT_GRAPHITE "graphite" | ||
#define MAT_HARDLOG "hardwood log" | ||
#define MAT_HARDWOOD "hardwood" | ||
#define MAT_HEMATITE "hematite" | ||
#define MAT_IRON "iron" | ||
#define MAT_LEAD "lead" | ||
#define MAT_LEATHER "leather" | ||
#define MAT_LOG "log" | ||
#define MAT_MARBLE "marble" | ||
#define MAT_METALHYDROGEN "mhydrogen" | ||
#define MAT_MORPHIUM "morphium" | ||
#define MAT_MORPHIUMHULL "morphium hull" | ||
#define MAT_OSMIUM "osmium" | ||
#define MAT_PHORON "phoron" | ||
#define MAT_PLASTEEL "plasteel" | ||
#define MAT_PLASTEELHULL "plasteel hull" | ||
#define MAT_PLASTIC "plastic" | ||
#define MAT_PLATINUM "platinum" | ||
#define MAT_SIFLOG "alien log" | ||
#define MAT_SIFWOOD "alien wood" | ||
#define MAT_SILENCIUM "silencium" | ||
#define MAT_SILVER "silver" | ||
#define MAT_SNOW "snow" | ||
#define MAT_STEEL "steel" | ||
#define MAT_STEELHULL "steel hull" | ||
#define MAT_SUPERMATTER "supermatter" | ||
#define MAT_TITANIUM "titanium" | ||
#define MAT_TITANIUMHULL "titanium hull" | ||
#define MAT_URANIUM "uranium" | ||
#define MAT_VALHOLLIDE "valhollide" | ||
#define MAT_VAUDIUM "vaudium" | ||
#define MAT_VERDANTIUM "verdantium" | ||
#define MAT_WOOD "wood" | ||
|
||
|
||
#define SHARD_SHARD "shard" | ||
#define SHARD_SHRAPNEL "shrapnel" | ||
#define SHARD_STONE_PIECE "piece" | ||
#define SHARD_SPLINTER "splinters" | ||
#define SHARD_NONE "" | ||
|
||
#define MATERIAL_UNMELTABLE 0x1 | ||
#define MATERIAL_BRITTLE 0x2 | ||
#define MATERIAL_PADDING 0x4 | ||
|
||
/// Amount table damage is multiplied by if it is made of a brittle material (e.g. glass) | ||
#define TABLE_BRITTLE_MATERIAL_MULTIPLIER 4 | ||
|
||
#define SHEET_MATERIAL_AMOUNT 2000 |
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
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 |
---|---|---|
@@ -1,14 +1,49 @@ | ||
//? master file for balancing / efficiency tuning | ||
|
||
//* Machinery | ||
/// Idle usage of a nanite chamber in watts | ||
#define POWER_USAGE_NANITE_CHAMBER_IDLE 100 | ||
/// Active usage of a nanite chamber in watts | ||
#define POWER_USAGE_NANITE_CHAMBER_ACTIVE 5000 | ||
//* Cells | ||
|
||
/// the closest thing we'll get to a cvar - cellrate is kJ per cell unit. kJ to avoid float precision loss. | ||
GLOBAL_VAR_INIT(cellrate, 0.5) | ||
/** | ||
* current calculations | ||
* cellrate 0.5 = 0.5 kj/unit | ||
* for 10k cell, 5000kj | ||
* 1 Wh = 60J-S*60s/m = 3600J = 3.6kJ | ||
* 10k cell --> 1388.89 Wh | ||
* damn, future cells be pogging | ||
*/ | ||
/// the closest thing we'll get to a cvar - affects cell use_scaled - higher = things use less energy. handheld devices usually use this. | ||
GLOBAL_VAR_INIT(cellefficiency, 1) | ||
|
||
//* Computers | ||
|
||
/// Idle usage of a mid-range control computer in watts | ||
#define POWER_USAGE_COMPUTER_MID_IDLE 50 | ||
/// Active usage of a mid-range control computer in watts | ||
#define POWER_USAGE_COMPUTER_MID_ACTIVE 500 | ||
|
||
//* Equipment | ||
|
||
/// cost of shield difussion in cell units | ||
#define CELL_COST_SHIELD_DIFFUSION 120 | ||
|
||
//* Machinery | ||
|
||
/// idle power usage of a lathe in watts | ||
#define POWER_USAGE_LATHE_IDLE 25 | ||
/// active power usage of lathe scaling to decisecond work unit (e.g. 4x speed lathe is 4 for input) in watts | ||
#define POWER_USAGE_LATHE_ACTIVE_SCALE(factor) (factor * 1000) | ||
/// Idle usage of a nanite chamber in watts | ||
#define POWER_USAGE_NANITE_CHAMBER_IDLE 100 | ||
/// Active usage of a nanite chamber in watts | ||
#define POWER_USAGE_NANITE_CHAMBER_ACTIVE 5000 | ||
|
||
//* Misc | ||
|
||
//#define THERMOMACHINE_CHEAT_FACTOR 1 | ||
#define RECHARGER_CHEAT_FACTOR 5 | ||
#define SYNTHETIC_NUTRITION_KJ_PER_UNIT 10 | ||
#define SYNTHETIC_NUTRITION_INDUCER_CHEAT_FACTOR 2 | ||
#define CYBORG_POWER_USAGE_MULTIPLIER 2 | ||
#define SPACE_HEATER_CHEAT_FACTOR 1.5 | ||
#define THERMOREGULATOR_CHEAT_FACTOR 5 |
Oops, something went wrong.