Commit Graph

97 Commits

Author SHA1 Message Date
Oliver Brakmann
6f538e0180 Add more functions for objectives management to Lua API 2014-09-20 10:42:40 +02:00
Matthias Mailänder
9c3baabb6e Merge pull request #6423 from TWaalen/upstream/fix-spelling-luadocs
LuaDocs/Desc attributes spelling fixes
2014-09-07 08:37:01 +02:00
Thijs Waalen
de66e947e0 Changed "the player" to "this player" for the mission objective properties 2014-09-07 00:21:38 +02:00
Thijs Waalen
3a80ee27cd Fix spelling for Actor.Create description 2014-09-06 21:56:33 +02:00
Thijs Waalen
4f4bdf249b Fix wrong changes of possessive 2014-09-06 21:42:19 +02:00
Thijs Waalen
f47fe75970 LuaDocs consistency fixes 2014-09-06 19:29:38 +02:00
Thijs Waalen
eb959c5858 LuaDocs punctuation fixes 2014-09-06 19:29:37 +02:00
Thijs Waalen
a9b5e1d911 LuaDocs spelling fixes 2014-09-06 19:29:37 +02:00
Matthias Mailänder
128b2b8b67 rename the boolean 2014-09-05 15:42:38 +02:00
Matthias Mailänder
a7389a0e45 make this a seasonal easter egg 2014-08-31 20:38:16 +02:00
Oliver Brakmann
d85b5d5a4f Replace explicit Dispose() calls with using statements in ScriptTrigger.cs 2014-08-23 16:21:40 +02:00
Oliver Brakmann
74c45d5d21 Add reinforcements functions to Lua API 2014-08-23 16:21:40 +02:00
Oliver Brakmann
882f3f34c2 Add a number of small helper functions to Lua API 2014-08-23 16:21:40 +02:00
Oliver Brakmann
d23707b5f7 Add OnCapture, OnAddedToWorld and OnRemovedFromWorld triggers to Lua API
This brings the new Lua API up to feature-parity with the old API in the
trigger department.
2014-08-23 16:21:40 +02:00
Oliver Brakmann
1c8a56d197 Make ScriptContext available in Actor- and PlayerProperty classes
Needed to return non-native types to Lua
2014-08-23 16:21:40 +02:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
Paul Chote
e2ede4ec24 Merge pull request #6201 from cjshmyr/morelua
Add more Lua functions
2014-08-17 12:54:30 +12:00
Curtis Shmyr
cb4bd52fc0 Added more Lua functions 2014-08-15 19:51:02 -06:00
Paul Chote
0425416ce2 Convert damage modifiers to integer percentages. 2014-08-12 11:41:09 +12:00
Oliver Brakmann
8c43ffb802 Add some Media functions to new Lua API 2014-08-08 13:35:50 +02:00
Oliver Brakmann
cca6646927 Add mission objectives to Lua interface 2014-08-08 13:35:43 +02:00
Oliver Brakmann
a448ba29a8 Move trigger lists into a dictionary for easier access and enumeration 2014-08-08 13:34:47 +02:00
Oliver Brakmann
6e3000ab0e Make Conquest- and StrategicVictoryConditions use objectives backend
Note: 3rd party KotH maps will need to be modified to work correctly
with this change.  Previously, StrategicVictoryConditions was a
supplement to ConquestVictoryConditions.  After this change, each works
by itself.  So KotH maps will need to remove the ConquestVictoryConditions
trait from the player definitions, or both victory conditions will have
to be satisfied to win the game.
2014-08-07 16:56:17 +02:00
UberWaffe
c972b39687 Custom Warheads refactor
Changes included:

Warhead code split out of weapon code and refactored.
Warhead functionality now split into several classes, each handling one effect/impact.

Additional custom warheads can now be defined and called via yaml.
Custom warheads inherit the abstract class Warhead,
which provides target check functions.

