Commit Graph

62 Commits

Author SHA1 Message Date
Oliver Brakmann
f6f81e84df Fix Lua API returning wrong player info
The Lua API would return wrong information on player fields such as the team or faction when it was changed in the lobby. It referenced fields on the PlayerReference, which are pretty much read-only and don't get changed by the lobby.
2016-08-11 20:16:01 +02:00
Zimmermann Gyula
cf8fff2b99 Remove passing the warheads from DamageWarhead to AttackInfo.
Added a Damage class to pass damage value and damage(types) instead.
This removes a great amount of overhead and longterm opens possibilities to have damagetypes without warheads.
2016-07-12 10:09:49 +02:00
Oliver Brakmann
20d55a1d93 Add Lua integration for PlayerExperience 2016-07-10 15:30:17 +02:00
abcdefg30
61fd9d2959 Add AmmoPoolProperties to lua 2016-06-21 23:20:02 +02:00
abcdefg30
4461379963 Make the Attack lua method available for non-mobile actors 2016-06-21 22:49:29 +02:00
abcdefg30
19482863fd Expose Land and Resupply functions for aircraft to lua 2016-06-21 22:49:28 +02:00
Matthias Mailänder
1a2851bdaf Merge pull request #11316 from obrakmann/mp-allies02
Add Scott's Allies02 multiplayer mission as "Evacuation"
2016-05-30 19:49:07 +02:00
Matthias Mailänder
3e011a74af Rename C4Demolition to Demolition. 2016-05-26 19:27:40 +02:00
Oliver Brakmann
ebba7fdaf1 Add methods to retrieve player stats to Lua API 2016-05-19 23:08:01 +02:00
Oliver Brakmann
735975057d Add another way to call air strikes/paradrops to the Lua API 2016-05-19 23:08:01 +02:00
Oliver Brakmann
d743c23482 Add missing Requires to MissionObjectiveProperties 2016-05-19 23:08:01 +02:00
reaperrr
828dc61b67 Use already cached mobile in MobileProperties.Scatter 2016-04-24 20:12:51 +02:00
Matthias Mailänder
f37f1f1e0c Add Player.GetActors to the Lua API. 2016-04-10 19:52:41 +02:00
Taryn Hill
6582d0f480 Add ScriptTags trait
This allows actors to be tagged with arbitrary strings.
Also includes ScriptTagsInit and MapGlobal.ActorsWithTag
  which expose this functionality to map scripters.
2016-03-28 16:15:44 -05:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
Paul Chote
73b3f20921 Remove fragile alliances feature. 2016-01-30 20:47:50 +00:00
RoosterDragon
8e89a6a696 Simplify names, remove unused usings, remove redundant casts. 2016-01-17 21:35:36 +00:00
RoosterDragon
c0286bb147 Remove ActorMap.ActorsInWorld.
Prefer the more direct and efficient query on World.Actors instead.
2015-12-12 20:42:44 +00:00
atlimit8
0fc04b7a4a Make Mobile upgradable 2015-12-04 19:22:23 -06:00
Paul Chote
6304d72f44 Add enter behaviour customisation to C4Demolition. 2015-11-25 21:16:15 +00:00
RoosterDragon
e6e98d3aa2 Cache self.ToLuaValue in ScriptTriggers.
When making an Lua function call, any LuaCustomClrObject must be introspected via reflection in order to determine what to expose in Lua code. In OpenRA, we use these for any types that implement IScriptBindable, such as Actor.

