Commit Graph

48 Commits

Author SHA1 Message Date
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
7c6ec577dc Rewrite ActorInit queries. 2020-05-28 19:04:53 +02:00
Paul Chote
86f61298e6 Replace ITraitInfo interface with TraitInfo class. 2020-05-21 13:01:04 +02:00
abcdefg30
15b2d6b9e0 Let all Positionable traits notify visual position changes 2020-01-18 23:07:23 +00:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
abcdefg30
4717e98c48 Add a subCell parameter to IPositionableInfo.CanEnterCell 2019-11-21 14:13:17 +01:00
tovl
4a609bbee8 Allow units to give way when path is blocked by oncoming unit. 2019-09-15 17:51:34 +01:00
tovl
2d394f33b8 Fix units from transports appearing at load point. 2019-08-19 00:33:38 +02:00
teinarss
277906c657 Fixes on blocking logic 2019-08-10 17:34:11 +02:00
teinarss
cc84daacea Added cache for cell cost and blocking 2019-07-26 15:54:22 +02:00
Mustafa Alperen Seki
ccc68b0272 Make Crate trait public. 2019-06-02 15:34:06 +02:00
Paul Chote
78a70be0d4 Fix and enable SA1133, SA1134 style rules. 2019-05-24 10:47:57 +02:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Chris Forbes
51e000599a Convert crushclasses to bitset 2018-07-28 21:28:46 +01:00
reaperrr
81343926b6 Split Locomotor trait from Mobile
Add GrantConditionOn*Layer traits

This allows to
- drop some booleans from Locomotor
- drop a good part of the subterranean- and jumpjet-specific code/hacks from Mobile
- grant more than 1 condition per layer type (via multiple traits)
- easily add more traits of this kind for other layers
2018-05-03 10:49:21 +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
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +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
reaperrr
8533debc44 Require explicit INotifyAddedToWorld and INotifyRemovedFromWorld 2017-10-07 10:17:11 +02:00
reaperrr
28e1f391e0 Make ITick require explicit implementation 2017-09-16 15:51:37 +02:00
abcdefg30
ce97b3a3a2 Fix IPositionableInfo not inheriting IOccupySpaceInfo 2017-02-09 22:04:33 +01:00
abcdefg30
a385835939 Fix GiveUnitCrateAction being limited to MobileInfo 2017-02-09 22:04:32 +01:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
bcb3d52eb0 Convert Parachutable to conditions. 2016-12-13 19:30:38 +00:00
Zimmermann Gyula
ecc65e4fe4 Do not apply the cell's Z offset twice during crate positioning. 2016-08-27 16:41:52 +02:00
reaperrr
fd5a597966 Move Render traits to Traits.Render namespace 2016-04-15 20:43:04 +02:00
Bynnar18
a9ffe0a779 Paradrop Production 2016-03-30 02:46:19 +02:00
Oliver Brakmann
59d9eeaa08 Merge pull request #10795 from Mailaender/screenmap-bounds-crash
Fixed screen map updates for invisible mobile actors
2016-02-27 17:52:49 +01:00
Matthias Mailänder
9734054582 Reduce duplication. 2016-02-27 14:10:17 +01:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
Matthias Mailänder
3885f0b559 Fix screen map updates for boundless actors. 2016-02-21 11:34:33 +01:00
abcdefg30
fe5754e2bd Change the parameters of ICrushable.CrushableBy 2016-02-14 18:51:59 +01:00
abcdefg30
f21d1f52e7 Make the ICrushable implementation explicit 2016-02-14 18:51:57 +01:00
abcdefg30
8b59ce4dc2 Add a new INotifyCrushed interface 2016-02-14 18:51:56 +01:00
abcdefg30
e343803810 Remove an unnecessary Where in Crate.cs 2016-02-14 18:51:55 +01:00
RoosterDragon
8e89a6a696 Simplify names, remove unused usings, remove redundant casts. 2016-01-17 21:35:36 +00:00
atlimit8
3d2aa751a3 TraitInfoInterface base for interfaces implemented by trait infos 2015-12-07 18:22:43 -06:00
reaperrr
2f69711341 Rename ActorMap *UnitsAt* occurences to *ActorsAt*
These enumerate actors in general, not just mobile actors (which the term 'unit' usually refers to).
2015-10-16 00:07:06 +02:00
atlimit8
09984683a7 Add ActorInfo.TraitInfo[OrDefault]<T>() requiring ITraitIfo types 2015-09-19 09:56:14 -05:00
atlimit8
85fab45451 Remove Actor.HasTrait<T>() 2015-09-19 09:49:23 -05:00
atlimit8
8250f223c4 More HashSet trait fields & Lint support 2015-09-05 16:59:30 -05:00
Taryn Hill
6fa1f757b0 Add Map.DistanceAboveTerrain(WPos) and Actor.IsAtGroundLevel() extension method 2015-08-01 11:48:47 -05:00
Oliver Brakmann
eada254ad3 Fix crates dying while not in the world
On large maps, it can take the delivery aircraft longer than the crate's
lifetime to reach the paradrop location, so the crate will be destroyed while it's still in the aircraft, leading to an attempt to get a trait from a destroyed object in the Paradrop trait.

This fixes the lifetime logic of crates so that the lifetime will only be increased when the crate is actually in the world. This will probably also better reflect the intention behind the Lifetime property, which I assume was meant to be the time the crate would be on the map available for pickup, rather than the lifetime of the actor itself.
2015-07-29 12:35:58 +02:00
Matija Hustić
72e8e08f48 Step in the direction of RA2 paratroopers. 2015-07-14 20:39:06 +01:00
Paul Chote
585a43fd8f Rename Actor.Destroy/Destroyed to Dispose/Disposed. 2015-05-29 19:08:38 +01:00
Paul Chote
9e5e1f1a89 Add methods to IOccupySpaceInfo. 2015-05-15 17:08:31 +01:00
penev92
52cc69fd1f Move Crate, CrateSpawner and all CrateActions to Mods.Common 2015-01-18 16:40:55 +02:00