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

[pull] master from CleverRaven:master #36

Merged
merged 2 commits into from
May 4, 2019
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/items/vehicle_parts.json
Original file line number Diff line number Diff line change
Expand Up @@ -1028,8 +1028,8 @@
{
"type": "GENERIC",
"id": "recharge_station",
"name": "UPS-compatible recharging station",
"description": "A Unified Power System recharging station designed to operate on vehicle power. Once installed in a vehicle storage space and turned on from a dashboard or electronics control unit, it will slowly charge all UPS compatible tools and battery cells in that space. The system can only be installed in existing storage compartments.",
"name": "recharging station",
"description": "A universal recharging station designed to operate on vehicle power. While on it will steadily charge all rechargeable batteries (battery cells, lead-acid batteries, etc) placed directly within its storage space. The system can only be installed onto existing storage compartments, and is controlled from a dashboard or electronics control unit.",
"weight": 10000,
"to_hit": 1,
"color": "light_blue",
Expand Down
4 changes: 2 additions & 2 deletions data/json/vehicle_parts.json
Original file line number Diff line number Diff line change
Expand Up @@ -1974,14 +1974,14 @@
{
"type": "vehicle_part",
"id": "recharge_station",
"name": "UPS-compatible recharging station",
"name": "recharging station",
"symbol": "o",
"color": "light_green",
"broken_symbol": "#",
"broken_color": "blue",
"damage_modifier": 10,
"durability": 20,
"description": "A recharger for UPS devices. When turned on, it charges any UPS devices in the cargo space.",
"description": "A device for recharging batteries. When turned on, it charges any rechargeable batteries (battery cells, lead-acid batteries, etc) placed directly in the attached storage space.",
"epower": -25,
"bonus": 600,
"item": "recharge_station",
Expand Down
12 changes: 4 additions & 8 deletions data/mods/BrightNights/misc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,13 @@
"capacity": 1000
},
{
"id": "recharge_station",
"type": "GENERIC",
"category": "veh_parts",
"name": "battery charger",
"description": "A charger for batteries that runs off vehicle power. It is quite inefficient, but charges fast.",
"id": "recharge_station",
"name": "recharging station",
"copy-from": "recharge_station",
"weight": 1000,
"volume": 4,
"price": 2000,
"price_postapoc": 10000,
"material": [ "steel", "plastic" ],
"symbol": "-",
"color": "light_blue"
"price_postapoc": 10000
}
]
2 changes: 1 addition & 1 deletion data/mods/BrightNights/recipe.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"time": 50000,
"reversible": true,
"autolearn": [ [ "electronics", 2 ] ],
"using": [ [ "soldering_standard", 35 ] ],
"qualities": [ { "id": "SCREW", "level": 1 } ],
"tools": [ [ [ "soldering_iron", 35 ], [ "toolset", 35 ] ] ],
"components": [ [ [ "power_supply", 2 ] ], [ [ "processor", 2 ] ], [ [ "scrap", 5 ] ], [ [ "cable", 8 ] ] ]
},
{
Expand Down
18 changes: 2 additions & 16 deletions data/mods/BrightNights/vehicle_parts.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,11 @@
{
"id": "recharge_station",
"type": "vehicle_part",
"name": "battery charger",
"item": "recharge_station",
"location": "on_cargo",
"symbol": "o",
"broken_symbol": "#",
"color": "light_green",
"broken_color": "blue",
"name": "recharge station",
"copy-from": "recharge_station",
"difficulty": 1,
"durability": 20,
"epower": 0,
"bonus": 600,
"damage_modifier": 10,
"folded_volume": 4,
"description": "A charger for batteries that runs off vehicle power. It is quite inefficient, but charges fast.",
"breaks_into": [
{ "item": "steel_chunk", "count": [ 0, 2 ] },
{ "item": "scrap", "count": [ 1, 2 ] },
{ "item": "cable", "charges": [ 1, 3 ] }
],
"flags": [ "INTERNAL", "RECHARGE", "FOLDABLE", "TOOL_SCREWDRIVER" ]
}
]
2 changes: 1 addition & 1 deletion src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4238,7 +4238,7 @@ void player::update_stomach( const time_point &from, const time_point &to )
const bool mouse = has_trait( trait_NO_THIRST );
const bool mycus = has_trait( trait_M_DEPENDENT );
// @TODO: move to kcal altogether
const float kcal_per_nutr = 2500.0f / ( 12 * 24 );
const float kcal_per_nutr = 2400.0f / ( 12 * 24 );
const int five_mins = ticks_between( from, to, 5_minutes );

if( five_mins > 0 ) {
Expand Down
6 changes: 4 additions & 2 deletions tests/stomach_contents_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ TEST_CASE( "all_nutrition_starve_test" )
printf( "\n\n" );
}

for( unsigned int day = 0; day <= 10; day++ ) {
for( unsigned int day = 0; day <= 20; day++ ) {
if( print_tests ) {
printf( "day %d: %d\n", day, dummy.get_stored_kcal() );
}
Expand All @@ -189,7 +189,9 @@ TEST_CASE( "all_nutrition_starve_test" )
dummy.vitamin_get( vitamin_id( "vitA" ) ), dummy.vitamin_get( vitamin_id( "vitB" ) ),
dummy.vitamin_get( vitamin_id( "vitC" ) ), dummy.vitamin_get( vitamin_id( "calcium" ) ),
dummy.vitamin_get( vitamin_id( "iron" ) ) );
printf( "\n\n" );
printf( "\n" );
print_stomach_contents( dummy, print_tests );
printf( "\n" );
}
CHECK( dummy.get_stored_kcal() >= dummy.get_healthy_kcal() );
// since vitamins drain very quickly, it is almost impossible to remain at 0
Expand Down