Previously, we would need to pay the cost of this reflection for every individual Lua call an Actor used in its ScriptTriggers trait where it passed `self` as a parameter. This would be repeated every time. For performance, we now cache self.ToLuaValue in the trait and use that for all calls so we only pay the reflection cost once on trait construction. This removes a significant overhead in the Lua bridging code.
2015-11-12 22:18:19 +00:00
Paul Chote
dbd23c9d46 Merge pull request #9919 from obrakmann/fix9863
Fix bogus owner check in Lua API production code
2015-11-11 22:23:44 +00:00
Oliver Brakmann
b30bae08c0 Fix bogus owner check in Lua API production code 2015-11-09 19:31:19 +01:00
Matthias Mailänder
0e13472651 Merge pull request #9924 from cjshmyr/lua-islocalplayer
Added 3 Lua player API properties
2015-11-08 08:52:17 +01:00
Curtis Shmyr
2a6c87f81d Added 3 Lua player API properties 2015-11-07 12:17:09 -07:00
atlimit8
b6f17df260 Add ActorsHavingTrait<TTrait>([Func<TTrait, bool]) 2015-10-28 16:36:45 -05:00
Oliver Brakmann
6420a6ec8a Allow force-attacking things with the Lua API's Attack() method 2015-10-24 00:27:23 +02:00
Huw Pascoe
c95fc793e4 Moved Health trait to OpenRA.Mods.Common
In preparation for custom hitboxes.
2015-10-12 01:56:00 +01:00
abcdefg30
be50adbed3 Add a lua function to check for prerequisites 2015-10-06 22:14:23 +02:00
Pavel Penev
0ee38de4bb Rename HeliReturn
Rename HeliReturn to HeliReturnToBase to keep somewhat with the convention established for Plane- against Heli- oriented traits.
2015-10-01 20:15:50 +03:00
Pavel Penev
8a44366667 Merge Plane and Helicopter into Aircraft 2015-10-01 20:15:41 +03:00
atlimit8
09984683a7 Add ActorInfo.TraitInfo[OrDefault]<T>() requiring ITraitIfo types 2015-09-19 09:56:14 -05:00
atlimit8
8162fa27ab Add ActorInfo.HasTraitInfo<T>() requiring ITraitInfo types 2015-09-19 09:49:24 -05:00
atlimit8
85fab45451 Remove Actor.HasTrait<T>() 2015-09-19 09:49:23 -05:00
clemty
ea71620f47 Lua API documentation cleanup
also reduces amount of headings with only a single entry

SendAirStrike() - now listed under "Support Powers"
Guard() - now listed under "Combat"
FindResources() - now listed under "Movement"
Deploy() - now listed under "General"
SendParaTroopers() - now listed under "Support Powers"
Paradrop() - no listed under "Transports"

Teleport() should probably be listd under "Movement", but I don't know how to change that (currently listed under "General").

note that I changed "ScriptGlobal" to "ScriptPropertyGroup" for SendAirStrike() - I hope that does not screw up anything
2015-09-05 15:01:14 +02:00
clemty
2bbc1fcda4 LUA and trait documentation fixes
- Typo in documentation ("proximitry").
- Add spaces between sentences.
- Remove most occurrences of "  " (two spaces) unless clearly used as indendation
- Punctuation (although no fullstop after filenames like "notifications.yaml").
2015-08-24 19:41:15 +02:00
Pavel Penev
09f67d18bb Some internal "race" to "faction" renaming 2015-08-22 23:34:36 +03:00
penev92
4616828b28 Deprecate PlayerProperties.Race 2015-07-25 16:43:34 +03:00
Oliver Brakmann
4ed7a4ce8a Merge pull request #8659 from penev92/bleed_playerReference
Rename PlayerReference.Race to Faction
2015-07-14 20:15:56 +02:00
Matthias Mailänder
7447e0bf93 rename WRange to WDist 2015-07-09 10:55:38 +02:00
penev92
1d49c23af0 Rename PlayerReference.Race and LockRace to Faction and LockFaction 2015-07-05 23:08:49 +03:00
abcdefg30
57cea5aba1 Added a Capture function to lua 2015-07-02 21:48:30 +02:00
Matthias Mailänder
ae59198363 Merge pull request #8418 from abcdefg30/newlua_other_cool_stuff
Added even more lua functions
2015-06-28 12:37:06 +02:00
abcdefg30
4b39064661 Add a Demolish function to lua 2015-06-28 01:25:55 +02:00
abcdefg30
e1c674aeca Add EnterTransport function to lua 2015-06-28 01:25:36 +02:00
abcdefg30
6527d7751b Expose a Attack method to lua 2015-06-27 17:55:38 +02:00
penev92
2ab7abcee4 Add ScriptUpgradesCache class to enable maps to explicitly declare what upgrades their Lua scripts will use 2015-06-21 11:00:18 +03:00
abcdefg30
91f62b5741 Expose more PlayerProperties to lua 2015-05-27 16:51:28 +02:00
RoosterDragon
fb0cab7481 Cache results of TraitsImplementing calls.
If a class is caching the TraitsImplementing enumerable, instead cache the results of enumerating it to an array. The avoids having to enumerate the sequence each time it is needed.
2015-04-25 20:42:27 +01:00