Commit Graph

118 Commits

Author SHA1 Message Date
ScottNZ
cc15d859e2 Have AI account for power outages 2014-08-27 18:45:09 +12:00
ScottNZ
b70395e27c Refactor more power and infiltration stuff. Create new power sabotage ability for spies in ra and ts. 2014-08-27 18:45:09 +12:00
UberWaffe
a1e51b71d6 AI Support Power Meta Data implemented.
Changes included:
Decision can be defined for the AI support powers, governing their targeting.
Each decision can be made up of multiple considerations.
2014-08-23 12:01:30 +02:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
UberWaffe
1375e56a32 Fixes D2K AI constantly repairing weather damage. 2014-08-13 16:13:34 +02:00
Taryn Hill
b6fd757672 Merge pull request #6030 from UberWaffe/CustomWarheads
Custom Warheads refactor
2014-08-03 10:35:36 -05: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
ScottNZ
692e3a9c88 Move Power out of Building and into its own trait
Conflicts:
	mods/ts/rules/structures.yaml
2014-08-03 18:53:51 +12:00
UberWaffe
b67a17add0 Fix AI not repairing buildings if struck by support powers. 2014-07-27 12:58:52 +02:00
Cr0s
0f363d4c0f Fixed typo in HackAI building placement code 2014-07-11 05:44:45 +04:00
Paul Chote
a46baeaf2b Reorganise AI base building logic.
- Now obeys defined structure percentages and limits.
- Faster.
- More readable and maintainable code.
2014-07-09 17:50:14 +12:00
Paul Chote
c8bd8336f7 Remove super-spammy debug messages. 2014-07-09 17:50:14 +12:00
Oliver Brakmann
33b916a713 Fix RepairBuilding not working for AI and Lua scripts
Fixes #5861
2014-07-07 19:43:52 +02:00
Matthias Mailänder
1e2e7bcf42 StyleCop 2014-07-05 09:00:20 +02:00
Matthias Mailänder
79dd9a9c6b get rid of the RallypointTestBuilding hack 2014-07-04 14:57:34 +02:00
Paul Chote
ce99f02ba6 Merge pull request #5678 from pavlos256/find-tiles-in-circle
Fix and optimize FindTilesInCircle
2014-07-04 10:27:37 +12:00
Pavlos Touboulidis
daed053a57 Fix and optimize FindTilesInCircle 2014-07-03 18:11:28 +03:00
Matthias Mailänder
5130723fcd remove the overly complicated configurable MCV actor name hack 2014-06-28 15:17:06 +02:00
Matthias Mailänder
aae428be2b throw with a more helpful error than NullReferenceException
closes #5622
2014-06-28 15:17:05 +02:00
Paul Chote
9487f49cd5 Replace WPos.ToCPos -> Map.CellContaining. 2014-06-27 23:30:40 +12:00
Paul Chote
7b52fa52b6 Replace CPos.CenterPosition -> Map.CenterOfCell. 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
7d24053f52 Introduce Order.SuppressVisualFeedback to cleanly disable flashes. 2014-06-26 23:14:13 +12:00
Paul Chote
d318d7c5e3 Add HackyAI support for multiple structure queues. 2014-06-26 23:14:13 +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
RoosterDragon
22abf9b4c4 Remove and sort usings. 2014-06-18 21:43:35 +01: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
ScottNZ
23f0e00bcc Now that we're on .NET 4 again, reintroduce optional parameter for RegisterNewSquad 2014-06-15 22:14:40 +12:00
Pavlos Touboulidis
060d5326ed Move FindTilesInCircle from WorldUtils to Map 2014-06-13 14:24:53 +03:00
Pavlos Touboulidis
c282fa1077 Move GetTerrainIndex/Info from WorldUtils to Map 2014-06-13 13:57:32 +03:00
Pavlos Touboulidis
092352729f Change terrain type from string based dictionaries to arrays 2014-06-13 11:20:54 +03:00
RoosterDragon
2e992a7310 Changed MiniYaml.NodesDict property into a method.
Method is now called ToDictionary.
- Cached a few invocations into locals which should prevent some redundant evaluation.
- Added ToDictionary overloads that take projection functions for the keys and elements, since several callsites were doing a subsequent Linq.ToDictionary call to get this.
2014-06-09 17:06:42 +01:00
Paul Chote
d8e5177a36 Merge pull request #5405 from RoosterDragon/min-max
Added MinBy, MaxBy, etc.
2014-06-09 17:42:01 +12:00
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
RoosterDragon
0ea3509ee4 Added MinBy, MaxBy, MinByOrDefault and MaxByOrDefault methods and replaced calls of the style OrderBy[Descending]().First[OrDefault]() which is not as performant. 2014-05-23 08:23:42 +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