Commit Graph

67 Commits

Author SHA1 Message Date
penev92
7c1ef2231d Rename RaceInit to FactionInit 2015-07-25 00:39:31 +03:00
reaperrr
61c0b5d59b Make refinery unblock cell customisable 2015-07-22 02:31:29 +02:00
reaperrr
62e05cf618 Fix for potential infinite loop freeze 2015-07-22 02:31:28 +02:00
David Jiménez
787609d51e Improved the performance and intelligence of resource harvesting by
refactoring the Harvesters' pathfinding. Now they in first place assess
which is the closest resource inside their search area and then a path is
calculated

Changed the way harvesters find resources by always trying to find the
closest resource to their refinery.

Changed the strategy of finding to find resources in Annulus.
2015-07-22 02:31:26 +02:00
penev92
bb648decc3 Rename Player.Country to Player.Faction 2015-07-15 04:06:52 +03:00
Matija Hustić
72e8e08f48 Step in the direction of RA2 paratroopers. 2015-07-14 20:39:06 +01:00
penev92
2e04fb5ddd Rename Faction trait members
Rename Faction.Race to Faction.InternalName
2015-07-14 18:50:39 +03:00
reaperrr
ba2181e523 Make delay for re-checking for available refinery customisable and increase default 2015-07-12 23:36:58 +02:00
reaperrr
8fdeb04569 Extract HarvestResource into own file and cache trait lookups in
constructor
2015-07-12 23:36:57 +02:00
reaperrr
c8661ca2f9 Cache FindResources trait lookups in constructor 2015-07-12 23:36:56 +02:00
reaperrr
8253573ced Cache lookups in DeliverResources constructor
Only re-check for refinery every 5 seconds instead of every second.
2015-07-12 22:36:24 +02:00
Matthias Mailänder
56e9bcd96e rename RangeSquard to LengthSquared 2015-07-09 21:16:01 +02:00
Matthias Mailänder
413baf9d8b rename WDist.Range to WDist.Length 2015-07-09 10:55:38 +02:00
Matthias Mailänder
7447e0bf93 rename WRange to WDist 2015-07-09 10:55:38 +02:00
reaperrr
76aaafe37c Added WithHarvestAnimation + WithDockingAnimation
Removed RenderHarvester.
2015-07-04 22:08:06 +02:00
Matthias Mailänder
e86b8d0dde avoid an unneccessary and frequent trait lookup 2015-07-02 20:22:36 +02:00
pevers
6ed0273656 Actors will lose targets and AI won't follow indefinitely 2015-06-28 19:11:53 +02:00
Paul Chote
0677c309f3 Move Shroud.IsTargetable to Player. 2015-06-19 22:02:08 +01:00
Oliver Brakmann
206c33ed41 Merge pull request #8226 from pchote/actor-disposal
Dispose traits when destroying an actor.
2015-06-02 19:33:22 +02:00
Matthias Mailänder
ea5003cd2d add new long WRange.RangeSquared to avoid integer overflows 2015-05-31 23:51:30 +02:00
Matthias Mailänder
723c2d82c8 fix a possible NRE 2015-05-31 15:58:55 +02:00
Paul Chote
585a43fd8f Rename Actor.Destroy/Destroyed to Dispose/Disposed. 2015-05-29 19:08:38 +01:00
penev92
463ac0ddc2 Enable Repairable actors to call for transport to the repair pad 2015-05-26 12:44:18 +03:00
abcdefg30
cd9af39662 Merge pull request #8044 from penev92/bleed_withSpriteBody
Retire RenderFlare and WithFire traits
2015-05-03 11:19:02 +02:00
penev92
c5dead9098 Introduce WithSpriteBody trait
Add upgrade rules

Add ISpriteBody
2015-05-03 11:54:27 +03:00
abcdefg30
95e3713b69 Add an upgrade rule 2015-05-01 14:16:20 +02:00
abcdefg30
8d2307db83 Convert the float health percentage to an int one 2015-05-01 14:16:19 +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
RoosterDragon
500a33b590 Cache some trait lookups that occur frequently. 2015-04-25 20:41:49 +01:00
reaperrr
7ddd6aab93 Make helicopters move backwards when target is too close
'Too close' as in closer than weapons' MinRange.
2015-04-08 00:51:24 +02:00
Oliver Brakmann
b1d3486561 Expose Plane turn-to-attack delay to yaml 2015-04-04 00:10:06 +02:00
Oliver Brakmann
32ed63727d Revert "Expose Plane turn-to-attack delay to yaml."
This reverts commit 02da41e5c5.
2015-04-03 23:42:35 +02:00
Taryn Hill
02da41e5c5 Expose Plane turn-to-attack delay to yaml.
Require Plane in some ctors.
2015-04-01 00:12:20 -05:00
reaperrr
b52d055eec Misc constructor caching
Cache trait look-ups in constructor for various other traits and
activities.
2015-03-27 13:47:04 +01:00
reaperrr
1e9d1a6cb7 Cache trait look-ups in the constructor where possible for Air activities/traits 2015-03-27 13:47:04 +01:00
reaperrr
38d5163062 Refactors LimitedAmmo to AmmoPool.
Removes Reloads trait.

