Commit graph

93 commits

Author SHA1 Message Date
Stan
6ada1d015d Allow modders to play an animation when objects with production queues are researching techs.
Reviewed by: @Angen
Comments by: @Krinkle, @bb
Thread:
https://wildfiregames.com/forum/index.php?/topic/27329-visual-feedback-for-researching/&tab=comments#comment-389598

Differential Revision: https://code.wildfiregames.com/D2459
This was SVN commit r23239.
2019-12-14 20:49:04 +00:00
wraitii
026ce76e3f Update the fast-actions cheat and AI bonuses to use the modifiers manager
This deletes custom-code and shows how to use this system component for
triggers.

Differential Revision: https://code.wildfiregames.com/D1011
This was SVN commit r22964.
2019-09-22 07:46:29 +00:00
wraitii
190f8d3566 Calculate entity limit counts correctly when SpawnUnits fails in ProductionQueue.
When adding a batch of unit, these in-training units get added to the
production queue and to the entity limit count.
These in-training units need to be removed from the entity limit counts
when spawning them, or we would be double-counting them. This was done
when creating the cached entities, but this was too early: entities
might fail to spawn, for example when there is no room around the
foundation.

Change that so the entity limit count is now decremented right before
giving spawned entities the correct owner (which triggers EntityLimits
OnGlobalOwnershipChanged, which adds the spawned entities to the entity
limit count).

Additionally, add Init to TrainingRestrictions so that the test setup
doesn't complain. Other components have an empty Init instead of
checking for Init in the test setup (and 61/67 have an Init function) so
it seems more standard this way.


Reported By: elexis
Reviewed By: wraitii
Patch By: Angen
Tests By: wraitii
Differential Revision: https://code.wildfiregames.com/D1879
This was SVN commit r22375.
2019-06-15 17:27:24 +00:00
mimo
787345a8db fix error when using salad-bowl on gaia, fixes #4603
This was SVN commit r21661.
2018-04-04 19:27:19 +00:00
mimo
5b314fc0ac Add a time multiplier for AI levels
Differential Revision: https://code.wildfiregames.com/D1350
This was SVN commit r21423.
2018-03-03 10:05:04 +00:00
temple
37d317e01a Remove the alert status on units
Differential Revision: https://code.wildfiregames.com/D681
Reviewed by: causative
Fixes: #4185, #4656

This was SVN commit r21074.
2018-01-30 01:47:12 +00:00
elexis
d5af005a00 Expose INVALID_PLAYER to the JS simulation and use it instead of -1 for consistency with the C++ counterpart.
This was SVN commit r20953.
2018-01-22 01:02:29 +00:00
elexis
c90d72deb5 Replace DataTemplateManager simulation component with a globalscript, refs #4868.
Removes the serialization of JSON files, shrinking savegame files and
rejoin states sent across the network, refs #3834, #4239, #3909,
f24523dc8f.
Removes the AI C++ code to read JSON files from e33d4a52e9 since the AI
can now use the globalscript.
Allows the AI to read Aura templates and removal of GUIInterface code to
improve performance.
Serialization of the JSON objects in other simulation components was
removed in 9c0e37f2c0 / D1109, a6f14f5631 / D1130.

Serialization removal planned by sanderd17
AI part proofread by mimo
Simulation part proofread by bb
Discussed with Itms on irc

Differential Revision: https://code.wildfiregames.com/D1108
This was SVN commit r20737.
2017-12-31 01:02:21 +00:00
mimo
2a6fcafbae Add a {native} civ replacement in buildable and trainable template names
Reviewed By: wraitii, elexis, with inputs from s0600204
Differential Revision: https://code.wildfiregames.com/D1084
This was SVN commit r20603.
2017-12-07 18:33:08 +00:00
elexis
8582dcf47f Check for Technology existence by looking up loaded technologies rather than performing disk access ingame, refs D1024 / 8de5c26540.
Differential Revision: https://code.wildfiregames.com/D1105
Discussed with: mimo

This was SVN commit r20587.
2017-12-04 23:58:44 +00:00
mimo
8de5c26540 Allow civ specific techs with {civ}
Discussed with leper

Reviewed By: bb
Trac Tickets: #4589