Custom warheads have to define their own impact functions,
and can also define their own replacement for check
functions.
2014-08-03 17:10:44 +02:00
Matthias Mailänder
405d21d797 add Game.AddChatLine to the new Lua API 2014-07-27 07:34:24 +02:00
Matthias Mailänder
7901c06e4c differentiate new/old Lua APIs 2014-07-20 13:53:12 +02:00
Paul Chote
87e425042f Fix scripted paradrops. 2014-07-19 14:40:29 +12:00
Oliver Brakmann
3a67b3dec3 Fix breakage of the old Lua API due to recent changes
Specifically, the CPos::CenterPosition -> Map::CenterOfCell rename (#5758),
as well as the additional argument to Paradrop::SetLZ (#5695).
2014-07-06 01:21:22 +02:00
Matthias Mailänder
a38d43019a new setting to allow unlucky paratroopers 2014-07-05 09:13:51 +02:00
Paul Chote
d7f1b1c9e2 Remove CVec -> WVec conversion. 2014-06-27 23:30:41 +12:00
Paul Chote
7b52fa52b6 Replace CPos.CenterPosition -> Map.CenterOfCell. 2014-06-27 23:30:40 +12:00
Paul Chote
086ec07eb6 Add World parameter to Target.FromCell. 2014-06-27 23:30:40 +12:00
Paul Chote
b52cdd4b45 Remove redundant FindActorsInBox helpers. 2014-06-27 23:30:40 +12:00
Paul Chote
4db2cf6b2b Propagate race to produced actors. 2014-06-26 23:14:14 +12:00
Paul Chote
ca082e3cec Allow ProductionQueue to filter by race. 2014-06-26 23:14:13 +12:00
Paul Chote
7b3a0ebeb5 Tidy production traits. 2014-06-26 23:14:10 +12:00
Paul Chote
c5089db19c Allow actors to exist in multiple building queues. 2014-06-26 23:12:22 +12:00
Matthias Mailänder
3e627d2eba rename ore to the more generic name resources everywhere 2014-06-20 11:11:31 +02:00
ScottNZ
90894aa03e Use var everywhere 2014-06-15 22:17:34 +12:00
ScottNZ
dbffce81a6 Remove unused usings 2014-06-15 22:16:40 +12:00
Pavlos Touboulidis
86febed0ce Move ChooseRandomEdgeCell from WorldUtils to Map 2014-06-13 14:31:01 +03:00
Pavlos Touboulidis
f0c672b70c Move ChooseRandomCell from WorldUtils to Map 2014-06-13 14:02:51 +03:00
RoosterDragon
a598a01108 Fixed IDisposable implementation and usage.
- Implement IDisposable interface correctly, with sealed classes where possible for simplicity.
- Add using statement around undisposed local variables.
2014-06-10 11:23:55 +01:00
RoosterDragon
b733465f33 General uncontroversial cleanup:
- Made private methods static where possible (runtime can elide checking the object for null).
- Declared attribute classes as sealed (allows reflection on attributes to complete faster).
- Moved some static cctor's into field initializers (static cctor's are slower than static field initializers).
- Made classes static if they contained only static methods (can't create instances of useless objects).
- Use inferable Exts.Lazy and not new Lazy<T>().
- Added required STAThread attribute to CrashDialog.
- Removed unused parameters in private methods.
- Added Serializable attribute to exceptions.
- Added parameter name in calls to ArgumentNullException.
- Use of as operator instead of is + cast.
- Changed (x as Foo).Bar anti-pattern into ((Foo)x).Bar. Results in sensible cast exceptions on error rather than null dereferences.
- Removed unused method in NullShader.
2014-05-23 15:50:54 +01:00
Pavlos Touboulidis
a8b2187d93 Possible fix for lua crash #5269
Check if this instance has been disposed and don't call 'tick'
if it has.

Also remove the finalizer that was broken and wrong anyway.
'runtime' would never become null because it's readonly and
managed resources are freed automatically or may have already
been freed by then.
2014-05-19 23:37:23 +03:00
Oliver Brakmann
b90e6ccae5 Remove the deprecation notice from the old Lua interface
Fixes #5332.  The impending deprecation should probably still be
mentioned in the release notes.
2014-05-17 19:34:57 +02:00
Pavlos Touboulidis
63ec6d60e7 Refactoring to remove static Rules & SequenceProvider 2014-05-17 14:32:03 +03:00
Paul Chote
06f162ad57 Add initial standard library, and port shellmaps. 2014-05-02 22:18:34 +12:00
Paul Chote
d73af0190f Add a new native-lua implementation. 2014-05-02 22:18:34 +12:00
Paul Chote
f6efc9c5bc Add deprecation notice to the original api. 2014-05-02 22:08:42 +12:00