Commit Graph

6237 Commits

Author SHA1 Message Date
Paul Chote
7c0e4b25ae Specify interaction bounds relative to the mod tile size. 2021-03-27 16:31:50 +01:00
reaperrr
e2a6b55d44 Move up Undamaged check in DamageState
A mere int comparison is obviously cheaper than
a comparison between two multiplications,
so pulling this above the checks of other damage states
allows us to bail early for undamaged actors.
2021-03-21 17:37:42 +01:00
reaperrr
c240c0a24b Only apply non-100 damage modifiers in InflictDamage
Profiling has shown that filtering them out early is cheaper
than applying those percentage modifiers anyway.

Additionally, profiling shows foreach loops to be cheaper
than LINQ here as well.
2021-03-21 17:37:42 +01:00
Matthias Mailänder
e13fd4816e Extract the directory if the registry value points to a filename. 2021-03-20 18:42:02 +01:00
Andre Mohren
1f6e0f582a Fixed aiming not propertly stopped. 2021-03-20 18:33:04 +01:00
Matthias Mailänder
bbbed49f82 Add a lint check for cursor definitions. 2021-03-20 17:37:16 +01:00
Paul Chote
5832ec76d4 Render integrated muzzle flashes as their own tint-ignoring animations. 2021-03-20 17:15:56 +01:00
Paul Chote
594e5b80d7 Add WithMakeOverlay trait. 2021-03-20 17:15:56 +01:00
Paul Chote
14a434975a Add facing support to WithAttackOverlay. 2021-03-20 17:15:56 +01:00
Paul Chote
6854b23bcc Add custom palette support to WithSpriteBody. 2021-03-20 17:15:56 +01:00
Paul Chote
0c52d275fa Add TransparentIndex to PaletteFromFile. 2021-03-20 17:15:56 +01:00
Paul Chote
e63b9b4986 Add condition support to ActorLostNotification. 2021-03-20 17:07:29 +01:00
Andre Mohren
f5f06b86ad ExplosionOnDamageTransition now Conditional. 2021-03-20 17:02:47 +01:00
Paul Chote
fcc3008b00 Implement proper TS Tiberium and Vein logic. 2021-03-20 16:45:41 +01:00
Paul Chote
0bdd46451e Overhaul resource layer logic:
* ResourceType trait has been removed.
* Simulation-related data is now defined on the
  ResourceLayer (which mods can subclass/replace).
* Support non-money resources by moving the resource
  values to the PlayerResources trait.
* Allow mods to disable the neighbour density override
  and instead always use the map-defined densities.
* Allow mods to define their own resource placement
  logic (e.g. allow resources on slopes) by subclassing
  (Editor)ResourceLayer.
* Improve ability to subclass/override ResourceRenderer
  by exposing more virtual methods.
2021-03-20 16:45:41 +01:00
Paul Chote
80e92849da Replace ResourceType with strings in interfaces/public methods. 2021-03-20 16:45:41 +01:00
Paul Chote
dcd8eccee4 Replace ResourceLayer references with IResourceLayer in traits/warheads. 2021-03-20 16:45:41 +01:00
Paul Chote
5adcbe4c78 Use IResourceLayer for editor resources. 2021-03-20 16:45:41 +01:00
Paul Chote
0b93556c06 Add resource updating methods to IResourceLayer. 2021-03-20 16:45:41 +01:00
Paul Chote
7e9d291223 Add IResourceRenderer interface. 2021-03-20 16:45:41 +01:00
Paul Chote
1dc26a9b8e Pass resource type and count to IAcceptResources instead of the value. 2021-03-20 16:45:41 +01:00
Paul Chote
3dbc6400a6 Use IResourceLayer in BaseBuilderBotModule. 2021-03-20 16:45:41 +01:00
reaperrr
adf1aeb06a Add support for pool-specific ammo pips decoration 2021-03-20 15:31:41 +01:00
teinarss
6b74093c04 Add readonly to structs 2021-03-14 15:17:57 +01:00
reaperrr
65c796dec7 Use Mobile.Pathfinder to reduce trait look-ups 2021-03-14 12:28:54 +00:00
reaperrr
503e706d45 Check for IsReloading in HasAnyValidWeapons
For Attack*.CanAttack().