Differential Revision: https://code.wildfiregames.com/D1024
This was SVN commit r20551.
2017-11-28 20:43:00 +00:00
mimo
f84d195b9d Fix Builder and ProductionQueue schemas inconsistencies
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D1070
This was SVN commit r20540.
2017-11-27 18:42:46 +00:00
elexis
235f452765 Let units face away from the building they were trained or ungarrisoned from.
Uses the vector functions from 8ee2a8aca2 and fixes the TODO from
08db7ebe13 / 0aaddf62aa.

Differential Revision: https://code.wildfiregames.com/D1037
Patch By: temple
This was SVN commit r20497.
2017-11-21 16:22:09 +00:00
mimo
76a2cd43d0 Fix broken Autogarrison in 1638727c23
Patch by Stan

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D885
This was SVN commit r20137.
2017-09-08 18:04:19 +00:00
elexis
2e3ac4cf20 Prevent players from gaining unlimited resources by setting the batch-train-modifier to a non numeric value.
Differential Revision: https://code.wildfiregames.com/D66
Refs #4459
Reviewed By: fatherbushido (wraitii, leper)
This was SVN commit r19826.
2017-06-25 16:05:06 +00:00
mimo
e8c6b09c4f Reset the alert of ProductionQueues when ownerShip changes, fixes #4571
This was SVN commit r19570.
2017-05-13 14:52:23 +00:00
elexis
51d189c767 Display a chat notification if an ally has reached a new phase, optionally also if started or aborted.
Remove the equivalent AI chat notifications.

Differential Revision: https://code.wildfiregames.com/D354
Patch By: Polakrity
Fixes #3512

This was SVN commit r19445.
2017-04-23 00:00:14 +00:00
Itms
83a2e810da Remove all occurrences of for each in JS scripts.
This will allow us to use some linters that would otherwise crash on
this non-standard SpiderMonkey feature. Refs #4419.

Special thanks to elexis for thoroughly checking and testing all the
changes!
Reviewed By: leper, elexis
Differential Revision: https://code.wildfiregames.com/D40
This was SVN commit r19191.
2017-01-30 12:47:08 +00:00
fatherbushido
6c97d8118b Merge different logics of technology requirements and fix the related bugs. Create a global script which derive the technology requirements objects in a form usable for structure tree, gui, simulation and AI. Reviewed by mimo (for AI) and fatherbushido. Fixes #3993, #1646, #4263, #4217. Refs #4108.
This was SVN commit r19120.
2017-01-08 14:00:20 +00:00
elexis
7702908a52 Remove an unused variable following 1b20ac7671 and fix some missing and some redundant semicolons found with jshint.
This was SVN commit r19011.
2016-11-28 14:47:13 +00:00
elexis
6149dd3841 Actually remove trailing whitespace for non-header files as well.
This was SVN commit r18989.
2016-11-23 13:02:58 +00:00
elexis
1b20ac7671 Remove silencing of resource-not-found errors (that were introduced with an enabled property in the JSON resource files that got removed later). Refs #3934.
This was SVN commit r18977.
2016-11-21 17:32:17 +00:00
elexis
52f311da2b Merge resource agnostic branch by s0600204, fixes #3934.
Remove all occurances of hardcoded resources in the simulation, GUI and
AI code by
specifying resources as JSON files in a new simulation subdirectory and
accessing them through a globally defined prototype.

