Make des.mineralize use default probabilities
Calling des.mineralize() with no arguments was equivalent to calling it and manually specifying gem_prob = 0, gold_prob = 0, etc. Which meant that no mineralization would actually happen. Instead, make this match the intuitive behavior, and pass in -1 probabilities as defaults -- which the mineralize() function interprets as the caller wanting to use the standard probabilities for a level of that depth, as if it were not a special level. This change does not affect any special level files since des.mineralize is not currently used in any of them.
This commit is contained in:
committed by
Pasi Kallinen
parent
d8ada3d768
commit
82782a1d6d
@@ -3782,10 +3782,11 @@ lspo_mineralize(lua_State *L)
|
||||
create_des_coder();
|
||||
|
||||
lcheck_param_table(L);
|
||||
gem_prob = get_table_int_opt(L, "gem_prob", 0);
|
||||
gold_prob = get_table_int_opt(L, "gold_prob", 0);
|
||||
kelp_moat = get_table_int_opt(L, "kelp_moat", 0);
|
||||
kelp_pool = get_table_int_opt(L, "kelp_pool", 0);
|
||||
/* -1 produces default mineralize behavior */
|
||||
gem_prob = get_table_int_opt(L, "gem_prob", -1);
|
||||
gold_prob = get_table_int_opt(L, "gold_prob", -1);
|
||||
kelp_moat = get_table_int_opt(L, "kelp_moat", -1);
|
||||
kelp_pool = get_table_int_opt(L, "kelp_pool", -1);
|
||||
|
||||
mineralize(kelp_pool, kelp_moat, gold_prob, gem_prob, TRUE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user