-
Notifications
You must be signed in to change notification settings - Fork 15
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
FI Sky Palace Stage Tracking #144
Comments
Something like (pseudocode): types = {}
activated_types.foreach -> types{type}++
type = types.filter(types[t] > 3) // there will be only one but we can make sure
count = types[type]
name = island_mod_panels.filter(mp.type = type).name
message.stage += ` x${count} $name` Something like that - get the type that has 3+ active panels, turn that type name into a string, append the count and name to the stage |
We're testing this, setting env_attrs to the hunting_site_attributes: if (env_attrs.is_vault_island
&& 'activated_island_mod_types' in env_attrs
&& Array.isArray(env_attrs.activated_island_mod_types)) {
const panels = {};
env_attrs.activated_island_mod_types.forEach(t => t in panels ? panels[t]++ : panels[t] = 1);
let counter = 0;
let mod_type = '';
for (const [type, num] of Object.entries(panels)) {
if (num >= 3) {
counter = num;
mod_type = env_attrs.island_mod_panels.filter(p => p.type === type)[0].name;
}
}
if (counter && mod_type)
console.log(`New Stage: ${env_attrs.island_name} ${counter}x ${mod_type}`);
else
console.log(`Didn't set counter (${counter}) or mod_type. Vault: ${env_attrs.is_vault_island}`);
} |
Addressed in sky_palace branch and several merges. Some database cleanup has happened. |
https://github.com/mh-community-tools/mh-helper-extension/blob/864d682a78e6ca44ed54375c4d4d1fd29c9bdaf4/src/scripts/main.js#L1907
Sky palace expansion has new fancy mice that come to play when there are 3 of the same tile active. They come to play more often when there are 4. We should count the same-named active tiles and if one of them is 3 or 4 add a stage decoration indicating which type is x3/x4.
The text was updated successfully, but these errors were encountered: