Commit Graph

75 Commits

Author SHA1 Message Date
Paul Chote
6d6b21a0eb Convert Aircraft.Facing to WAngle. 2020-06-01 20:25:38 +02:00
abcdefg30
a5bc841355 Ignore the types of an exit when the production type is null or empty 2020-02-28 18:48:05 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
reaperrr
ee00954f2e Replace AmmoPool lookup methods with properties
And gave the more suitable names while at it.
This is more in line with how we do things in
other places.
2019-11-20 15:45:41 +01:00
Abdurrahmaan Iqbal
763e6d8109 Fix #17229: Refactor ReturnToBase.cs 2019-10-17 10:28:43 +02:00
reaperrr
801f5ba525 Rename FlyCircle to FlyIdle and make it tick TickIdle
It now handles both hovering and circling aircraft, for consistency.
2019-09-01 16:38:44 +02:00
tovl
c0d5cd750d Add missing target lines. 2019-08-10 12:17:36 +02:00
reaperrr
969be686a3 Fix aircraft with TakeOffOnResupply not taking off
...after auto-resupply.
2019-08-09 09:45:40 +02:00
Turupawn
3240b1e9eb Overhaul target line rendering:
- Targets are now defined by the activities
- Queued activities are shown
- Support custom attack colors
2019-08-05 02:53:09 +01:00
tovl
a38c2d9aae Allow ReturnToBase to exit if actor does not land at building. 2019-07-19 12:19:15 +02:00
reaperrr
cf4d73ab91 Revert FlightDynamics
This needs more thought and most parts might get superseded
by other approaches.

Kept CanSlide separation from CanHover.
2019-07-18 10:26:43 +02:00
reaperrr
5211eb25aa Improve handling of finished/cancelled Resupply 2019-07-15 23:48:54 +01:00
reaperrr
0ebeb30880 Replace various Aircraft fields with FlightDynamics
Replaces various booleans with a FlightDynamics flag list.
2019-07-05 00:03:36 +02:00
tovl
985020b4ad Simplify special exits of several acitivities. 2019-07-03 20:42:19 +02:00
tovl
3790169db9 Make Tick return bool 2019-07-03 20:42:19 +02:00
tovl
b9c302a73a Move ChildActivity handling into base Activity class. 2019-07-03 20:42:19 +02:00
tovl
71a035315c Prevent infinite loop between FlyAttack and ReturnToBase. 2019-06-30 18:04:43 +02:00
tovl
76422933f6 Allow forced landing on helipads and enforce takeoff otherwise. 2019-06-30 18:04:43 +02:00
tovl
adecd4ca87 Overhaul Land activity:
- Landing on an actor is no longer blocked by the underlying terrain
- Land in a nearby cell if the requested location is blocked
- Internally manages the fixed-wing landing sequence
- ProductionAirdrop transport waits until the exit is free before landing
2019-06-30 18:04:43 +02:00
reaperrr
db0c6d88bf Fix AbortOnResupply not working
Going by yaml rules, all(!) aircraft in the shipping
mods should be aborting any previous activities
on resupply. None actually did, due to this bug.
2019-06-20 15:01:30 +01:00
reaperrr
4f8f8cfb9d Merge HeliFly into Fly 2019-06-07 22:18:33 +01:00
reaperrr
0c2666b97e Streamline Land activity
Removed some redundant parameters, some redundant overloads
and made Land always consider LandAltitude relative to target.
2019-05-17 18:51:21 +01:00
reaperrr
14bd5ada1a Merge HeliLand into Land activity 2019-05-17 18:51:21 +01:00
reaperrr
bc0d8ca015 Remove ResupplyAircraft and AllowYieldingReservation
The few extra things those two activities did can be done
in Resupply, making them redundant.
2019-04-29 01:40:52 +01:00
tovl
c633e07410 Make aircraft occupy cells when landed. 2019-04-22 02:56:57 +02:00
reaperrr
c7eee6ae5d Improve ReturnToBase Activity.cs adherance
And make it use child activities for queueability.
2019-04-13 18:47:08 +02:00
reaperrr
8edf5b56ea Exclude dead actors from ChooseResupplier 2019-04-13 18:47:08 +02:00
reaperrr
2cdae0b380 Merge HeliReturnToBase into ReturnToBase 2019-04-13 18:47:08 +02:00
reaperrr
5ec47b47af Rename fields on Repairable traits
To bring them in line with RearmActors,
Repairable.RepairBuildings and
RepairableNear.Buildings have been renamed
to RepairActors.
Additionally, their RA-specific internal
defaults were removed and the FieldLoader
now requires them to be set explicitly.
2019-03-10 19:19:49 +01:00
tovl
a17cd0fa06 Replaced Canceled state with Canceling state. 2019-03-09 21:47:43 +00:00
tovl
8191a6566b Add missing self and optional pretick parameters to Queue, QueueChild and PrintActivity methods.
This means sequenceActivities needs to accept self as well.
2019-03-09 21:47:43 +00:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00
portablestew
a49287cc97 Possible fix for #14102: Consider airfield available if already reserved for the same actor 2019-02-15 13:59:53 +01:00
portablestew
2d4bad66ae Fix for #7083: Fly stops turning when target is inside the turn radius 2019-02-08 19:38:01 +01:00
Paul Chote
b2d960ec19 Pass target line color to inner move activities. 2019-01-26 22:53:46 +00:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
reaperrr
577fc1c409 Remove separate AircraftInfo caching from ReturnToBase
This extra info caching was overkill and most likely had zero effect on performance.
2018-11-04 00:25:55 +01:00
reaperrr
54d3656205 Move CalculateTurnRadius up in ReturnToBase
Just a slight readability improvement.
2018-11-04 00:25:55 +01:00
reaperrr
8f1d8a67cc Remove RearmBuildings from Aircraft and Minelayer
In favor of using Rearmable trait.
2018-11-02 22:28:08 +00:00
reaperrr
139d5efba8 Remove RepairBuildings from Aircraft
Require them to use Repairable trait instead.
2018-11-02 22:28:08 +00:00
abcdefg30
0b89883012 Prevent ReturnToBase from causing a divide by zero crash 2018-10-28 18:54:32 +01:00
reaperrr
77d03ce1e1 Replace Airfield/Helipad references with generic Resupplier in RTB activities
More generalization to prepare for possible future activity merger.
2018-08-12 14:24:21 +02:00
reaperrr
96032d1953 Generalize *ReturnToBase trait caching naming
Makes both copying changes as well as a potential future activity merger a little easier.
2018-08-12 14:24:21 +02:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
reaperrr
d602ec6485 Rename SelfReloads to AutoReloads 2017-11-12 19:48:06 +00:00
reaperrr
6f95080aa4 Add ReloadAmmoPool and adapt AmmoPool
Refactored and simplified Rearm activity.
Uses local Reload now.

Removed AmmoPool.SelfReloads.
2017-11-12 19:48:06 +00:00
reaperrr
5d58374962 Remove FlyCircleTimed activity
A FlyCircle overload is sufficient.
2017-08-31 18:03:59 +02:00
Jean-Rémy Buchs
1d1802a163 Add LandOnCondition to the trait Aircraft which triggers a landing and prevents takeoffs while the condition is met 2017-08-08 15:13:50 -05:00
Oliver Brakmann
ff8f204cac Check for dead destination airfield in ReturnToBase 2017-04-17 19:23:11 +02:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00