Skip to content

Commit

Permalink
Fix "resin_cord is undefed" (#33504)
Browse files Browse the repository at this point in the history
* Make repair_actions non-static.

Put them into `Item_factory` and clear and reset them on each game resetting.

* Also clear Item_factory::misc_tools
  • Loading branch information
BevapDin authored and ZhilkinSerg committed Aug 24, 2019
1 parent b215f78 commit e6f1833
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/item_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ struct tripoint;
using t_string_set = std::set<std::string>;
static t_string_set item_blacklist;

static std::set<std::string> repair_actions;

static DynamicDataLoader::deferred_json deferred;

std::unique_ptr<Item_factory> item_controller = std::make_unique<Item_factory>();
Expand Down Expand Up @@ -2335,6 +2333,8 @@ void Item_factory::clear()

repair_tools.clear();
gun_tools.clear();
misc_tools.clear();
repair_actions.clear();

frozen = false;
}
Expand Down
2 changes: 2 additions & 0 deletions src/item_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ class Item_factory

// tools that can be used to repair wood/paper/bone/chitin items
std::set<itype_id> misc_tools;

std::set<std::string> repair_actions;
};

#endif

0 comments on commit e6f1833

Please sign in to comment.