Commit Graph

229 Commits

Author SHA1 Message Date
Andrea Rendine da0d39b579 Check for delayed events
This triggers onload for all those events whose (possible) reward is registered with a time delay.
2015-06-27 01:43:09 -04:00
Andrea Rendine cb717b41d0 function for fire hut event and more
Effect of hut fire is associated with new Outside method .destroyHuts().
2015-06-27 00:44:26 -04:00
Andrea Rendine 358fe5fbcc Restore navigation property
Instead of a timed method to restore lx/rx navigation, a property will be set to true. In that case, the keyup method will not be executed, but it will restore navigation for further use.
2015-06-27 00:26:41 -04:00
wmassingham f94cfe2590 disable tab navigation during events (fixes #403) depends on @AndySky21's branch world-to-path 2015-06-27 00:26:40 -04:00
Andrea Rendine 08bd1c7caf Single letter representations for enemies
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)
2015-06-27 00:26:40 -04:00
SVS 1d2f95b561 Change the enemy labels 2015-06-27 00:26:40 -04:00
Andrea Rendine daf5de3973 Property for tab navigation
Added Engine.tabNavigation property. When true, it enables keyboard navigation to/from tabs. It is disabled on world and enabled some milliseconds after Path.onArrival(), so that when player returns s/he finds him/herself on Path tab instead of navigating.
2015-06-27 00:26:40 -04:00
Andrea Rendine 64a02c162c Modified command destination for save
Export dialog replaces selection dialog, rather than overlapping it.
Closing it exits the panel and returns to current game.
Aborting Import dialog returns the player to the selection screen, so that s/he can save before trying to load.
2015-06-26 23:49:30 -04:00
Andrea Rendine c4535c029a Alphabetical order for workers
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
2015-06-26 23:42:11 -04:00
Andrea Rendine 92f7cf683e Unified legend
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.
2015-06-26 22:10:02 -04:00
Andrea Rendine 93649307f6 Non-overlapping up/down buttons
Fixed dimensions and margins for up/down arrows.
2015-06-26 21:54:41 -04:00
Andrea Rendine 8306f155f1 Notifications for outside events
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.
2015-06-26 21:31:20 -04:00
John Redford ee591ca218 Update outside.js
Changed sickness event to kill up to half of the villagers instead of up to 20.
2015-06-14 00:47:08 -05:00
Blake Grotewold 84577047a6 Merge pull request #391 from AndySky21/ship-title
Ship tab title
2015-05-29 10:12:08 -04:00
Andrea Rendine f219b3288f Single letter representations for enemies
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)
2015-05-27 14:28:12 -04:00
SVS 8d3b313e9c Change the enemy labels 2015-05-27 14:25:21 -04:00
Andrea Rendine acca5806b5 Ship title
Browser "title" is not translated when Ship tab is active.
2015-05-18 23:15:18 +02:00
Andrea Rendine de705e4a5e Load event before anything else
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)
2015-05-13 12:08:00 -04:00
Andrea Rendine ebf5e6934e Correct DOM positions for village, store, perks box
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.
2015-05-13 12:01:32 -04:00
Travis Weston 8c368d363a Add take all button 2015-05-13 11:35:25 -04:00
Andrea Rendine fb13f6e808 Notification before reward
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.
2015-05-11 10:16:43 -04:00
Blake Grotewold 7fd474d3c0 Add missing Hyper Mode pieces
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
2015-05-10 18:14:13 -04:00
nicholas_pellizer 8320156f42 Hyper mode and LightsOff is now stored in the State 2015-05-03 22:09:49 -04:00
Michael Townsend f85b8fdf7e Merge pull request #349 from AndySky21/patch-1
Fixed variable name
2015-04-30 11:38:42 -04:00
Michael Townsend d2bd08dcb1 Merge pull request #345 from AndySky21/stores-az-sorting
Stores alphabetical sorting
2015-04-30 11:38:12 -04:00
Andrea Rendine f0e0548116 Var
Working ina hurry is bad.
2015-04-30 17:27:50 +02:00
Andrea Rendine 4efebe4f66 Var
Working in a hurry is bad.
2015-04-30 17:26:56 +02:00
Andrea Rendine 4efb22b890 Fixed variable name
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).
2015-04-30 17:11:24 +02:00
Andrea Rendine dca3faa2f9 Fixed variable name
"k" still refers to the English string, while "lk" carries the translated value.
2015-04-30 16:57:18 +02:00
Michael Townsend 5c37074c2d Merge pull request #346 from AndySky21/buildings-az-sorting
Buildings alphabetical sorting
2015-04-30 09:45:26 -04:00
Andrea Rendine c2f8ac89fa Correct jobs incomes on load
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.
2015-04-30 00:01:36 +02:00
Andrea Rendine 9c1ebecda7 Buildings alphabetical sorting
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.
2015-04-29 23:52:58 +02:00
Andrea Rendine 8042414be7 Stores alphabetical sorting
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.
2015-04-29 23:43:43 +02:00
Michael Townsend 909894cb50 Update engine.js 2015-04-16 10:17:59 -04:00
Blake Grotewold f998c270da Merge anubisthejackle:issue115
Closes #115
Closes #224
2015-02-14 17:14:22 -05:00
Travis Weston 7333d03dbb Use Outside.killVillagers to kill villagers 2015-02-12 12:45:27 -05:00
Travis Weston 6ee6470972 Merging updates 2015-02-11 18:55:27 -05:00
Travis Weston 340851a99d Updated against suggestions 2015-02-11 18:21:08 -05:00
Travis Weston f2b8ad6268 Merge remote-tracking branch 'upstream/master' into issue115
Conflicts:
	script/outside.js
	script/path.js
2015-02-10 07:11:10 -05:00
Blake Grotewold c87541b8b9 Merge pull request #222 from anubisthejackle/issue80 2015-02-09 19:37:10 -05:00
Travis Weston 6e044292ae Add in doubleTime capabilities
Add hyper / classic to menu
2015-02-09 19:31:24 -05:00
Blake Grotewold 5d921d9464 Merge pull request #204 from rgravina/188_fix_jshint_warnings 2015-02-09 19:25:08 -05:00
Robert Gravina 67b3c7fb7e Low-risk fixes suggested by JSHint. 2015-02-09 19:20:29 -05:00
Travis Weston 25b2fbfa5f Limit Fire event to only Outside module 2015-02-08 22:33:18 -05:00
Travis Weston 8010597e44 Add hut fire event.
Closes #35
2015-02-08 11:23:32 -05:00
Travis Weston 2d3daa572d Move movement functions to Engine. Create scrollable Path sidebar 2015-02-07 14:00:32 -05:00
Travis Weston 3d00ed3c40 Add scrolling via keyboard 2015-02-07 11:19:37 -05:00
Travis Weston 5fcdf29601 Remove ^M from file because to heck with them. 2015-02-06 16:02:37 -05:00
Gary Krige 6f2a705479 Update scoring.js
Fix verbose code
2015-01-28 21:58:36 +02:00
Alex Liebscher 5d12670979 Prevent negative HP
Closes #201
2015-01-05 01:38:35 -05:00