MCPcopy Create free account
hub / github.com/CleverRaven/Cataclysm-DDA / load_from_jsin

Function load_from_jsin

tests/submap_load_test.cpp:766–780  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

764static JsonIn submap_cosmetic( submap_cosmetic_ss );
765
766static void load_from_jsin( submap &sm, JsonIn &jsin )
767{
768 // Ensure that the JSON is up to date for our savegame version
769 REQUIRE( savegame_version == 33 );
770 jsin.start_object();
771 int version = 0;
772 while( !jsin.end_object() ) {
773 std::string name = jsin.get_member_name();
774 if( name == "version" ) {
775 version = jsin.get_int();
776 } else {
777 sm.load( jsin, name, version );
778 }
779 }
780}
781
782struct submap_checks {
783 bool terrain = true;

Callers 1

Calls 5

start_objectMethod · 0.80
end_objectMethod · 0.80
get_member_nameMethod · 0.80
get_intMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected