Commit Graph

82 Commits

Author SHA1 Message Date
RoosterDragon
0c8bdff5be Formatting fixes.
Spaces to tabs, indents, etc.
2014-05-26 18:10:59 +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
Matthias Mailänder
187362e80e rename OpenRA.Support.Random aka XRandom to MersenneTwister 2014-05-18 21:53:21 +02:00
Pavlos Touboulidis
6eabc6adf5 Remove one line of forgotten commented-out code 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
63ec6d60e7 Refactoring to remove static Rules & SequenceProvider 2014-05-17 14:32:03 +03:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
reaperrr
55c1a93bf5 Follow-up on #4415. Fixed/precised some descriptions. 2014-01-04 14:31:29 +01:00
reaperrr
16fd5559e9 Un-hardcoded several radiuses and production-related count for units hanging around base 2014-01-04 01:19:03 +01:00
reaperrr
98f7995d00 Un-hardcoded excess power factor and excess power minimum 2014-01-04 01:16:00 +01:00
ScottNZ
aa5ea1a3ce Fix bots not deploying their mcv as a result of the DeployTransform change 2013-11-30 09:59:22 +13:00
Matthias Mailänder
da235d7aee .IsDead() includes the .Destroyed check 2013-11-17 23:32:32 +01:00
ScottNZ
3f117d751b Fix HackyAI confusing an empty sequence for null 2013-11-12 20:27:36 +13:00
ScottNZ
74e2baeb48 Fix a few spelling errors 2013-11-12 19:39:41 +13:00
ScottNZ
1394c1dcee Remove some misc redundancies 2013-11-12 19:39:39 +13:00
ScottNZ
8197f29606 Rename type parameter "ValueType" to "T" in HackyAI.cs 2013-11-12 19:39:39 +13:00
ScottNZ
00ec1ca87a Remove unused usings 2013-11-12 19:39:33 +13:00
ScottNZ
86a3e14f2d Remove constructor base() redundancies 2013-11-12 17:31:55 +13:00
ScottNZ
7c5f3cc0f1 Replace some Where-FirstOrDefault chains with a single call to FirstOrDefault 2013-11-12 17:21:31 +13:00
ScottNZ
aec50426d5 Fix some broken logic in AI air targeting code 2013-11-02 17:19:07 +13:00
Paul Chote
d272715c50 Revert "Filter AI targets based on what it can actually attack. Fixes #3763."
This reverts commit 4791f93d77.
2013-09-08 16:57:29 +12:00
buddytex
403e374b61 Removed default param usage. 2013-09-05 16:07:34 -05:00
Paul Chote
4791f93d77 Filter AI targets based on what it can actually attack. Fixes #3763. 2013-09-02 19:39:06 +12:00
Matthias Mailänder
1a33608b73 CleanSquads from units that got stolen 2013-08-29 22:26:34 +02:00
Paul Chote
fc324baf5f Rename IsReloadable -> ReloadsAutomatically. 2013-08-29 20:14:38 +12:00
Paul Chote
ff36aa301f Restore 6e13cb7f3 (lost while rebasing). 2013-08-29 20:14:37 +12:00
Paul Chote
c3da842b06 Initial cleanup of AirStates. 2013-08-29 20:14:37 +12:00
Paul Chote
d46c535850 Rename and simplify MayBeFlee -> ShouldFlee. 2013-08-29 20:14:37 +12:00
Paul Chote
7bcdf7d74b Merge CalculateFuzzy and CanAttack. 2013-08-29 20:14:37 +12:00
Paul Chote
f6730a6740 Remove StateBase.AverageUnitsPosition. 2013-08-29 20:14:36 +12:00
Paul Chote
ea1b5fc89d Remove explicit List<Actors> everywhere. 2013-08-29 20:14:36 +12:00
Paul Chote
5d142945eb Initial cleanup of StateBase. 2013-08-29 20:14:36 +12:00
Paul Chote
233ba81976 Change Squad.IsEmpty -> IsValid. 2013-08-29 20:14:36 +12:00
Paul Chote
fd311502f5 Rename IState interface method names. 2013-08-29 20:14:35 +12:00
Paul Chote
b2a91cc8f8 Initial cleanup of Squad. 2013-08-29 20:14:35 +12:00
Paul Chote
aadfd6979b Initial cleanup of BaseBuilder. 2013-08-29 20:14:35 +12:00
Paul Chote
d5f65eff88 Initial cleanup of fuzzy logic. 2013-08-29 20:14:34 +12:00
Paul Chote
e667ed8f1a Make a bit more sense of FindAndDeployMcv. 2013-08-29 20:14:34 +12:00
Paul Chote
e30cd96500 Initial HackyAI cleanup pass. 2013-08-29 20:14:34 +12:00
Paul Chote
de8c736ca4 Split HackyAI into a more manageable set of files. 2013-08-29 20:14:33 +12:00
Paul Chote
6e13cb7f3b Unacquire invalid AI targets. 2013-08-22 19:32:25 +12:00
Matthias Mailänder
1279b23f62 check null because Nullable object must have a value
fixes #3642
2013-08-09 22:06:28 +02:00
Paul Chote
048bed0a5e Rename ITeleportable -> IPositionable. 2013-07-21 17:35:41 +12:00
Paul Chote
ecc119cb29 Combine IHasLocation -> IOccupySpace, IMove -> ITeleportable. 2013-07-21 17:33:32 +12:00
Paul Chote
200fde77b1 Remove unnecessary IHasLocation checks in HackyAI.
Existing checks for ITargetable / Building / etc
make these redundant.
2013-07-21 17:31:00 +12:00
Paul Chote
800acdbdf2 Rename FindUnitsInCircle -> FindActorsInCircle. 2013-07-20 15:34:27 +12:00
Paul Chote
c1a0836640 Convert HackyAI to world coords. 2013-07-20 15:34:26 +12:00
Nico
d3e760659a fix #3569 , and possible many other bugs... if the place is not close to the base, instead of returning the error, continue to see if there is another place to build 2013-07-14 23:31:09 -03:00
Nico
01f72f4f44 Revert "allow the AI to base-walk without restrictions"
This reverts commit d08d3d6e23.
2013-07-14 23:14:09 -03:00
Paul Chote
935b829532 Tidy TargetableUnit and subclasses. 2013-07-10 19:22:11 +12:00
Paul Chote
9eaeeffae9 CenterLocation.ToCPos() -> CenterPosition.ToCPos(). 2013-07-08 21:52:26 +12:00