From 56e94bf7ed65d255adc54b6003247fb49debf3c7 Mon Sep 17 00:00:00 2001 From: ghostly_zsh Date: Fri, 10 Apr 2026 22:22:22 -0500 Subject: [PATCH] feat: added some parts, and all planets have a resource --- .../config/parts/basic_thruster.part.toml | 24 ++++++++++++ .../assets/config/parts/chassis.part.toml | 31 ---------------- .../assets/config/parts/hearty.part.toml | 2 +- .../unified/assets/config/parts/hub.part.toml | 32 ++++++++++++++++ .../assets/config/parts/storage_hub.part.toml | 37 +++++++++++++++++++ .../assets/config/parts/thruster.part.toml | 2 + crates/unified/assets/config/planets.pc.toml | 9 +++++ crates/unified/assets/config/recipes.rc.toml | 13 ++++++- 8 files changed, 116 insertions(+), 34 deletions(-) create mode 100644 crates/unified/assets/config/parts/basic_thruster.part.toml delete mode 100644 crates/unified/assets/config/parts/chassis.part.toml create mode 100644 crates/unified/assets/config/parts/hub.part.toml create mode 100644 crates/unified/assets/config/parts/storage_hub.part.toml diff --git a/crates/unified/assets/config/parts/basic_thruster.part.toml b/crates/unified/assets/config/parts/basic_thruster.part.toml new file mode 100644 index 0000000000000000000000000000000000000000..e06a093cdd5d656d8faf285ae7135ae5eb1f0470 --- /dev/null +++ b/crates/unified/assets/config/parts/basic_thruster.part.toml @@ -0,0 +1,24 @@ +[part] +name = "BasicThruster" +sprite_connected = "textures/cargo_on.png" +sprite_disconnected = "textures/cargo_off.png" +emissivity = 0.1 +specific_heat = 500.0 +radiation_area = 20.0 + +[physics] +width = 50 +height = 50 +mass = 100 + +[[thruster]] +id = "main" +apply_force_at_local = [ 0, 0 ] +thrust_vector = [ 0.0, -4000.0 ] +exhaust_temperature = 1000.0 +heat_constant = 10.0 + +[[joint]] +id = "Top" +target = { translation = [ 0.0, 55.0, 0.0 ], rotation = 0.0 } +snap = { translation = [ 0.0, 25.0, 0.0 ], rotation = 0.0 } diff --git a/crates/unified/assets/config/parts/chassis.part.toml b/crates/unified/assets/config/parts/chassis.part.toml deleted file mode 100644 index 5e01790f758b0268b8aabf2909cbc7392b5af408..0000000000000000000000000000000000000000 --- a/crates/unified/assets/config/parts/chassis.part.toml +++ /dev/null @@ -1,31 +0,0 @@ -[part] -name = "Chassis" -sprite_connected = "textures/chassis.png" -sprite_disconnected = "textures/chassis.png" -emissivity = 1.0 - -[physics] -width = 50 -height = 50 -mass = 100 - -[[joint]] -id = "Top" -target = { translation = [ 0.0, 50.0, 0.0 ], rotation = 0.0 } -snap = { translation = [ 0.0, 25.0, 0.0 ], rotation = 0.0 } - - -[[joint]] -id = "Right" -target = { translation = [ 50.0, 0.0, 0.0 ], rotation = -90.0 } -snap = { translation = [ 25.0, 0.0, 0.0 ], rotation = 0.0 } - -[[joint]] -id = "Bottom" -target = { translation = [ 0.0, -50.0, 0.0 ], rotation = -180.0 } -snap = { translation = [ 0.0, -25.0, 0.0 ], rotation = 0.0 } - -[[joint]] -id = "Left" -target = { translation = [ -50.0, 0.0, 0.0 ], rotation = -270.0 } -snap = { translation = [ -25.0, 0.0, 0.0 ], rotation = 0.0 } diff --git a/crates/unified/assets/config/parts/hearty.part.toml b/crates/unified/assets/config/parts/hearty.part.toml index 3f63fd5a12c4f15efb6e886cb8b4c2cfa7c91763..31d9c39e4f7640f18ab38bfcbc83ae9c350b2f9c 100644 --- a/crates/unified/assets/config/parts/hearty.part.toml +++ b/crates/unified/assets/config/parts/hearty.part.toml @@ -72,4 +72,4 @@ resource_multiplier = 1.0 [storage] storage_type = "SingleResource" -capacity = 1000.0 +capacity = 300.0 diff --git a/crates/unified/assets/config/parts/hub.part.toml b/crates/unified/assets/config/parts/hub.part.toml new file mode 100644 index 0000000000000000000000000000000000000000..dc1661d8057f1d70fee09023e30d7c50c47014ed --- /dev/null +++ b/crates/unified/assets/config/parts/hub.part.toml @@ -0,0 +1,32 @@ +[part] +name = "Hub" +sprite_connected = "textures/hub_on.png" +sprite_disconnected = "textures/hub_off.png" +emissivity = 0.1 +specific_heat = 500.0 +radiation_area = 20.0 + +[physics] +width = 50 +height = 50 +mass = 100 + +[[joint]] +id = "Top" +target = { translation = [ 0.0, 55.0, 0.0 ], rotation = 0.0 } +snap = { translation = [ 0.0, 25.0, 0.0 ], rotation = 0.0 } + +[[joint]] +id = "Right" +target = { translation = [ 55.0, 0.0, 0.0 ], rotation = -90.0 } +snap = { translation = [ 25.0, 0.0, 0.0 ], rotation = 0.0 } + +[[joint]] +id = "Bottom" +target = { translation = [ 0.0, -55.0, 0.0 ], rotation = -180.0 } +snap = { translation = [ 0.0, -25.0, 0.0 ], rotation = 0.0 } + +[[joint]] +id = "Left" +target = { translation = [ -55.0, 0.0, 0.0 ], rotation = -270.0 } +snap = { translation = [ -25.0, 0.0, 0.0 ], rotation = 0.0 } diff --git a/crates/unified/assets/config/parts/storage_hub.part.toml b/crates/unified/assets/config/parts/storage_hub.part.toml new file mode 100644 index 0000000000000000000000000000000000000000..d6a3cae558a8249f6887b9d903ddb19ca5f8b988 --- /dev/null +++ b/crates/unified/assets/config/parts/storage_hub.part.toml @@ -0,0 +1,37 @@ +[part] +name = "StorageHub" +sprite_connected = "textures/powerhub_on.png" +sprite_disconnected = "textures/powerhub_off.png" +emissivity = 0.1 +specific_heat = 800.0 +radiation_area = 200.0 + +[physics] +width = 50 +height = 50 +mass = 100 + +[[joint]] +id = "Top" +target = { translation = [ 0.0, 55.0, 0.0 ], rotation = 0.0 } +snap = { translation = [ 0.0, 25.0, 0.0 ], rotation = 0.0 } + + +[[joint]] +id = "Right" +target = { translation = [ 55.0, 0.0, 0.0 ], rotation = -90.0 } +snap = { translation = [ 25.0, 0.0, 0.0 ], rotation = 0.0 } + +[[joint]] +id = "Bottom" +target = { translation = [ 0.0, -55.0, 0.0 ], rotation = -180.0 } +snap = { translation = [ 0.0, -25.0, 0.0 ], rotation = 0.0 } + +[[joint]] +id = "Left" +target = { translation = [ -55.0, 0.0, 0.0 ], rotation = -270.0 } +snap = { translation = [ -25.0, 0.0, 0.0 ], rotation = 0.0 } + +[storage] +storage_type = "SingleResource" +capacity = 1000.0 diff --git a/crates/unified/assets/config/parts/thruster.part.toml b/crates/unified/assets/config/parts/thruster.part.toml index a273d5144b58a0afed534ce0538e57f5c3f62644..ee305f15cfc6a4b95498b9e215974cad935666c7 100644 --- a/crates/unified/assets/config/parts/thruster.part.toml +++ b/crates/unified/assets/config/parts/thruster.part.toml @@ -15,6 +15,8 @@ mass = 100 id = "main" apply_force_at_local = [ 0, 0 ] thrust_vector = [ 0.0, -20000.0 ] +exhaust_temperature = 1000.0 +heat_constant = 10.0 [[joint]] id = "Top" diff --git a/crates/unified/assets/config/planets.pc.toml b/crates/unified/assets/config/planets.pc.toml index b3208a3f688f66ca61974d12870954e744123a21..217a961f8c63a1f4974156de48f74829272a418e 100644 --- a/crates/unified/assets/config/planets.pc.toml +++ b/crates/unified/assets/config/planets.pc.toml @@ -4,6 +4,7 @@ sprite = "textures/sun.png" radius = 20_000.0 # m mass = 16_000_000_000_000.0 # kg default_transform = [0.0, 0.0, 0.0] +planet_resource = { name = "Plasma", color = { LinearRgba = { red = 0.7, green = 0.7, blue = 0.7, alpha = 1.0 } }, mining_speed = 5.0 } special_sprite_properties = { ForceColor = { Oklcha = { lightness = 10.0, chroma = 0.058, hue = 104.26, alpha = 1.0 } } } [[planets]] @@ -12,6 +13,7 @@ sprite = "textures/mercury.png" radius = 666.66 # m mass = 205_000_000.0 # kg default_transform = [116_129.4, 0.0, 0.0] +planet_resource = { name = "Composite", color = { LinearRgba = { red = 0.7, green = 0.7, blue = 0.7, alpha = 1.0 } }, mining_speed = 5.0 } orbit = { orbiting = "Sun", eccentricity = 0.2056 } [[planets]] @@ -20,6 +22,7 @@ sprite = "textures/venus.png" radius = 1899.8 # m mass = 806_166_000.0 # kg default_transform = [216_999.6, 0.0, 0.0] +planet_resource = { name = "Sulfur", color = { LinearRgba = { red = 0.7, green = 0.7, blue = 0.7, alpha = 1.0 } }, mining_speed = 5.0 } orbit = { orbiting = "Sun", eccentricity = 0.0068 } [[planets]] @@ -49,6 +52,7 @@ indicator_sprite = "textures/mars_icon.png" radius = 1062.0 # m mass = 525_857_000.0 # kg default_transform = [430_000.0, 0.0, 0.0] +planet_resource = { name = "Iron", color = { LinearRgba = { red = 0.7, green = 0.7, blue = 0.7, alpha = 1.0 } }, mining_speed = 5.0 } orbit = { orbiting = "Sun", eccentricity = 0.0934 } [[planets]] @@ -57,6 +61,7 @@ sprite = "textures/jupiter.png" radius = 21946.0 # m mass = 1_131_221_218_000.0 # kg default_transform = [1_561_140.0, 0.0, 0.0] +planet_resource = { name = "Hydrogen", color = { LinearRgba = { red = 0.7, green = 0.7, blue = 0.7, alpha = 1.0 } }, mining_speed = 5.0 } orbit = { orbiting = "Sun", eccentricity = 0.0484 } [[planets]] @@ -65,6 +70,7 @@ sprite = "textures/earth.png" radius = 18_280.4 # m mass = 561_386_112_000.0 # kg default_transform = [2_874_780.0, 0.0, 0.0] +planet_resource = { name = "Helium", color = { LinearRgba = { red = 0.7, green = 0.7, blue = 0.7, alpha = 1.0 } }, mining_speed = 5.0 } orbit = { orbiting = "Sun", eccentricity = 0.0541 } [[planets]] @@ -73,6 +79,7 @@ sprite = "textures/venus.png" radius = 8014.0 # m mass = 69_763_532_000.0 # kg default_transform = [4_050_000.0, 0.0, 0.0] +planet_resource = { name = "Rubber", color = { LinearRgba = { red = 0.7, green = 0.7, blue = 0.7, alpha = 1.0 } }, mining_speed = 5.0 } orbit = { orbiting = "Sun", eccentricity = 0.0472 } [[planets]] @@ -81,6 +88,7 @@ sprite = "textures/mars.png" radius = 7_766.0 # m mass = 106_674_649_000.0 # kg default_transform = [5_000_000.0, 0.0, 0.0] +planet_resource = { name = "Methane", color = { LinearRgba = { red = 0.7, green = 0.7, blue = 0.7, alpha = 1.0 } }, mining_speed = 5.0 } orbit = { orbiting = "Sun", eccentricity = 0.0086 } [[planets]] @@ -89,4 +97,5 @@ sprite = "textures/jupiter.png" radius = 373.6 # m mass = 10_817_000.0 # kg default_transform = [5_922_300.0, 0.0, 0.0] +planet_resource = { name = "Ice", color = { LinearRgba = { red = 0.7, green = 0.7, blue = 0.7, alpha = 1.0 } }, mining_speed = 5.0 } orbit = { orbiting = "Sun", eccentricity = 0.2488 } diff --git a/crates/unified/assets/config/recipes.rc.toml b/crates/unified/assets/config/recipes.rc.toml index 8cc3a258ea74169e1a6cf135078b95dc8cf9f373..e8e5498943ac14c3f79690081dc6fe3120d4c102 100644 --- a/crates/unified/assets/config/recipes.rc.toml +++ b/crates/unified/assets/config/recipes.rc.toml @@ -1,7 +1,16 @@ [recipes] Frame = [ - { order = 0, inputs = { Carbon = 10 } } + { order = 0, inputs = { Silicon = 20 } } ] Thruster = [ - { order = 1, inputs = { Silicon = 20, Carbon = 20 } } + { order = 1, inputs = { Composite = 30, Hydrogen = 20 } } +] +BasicThruster = [ + { order = 2, inputs = { Silicon = 30, Sulfur = 10 } } +] +Hub = [ + { order = 3, inputs = { Iron = 25, Silicon = 50 } } +] +StorageHub = [ + { order = 4, inputs = { Composite = 50, Silicon = 50 } } ]