Skip to content

Commit

Permalink
Make folding_solar_panel_v2 a solar suitcase
Browse files Browse the repository at this point in the history
Instead of not-spawning, have turn the solar_panel_v2 into a solar
suitcase. Add some spawns to vehicles, and allow it to be deployed as an
appliance for charging items.

Still a bit hacky, like the smaller folding solar panel.
Recipe was also removed, though it is potentially reasonable to craft a
solar suitcase. I just don't know enough about it to say the recipe is
still accurate.
  • Loading branch information
ehughsbaird committed Oct 17, 2023
1 parent a8b2cdc commit 52ac5d1
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 29 deletions.
10 changes: 10 additions & 0 deletions data/json/furniture_and_terrain/appliances.json
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,16 @@
"remove_as": "folding_solar_panel",
"item": "folding_solar_panel_deployed"
},
{
"type": "vehicle_part",
"id": "ap_folding_solar_panel_v2",
"flags": [ "SOLAR_PANEL", "OBSTACLE", "APPLIANCE" ],
"description": "This solar suitcase has been unpacked and is ready to supply power.",
"copy-from": "advanced_foldable_solar_panel",
"requirements": { "removal": { "time": "1 m" } },
"remove_as": "folding_solar_panel_v2",
"item": "folding_solar_panel_v2_deployed"
},
{
"type": "vehicle_part",
"id": "ap_solar_panel",
Expand Down
2 changes: 2 additions & 0 deletions data/json/itemgroups/vehicles_fuel_related.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
[ "hose", 50 ],
[ "jumper_cable", 30 ],
[ "hand_pump", 30 ],
[ "folding_solar_panel_v2", 2 ],
{ "group": "bugout_bag", "prob": 3 }
]
},
Expand Down Expand Up @@ -160,6 +161,7 @@
[ "sunglasses", 20 ],
[ "knife_swissarmy", 10 ],
[ "eclipse_glasses", 1 ],
[ "folding_solar_panel_v2", 2 ],
[ "thermos", 20 ]
]
},
Expand Down
31 changes: 27 additions & 4 deletions data/json/items/vehicle/solar.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,33 @@
"type": "GENERIC",
"copy-from": "folding_solar_panel",
"id": "folding_solar_panel_v2",
"name": { "str": "advanced collapsible solar array" },
"description": "An electronic device that can convert solar radiation into electric power, mounted on a folding frame. This one is a high-performance type made with monocrystalline silicon cells.",
"price": 220000,
"price_postapoc": 3500
"name": { "str": "solar suitcase" },
"description": "A large, ready-to-deploy set of solar panels, designed for portable off-the-grid use.",
"//": [
"Based on https://www.renogy.com/200-watt-12-volt-monocrystalline-foldable-solar-suitcase",
"26.4x32.5x2.8 inches is 39.4L, 38.6lbs = 17.5kg",
"Surface area 0.554m^2, listed 200W. Half of solar_panel_v2 for half surface area"
],
"weight": "17500 g",
"volume": "39400 ml",
"longest_side": "83 cm",
"use_action": { "type": "deploy_appliance", "base": "folding_solar_panel_v2_deployed" },
"price": 32000,
"price_postapoc": 2000
},
{
"type": "MAGAZINE",
"copy-from": "folding_solar_panel_v2",
"id": "folding_solar_panel_v2_deployed",
"name": { "str": "deployed solar suitcase" },
"//": [
"Deployed version of the above. Shouldn't spawn in game.",
"Has a little hacky battery pocket so it can charge phones and the like"
],
"ammo_type": [ "battery" ],
"capacity": 1,
"flags": [ "NO_SALVAGE", "NO_UNLOAD", "NO_RELOAD", "RECHARGE" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 1 } } ]
},
{
"type": "GENERIC",
Expand Down
21 changes: 0 additions & 21 deletions data/json/recipes/other/power_supplies.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,6 @@
"qualities": [ { "id": "SAW_M", "level": 1 } ],
"components": [ [ [ "solar_panel", 1 ] ], [ [ "reinforced_glass_pane", 1 ] ], [ [ "scrap", 1 ] ] ]
},
{
"type": "recipe",
"activity_level": "MODERATE_EXERCISE",
"result": "folding_solar_panel_v2",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_PARTS",
"skill_used": "fabrication",
"difficulty": 4,
"time": "2 h",
"reversible": true,
"autolearn": true,
"//": "30cm weld",
"using": [ [ "welding_standard", 30 ] ],
"proficiencies": [
{ "proficiency": "prof_metalworking" },
{ "proficiency": "prof_welding_basic", "skill_penalty": 0.5 },
{ "proficiency": "prof_welding" }
],
"qualities": [ { "id": "SAW_M", "level": 1 } ],
"components": [ [ [ "solar_panel_v2", 1 ] ], [ [ "scrap", 2 ] ], [ [ "wire", 2 ] ], [ [ "nuts_bolts", 8 ] ] ]
},
{
"type": "recipe",
"activity_level": "MODERATE_EXERCISE",
Expand Down
10 changes: 6 additions & 4 deletions data/json/vehicleparts/vehicle_parts.json
Original file line number Diff line number Diff line change
Expand Up @@ -1769,17 +1769,19 @@
"proportional": { "durability": 0.5 },
"epower": "120 W",
"folded_volume": "8 L",
"description": "A folding solar panel. Not designed for mounting to a car, but who will stop you now?",
"description": "A folding solar panel. Not designed for mounting to a vehicle, but who will stop you now?",
"breaks_into": [ { "item": "folding_solar_panel", "damage": [ 5, 5 ] } ],
"item": "folding_solar_panel"
},
{
"type": "vehicle_part",
"id": "advanced_foldable_solar_panel",
"copy-from": "foldable_solar_panel",
"name": { "str": "advanced collapsible solar array" },
"proportional": { "epower": 2 },
"description": "A small array of high-performance solar panels designed to be able to fold into one another.",
"name": { "str": "deployed solar suitcase" },
"epower": "200 W",
"folded_volume": "40 L",
"description": "Unpack a solar suitcase and stick it on the roof. What could go wrong?",
"breaks_into": [ { "item": "folding_solar_panel_v2", "damage": [ 5, 5 ] } ],
"item": "folding_solar_panel_v2"
},
{
Expand Down

0 comments on commit 52ac5d1

Please sign in to comment.