diff options
author | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-10-11 09:51:01 +0200 |
---|---|---|
committer | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-10-11 09:51:01 +0200 |
commit | 1e6ae5eefa0b3f9bd272394833cdfa082e3401af (patch) | |
tree | 774b37fa799af2560837795748c7ffc25f565392 /rules.js | |
parent | 8846ab63c39339a0346c50105cb0bcf1710d8066 (diff) | |
download | algeria-1e6ae5eefa0b3f9bd272394833cdfa082e3401af.tar.gz |
remove unused. setup cleanup
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 49 |
1 files changed, 2 insertions, 47 deletions
@@ -80,30 +80,6 @@ function set_active_player() { } } -function set_passive_player() { - clear_undo() - let nonphasing = (game.phasing === GOV_NAME ? FLN_NAME : GOV_NAME) - if (game.active !== nonphasing) { - game.active = nonphasing - update_aliases() - } -} - -function set_enemy_player() { - if (is_active_player()) - set_passive_player() - else - set_active_player() -} - -function is_active_player() { - return game.active === game.phasing -} - -function is_passive_player() { - return game.active !== game.phasing -} - function is_gov_player() { return game.active === GOV_NAME } @@ -844,21 +820,6 @@ function has_fln_not_neutralized_mobile_unit_in_algeria() { return false } -function has_non_neutralized_police_in_loc(x) { - for (let u = 0; u <= unit_count; ++u) - if (unit_loc(u) === x && unit_type(u) === POL && is_unit_not_neutralized(u)) - return true - return false -} - -function has_friendly_unit_in_locs(xs) { - for (let u = first_friendly_unit; u <= last_friendly_unit; ++u) - for (let x of xs) - if (unit_loc(u) === x) - return true - return false -} - function has_unit_type_in_loc(t, x) { for (let u = 0; u <= unit_count; ++u) if (unit_loc(u) === x && unit_type(u) === t) @@ -1303,11 +1264,10 @@ states.scenario_setup = { } } - if (!count) { - gen_action('end_deployment') - } + view.actions.end_deployment = !count }, quick_setup() { + push_undo() for_each_friendly_unit(u => { free_unit(u) }) @@ -1412,11 +1372,6 @@ states.random_event = { } } -function goto_restart() { - // XXX debug only - exports.setup(game.seed, game.scenario) -} - function goto_no_event() { log_h3("No Event. Lucky you.") end_random_event() |