Commit Graph

54 Commits

Author SHA1 Message Date
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
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
ScottNZ
856120f2b2 Remove hardcoded missions 2014-03-08 00:26:09 +13:00
ScottNZ
7d43ecc33f Remove the temperate RA shellmap and port the desert shellmap to Lua. 2014-03-06 19:27:29 +13:00
Oliver Brakmann
e65626cc6b Add Actor.Guard 2014-02-17 19:16:47 +01:00
Oliver Brakmann
bfc34df581 Add Actor.OnDamaged
Allows the AI to react to its units being attacked.
2014-02-17 19:16:47 +01:00
Oliver Brakmann
886efd0b97 Add production-related Lua functions 2014-02-02 23:37:22 +01:00
Oliver Brakmann
b3323869cb Add Map.FindActorsInCircle and ...InBox, plus related shortcuts 2014-02-02 23:37:22 +01:00
Oliver Brakmann
5322096dc4 Add Team.Patrol and Actor.Patrol. Fixes #4491. 2014-02-02 23:37:22 +01:00
Paul Chote
fae9611d27 Fix HeliFly lua bindings. 2014-02-01 10:56:06 +13:00
Paul Chote
4eaaa052cc Simplify Fly interface. 2014-02-01 10:55:04 +13:00
Paul Chote
85500c0ec7 Tidy AutoTarget code. 2014-02-01 10:55:04 +13:00
ScottNZ
d34de25495 Move lua logs to lua.log 2014-01-12 23:28:50 +13:00
Dan9550
91050ba458 OnCapture lua trigger & nod03a
Cleaned up nod03a, spaces -> tabs

nod03a and OnCapture lua trigger
2014-01-05 20:19:13 +11:00
ScottNZ
09b694095c Add Map.GetNamedActor for map actor lookup 2013-12-20 19:20:56 +13:00
ScottNZ
b2e9de810e Add CPos.New etc functions to Lua standard library and helpers to LuaScriptInterface.cs. Rename Team.Create to Team.New. 2013-12-19 19:26:57 +13:00
ScottNZ
1a4888b050 PerfSample Lua Tick execution 2013-12-06 23:11:33 +13:00
ScottNZ
452a0c0e25 Add Lua reserved name checking and exception hooks 2013-12-06 21:53:07 +13:00
ScottNZ
aca618ceef Introduce LuaScriptContext function cache 2013-12-06 21:53:06 +13:00
ScottNZ
1cf1086122 Swap LuaInterface for NLua and KopiLua 2013-12-06 21:52:59 +13:00
Chris Forbes
870685995d defer disposal of lua context to main thread 2013-12-02 17:50:09 +13:00
ScottNZ
e4d477b0e0 Add Lua standard library and supporting C#/yaml 2013-11-29 23:48:44 +13:00
ScottNZ
cd0b3d8862 Add map scripting support 2013-11-18 20:55:59 +13:00
ScottNZ
55423b159a Move RASpecialPowers into OpenRA.Mods.RA.Scripting 2013-11-18 20:55:57 +13:00
ScottNZ
00ec1ca87a Remove unused usings 2013-11-12 19:39:33 +13:00
Matthias Mailänder
659600db23 let the cruiser jump in earlier and nearer to friendly harbor
fixes #3126
2013-06-17 21:50:05 +02:00
Paul Chote
c3c5321e1d Predict local pause state to avoid order lag. Fixes #3223. 2013-05-09 22:42:55 +12:00
Paul Chote
096d95f391 Fix bogus pause logic. 2013-04-07 23:38:52 +12:00
Matthias Mailänder
0a82bfe552 format TODO: uniformly to auto-generate task list in MonoDevelop 2013-03-27 09:45:17 +01:00
Kenny
f41fb32d60 Introducing per-player shrouds.
- Each player has their own shroud and their visibility does not extend outside of the shroud. 
- Units and buildings can no longer target other units outside of their visibility. Buildings can still be targetted if they have been explored.
- GPS will provide visibility in the fog-of-war.
- Spies that infiltrate radar domes will gain their victim's exploration and reset it on all clients (if the victim does not have GPS)
2012-12-13 15:16:56 -08:00
Scott_NZ
362dc8128e Don't crash and burn if vqa files aren't found 2012-08-25 15:20:58 +12:00
Chris Forbes
5fee165692 fixed #2289 - missing chrono effects on return 2012-07-01 14:24:49 +12:00
James Dunne
9c49143534 New types for cell and pixel coordinate position/vectors. 2012-06-21 15:36:59 -05:00
Chris Forbes
c30d46c014 #2051 fixed -- Widget.Get() throws by default 2012-04-27 19:39:07 +12:00
Chris Forbes
ed429a3b30 split Widget static bits into Ui static class 2011-12-13 23:38:59 +13:00
Tirili
6174ccc882 Change World.DisableTick to World.EnableTick 2011-10-23 13:11:39 +13:00
Chris Forbes
a1dd5cedd4 clean up duplicate trait lookup in RASpecialPowers 2011-10-18 21:52:58 +13:00
Chris Forbes
bc6af1841b fix indents everywhere 2011-10-18 15:10:17 +13:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Chris Forbes
a3994df925 queries dies 2011-03-17 22:09:10 +13:00
Paul Chote
094907c1a9 Update copyright header. Normalize line endings to LF. 2011-02-13 10:38:57 +13:00
Paul Chote
481cc7807b Don't require a WorldRenderer to draw non-world-rendering widgets. 2011-01-19 20:41:32 +13:00
Chris Forbes
e2ff40dc7f better fix for chrono bug 2011-01-08 17:30:29 +13:00
Chris Forbes
e1761d8969 cleanup some usings 2010-12-03 20:43:27 +13:00