Allows us to drop the additional check for armaments with ammo.
2021-03-14 12:28:54 +00:00
reaperrr
a1f974bd40 Save Mobile trait look-up in AttackBase 2021-03-14 12:28:54 +00:00
Paul Chote
cbea08e1fe Fix non-relative path handling in install logic. 2021-03-13 15:56:38 +01:00
Paul Chote
7694d0842b Fix two outdated comments. 2021-03-12 21:52:16 +01:00
Paul Chote
a90e6940ab Add sequence scale and alpha support to ShroudRenderer. 2021-03-12 21:52:16 +01:00
Paul Chote
96c3825b6a Add alpha support to TerrainSpriteLayer. 2021-03-12 21:52:16 +01:00
Paul Chote
d52ba83f96 Replace terniary null checks with coalescing. 2021-03-08 18:11:25 +01:00
reaperrr
2473b8763b Rename methods/activities with Visual in them
While they may be only 'visual' in terms of influence/cell grid,
they all do update CenterPosition, which is essentially the
actual world position of the actor.
'Visual' would imply that it only affects the position where the
actor is drawn, which is inaccurate.
Furthermore, using the term 'Visual' here would make
naming future methods/properties related to visual interpolation
unnecessarily complicated, because that's where we might
need a real 'Visual(Only)Position'.
2021-03-08 11:19:11 +01:00
teinarss
7073279ab8 Replace WebClient with HttpClient 2021-03-07 16:04:57 +00:00
teinarss
ed43071792 Compile engine and mod dlls as NET5 when not using mono 2021-03-07 16:04:57 +00:00
teinarss
4a1e4f3e16 Use expression body syntax 2021-03-07 13:00:52 +00:00
reaperrr
1a7a47fa08 Randomize AI idle harvester scan intervals 2021-02-28 18:58:03 +01:00
teinarss
c2279d3071 Change GetField calls to use nameof 2021-02-28 18:43:51 +01:00
teinarss
ed295ae315 Change throw exceptions to use nameof in parameter 2021-02-28 18:43:51 +01:00
teinarss
53b781960c Change FieldLoader.LoadUsing to use nameof 2021-02-28 18:43:51 +01:00
Paul Chote
0975102e92 Add Alpha support to sequences.
Alpha can specify a single value for the sequence
or values for each frame in the sequence.

AlphaFade: True can be specified to linearly fade
to transparent over the length of the animation.
2021-02-24 19:20:48 +01:00
Paul Chote
554486fb0b Replace projectile, WithShadow, WithParachute shadows with tint effects. 2021-02-20 02:08:40 +01:00
Trevor Nichols
536c130a39 Add MSADPCM audio format decoding support 2021-02-19 01:56:57 +01:00
Matthias Mailänder
e7cfd2765c Make UI cursors configurable. 2021-02-14 13:09:59 +00:00
abcdefg30
96c4554644 Remove GenericSelectTarget 2021-02-14 12:51:12 +00:00
Mustafa Alperen Seki
df94f0ec8b Add InitialActor to Carryall. 2021-02-14 12:47:08 +00:00
abcdefg30
9c29264be7 Drop FlyAttackRun targets when we don't have valid armaments against them 2021-02-12 02:17:26 +01:00
Paul Chote
d09476c603 Remove custom palettes from building placement previews. 2021-02-12 02:08:30 +01:00
Ivaylo Draganov
641b05eb21 Split settings panels logic and add support for custom panels 2021-02-08 11:25:50 +01:00
Paul Chote
fb0031d34a Rename remaining Stance references to PlayerRelationship. 2021-02-04 23:14:09 +01:00