This was SVN commit r18964.
2016-11-19 14:29:45 +00:00
elexis
9cea2bb8fe Fix paired techs following a754b1bad4. Patch by Imarok, fixes #4251, refs #3823.
This was SVN commit r18790.
2016-09-29 10:25:48 +00:00
elexis
a754b1bad4 Correctly handle commands and production for multiple units and mixed selections. Patch by Imarok, reviewed by Itms, fixes #3823. Fixes #3492, #3288, #3668.
This was SVN commit r18773.
2016-09-25 19:38:10 +00:00
sanderd17
450973a624 Clean up some code-style issues reported by leper
This was SVN commit r18390.
2016-06-16 14:51:12 +00:00
mimo
0856dde011 fix a typo in 58e356babb, plus a missing semicolon
This was SVN commit r18234.
2016-05-26 17:58:08 +00:00
sanderd17
1b0fbee2d9 Let auras and techs modify tech cost. Patch by fatherbushido. Fixes #3930
This was SVN commit r18233.
2016-05-26 06:28:23 +00:00
sanderd17
f24523dc8f Rename TechnologyTemplateManager to DataTemplateManager in order to reflect its new function. Fixes #3909. Disable serialisation of technology templates. Refs #3834
This was SVN commit r18100.
2016-04-27 08:25:47 +00:00
sanderd17
a69da3401f Completely hide techs that aren't researchable by the civ of the owner + cleanup of requirements checking. Patch by fatherbushido. Fixes #3899
This was SVN commit r18027.
2016-04-13 09:15:16 +00:00
sanderd17
e0cfcbd806 Enable technologies on captured buildings. Allow a negation on the civ selection in the technology json files. Patch by fatherbushido
This was SVN commit r18021.
2016-04-11 19:40:53 +00:00
leper
491cba314a Translate some notification messages. Refs #3665.
This was SVN commit r17614.
2016-01-08 23:22:45 +00:00
mimo
14aaa7c640 add some missing semicolon
This was SVN commit r17059.
2015-09-21 21:08:58 +00:00
mimo
0b86bbd424 another bunch of cleanup (mainly missing semicolon) signaled by jshint
This was SVN commit r17045.
2015-09-19 12:50:48 +00:00
mimo
fc45777793 delay the ownerShip only after the entity is spawned, fix #3422
This was SVN commit r17027.
2015-09-16 09:33:38 +00:00
sanderd17
ffdacbb612 Fix issues with technologies and pop bonus/cost. Patch by Vladislav. Fixes #3236
This was SVN commit r16709.
2015-06-02 14:33:21 +00:00
sanderd17
b4cbc14490 Style fixes
This was SVN commit r16510.
2015-04-07 07:15:59 +00:00
sanderd17
71a84682ad Fix the productionQueue for capturing. Needs the AI to be fixed in a similar way, and still needs template changes to see the full effect. Refs #2614
This was SVN commit r16506.
2015-04-06 15:02:37 +00:00
sanderd17
c735f9a579 Revert wrong commit 14b7e7568c
This was SVN commit r16495.
2015-04-04 09:11:05 +00:00
sanderd17
14b7e7568c Rename athen archer, as it's not a default unit. Naming it as a default unit makes any capture code more difficult.
This was SVN commit r16494.
2015-04-04 08:56:14 +00:00
leper
af8a6f5e8c Removes generic hele and celt civs. Based on patch by prodigalson and
comments by s0600204. Fixes #2619.

Also removes the theb civ json file.

This was SVN commit r16416.
2015-03-15 04:16:24 +00:00
mimo
f0ae351158 read starting tech, disabled tech, ... from map JSON file, refs #1404
This was SVN commit r16270.
2015-02-05 22:29:36 +00:00
mimo
611d20016a fixes error with GetPosition2D called while out of world
This was SVN commit r15694.
2014-08-30 17:03:04 +00:00
Itms
c0e7208130 Fixes 016d4599e1 by registering the new DisabledTemplatesChanged message.
Also fixes a typo.

This was SVN commit r15616.
2014-08-05 21:21:06 +00:00
Spahbod
016d4599e1 Added the ability to disable training/building of entities by triggers. Changes survival of the fittest random map to work with this. Refs #52
This was SVN commit r15614.
2014-08-05 12:49:12 +00:00
sanderd17
9f47ed536d Add engine support to triggers + a component to provide an easy interface and to be extended by triggers. Thanks to SpahBod for the biggest part of the code, and Yves for the review.
This was SVN commit r15421.
2014-06-23 13:42:59 +00:00
Yves
bee865416b Fixes small issues in 81d1f5f71f.
This was SVN commit r15398.
2014-06-19 18:50:41 +00:00
sanderd17
81d1f5f71f Clean up notifications. Merge the timed and untimed text notifications, allow passing a list of players to all notifications, make modification types moddable. Refs #52
This was SVN commit r15394.
2014-06-19 14:37:08 +00:00
mimo
5903935e4a let the AIs know when a training has started
This was SVN commit r15350.
2014-06-14 14:34:37 +00:00
mimo
e2b493bb67 fix double-click on a garrisoned hero button should select its holder, even if from autogarrison
This was SVN commit r15348.
2014-06-14 14:21:30 +00:00