This enables adding multiple AmmoPools via @ differentiators and
Name which adds the possibility to assign each armament to a specific
ammo pool.

Furthermore, this moves all Reloads functionality onto AmmoPool.

Now a combination of all three is possible on a single actor: no limited
ammo, limited ammo that can reload on its own, and limited ammo which
needs to be reloaded at a rearm actor.

Additionally moves RearmSound from Minelayer to AmmoPool.
2015-03-26 23:21:01 +01:00
RoosterDragon
1515ac54f6 Enforce a line length limit. 2015-03-19 17:20:34 +00:00
reaperrr
a14bf8622f Merge pull request #7570 from Mailaender/mods-common
Moved more traits to Mods.Common
2015-03-15 19:53:13 +01:00
Matthias Mailänder
737a0e0b67 move common traits 2015-03-15 18:25:28 +01:00
David Jiménez
ea32c20450 Changed the harvester heuristic so that now takes into account the distance from the initial search location. This makes harvesters somewhat more "intelligent" and gather nearer resources. Also solved several regressions introduced in the recent changes in the Pathfinder 2015-03-12 12:28:34 +01:00
Paul Chote
8c4ea20636 Merge pull request #7430 from Rydra/upstream/pf-optimized
[Discussion PR] Complete refactor of Pathfinder
2015-03-03 19:50:25 +00:00
David Jiménez
54ae572303 - Introduced Unit Testing capabilities to the PathFinder trait and algorithm.
Introduced also a small Unit test project to prove it.

- Separated caching capabilities from PathFinder class to increase cohesion and maintainability.
Refactored the pathfinding algorithm by extracting methods based on responsibilities like
calculating costs and reordering functions. These changes should provide a in average a small increase in
pathfinding performance and maintainability.

- Optimized the pathfinder algorithm to reuse calculations like the
MovementCost and heuristics.

- Introduced base classes, IPathSearch and IPriorityQueue interfaces,
and restructured code to ease readability and testability

- Renamed the PathFinder related classes to more appropriate names. Made the
traits rely on the interface IPathfinder instead of concrete PathFinder
implementation.

- Massive performance improvements

- Solved error with harvesters' Heuristic

- Updated the heuristic to ease redability and adjustability. D can be
adjusted to offer best paths by decreasing and more performance by
increasing it

- Refactored the CellLayer<CellInfo> creation in its own Singleton class

- Extracted the graph abstraction onto an IGraph interface, making the
Pathfinder agnostic to the definition of world and terrain. This
abstraction can help in the future to be able to cache graphs for similar
classes and their costs, speeding up the pathfinder and being able to feed
the A* algorithm with different types of graphs like Hierarchical graphs
2015-03-03 20:11:11 +01:00
Paul Chote
59d06a22bf Change "Cannot deploy here" to a notification. 2015-03-03 18:45:44 +00:00
ScottNZ
582b6635ff Brace style fixes 2015-02-13 02:32:49 +13:00
penev92
494b600ed8 Move refinery and harvester logic to Mods.Common;
Remove unused interface IAcceptOreDockAction
2015-02-06 13:23:07 +02:00
Oliver Brakmann
c092c0231f Merge pull request #7316 from reaperrr/move-stuff28
Moved Upgrades, SupportPowers and some misc features to Mods.Common
2015-01-15 20:57:40 +01:00
abcdefg30
15c07d94ac Add repairing and unit repaired sounds to fix 2015-01-15 20:16:24 +01:00
reaperrr
e8fbfc366a Moves some misc traits/activities to Mods.Common, moves some RA traits into the Traits folder 2015-01-15 13:18:12 +01:00
penev92
e42cf58cb1 Add IgnoresVisibility field to AttackBase 2015-01-14 21:26:54 +02:00
Taryn Hill
0dc65e5cf3 Merge pull request #7301 from abcdefg30/yearnumbers
Updated year numbers in all files.
2015-01-10 17:57:42 -07:00