Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(balance): Solar power bump #4155

Merged
merged 9 commits into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading