mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-06-05 06:05:58 +01:00
354e75026d
## About The Pull Request Machines that require a cable underneath it to operate like Tesla, SMES, Emitter & Turbine now look for the `cable_layer` (red, yellow, blue default being yellow) to operate on and not `machine_layer`(that var is removed). `machine_layer` & `cable layer` served the same purpose so i removed `machine_ layer` var and made it just look for the cable layer to operate on to reduce redundancy. The following machine's can have their cable layer changed with a multitool when in the specified state 1. Emitter when it's not welded 2. Tesla Coil when it's not wrenched 3. SMES when it does not have a terminal attached 3.1 Terminal of the SMES cable layer can also be changed with Right Click during installation 4. APC terminal cable layer can also be changed with Right Click during installation 5. Turbine rotor when its panel is open  Here all 3 SMES were on 3 separate layers of cable but they were all joined by a single multi z layer hub cable summing up all their contribution's even though they were on different cable layers. ## Why It's Good For The Game It makes sense that a machine should only look for what cable layer it should operate on and adding another layer called machine layer was just redundant. Also cable layers blue & red which could not be used by machines are now usable ## Changelog 🆑 fix: cable layers 1 & 3 can now be used by machine's like emitters, smes, tesla coil & turbine. fix: terminals(smes & apc) can operate on different cable layers by installing them with right click /🆑 --------- Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
33 lines
1005 B
Plaintext
33 lines
1005 B
Plaintext
#define CABLE_LAYER_1 (1<<0)
|
|
#define CABLE_LAYER_1_NAME "Red Power Line"
|
|
#define CABLE_LAYER_2 (1<<1)
|
|
#define CABLE_LAYER_2_NAME "Yellow Power Line"
|
|
#define CABLE_LAYER_3 (1<<2)
|
|
#define CABLE_LAYER_3_NAME "Blue Power Line"
|
|
|
|
#define SOLAR_TRACK_OFF 0
|
|
#define SOLAR_TRACK_TIMED 1
|
|
#define SOLAR_TRACK_AUTO 2
|
|
|
|
///conversion ratio from joules to watts
|
|
#define WATTS / 0.002
|
|
///conversion ratio from watts to joules
|
|
#define JOULES * 0.002
|
|
|
|
GLOBAL_VAR_INIT(CHARGELEVEL, 0.001) // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
|
|
|
|
// Converts cable layer to its human readable name
|
|
GLOBAL_LIST_INIT(cable_layer_to_name, list(
|
|
"[CABLE_LAYER_1]" = CABLE_LAYER_1_NAME,
|
|
"[CABLE_LAYER_2]" = CABLE_LAYER_2_NAME,
|
|
"[CABLE_LAYER_3]" = CABLE_LAYER_3_NAME
|
|
))
|
|
|
|
// Converts cable color name to its layer
|
|
GLOBAL_LIST_INIT(cable_name_to_layer, list(
|
|
CABLE_LAYER_1_NAME = CABLE_LAYER_1,
|
|
CABLE_LAYER_2_NAME = CABLE_LAYER_2,
|
|
CABLE_LAYER_3_NAME = CABLE_LAYER_3
|
|
))
|
|
|