Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check loaded mapgen for being used at all. #37425

Merged
merged 27 commits into from
Mar 9, 2020
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e98c340
Remove manual JSON object member check:
BevapDin Jan 26, 2020
8a3af65
Move some repeated code into a function get_mapgen_function.
BevapDin Jan 26, 2020
aa339c1
Move some code as function into mapgen.cpp
BevapDin Jan 26, 2020
0c9dcb6
Remove redundant declaration.
BevapDin Jan 26, 2020
05bf7d0
Remove commented out code.
BevapDin Jan 26, 2020
b906f93
Move access to oter_mapgen into mapgen.cpp
BevapDin Jan 26, 2020
4517596
Remove exposing variables from mapgen.cpp in the header.
BevapDin Jan 26, 2020
36a3674
Add separate function to register mapgen object: register_mapgen_func…
BevapDin Jan 26, 2020
daaf576
Change oter_mapgen to contain ínstances of a dedicated class
BevapDin Jan 26, 2020
818b34d
Merge oter_mapgen_weights into oter_mapgen:
BevapDin Jan 26, 2020
8a7d9ba
Store pointers directly in oter_mapgen weights map instead of indices…
BevapDin Jan 26, 2020
2abf567
Use weighted_int_list for oter_mapgen weights
BevapDin Jan 26, 2020
832dba8
Move code into a member function mapgen_basic_container::pick
BevapDin Jan 26, 2020
8f68fe4
Move code into a member function: mapgen_basic_container::setup
BevapDin Jan 26, 2020
93af65b
Move code into a member function: mapgen_basic_container::check_consi…
BevapDin Jan 26, 2020
8db4d4e
Make all data members of mapgen_basic_container private.
BevapDin Jan 26, 2020
f0b11ce
Make a separate class for oter_mapgen
BevapDin Jan 26, 2020
72190de
Replace `auto` with actual type
BevapDin Jan 26, 2020
35c07f7
Consistent naming: "omw" just like in the other function
BevapDin Jan 26, 2020
d724bdd
Consistent naming: just "iter" as there is no need to hint the data t…
BevapDin Jan 26, 2020
bd2e793
Add usage checks for loaded mapgen instances.
BevapDin Jan 26, 2020
1f5668b
Add some documentation.
BevapDin Jan 26, 2020
ada1a13
Encapsulate the `mapgen_function` function pointers within `mapgen_fa…
BevapDin Feb 1, 2020
9a4eb67
Remove mapgen entries for overmap terrain "null".
BevapDin Feb 2, 2020
7793608
Follow recommendation of clang-tidy
BevapDin Feb 2, 2020
0c650d1
Make parameter offset of load_mapgen_function mandatory.
BevapDin Feb 2, 2020
e2b0dd8
Remove default_idx parameter from load_mapgen_function.
BevapDin Feb 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/map_extras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2832,9 +2832,6 @@ void map_extra::load( const JsonObject &jo, const std::string & )
optional( jo, was_loaded, "autonote", autonote, false );
}

extern std::map<std::string, std::vector<std::shared_ptr<mapgen_function>> > oter_mapgen;
extern std::map<std::string, std::vector<std::unique_ptr<mapgen_function_json_nested>> >
nested_mapgen;
extern std::map<std::string, std::vector<std::unique_ptr<update_mapgen_function_json>> >
update_mapgen;

Expand All @@ -2850,13 +2847,6 @@ void map_extra::check() const
break;
}
case map_extra_method::mapgen: {
/*
const auto fmapit = oter_mapgen.find( generator_id );
const oter_id extra_oter( generator_id );
if( ( fmapit == oter_mapgen.end() || !fmapit->second.empty() ) && !extra_oter.is_valid() ) {
debugmsg( "invalid mapgen function (%s) defined for map extra (%s)", generator_id, id.str() );
}
*/
break;
}
case map_extra_method::update_mapgen: {
Expand Down
Loading