Skip to content

Commit

Permalink
feat(balance): Solar power bump (#4155)
Browse files Browse the repository at this point in the history
* Solar power bump

Made regular solar panels generate 100 power instead of 50 and advanced solar panels generate 200 instead of 100.

* Debuff

* Power test potential fix

* Power test fix???

* Help help help

* Help help help

* style(autofix.ci): automated formatting

* Update vehicle_power_test.cpp

* Update vehicle_power_test.cpp

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Chaosvolt <chaosvolt@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 4, 2024
1 parent 74fcc7b commit 1ab6c23
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions data/json/furniture_and_terrain/furniture-appliances.json
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@
"color": "yellow",
"move_cost_mod": 2,
"required_str": -1,
"active": [ "solar", { "power": 50 } ],
"active": [ "solar", { "power": 80 } ],
"flags": [ "TRANSPARENT" ],
"deconstruct": {
"items": [
Expand Down Expand Up @@ -854,7 +854,7 @@
"color": "yellow",
"move_cost_mod": 2,
"required_str": -1,
"active": [ "solar", { "power": 100 } ],
"active": [ "solar", { "power": 160 } ],
"flags": [ "TRANSPARENT" ],
"deconstruct": {
"items": [
Expand Down
2 changes: 1 addition & 1 deletion data/json/vehicleparts/vehicle_parts.json
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@
"damage_modifier": 10,
"durability": 20,
"description": "A solar panel. Will slowly recharge the vehicle's electrical power when exposed to the sun. Clouds will slow the recharge speed even more.",
"epower": 50,
"epower": 80,
"item": "solar_panel",
"location": "on_roof",
"requirements": {
Expand Down
8 changes: 4 additions & 4 deletions tests/vehicle_power_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ TEST_CASE( "vehicle power with reactor and solar panels", "[vehicle][power]" )

THEN( "the battery should be partially charged" ) {
int charge = veh_ptr->fuel_left( fuel_type_battery ) / 100;
CHECK( 10 <= charge );
CHECK( charge <= 15 );
CHECK( 20 <= charge );
CHECK( charge <= 30 );

AND_WHEN( "another 30 minutes elapse" ) {
veh_ptr->update_time( start_time + 2 * 30_minutes );

THEN( "the battery should be further charged" ) {
charge = veh_ptr->fuel_left( fuel_type_battery ) / 100;
CHECK( 20 <= charge );
CHECK( charge <= 30 );
CHECK( 25 <= charge );
CHECK( charge <= 35 );
}
}
}
Expand Down

0 comments on commit 1ab6c23

Please sign in to comment.