Commit Graph

178 Commits

Author SHA1 Message Date
Paul Chote
ae7cfa56b7 Restrict IActorPreviewInitInfo to ActorInit. 2020-06-19 17:57:56 +02:00
Paul Chote
b856613194 Add ISingleInstanceInit interface.
Inits that are logically singletons (e.g. actor
location or owner) should implement this interface
to avoid runtime inconsistencies.

Duplicate instances are rejected at init-time,
allowing simpler queries when they are used.
2020-06-19 17:57:56 +02:00
Paul Chote
803b930405 Change IFacing.TurnSpeed to WAngle. 2020-06-12 18:35:41 +02:00
Paul Chote
6adf45bcb4 Convert IFacing.Facing and TurnSpeed to WAngle. 2020-06-12 18:35:41 +02:00
Paul Chote
b38018af9c Replace IActorInit with an abstract class.
A shared ValueActorInit<T> is introduced to reduce duplication
in the most common init cases, and an ActorInitActorReference
allow actors to be referenced by map.yaml name.
2020-06-08 19:18:38 +02:00
Ivaylo Draganov
b8a9f41892 Add missing trait descriptions for cursors and unify the language 2020-05-31 00:12:04 +02:00
Paul Chote
7c6ec577dc Rewrite ActorInit queries. 2020-05-28 19:04:53 +02:00
Adam Mitchell
0a9eb1ff83 Fix units stuck on transit-only when resupplying 2020-04-17 11:13:46 +02:00
reaperrr
da4ed24064 Mobile ResolveOrder optimization
When the order is "Move", the other two 'if' checks
are redundant, so 'else if' makes more sense here.
2020-02-22 17:56:47 +00:00
Paul Chote
9dc4ea8541 Fix production door not closing if the actor stays on the exit cell. 2020-02-09 16:52:22 +01:00
Paul Chote
85a5b6cc17 Fix subcell crusher logic. 2020-02-09 13:18:57 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
tovl
2094142b7d Include tunnel check in CanStayInCell. 2020-01-04 16:04:27 +00:00
tovl
434c46058f Disallow units idling on service depot. 2020-01-04 16:04:27 +00:00
tovl
3236499fb7 Increase IMove.MoveTo call flexibility. 2019-12-13 23:51:03 +01:00
abcdefg30
142f823e6f Explain that CanEnterCell ignores 'subCell' if there is a free subcell 2019-11-21 14:13:17 +01:00
abcdefg30
25b7386f0d Let Mobile's CanEnterCell consider ToSubCell 2019-11-21 14:13:17 +01:00
abcdefg30
4717e98c48 Add a subCell parameter to IPositionableInfo.CanEnterCell 2019-11-21 14:13:17 +01:00
reaperrr
2de51ae73c Cache IPathFinder in Mobile at creation
Avoiding look-ups on every move order,
as well as reducing line lengths.
2019-11-03 20:53:29 +01:00
teinarss
c94cf61069 Fix OccupiedCells for units sharing cells 2019-10-31 21:49:07 +00:00
Paul Chote
5315f8603f Override selection if the mouse is over an already selected actor. 2019-10-30 14:53:23 +01:00
Paul Chote
0e4cb53ada Pass contextual information to TargetOverridesSelection. 2019-10-30 14:53:23 +01:00
tovl
d2991247a3 Add separate condition to mobile for disabling nudging only. 2019-10-28 19:35:32 +01:00
tovl
38caadfdf0 Clean up nudging code. 2019-10-28 19:35:32 +01:00
tovl
c4d1468f62 Make locomotor cache and nudging logic aware of mobile trait status. 2019-10-28 19:35:32 +01:00
Paul Chote
c15a0a54bb Don't consider unit creation as movement. 2019-10-20 16:38:25 +02:00
Paul Chote
69970d42f3 Prevent movement pausing at invalid position. 2019-10-19 13:11:00 +02:00
Paul Chote
ae34410c80 Replace MoveIntoWorld with ReturnToCell/AssociateWithAirfield. 2019-10-17 23:31:15 +02:00
Paul Chote
9b4d149a06 Revert "Suppress MoveIntoWorldInit for map-placed Mobile actors."
This reverts commit f0c28cc15334c7224630c375d669274f8da8fb31.
2019-10-17 23:31:15 +02:00
Paul Chote
5eaa99827d Suppress MoveIntoWorldInit for map-placed Mobile actors. 2019-10-07 19:02:48 +02:00
abcdefg30
56726a0533 Add an ICreationActivity interface 2019-10-06 14:42:50 +01:00
tovl
ac6431acf8 Clean up usage of CancelActivity. 2019-10-05 19:07:54 +02:00
teinarss
d34bce9eab Remove CanEnterCell from OccupiedCells 2019-10-05 14:37:54 +02:00
teinarss
9bfc324c04 Mark cells that have changed MovementType as dirty 2019-10-05 14:37:54 +02:00
tovl
ed7667683b Fix deployed units being nudgeable. 2019-09-19 20:52:13 +02:00
tovl
4a609bbee8 Allow units to give way when path is blocked by oncoming unit. 2019-09-15 17:51:34 +01:00
reaperrr
07de3ba5e0 Change default preview facing to 96
92 is not a multiple of 8, and all sprite actors
in the official mods have at most 32 facings.
2019-08-27 22:59:22 +02:00
tovl
2d394f33b8 Fix units from transports appearing at load point. 2019-08-19 00:33:38 +02:00
Hedog
2a6f2bbe0e Update movement inside leap to show attack animation 2019-08-17 12:42:06 +02:00
teinarss
4193247169 Reset Locomotor cache on world loaded 2019-08-10 17:34:11 +02:00
Tomase
98602cb1cb Change impassable terrain to short.max 2019-08-10 17:34:11 +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
8c7ff3b5b0 Make VisualMove uninterruptible by making Turn a Child of Drag. 2019-08-04 11:48:59 +02:00
teinarss
cc84daacea Added cache for cell cost and blocking 2019-07-26 15:54:22 +02:00
teinarss
2ddf9fa826 Using Locomotor instead of Info for pathfinding 2019-07-26 15:54:22 +02:00
reaperrr
30c2e6b4d2 Remove Resupply re-queueing hack from Aircraft
By preventing that other traits can remotely cancel Resupply
or ReturnToBase.
2019-07-21 16:29:38 +02:00
tovl
c5558e2145 Remove SequenceActivities. 2019-07-20 23:41:31 +02:00
tovl
b9c302a73a Move ChildActivity handling into base Activity class. 2019-07-03 20:42:19 +02:00
Paul Chote
98125a3d94 Fix Mobile conditions.
The explicit IObservesVariables implementation was hiding
the base PausableConditionalTrait variable initialization.
2019-06-24 16:25:40 +02:00
Paul Chote
c853e8c5d6 Disable non-force move for deployed units. 2019-06-08 02:09:30 +02:00