Skip to content

Commit 064b71a

Browse files
committed
Add initializations from mtype::mtype()
These values are not initialized in the structure definition, but in the constructor.
1 parent 3aa1b84 commit 064b71a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/monstergenerator.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -857,8 +857,9 @@ void mtype::load( const JsonObject &jo, const std::string_view src )
857857

858858
optional( jo, was_loaded, "bodytype", bodytype );
859859
optional( jo, was_loaded, "color", color, nc_color_reader{}, c_white );
860-
optional( jo, was_loaded, "volume", volume, units_bound_reader<units::volume> { 0_ml } );
861-
optional( jo, was_loaded, "weight", weight, units_bound_reader<units::mass> { 0_gram } );
860+
optional( jo, was_loaded, "volume", volume, units_bound_reader<units::volume> { 0_ml }, 62499_ml );
861+
optional( jo, was_loaded, "weight", weight, units_bound_reader<units::mass> { 0_gram },
862+
81499_gram );
862863

863864
optional( jo, was_loaded, "phase", phase, make_flag_reader( gen.phase_map, "phase id" ),
864865
phase_id::SOLID );
@@ -998,7 +999,7 @@ void mtype::load( const JsonObject &jo, const std::string_view src )
998999

9991000
optional( jo, was_loaded, "dissect", dissect );
10001001

1001-
optional( jo, was_loaded, "decay", decay );
1002+
optional( jo, was_loaded, "decay", decay, harvest_id::NULL_ID() );
10021003

10031004
optional( jo, was_loaded, "shearing", shearing );
10041005

0 commit comments

Comments
 (0)