I had missed this completely. Workers are listed in alphabetical order in English. Now they are ordered in other languages too.
Alphabetical order for outfit
Legends on boxes and lists are currently added via CSS and as stylesheets cannot be localised, translated strings rely upon an additional inline CSS.
This commit inserts localised legends as "data-legend" attributes on proper elements, and then this attribute is shown by stylesheet rule content: attr(data-legend). No need of localisation script and more compact CSS rules.
As said in #363, there are almost no notifications for outside events.
I took a little liberty to suggest new sentences. Inspired by the game atmosphere and the double notification for Hut Fire, wrote lines for events and possible outcomes.
they're associated to buttons where there are no outcome scenes.
R wild animals (beast, birds, lizards, rats)
T mutated creatures (includes giant lizards)
E human enemies (old men, scavengers, thugs and squatters)
D armed human enemies (includes vigilantes, soldiers, snipers, commandos, veterans and chiefs)
An event could produce different notifications or rewards according to different outcomes of the event itself (e.g. a negative event impacting on buildings and/or villagers, or a wanderer leaving items of some specific kind), but the notification is generated before the onLoad() call.
I'd say that this is the best action order:
1. event action
2. event notification
3. event reward (and possible additional notifications due to that)
I noticed a minor glitch with the Village box position in the DOM. As it is appended to the Outside panel, it can end up after the Wood gather button or after the Traps check. It depends on whether the latter exists or not.
I changed it a little. Now it is "prepended" (thanks jQuery!), so it's always before any other content in the panel.
It would mind e.g. for CSS consistency, as you could decide to use a style for sibling buttons and it wouldn't work unless the box is placed before or after (not between) them.
For consistency with Outside box placement issue, stores are prepended to the Room panel, as first content in the DOM tree.
For consistency with Outside box placement issue, perks are prepended to the Path panel, as first content in the DOM tree.
Noticed when buying the compass.
I found it weird that *first* the compass points and *then* it appears in good condition.
Now event notification precedes event reward, and it should be corrected.
Some code was missing from the Hyper Mode feature addition. This
completes the use of `Engine.setTimeout` and adds doubleTime check in
button cooldowns.
Closes#374
Actually in this case "name" is used in a function and is not necessary for lookups, but I think that if future changes to both room.js and outside.js occur, authors will appreciate consistency in scripts (also fixes indentation in comments).
Currently, when a game is loaded, job production/consumption rates in tooltips are shown based on the unit, rather than multiplied by the employed village number. Incomes are then corrected when the numbers change.
With the initial call of updateVillageIncome() function, the correct numbers are displayed when the game is opened and loaded.
The bulk of this small change was to sort buildings by alphabetical order according to translated names, instead of english strings.
This meant removing the ID splitting as well as hyphen/space replacing, as the ID is not considered for the test.
Also changed:
1. line 366: as the original english string is no longer necessary in the iteration, "name" takes the value of translated string. "name" is then used for alphabetical comparison (as before) with the right value.
2. line 378: removed the test on curPrev variable. Items already listed have been placed in alphabetical order, so there is no need to check whether each item actually follows value of control variable.
The bulk of this small change was to sort stores by alphabetical order according to translated names, instead of english strings.
This meant removing the ID splitting as well as hyphen/space replacing, as the ID is not considered for the test.
Also changed:
1. line 800: as the original english string is no longer necessary in the iteration, k takes the value of translated string. k is then used for alphabetical comparison (as before) with the right value.
2. line 816: removed the test on curPrev variable. Items already listed have been placed in alphabetical order, so there is no need to check whether each item actually follows value of control variable.
Because there is a serious need for medicine, the price
is raised with this button. I felt like it should be even
higher but this will do for now.
Closes#199
Load the state when initialising the path screen. When embarking, make sure to clear the state. On arrival, update the saved state.
This enables save/load of the path state in the save game if it occurs before leaving.