From 7a3490c50883fa5a1ab364d94aa64014c1885e85 Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Mon, 7 Aug 2023 17:13:45 +0500 Subject: [PATCH 01/20] Add stationary solar arrays --- .../furniture_and_terrain/appliances.json | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/data/json/furniture_and_terrain/appliances.json b/data/json/furniture_and_terrain/appliances.json index 278209d962947..00f4d5ee77d22 100644 --- a/data/json/furniture_and_terrain/appliances.json +++ b/data/json/furniture_and_terrain/appliances.json @@ -712,6 +712,30 @@ "requirements": { "removal": { "time": "3 m", "using": [ [ "vehicle_wrench_2", 1 ] ] } }, "variants": [ { "symbols": "#", "symbols_broken": "x" } ] }, + { + "type": "vehicle_part", + "id": "ap_stationary_solar_panel", + "flags": [ "SOLAR_PANEL", "OBSTACLE", "APPLIANCE" ], + "description": "A stationary solar panel, mounted on a frame and ready to power other appliances.", + "name": { "str": "stationary solar panel" }, + "categories": [ "energy" ], + "color": "blue", + "broken_color": "blue", + "damage_modifier": 10, + "durability": 20, + "epower": "400 W", + "item": "stationary_solar_panel", + "requirements": { "removal": { "time": "6 m", "using": [ [ "vehicle_wrench_2", 1 ] ] } }, + "variants": [ { "symbols": "#", "symbols_broken": "x" } ] + }, + { + "type": "vehicle_part", + "id": "ap_stationary_solar_panel_v2", + "copy-from": "ap_stationary_solar_panel", + "description": "A high-performance stationary solar panel, mounted on a frame and ready to power other appliances.", + "item": "stationary_solar_panel_v2", + "epower": "800 W" + }, { "type": "vehicle_part", "id": "ap_wind_turbine", From c48f9b22fe1cd02584ca19903dc4de7420e92b34 Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Mon, 7 Aug 2023 17:15:14 +0500 Subject: [PATCH 02/20] Adjusted solar cells/arrays --- data/json/items/vehicle/solar.json | 47 +++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/data/json/items/vehicle/solar.json b/data/json/items/vehicle/solar.json index c5191fcec3f87..d7a80ee3e3244 100644 --- a/data/json/items/vehicle/solar.json +++ b/data/json/items/vehicle/solar.json @@ -4,25 +4,57 @@ "id": "solar_panel", "name": { "str": "solar panel" }, "description": "An electronic device that can convert solar radiation into electric power. Useful for a vehicle or a static power grid.", - "weight": "14000 g", + "weight": "11000 g", "to_hit": -4, "color": "yellow", "symbol": "]", "material": [ "glass" ], - "volume": "3 L", + "volume": "54 L", "flags": [ "NO_REPAIR", "WATER_BREAK" ], "category": "veh_parts", "price": 90000, "price_postapoc": 1000, "melee_damage": { "bash": 1 } }, + { + "type": "GENERIC", + "id": "stationary_solar_panel", + "name": { "str": "disconnected stationary solar panel" }, + "description": "An electronic device that can convert solar radiation into electric power. It is mot mountable on a vehicle and is intended to be mounted on a rooftop as an appliance.", + "weight": "21000 g", + "to_hit": -6, + "color": "blue", + "symbol": "]", + "material": [ "glass" ], + "volume": "81 L", + "flags": [ "NO_REPAIR", "WATER_BREAK" ], + "price": 180000, + "price_postapoc": 2000, + "melee_damage": { "bash": 1 } + }, + { + "type": "GENERIC", + "id": "stationary_solar_panel_v2", + "name": { "str": "disconnected stationary advanced solar panel" }, + "description": "An electronic device that can convert solar radiation into electric power. It is mot mountable on a vehicle and is intended to be mounted on a rooftop as an appliance. This model uses high-performsnce monocrystalline silicon cells.", + "weight": "21000 g", + "to_hit": -6, + "color": "blue", + "symbol": "]", + "material": [ "glass" ], + "volume": "81 L", + "flags": [ "NO_REPAIR", "WATER_BREAK" ], + "price": 360000, + "price_postapoc": 6000, + "melee_damage": { "bash": 1 } + }, { "type": "GENERIC", "copy-from": "solar_panel", "id": "folding_solar_panel", "name": { "str": "collapsible solar array" }, "description": "An electronic device that can convert solar radiation into electric power, mounted on a folding frame. This one is a common, inexpensive type made with polycrystalline silicon cells.", - "weight": "14500 g", + "weight": "11500 g", "price": 120000, "price_postapoc": 1500 }, @@ -40,10 +72,10 @@ "id": "reinforced_solar_panel", "name": { "str": "reinforced solar panel" }, "description": "A solar panel that has been covered with a pane of reinforced glass to protect the delicate solar cells from zombies or errant baseballs. The glass causes this panel to produce slightly less power than a normal panel.", - "weight": "24153 g", + "weight": "25153 g", "color": "light_blue", "material": [ "glass", "steel" ], - "volume": "6500 ml", + "volume": "22500 ml", "price": 120000, "price_postapoc": 1500, "copy-from": "solar_panel" @@ -71,9 +103,10 @@ "id": "solar_cell", "name": { "str": "solar cell" }, "description": "A small electronic device that can convert solar radiation into electric power. This one is a common, inexpensive type made of polycrystalline silicon.", - "weight": "500 g", + "weight": "1250 g", "symbol": ";", - "volume": "250 ml", + "//1": "Density of silicon is 2.33 kg/l", + "volume": "550 ml", "category": "spare_parts", "price": 5000, "price_postapoc": 100, From 7c84ddcf75d4d657811d2429eeae3855ada4bda2 Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Mon, 7 Aug 2023 17:16:44 +0500 Subject: [PATCH 03/20] Solar array rework vehicle solar array = 8 solar cells stationary solar array = 16 solar cells --- data/json/recipes/other/power_supplies.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/json/recipes/other/power_supplies.json b/data/json/recipes/other/power_supplies.json index 53b1d0dd9c53c..390eed4c2ba8a 100644 --- a/data/json/recipes/other/power_supplies.json +++ b/data/json/recipes/other/power_supplies.json @@ -247,7 +247,7 @@ { "proficiency": "prof_elec_circuits" }, { "proficiency": "prof_elec_semiconductors" } ], - "components": [ [ [ "power_supply", 2 ] ], [ [ "amplifier", 2 ] ], [ [ "solar_cell", 12 ] ], [ [ "cable", 20 ] ] ] + "components": [ [ [ "power_supply", 2 ] ], [ [ "amplifier", 2 ] ], [ [ "solar_cell", 8 ] ], [ [ "cable", 20 ] ] ] }, { "type": "recipe", @@ -480,7 +480,7 @@ { "proficiency": "prof_elec_circuits" }, { "proficiency": "prof_elec_semiconductors" } ], - "components": [ [ [ "power_supply", 2 ] ], [ [ "amplifier", 2 ] ], [ [ "solar_cell_v2", 12 ] ], [ [ "cable", 20 ] ] ] + "components": [ [ [ "power_supply", 2 ] ], [ [ "amplifier", 2 ] ], [ [ "solar_cell_v2", 8 ] ], [ [ "cable", 20 ] ] ] }, { "type": "recipe", From a7c63d4d06927adcea635078dd36fd47e0132cf7 Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Mon, 7 Aug 2023 17:20:54 +0500 Subject: [PATCH 04/20] Adjusted solar array performance and "breakage" --- data/json/vehicleparts/vehicle_parts.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data/json/vehicleparts/vehicle_parts.json b/data/json/vehicleparts/vehicle_parts.json index ffe3f0c6f6d5e..58deb0a8b03eb 100644 --- a/data/json/vehicleparts/vehicle_parts.json +++ b/data/json/vehicleparts/vehicle_parts.json @@ -1660,7 +1660,7 @@ "damage_modifier": 10, "durability": 20, "description": "A solar panel.", - "epower": "50 W", + "epower": "200 W", "item": "solar_panel", "location": "on_roof", "requirements": { @@ -1677,7 +1677,7 @@ { "item": "steel_lump", "count": [ 2, 4 ] }, { "item": "steel_chunk", "count": [ 2, 4 ] }, { "item": "scrap", "count": [ 2, 4 ] }, - { "item": "solar_cell", "count": [ 1, 4 ] } + { "item": "solar_cell", "count": [ 1, 3 ] } ], "variants": [ { "symbols": "#", "symbols_broken": "x" } ] }, @@ -1754,7 +1754,7 @@ "name": { "str": "collapsible solar array" }, "color": "light_blue", "broken_color": "light_gray", - "proportional": { "epower": 0.68, "durability": 0.5 }, + "proportional": { "durability": 0.5 }, "folded_volume": "2 L", "description": "A small array of solar panels designed to be able to fold into one another.", "item": "folding_solar_panel" @@ -1791,7 +1791,7 @@ { "item": "steel_lump", "count": [ 4, 7 ] }, { "item": "steel_chunk", "count": [ 4, 7 ] }, { "item": "scrap", "count": [ 4, 7 ] }, - { "item": "solar_cell", "count": [ 1, 4 ] } + { "item": "solar_cell", "count": [ 1, 3 ] } ], "damage_reduction": { "all": 12 } }, @@ -1816,7 +1816,7 @@ { "item": "steel_lump", "count": [ 2, 4 ] }, { "item": "steel_chunk", "count": [ 2, 4 ] }, { "item": "scrap", "count": [ 2, 4 ] }, - { "item": "solar_cell_v2", "count": [ 1, 6 ] } + { "item": "solar_cell_v2", "count": [ 1, 4 ] } ] }, { @@ -1843,7 +1843,7 @@ { "item": "steel_lump", "count": [ 4, 7 ] }, { "item": "steel_chunk", "count": [ 4, 7 ] }, { "item": "scrap", "count": [ 4, 7 ] }, - { "item": "solar_cell", "count": [ 1, 6 ] } + { "item": "solar_cell", "count": [ 1, 4 ] } ], "damage_reduction": { "all": 10 } }, From b435aa591d9545753736d8a8f5ec455cddb2d660 Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Mon, 7 Aug 2023 17:49:51 +0500 Subject: [PATCH 05/20] Typo correction --- data/json/items/vehicle/solar.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/items/vehicle/solar.json b/data/json/items/vehicle/solar.json index d7a80ee3e3244..ffd76f0c58f75 100644 --- a/data/json/items/vehicle/solar.json +++ b/data/json/items/vehicle/solar.json @@ -36,7 +36,7 @@ "type": "GENERIC", "id": "stationary_solar_panel_v2", "name": { "str": "disconnected stationary advanced solar panel" }, - "description": "An electronic device that can convert solar radiation into electric power. It is mot mountable on a vehicle and is intended to be mounted on a rooftop as an appliance. This model uses high-performsnce monocrystalline silicon cells.", + "description": "An electronic device that can convert solar radiation into electric power. It is mot mountable on a vehicle and is intended to be mounted on a rooftop as an appliance. This model uses high-performance monocrystalline silicon cells.", "weight": "21000 g", "to_hit": -6, "color": "blue", From e4e710b6543099db5c3dcd25d025d20f10cba189 Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Mon, 7 Aug 2023 19:35:45 +0500 Subject: [PATCH 06/20] Add construction groups for Stationary Solar Panels --- data/json/construction_group.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/data/json/construction_group.json b/data/json/construction_group.json index fc8aa2f99c42c..beea2f406d540 100644 --- a/data/json/construction_group.json +++ b/data/json/construction_group.json @@ -1339,6 +1339,16 @@ "id": "place_reinforced_solar_panel_v2", "name": "Place Advanced Reinforced Solar Panel" }, + { + "type": "construction_group", + "id": "place_stationary_solar_panel", + "name": "Place Stationary Solar Panel" + }, + { + "type": "construction_group", + "id": "place_stationary_solar_panel_v2", + "name": "Place Advanced Stationary Solar Panel" + }, { "type": "construction_group", "id": "place_wind_turbine", From d890677ab0bc3d6a2de5fdb33ccdd15739f54157 Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Mon, 7 Aug 2023 19:36:36 +0500 Subject: [PATCH 07/20] Add Stationary Solar Panels construction recipes --- data/json/construction.json | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/data/json/construction.json b/data/json/construction.json index 17ed9ef7675db..7b0bfc39a672d 100644 --- a/data/json/construction.json +++ b/data/json/construction.json @@ -5329,6 +5329,32 @@ "post_special": "done_appliance", "activity_level": "LIGHT_EXERCISE" }, + { + "type": "construction", + "id": "app_stationary_solar", + "group": "place_stationary_solar_panel", + "category": "APPLIANCE", + "required_skills": [ [ "fabrication", 1 ] ], + "time": "12 m", + "qualities": [ [ { "id": "WRENCH", "level": 1 } ] ], + "components": [ [ [ "stationary_solar_panel", 1 ] ] ], + "pre_special": "check_empty", + "post_special": "done_appliance", + "activity_level": "LIGHT_EXERCISE" + }, + { + "type": "construction", + "id": "app_stationary_solar_v2", + "group": "place_stationary_solar_panel_v2", + "category": "APPLIANCE", + "required_skills": [ [ "fabrication", 1 ] ], + "time": "12 m", + "qualities": [ [ { "id": "WRENCH", "level": 1 } ] ], + "components": [ [ [ "stationary_solar_panel_v2", 1 ] ] ], + "pre_special": "check_empty", + "post_special": "done_appliance", + "activity_level": "LIGHT_EXERCISE" + }, { "type": "construction", "id": "app_wind_turbine", From c5776b739bfb9350aed460746f1e064cd154032c Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:20:28 +0500 Subject: [PATCH 08/20] Update data/json/items/vehicle/solar.json Co-authored-by: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> --- data/json/items/vehicle/solar.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/items/vehicle/solar.json b/data/json/items/vehicle/solar.json index ffd76f0c58f75..dc7ed39d78899 100644 --- a/data/json/items/vehicle/solar.json +++ b/data/json/items/vehicle/solar.json @@ -20,7 +20,7 @@ "type": "GENERIC", "id": "stationary_solar_panel", "name": { "str": "disconnected stationary solar panel" }, - "description": "An electronic device that can convert solar radiation into electric power. It is mot mountable on a vehicle and is intended to be mounted on a rooftop as an appliance.", + "description": "An electronic device that can convert solar radiation into electric power. It is mot mountable on a vehicle and is intended to be mounted on a rooftop as an appliance.", "weight": "21000 g", "to_hit": -6, "color": "blue", From db90ef26d00c378184e74974ef8b866b65435625 Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:21:19 +0500 Subject: [PATCH 09/20] Update data/json/items/vehicle/solar.json Co-authored-by: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> --- data/json/items/vehicle/solar.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/items/vehicle/solar.json b/data/json/items/vehicle/solar.json index dc7ed39d78899..a726605043bd3 100644 --- a/data/json/items/vehicle/solar.json +++ b/data/json/items/vehicle/solar.json @@ -36,7 +36,7 @@ "type": "GENERIC", "id": "stationary_solar_panel_v2", "name": { "str": "disconnected stationary advanced solar panel" }, - "description": "An electronic device that can convert solar radiation into electric power. It is mot mountable on a vehicle and is intended to be mounted on a rooftop as an appliance. This model uses high-performance monocrystalline silicon cells.", + "description": "An electronic device that can convert solar radiation into electric power. It is mot mountable on a vehicle and is intended to be mounted on a rooftop as an appliance. This model uses high-performance monocrystalline silicon cells.", "weight": "21000 g", "to_hit": -6, "color": "blue", From fda50d6f63c0e20af074bf9ad7f0c8f0800ea6ba Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Tue, 8 Aug 2023 12:47:25 +0500 Subject: [PATCH 10/20] Adjusted mass, volume and longest sides of solar cells/panels --- data/json/items/vehicle/solar.json | 35 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/data/json/items/vehicle/solar.json b/data/json/items/vehicle/solar.json index a726605043bd3..b9525cbca2681 100644 --- a/data/json/items/vehicle/solar.json +++ b/data/json/items/vehicle/solar.json @@ -4,12 +4,16 @@ "id": "solar_panel", "name": { "str": "solar panel" }, "description": "An electronic device that can convert solar radiation into electric power. Useful for a vehicle or a static power grid.", - "weight": "11000 g", + "weight": "9500 g", "to_hit": -4, "color": "yellow", "symbol": "]", "material": [ "glass" ], - "volume": "54 L", + "//1": "Solar cells on themselves are only 3.5 mm thick, so without extra volume added by frame the volume is 0.0035 x 1.065 = 3.6E-3 m3 or 3.6 l.", + "//2": "Let's add some volume for 2 power converters etc.", + "volume": "6 L", + "//3": "Considering selected geometry of basic solar cells and making a 4x2 array and forming long side out of short edges.", + "longest_side": "120 cm", "flags": [ "NO_REPAIR", "WATER_BREAK" ], "category": "veh_parts", "price": 90000, @@ -27,6 +31,7 @@ "symbol": "]", "material": [ "glass" ], "volume": "81 L", + "longest_side": "240 cm", "flags": [ "NO_REPAIR", "WATER_BREAK" ], "price": 180000, "price_postapoc": 2000, @@ -34,19 +39,12 @@ }, { "type": "GENERIC", + "copy-from": "stationary_solar_panel", "id": "stationary_solar_panel_v2", "name": { "str": "disconnected stationary advanced solar panel" }, "description": "An electronic device that can convert solar radiation into electric power. It is mot mountable on a vehicle and is intended to be mounted on a rooftop as an appliance. This model uses high-performance monocrystalline silicon cells.", - "weight": "21000 g", - "to_hit": -6, - "color": "blue", - "symbol": "]", - "material": [ "glass" ], - "volume": "81 L", - "flags": [ "NO_REPAIR", "WATER_BREAK" ], "price": 360000, - "price_postapoc": 6000, - "melee_damage": { "bash": 1 } + "price_postapoc": 6000 }, { "type": "GENERIC", @@ -54,7 +52,7 @@ "id": "folding_solar_panel", "name": { "str": "collapsible solar array" }, "description": "An electronic device that can convert solar radiation into electric power, mounted on a folding frame. This one is a common, inexpensive type made with polycrystalline silicon cells.", - "weight": "11500 g", + "weight": "10000 g", "price": 120000, "price_postapoc": 1500 }, @@ -72,10 +70,11 @@ "id": "reinforced_solar_panel", "name": { "str": "reinforced solar panel" }, "description": "A solar panel that has been covered with a pane of reinforced glass to protect the delicate solar cells from zombies or errant baseballs. The glass causes this panel to produce slightly less power than a normal panel.", - "weight": "25153 g", + "//1": "Another 11.5 kg and 5.5 l is added by a pane of reinforced glass.", + "weight": "20000 g", "color": "light_blue", "material": [ "glass", "steel" ], - "volume": "22500 ml", + "volume": "11500 ml", "price": 120000, "price_postapoc": 1500, "copy-from": "solar_panel" @@ -103,10 +102,12 @@ "id": "solar_cell", "name": { "str": "solar cell" }, "description": "A small electronic device that can convert solar radiation into electric power. This one is a common, inexpensive type made of polycrystalline silicon.", - "weight": "1250 g", + "//1": "Density of silicon is 2.33 kg/l. Approx. area of 0.13125 m3 and thickness of 3.5 mm. That gives us volume of ~470 ml and weight of 1.1 kg.", + "weight": "1100 g", "symbol": ";", - "//1": "Density of silicon is 2.33 kg/l", - "volume": "550 ml", + "volume": "470 ml", + "//2": "Assumingh a 2/3 ration between height and length. Given the area this gives us ~0.44 m max length and ~0.3 m height.", + "longest_side": "44 cm", "category": "spare_parts", "price": 5000, "price_postapoc": 100, From e02b73a1215b8616c5d2ea0c9f74db3446ee4e5f Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Tue, 8 Aug 2023 12:59:17 +0500 Subject: [PATCH 11/20] Update power_supplies.jsonAdd recipes for stationary solar panels --- data/json/recipes/other/power_supplies.json | 56 +++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/data/json/recipes/other/power_supplies.json b/data/json/recipes/other/power_supplies.json index 390eed4c2ba8a..732ccdf2df0ad 100644 --- a/data/json/recipes/other/power_supplies.json +++ b/data/json/recipes/other/power_supplies.json @@ -249,6 +249,62 @@ ], "components": [ [ [ "power_supply", 2 ] ], [ [ "amplifier", 2 ] ], [ [ "solar_cell", 8 ] ], [ [ "cable", 20 ] ] ] }, + { + "type": "recipe", + "activity_level": "LIGHT_EXERCISE", + "result": "stationary_solar_panel", + "category": "CC_ELECTRONIC", + "subcategory": "CSC_ELECTRONIC_PARTS", + "skill_used": "electronics", + "difficulty": 8, + "time": "80 m", + "reversible": true, + "decomp_learn": 5, + "autolearn": true, + "book_learn": [ [ "manual_electronics", 7 ], [ "textbook_electronics", 6 ], [ "advanced_electronics", 6 ] ], + "using": [ [ "soldering_standard", 70 ] ], + "qualities": [ { "id": "SCREW", "level": 1 } ], + "proficiencies": [ + { "proficiency": "prof_elec_soldering" }, + { "proficiency": "prof_elec_circuits" }, + { "proficiency": "prof_elec_semiconductors" } + ], + "components": [ + [ [ "power_supply", 2 ] ], + [ [ "amplifier", 2 ] ], + [ [ "solar_cell", 16 ] ], + [ [ "cable", 40 ] ], + [ [ "xlframe", 1 ] ] + ] + }, + { + "type": "recipe", + "activity_level": "LIGHT_EXERCISE", + "result": "stationary_solar_panel_v2", + "category": "CC_ELECTRONIC", + "subcategory": "CSC_ELECTRONIC_PARTS", + "skill_used": "electronics", + "difficulty": 8, + "time": "80 m", + "reversible": true, + "decomp_learn": 5, + "autolearn": true, + "book_learn": [ [ "manual_electronics", 7 ], [ "textbook_electronics", 6 ], [ "advanced_electronics", 6 ] ], + "using": [ [ "soldering_standard", 70 ] ], + "qualities": [ { "id": "SCREW", "level": 1 } ], + "proficiencies": [ + { "proficiency": "prof_elec_soldering" }, + { "proficiency": "prof_elec_circuits" }, + { "proficiency": "prof_elec_semiconductors" } + ], + "components": [ + [ [ "power_supply", 2 ] ], + [ [ "amplifier", 2 ] ], + [ [ "solar_cell_v2", 16 ] ], + [ [ "cable", 40 ] ], + [ [ "xlframe", 1 ] ] + ] + }, { "type": "recipe", "activity_level": "LIGHT_EXERCISE", From 529d0994671f1d128ae0b6d4bf42956c4c739f31 Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Tue, 8 Aug 2023 13:07:09 +0500 Subject: [PATCH 12/20] Stationary panels have aluminum from xlframe in them --- data/json/items/vehicle/solar.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/items/vehicle/solar.json b/data/json/items/vehicle/solar.json index b9525cbca2681..31398e436e85e 100644 --- a/data/json/items/vehicle/solar.json +++ b/data/json/items/vehicle/solar.json @@ -29,7 +29,7 @@ "to_hit": -6, "color": "blue", "symbol": "]", - "material": [ "glass" ], + "material": [ "glass", "aluminum" ], "volume": "81 L", "longest_side": "240 cm", "flags": [ "NO_REPAIR", "WATER_BREAK" ], From 65e0aca2417a459c7ca6690468bc74414433ea77 Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Tue, 8 Aug 2023 13:21:23 +0500 Subject: [PATCH 13/20] Add stationary panel "furniture" for map placement --- .../furniture-appliances.json | 59 ++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/data/json/furniture_and_terrain/furniture-appliances.json b/data/json/furniture_and_terrain/furniture-appliances.json index a38ed590df05f..1c89ed3c8d881 100644 --- a/data/json/furniture_and_terrain/furniture-appliances.json +++ b/data/json/furniture_and_terrain/furniture-appliances.json @@ -703,7 +703,7 @@ "sound": "whack!", "sound_fail": "clang!", "items": [ - { "item": "solar_cell", "count": [ 1, 5 ] }, + { "item": "solar_cell", "count": [ 1, 4 ] }, { "item": "scrap", "count": [ 3, 6 ] }, { "item": "amplifier", "prob": 50 }, { "item": "cable", "charges": [ 10, 15 ] }, @@ -714,6 +714,63 @@ ] } }, + { + "type": "furniture", + "id": "f_stationary_solar_panel", + "name": "mounted stationary solar panel", + "description": "A large panel with photovoltaic power generators, which turn solar radiation into useable electricity. While useful before the Cataclysm, they have become priceless tools, invaluable to any survivor.", + "symbol": "#", + "color": "blue", + "move_cost_mod": 2, + "required_str": -1, + "examine_action": { "type": "appliance_convert", "furn_set": "f_null", "item": "stationary_solar_panel" }, + "flags": [ "TRANSPARENT" ], + "deconstruct": { "items": [ { "item": "stationary_solar_panel", "count": 1 } ] }, + "bash": { + "str_min": 10, + "str_max": 20, + "sound": "whack!", + "sound_fail": "clang!", + "items": [ + { "item": "solar_cell", "count": [ 2, 8 ] }, + { "item": "scrap_aluminum", "count": [ 20, 30 ] }, + { "item": "amplifier", "count": [ 0, 2 ] }, + { "item": "cable", "charges": [ 20, 30 ] }, + { "item": "power_supply", "count": [ 0, 2 ] }, + { "item": "scrap", "count": [ 4, 6 ] }, + { "item": "glass_shard", "count": [ 1, 16 ] } + ] + } + }, + { + "type": "furniture", + "//1": "IDK if this will be ever pre-placed on map, but I'll add it just to complete the set.", + "id": "f_stationary_solar_panel_v2", + "name": "mounted stationary solar panel_v2", + "description": "A large panel with photovoltaic power generators, which turn solar radiation into useable electricity. While useful before the Cataclysm, they have become priceless tools, invaluable to any survivor. This panel uses high-performance monocrystalline silicon cells.", + "symbol": "#", + "color": "blue", + "move_cost_mod": 2, + "required_str": -1, + "examine_action": { "type": "appliance_convert", "furn_set": "f_null", "item": "stationary_solar_panel_v2" }, + "flags": [ "TRANSPARENT" ], + "deconstruct": { "items": [ { "item": "stationary_solar_panel_v2", "count": 1 } ] }, + "bash": { + "str_min": 10, + "str_max": 20, + "sound": "whack!", + "sound_fail": "clang!", + "items": [ + { "item": "solar_cell_v2", "count": [ 2, 8 ] }, + { "item": "scrap_aluminum", "count": [ 20, 30 ] }, + { "item": "amplifier", "count": [ 0, 2 ] }, + { "item": "cable", "charges": [ 20, 30 ] }, + { "item": "power_supply", "count": [ 0, 2 ] }, + { "item": "scrap", "count": [ 4, 6 ] }, + { "item": "glass_shard", "count": [ 1, 16 ] } + ] + } + }, { "type": "furniture", "id": "f_oxygen_concentrator", From 2d38dc8c623324b3c7f4b0f66c6c43340c4a9b97 Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Tue, 8 Aug 2023 13:37:47 +0500 Subject: [PATCH 14/20] Change name for conformity --- data/json/items/vehicle/solar.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/items/vehicle/solar.json b/data/json/items/vehicle/solar.json index 31398e436e85e..99d962a63dcbc 100644 --- a/data/json/items/vehicle/solar.json +++ b/data/json/items/vehicle/solar.json @@ -41,7 +41,7 @@ "type": "GENERIC", "copy-from": "stationary_solar_panel", "id": "stationary_solar_panel_v2", - "name": { "str": "disconnected stationary advanced solar panel" }, + "name": { "str": "disconnected advanced stationary solar panel" }, "description": "An electronic device that can convert solar radiation into electric power. It is mot mountable on a vehicle and is intended to be mounted on a rooftop as an appliance. This model uses high-performance monocrystalline silicon cells.", "price": 360000, "price_postapoc": 6000 From 636e157882c43cde3fcc3d900c2f697c56b1c036 Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Tue, 8 Aug 2023 13:42:08 +0500 Subject: [PATCH 15/20] Add 20% boost for placement angle optimization --- data/json/furniture_and_terrain/appliances.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/json/furniture_and_terrain/appliances.json b/data/json/furniture_and_terrain/appliances.json index 00f4d5ee77d22..ff253e228cea7 100644 --- a/data/json/furniture_and_terrain/appliances.json +++ b/data/json/furniture_and_terrain/appliances.json @@ -723,7 +723,7 @@ "broken_color": "blue", "damage_modifier": 10, "durability": 20, - "epower": "400 W", + "epower": "480 W", "item": "stationary_solar_panel", "requirements": { "removal": { "time": "6 m", "using": [ [ "vehicle_wrench_2", 1 ] ] } }, "variants": [ { "symbols": "#", "symbols_broken": "x" } ] @@ -734,7 +734,7 @@ "copy-from": "ap_stationary_solar_panel", "description": "A high-performance stationary solar panel, mounted on a frame and ready to power other appliances.", "item": "stationary_solar_panel_v2", - "epower": "800 W" + "epower": "960 W" }, { "type": "vehicle_part", From eb88f4bcf9e57e930c38d939071fa159960ee5e9 Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Wed, 9 Aug 2023 16:31:57 +0500 Subject: [PATCH 16/20] Remove solar panels (density should be fixed based on silicon) --- data/mods/TEST_DATA/known_bad_density.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/data/mods/TEST_DATA/known_bad_density.json b/data/mods/TEST_DATA/known_bad_density.json index 857a7ea2557f7..12581bcc5e01a 100644 --- a/data/mods/TEST_DATA/known_bad_density.json +++ b/data/mods/TEST_DATA/known_bad_density.json @@ -52,7 +52,6 @@ "art_sphere", "cooked_marrow", "fruit_pancakes", - "folding_solar_panel_v2", "broken_mech_combat", "beer", "sandwich_sauce_wheat_free", @@ -182,7 +181,6 @@ "survivor_scope", "triffid_fungicide", "pine_resin", - "folding_solar_panel", "rehydration_drink", "bee_sting", "test_cracklins", @@ -581,7 +579,6 @@ "test_liquid_1ml", "compositecrossbow", "toothbrush_plain", - "solar_panel", "homemade_burrito", "bot_lab_security_drone_BM", "bot_manhack", @@ -605,7 +602,6 @@ "thermal_suit", "flavored_bonemeal_tablet", "chaw", - "solar_panel_v2", "moisturizer", "8mm_hvp", "load_bearing_vest", From 2d9e4ab6794ae757f4b2f0e9313f83fbd855d4a1 Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Wed, 9 Aug 2023 16:39:04 +0500 Subject: [PATCH 17/20] Fix for "rara x" --- data/mods/TEST_DATA/vehicle_drag_test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/mods/TEST_DATA/vehicle_drag_test.json b/data/mods/TEST_DATA/vehicle_drag_test.json index 36a436e9ced67..d65ddc3369930 100644 --- a/data/mods/TEST_DATA/vehicle_drag_test.json +++ b/data/mods/TEST_DATA/vehicle_drag_test.json @@ -54,7 +54,7 @@ "kayak_racing": [ 0.609525, 2.604776, 0.983417, 779, 1406 ], "DUKW": [ 0.918158, 3.636234, 78.648471, 9801, 11742 ], "raft": [ 0.997815, 9.743243, 5.51775, 239, 508 ], - "rara_x": [ 0.930735, 1.251436, 699.958333, 8357, 8665 ], + "rara_x": [ 0.930735, 1.131798, 633.041667, 8374, 8682 ], "aapc-mg": [ 1.9866, 8.699023, 4398.563988, 7576, 8873 ], "quad_bike": [ 0.690795, 1.093925, 698.691964, 6893, 8235 ], "golf_cart": [ 1.069088, 1.127783, 709.645833, 6813, 7065 ], From 8f10af12d44476843708ff7ff6fd3bed0c443318 Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Wed, 9 Aug 2023 16:48:34 +0500 Subject: [PATCH 18/20] Update results for "electric car" --- data/mods/TEST_DATA/vehicle_efficiency_test.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/mods/TEST_DATA/vehicle_efficiency_test.json b/data/mods/TEST_DATA/vehicle_efficiency_test.json index 4d0e6e0ddda2b..7211a15d2facb 100644 --- a/data/mods/TEST_DATA/vehicle_efficiency_test.json +++ b/data/mods/TEST_DATA/vehicle_efficiency_test.json @@ -12,7 +12,7 @@ "car_sports": { "forward": [ 999590, 665500, 483000, 44490, 32080 ], "reverse": [ 999590, 667700, 484600, 43340, 29190 ] }, "ambulance": { "forward": [ 1718161, 581100, 494600, 92170, 74550 ], "reverse": [ 1718161, 54450, 54030, 41110, 39970 ] }, "superbike": { "forward": [ 233585, 126400, 73470, 45480, 26130 ], "reverse": [ 233585, 19660, 11160, 13860, 8875 ] }, - "electric_car": { "forward": [ 715829, 203700, 173900, 16850, 14030 ], "reverse": [ 715829, 204000, 174200, 16890, 14060 ] }, + "electric_car": { "forward": [ 697829, 209600, 182700, 17300, 15000 ], "reverse": [ 697829, 209900, 182900, 17300, 15000 ] }, "beetle": { "forward": [ 711045, 499600, 434400, 116300, 95800 ], "reverse": [ 711045, 60380, 60270, 47140, 45680 ] }, "scooter": { "forward": [ 38191, 309800, 309800, 237100, 237100 ], "reverse": [ 38191, 89140, 89140, 68680, 68680 ] }, "truck_swat": { "forward": [ 6046751, 629000, 112300, 34510, 7719 ], "reverse": [ 6046751, 126300, 127100, 32650, 7898 ] }, From 104aade4880acc4e7a70875c16e18e0fe3072ce2 Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Wed, 9 Aug 2023 16:56:29 +0500 Subject: [PATCH 19/20] Update solar panel expected performance (why is it hardcoded, anyays?) --- tests/vehicle_power_test.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/vehicle_power_test.cpp b/tests/vehicle_power_test.cpp index 20b3ed9b3bb07..33e03069705c4 100644 --- a/tests/vehicle_power_test.cpp +++ b/tests/vehicle_power_test.cpp @@ -192,7 +192,7 @@ TEST_CASE( "Solar_power", "[vehicle][power]" ) WHEN( "30 minutes elapse" ) { veh_ptr->update_time( calendar::turn + 30_minutes ); int power = veh_ptr->fuel_left( fuel_type_battery ); - CHECK( power == Approx( 425 ).margin( 1 ) ); + CHECK( power == Approx( 1700 ).margin( 1 ) ); } } @@ -217,7 +217,7 @@ TEST_CASE( "Solar_power", "[vehicle][power]" ) WHEN( "30 minutes elapse" ) { veh_ptr->update_time( calendar::turn + 30_minutes ); int power = veh_ptr->fuel_left( fuel_type_battery ); - CHECK( power == Approx( 184 ).margin( 1 ) ); + CHECK( power == Approx( 734 ).margin( 1 ) ); } } @@ -270,7 +270,7 @@ TEST_CASE( "Daily_solar_power", "[vehicle][power]" ) WHEN( "24 hours pass" ) { veh_ptr->update_time( calendar::turn + 24_hours ); int power = veh_ptr->fuel_left( fuel_type_battery ); - CHECK( power == Approx( 5259 ).margin( 1 ) ); + CHECK( power == Approx( 21037 ).margin( 1 ) ); } } @@ -282,7 +282,7 @@ TEST_CASE( "Daily_solar_power", "[vehicle][power]" ) WHEN( "24 hours pass" ) { veh_ptr->update_time( calendar::turn + 24_hours ); int power = veh_ptr->fuel_left( fuel_type_battery ); - CHECK( power == Approx( 7925 ).margin( 1 ) ); + CHECK( power == Approx( 31703 ).margin( 1 ) ); } } @@ -294,7 +294,7 @@ TEST_CASE( "Daily_solar_power", "[vehicle][power]" ) WHEN( "24 hours pass" ) { veh_ptr->update_time( calendar::turn + 24_hours ); int power = veh_ptr->fuel_left( fuel_type_battery ); - CHECK( power == Approx( 5138 ).margin( 1 ) ); + CHECK( power == Approx( 20554 ).margin( 1 ) ); } } @@ -306,7 +306,7 @@ TEST_CASE( "Daily_solar_power", "[vehicle][power]" ) WHEN( "24 hours pass" ) { veh_ptr->update_time( calendar::turn + 24_hours ); int power = veh_ptr->fuel_left( fuel_type_battery ); - CHECK( power == Approx( 2137 ).margin( 1 ) ); + CHECK( power == Approx( 8546 ).margin( 1 ) ); } } } From 564498dd16e9f676a5b8b9cad1e5bba9b7b996fa Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Thu, 10 Aug 2023 10:14:11 +0500 Subject: [PATCH 20/20] Add missing name field --- data/json/furniture_and_terrain/appliances.json | 1 + 1 file changed, 1 insertion(+) diff --git a/data/json/furniture_and_terrain/appliances.json b/data/json/furniture_and_terrain/appliances.json index ff253e228cea7..5e2df2da40703 100644 --- a/data/json/furniture_and_terrain/appliances.json +++ b/data/json/furniture_and_terrain/appliances.json @@ -732,6 +732,7 @@ "type": "vehicle_part", "id": "ap_stationary_solar_panel_v2", "copy-from": "ap_stationary_solar_panel", + "name": { "str": "advanced stationary solar panel" }, "description": "A high-performance stationary solar panel, mounted on a frame and ready to power other appliances.", "item": "stationary_solar_panel_v2", "epower": "960 W"