Commit Graph

294 Commits

Author SHA1 Message Date
Paul Chote
b29b685058 Rename Fluent-related code to be more precise. 2024-10-04 15:11:27 +03:00
Matthias Mailänder
b8756c4737 Move CachedTransform to OpenRA.Primitives. 2024-08-03 11:56:43 +03:00
RoosterDragon
9d5d2ab493 RCS0056 - roslynator_max_line_length = 180 2024-07-29 21:56:36 +02:00
N.N
06cc47847d Spicebloom refactor
- pieces represent Min and Max instead of random interval
- More control where spice spread
- fix AoE in  SpiceExplosion weapon
- delay interval between each pieces

Co-Authored-By: Gustas <37534529+PunkPun@users.noreply.github.com>
2024-06-29 00:09:13 +03:00
Paul Chote
c0ae7ea497 Remove PaletteFromScaledPalette. 2023-11-15 20:52:03 +02:00
Paul Chote
ac53b89421 Remove D2kFogPalette. 2023-11-15 20:52:03 +02:00
RoosterDragon
11a892f991 Fix RCS1191 2023-10-30 23:31:33 +02:00
RoosterDragon
1a299d10ed Fix RCS1058 2023-10-30 23:31:33 +02:00
RoosterDragon
23f3f8d90c Add helper methods to locate actors that can be reached via a path.
Previously, the ClosestTo and PositionClosestTo existed to perform a simple distance based check to choose the closest location from a choice of locations to a single other location. For some functions this is sufficient, but for many functions we want to then move between the locations. If the location selected is in fact unreachable (e.g. on another island) then we would not want to consider it.

We now introduce ClosestToIgnoringPath for checks where we don't care about a path existing, e.g. weapons hitting nearby targets. When we do care about paths, we introduce ClosestToWithPathFrom and ClosestToWithPathTo which will check that a path exists. The PathFrom check will make sure one of the actors from the list can make it to the single target location. The PathTo check will make sure the single actor can make it to one of the target locations. This difference allows us to specify which actor will be doing the moving. This is important as a path might exists for one actor, but not another. Consider two islands with a hovercraft on one and a tank on the other. The hovercraft can path to the tank, but the tank cannot path to the hovercraft.

We also introduce WithPathFrom and WithPathTo. These will perform filtering by checking for valid paths, but won't select the closest location.

By employing the new methods that filter for paths, we fix various behaviour that would cause actors to get confused. Imagine an islands map, by checking for paths we ensure logic will locate reachable locations on the island, rather than considering a location on a nearby island that is physically closer but unreachable. This fixes AI squad automation, and other automated behaviours such as rearming.
2023-09-07 17:46:35 +03:00
RoosterDragon
93a97d5d6f Fix CA1851, assume_method_enumerates_parameters = true 2023-08-20 20:41:27 +02:00
Matthias Mailänder
c609c4af14 Extract text feedback messages. 2023-08-19 20:46:04 +03:00
RoosterDragon
f4af5c1764 Fix CA1852 2023-06-06 11:51:47 +03:00
RoosterDragon
8a285f9b19 Fix IDE0090 2023-04-08 16:51:51 +03:00
RoosterDragon
164abfdae1 Fix IDE0083 2023-04-08 16:51:51 +03:00
RoosterDragon
5254348819 Fix IDE0056 2023-04-08 16:51:51 +03:00
penev92
7a4ac01348 Changed SequenceReferenceAttributes to use nameof 2023-03-24 18:51:36 +01:00
Paul Chote
7cd4272350 Access sequences from Map. 2023-03-10 20:11:33 +02:00
RoosterDragon
d4135d608e Fix IDE0039 2023-02-27 10:09:11 +01:00
abcdefg30
5bf7fe852c Remove the copyright year numbers 2023-01-11 11:58:54 +02:00
Gustas
858d782af1 Simplify 'default' expression (IDE0034) 2022-10-11 17:40:05 +02:00
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
Eduardo Cáceres
79f321cb44 .Any(), .Count() -> .Count or .Length 2022-05-18 11:42:36 -05:00
Ivaylo Draganov
24b9482cc1 Add support for transient text notifications matching speech notifications 2022-04-30 12:39:29 +01:00
penev92
2bac492a65 Made all traitInfo fields readonly
This came up while working on the new documentation generation and comparing the results to ORAIDE's own code parser.
2022-04-26 22:37:12 +02:00
Matthias Mailänder
0e7ad43425 Remove unused parameters. 2022-04-01 23:30:26 +02:00
penev92
d37336456d Fixed inconsistent declaration modifier order 2022-01-20 22:10:28 +01:00
Matthias Mailänder
07815143f1 Fix CA1825 warnings on empty array initialisation. 2021-12-06 13:19:28 +01:00
penev92
f056cbba13 Added a bunch of TraitLocationAttributes
Also moved a few traits to their proper subfolders.
2021-10-16 20:52:50 +02:00
penev92
8ba6d13b2f Removed unused using directives 2021-10-15 13:12:33 +02:00
Matthias Mailänder
139af0c2bc Fix a crash when building placements are moved out of the map. 2021-10-12 10:47:34 +02:00
Paul Chote
a0d49729f5 Ignore modifiers when applying terrain damage. 2021-09-27 19:31:25 +02:00
Paul Chote
b3159d7515 Fix d2k map editor crash if spice is placed at the edge of map. 2021-09-09 10:19:17 +02:00
Paul Chote
7f94d67d39 Replace Map.CustomTerrain radar colors with IRadarTerrainLayer.
* TSVeinsRenderer now shows border cells on the radar
* BuildableTerrainLayer now uses the radar colors defined on the individual tiles
* CliffBackImpassabilityLayer no longer overrides the underlying terrain color.
2021-08-21 14:16:02 +02:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
Matthias Mailänder
da4bf7f191 Document and test the building placement preview for Dune 2000. 2021-06-12 12:43:03 +02:00
teinarss
10676be377 Replace F extension with string interpolation 2021-05-08 22:20:59 +02:00
Matthias Mailänder
5a0bcc01a6 Add a lint check for trait placement on hardcoded actor names. 2021-04-11 20:20:00 +02:00
Paul Chote
a1df91b665 Allow BuildingInfluence to track overlapping buildings in the same cell. 2021-04-10 14:28:31 +02:00
teinarss
d60c05eff3 Change to use pattern matching 2021-03-27 17:29:20 +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
c35e9fb016 Remove custom D2k spice variant logic and improve editor cursor sprite. 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
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
d09476c603 Remove custom palettes from building placement previews. 2021-02-12 02:08:30 +01:00
Paul Chote
e830d1e9c2 Fix Concrete placement on invalid terrain. 2021-01-30 14:48:04 +01:00
Paul Chote
82a9809192 Remove RenderSprites.Scale. 2021-01-21 18:22:11 +01:00
Paul Chote
f6b40b2bce Allow sequences to define a Scale factor. 2021-01-21 18:22:11 +01:00
Paul Chote
632af7c7e6 Support mixed indexed/BGRA terrain tiles. 2021-01-16 22:09:08 +01:00
Paul Chote
142870d78a Support multiple sheets in TerrainSpriteLayer. 2021-01-16 22:09:08 +01:00