Skip to content

Commit

Permalink
Fix division by 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Fris0uman committed May 5, 2020
1 parent e236187 commit 68a109c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions data/json/bionics.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@
"occupied_bodyparts": [ [ "HAND_R", 1 ] ],
"act_cost": "30 kJ",
"fake_item": "bio_laser_gun",
"capacity": "50 kJ",
"flags": [ "BIONIC_GUN", "BIONIC_NPC_USABLE" ]
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/bionics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ void bionic_data::load( const JsonObject &jsobj, const std::string )

optional( jsobj, was_loaded, "enchantments", enchantments );

optional( jsobj, was_loaded, "weight_capacity_modifier", weight_capacity_modifier, 1.0 );
optional( jsobj, was_loaded, "weight_capacity_modifier", weight_capacity_modifier, 1.0f );
optional( jsobj, was_loaded, "exothermic_power_gen", exothermic_power_gen );
optional( jsobj, was_loaded, "power_gen_emission", power_gen_emission );
optional( jsobj, was_loaded, "coverage_power_gen_penalty", coverage_power_gen_penalty );
Expand Down
2 changes: 1 addition & 1 deletion src/bionics.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct bionic_data {
*/
bool included = false;
/**Factor modifiying weight capacity*/
float weight_capacity_modifier = 0.0f;
float weight_capacity_modifier = 1.0f;
/**Bonus to weight capacity*/
units::mass weight_capacity_bonus = 0_gram;
/**Map of stats and their corresponding bonuses passively granted by a bionic*/
Expand Down

0 comments on commit 68a109c

Please sign in to comment.