Commit Graph

179 Commits

Author SHA1 Message Date
reaperrr
840eb7006d Make actors ignore ReturnToBase order if already on resupplier 2019-04-13 18:47:08 +02:00
reaperrr
717b8a24f1 Fix ReturnToBase restarting on each hotkey press
Now that the RTB process is a single activity with childs,
it's relatively easy to prevent the activity from restarting
every time the deploy/RTB hotkey is pressed.
2019-04-13 18:47:08 +02:00
reaperrr
b24e4510c8 Make aircraft without TakeOffOnResupply always land
on resupplier, even if ammo is full, when given a
"ReturnToBase" order via deploy key.
In other words, in that case treat the RTB order like an
explicit "Repair" or "Enter" order.
2019-04-13 18:47:08 +02:00
reaperrr
2cdae0b380 Merge HeliReturnToBase into ReturnToBase 2019-04-13 18:47:08 +02:00
tovl
25bc3ae2d2 Fix chinook being unable to land. 2019-03-31 18:25:14 +02:00
reaperrr
a10af382b4 Add plumbing for notifying traits of movement
More precisely, about start and stop of movement.
2019-03-30 16:24:47 +00:00
reaperrr
32ab822786 Fix ResupplyAircraft being cancelable by Stop command
It is now immediately queued again, as long as the actor
has not finished rearming/repairing yet.
2019-03-30 16:44:04 +01:00
reaperrr
b92aef5754 Make Aircraft.GetActorBelow() LandAltitude-aware 2019-03-30 16:44:04 +01:00
reaperrr
3211119027 Simplify ResupplyAircraft
By moving part of the take-off prevention (when TakeOffOnResupply
is set to false) to Aircraft.

Main reason & advantage is that dropping the 'WaitFor' child
makes this activity always end when resupplies are done,
which makes it more compatible with being queued as ChildActivity
itself (for example by ReturnToBase).
2019-03-30 16:44:04 +01:00
tovl
e2e4caf0ba Make Aircraft.OnBecomingIdle accesible. 2019-03-22 19:02:05 +01:00
tovl
64cec4a0ad Revise AttackMoveActivity. 2019-03-22 19:02:05 +01: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
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
reaperrr
2ac9d92ce7 Remove some legacy activity cruft from Aircraft
You only need to look at the RTB activities to tell that
Aircraft doing its own stuff here was somewhat redundant
and just made things worse regarding debugging and
code consistency.
2019-03-09 12:12:51 +00:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00
Paul Chote
cd92e94d74 Remove Order.TargetLocation from Aircraft. 2019-03-04 18:08:42 +00:00
tovl
dc9c758f12 unreserve when not queued 2019-02-22 21:48:34 +00:00
tovl
2975738477 make ReturnToBase order queueable 2019-02-22 21:48:34 +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
Paul Chote
70f4c51a17 Add AttackMove workaround for Aircraft. 2019-01-27 00:19:50 +00:00
Paul Chote
2080c72ab9 Define plumbing to pass initial target positions to inner move activities. 2019-01-26 22:53:46 +00: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
Mustafa Alperen Seki
00faccdecc Fix LandOnCondition causing stopping after changing altitude. 2018-12-26 17:44:45 +01:00
Paul Chote
4723e5ddb9 Expose common actor Inits in the map editor. 2018-12-08 22:53:13 +01:00
Paul Chote
f6768fe624 Remove legacy editor actor properties plumbing. 2018-12-08 22:53:13 +01:00
reaperrr
ac3e601edf Use INotifyIdle on Aircraft
For now only to trigger landing or circling.
2018-12-05 09:20:58 +13:00
reaperrr
d8220b390a Add IdleTurnSpeed to Aircraft
Instead of hardcoding 1/3 of normal TurnSpeed on HeliFlyCircle.
2018-12-05 09:20:58 +13:00
reaperrr
b8d3c9f73a Fix aircraft being repaired mid-air
Repairable was originally written for ground actors,
so it's both safer and much easier to just handle this in Aircraft directly.
2018-11-19 21:40:10 +00:00
reaperrr
92912c6c94 Add TurnToDock to Aircraft
Instead of hard-coding a turn before VTOLs
land/dock on resupplier.
2018-11-04 00:25:55 +01:00
reaperrr
e42094625d Merge AttackPlane and AttackHeli into AttackAircraft 2018-11-03 11:37:23 +00: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
Inq8
fec9fe1ad4 Aircraft Takeoff & Landing Sounds (Fixed-Wing)
Added Takeoff & Landing sounds to planes.

Changed Aircraft Trait, TakeoffSounds & LandingSounds are now arrays & accept a list of sound files & it will randomly select one to play.

Changed/fixed take off & landing sounds to originate from the aircraft location, rather than play a global sound.
2018-10-12 14:29:53 +02:00
Mustafa Alperen Seki
faa35946b8 Make Exit Conditional 2018-10-08 22:00:39 +01:00
Paul Chote
588a5d784f Add IMove.EstimatedMoveDuration. 2018-10-07 18:46:21 +02:00
reaperrr
8144fca5be Merge repair and rearm anim traits into WithResupplyAnimation
This is the safest approach to avoid conflicts/visual glitches when the host is responsible for both resupply types.
The new trait will simply play a looping animation as long as the actor is resupplying in any form.
2018-09-27 16:38:08 +02:00
Paul Chote
0a507f3d33 Allow deploy orders to be queued from the command bar. 2018-09-10 19:42:24 +02: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
Paul Chote
883834f1c3 Remove order.TargetActor from Aircraft. 2018-05-30 18:06:59 +02:00
Chris Forbes
dddd057e3d Add IPositionable.CanExistInCell
This is like CanEnterCell, but doesn't take into account conflicting
actors, etc.
2018-04-10 01:01:53 +02:00
abcdefg30
bed6b26428 Fix FallsToEarth not accounting for effective ownership 2018-02-17 12:21:55 +01:00
Paul Chote
2fccfdf1ee Add support for disabling IIssueDeployOrders. 2018-01-28 18:06:30 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Paul Chote
7dea5e28af Remove ReturnToBase order feedback if no RearmBuildings are defined.
ReturnToBase requires RearmBuildings to function.
2018-01-14 23:25:47 +01:00
GSonderling
488cec64b8 Added support for filtering exits by production type. 2017-12-13 04:08:52 +01:00
RoosterDragon
62ab6ae6f1 OccupiedCells and TargetableCells must return arrays, not just enumerables.
This allows callers to efficiently enumerate these returned collections without the allocation and overhead imposed by the IEnumerable interface. All implementations were already returning arrays, so this only required a signature change.
2017-12-07 20:39:30 +02:00
Matthias Mailänder
b27289106d Don't give an okay voice when not allowed to move into shroud. 2017-10-16 14:38:26 +02:00
Paul Chote
d967c564a2 Remove TargetActor and TargetLocation from order issuing. 2017-10-15 19:07:46 +02:00
Raffael Zica
f2b5040d30 YamlException is now thrown if WeaponInfo can not be found in Ruleset.Weapons
Removed invalid spacing at the end of the line 36 in ThrowsShrapnel

Prevented NullReferenceException in cases where weapons aren't optional
2017-10-14 14:12:08 +02:00