Skip to content

Commit

Permalink
Merge pull request #40381 from BevapDin/bbm
Browse files Browse the repository at this point in the history
Reset loaded monster adjustments.
  • Loading branch information
ZhilkinSerg authored May 9, 2020
2 parents 4aa0d6d + be268f8 commit e35d300
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ void DynamicDataLoader::unload_data()
overmap_terrains::reset();
profession::reset();
quality::reset();
reset_monster_adjustment();
recipe_dictionary::reset();
recipe_group::reset();
requirement_data::reset();
Expand Down
5 changes: 5 additions & 0 deletions src/monstergenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,11 @@ void monster_adjustment::apply( mtype &mon )

static std::vector<monster_adjustment> adjustments;

void reset_monster_adjustment()
{
adjustments.clear();
}

void load_monster_adjustment( const JsonObject &jsobj )
{
monster_adjustment adj;
Expand Down
1 change: 1 addition & 0 deletions src/monstergenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,6 @@ class MonsterGenerator
};

void load_monster_adjustment( const JsonObject &jsobj );
void reset_monster_adjustment();

#endif // CATA_SRC_MONSTERGENERATOR_H

0 comments on commit e35d300

Please sign in to comment.