Commit Graph

1479 Commits

Author SHA1 Message Date
Matthias Mailänder
68eec52cef Add TranslationProvider 2023-04-22 19:23:41 +02:00
Gustas
dc390a7301 Add IMove.MoveOntoTarget interface
In `TraitsInterfaces` we expose offset as WPos instead of CPos. In an upcoming PR we'll translate the same change to yaml.
2023-04-21 18:29:43 +02:00
Paul Chote
a0cd008da6 Fixed gen2 map importer Bounds calculations 2023-04-14 20:50:08 +03:00
penev92
3d2ba9d5bf Added abstract base class ImportGen2MapCommand
Split out ImportGen2MapCommand from ImportTSMapCommand, to also serve as a base for a RA2 map importer.
Also renamed TS importer to ImportTiberianSunMapCommand.
2023-04-14 20:50:08 +03:00
penev92
01e6babd54 Moved ImportLegacyMapCommand to OpenRA.Mods.Cnc
Also renamed to `ImportGen1MapCommand`.
Also moved Extensions.DistinctBy().
2023-04-14 20:50:08 +03:00
RoosterDragon
14c0d011ea Fix SA1414 2023-04-08 16:51:51 +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
bd2b3d9793 Fix IDE0074 2023-04-08 16:51:51 +03:00
RoosterDragon
cbd0583289 Fix IDE0062 2023-04-08 16:51:51 +03:00
RoosterDragon
023d80b94d Fix IDE0057 2023-04-08 16:51:51 +03:00
RoosterDragon
5254348819 Fix IDE0056 2023-04-08 16:51:51 +03:00
IceReaper
56c0680685 Fixed a typo. 2023-04-03 17:57:16 +02:00
RoosterDragon
bcfa0c9ae9 Review StyleCop rules.
- Enforce SA1604 ElementDocumentationShouldHaveSummary.
- Enforce SA1629 DocumentationTextShouldEndWithAPeriod.
- Turn off some rules covered by IDExxxx rules.
- Remaining rules are treated as part of OpenRA style.
2023-03-18 12:46:10 +02:00
penev92
e808549637 Removed a redundant cast - IDE0004 2023-03-14 17:43:32 +01:00
RoosterDragon
98c4eaca83 Fix IDE0032 2023-03-14 13:41:25 +02:00
Paul Chote
3b0b15abb9 Reduce duplication and allocations around CalculateFrameIndices. 2023-03-10 20:11:33 +02:00
Paul Chote
c35ab081ff Rewrite sequence loading logic.
Multiple layers of Lazy<T>ness are replaced with
an explicit two-part loading scheme.

Sequences are parsed immediately, without the need
for the sprite assets, and tell the SpriteCache
which frames they need. Use-cases that want the
actual sprites can then tell the SpriteCache to
load the frames and the sequences to resolve the
sprites.
2023-03-10 20:11:33 +02:00
Paul Chote
7cd4272350 Access sequences from Map. 2023-03-10 20:11:33 +02:00
Matthias Mailänder
f6e5bee334 Move JumpJet traits to the C&C library. 2023-03-07 12:24:05 +02:00
RoosterDragon
52fd564eac Fix some whitespace formatting issues: stray tabs or spaces.
Wrap some long lines on affected code.
2023-03-02 20:02:45 +02:00
RoosterDragon
8ee6957e6a Fix IDE0048 2023-03-01 21:56:28 +02:00
RoosterDragon
0b01b73111 Fix IDE0060 2023-02-28 21:21:40 +02:00
RoosterDragon
d4135d608e Fix IDE0039 2023-02-27 10:09:11 +01:00
Gustas
8d0fe52dd8 Remove unnecessary parentheses 2023-02-27 08:36:47 +02:00
RoosterDragon
99c289e063 Fix IDE0075 2023-02-24 22:00:25 +02:00
RoosterDragon
4f6095c3d4 Fix IDE0054 2023-02-24 22:00:25 +02:00
RoosterDragon
6d7c73d498 Fix IDE0019 2023-02-24 22:00:25 +02:00
RoosterDragon
80bb828fe5 Fix IDE0018 2023-02-24 22:00:25 +02:00
Gustas
049d0283f9 Remove TiberianSunRefinery
Also add IDockClientBody interface,
move WithDockingOverlay cnc -> common,
remove HarvesterDockSequence implementing classes
2023-02-18 16:35:15 +01:00
Gustas
f5aa2f153a Use Refinery reference in HarvesterDockSequence 2023-01-31 23:49:10 +01:00
Gustas
f56b0ea0d0 Moved HarvesterDockSequence notifications to the base class
And fix a minor oversight in VoxelHarvesterDockSequence.cs
2023-01-31 23:49:10 +01:00
Paul Chote
5b8f148c50 Simplify tileset-specific sequence definitions.
All magic behaviour for constructing sprite filenames
has been removed in favour of an explicit Filename
(and TilesetFilenames for tileset-specific sequences)
property.
2023-01-22 22:10:48 +02:00
Paul Chote
04c3cd6ec5 Reimplement sequence Defaults parsing:
The previous MiniYaml.Merge implementation interacted
poorly with yaml inheritance, making it complicated
(or impossible) to override certain keys from Defaults.

The new implementation is simpler: If a key is defined
it will be used. If it isn't, the default (if defined)
will be used. Defaults can be masked by making sure
the same key is defined (even with an empty value)
in the sequence.

This also fixes naming within the sequence code to
distinguish between images (a group of sequences),
sequences (defining a specific sprite/animation),
and filenames for a specific sprite/animation.
2023-01-22 22:10:48 +02:00
Gustas
dca07d240c Add INotifyDockHost and INotifyDockClient interfaces
Rename INotifyDocking to INotifyDockHost and extract INotifyDockClient from INotifyHarvesterAction
2023-01-20 10:43:18 +02:00
abcdefg30
5bf7fe852c Remove the copyright year numbers 2023-01-11 11:58:54 +02:00
Andre Mohren
0b94a0639e Implemented WestwoodCompression for AUD files. 2023-01-08 12:40:57 +00:00
Matthias Mailänder
19ecddcd86 Enforce use of 'var' instead of explicit type. 2022-12-28 23:02:04 +01:00
Andre Mohren
0c8ae195ae Removed offset and length utility commands, obsolete now. 2022-11-19 12:27:13 +01:00
Andre Mohren
f5b169ab54 Added ExtractMixSourceAction. 2022-11-19 12:27:13 +01:00
abcdefg30
75f642bd09 Introduce FirstEnabledConditionalTraitOrDefault 2022-10-14 13:50:57 +03:00
Gustas
858d782af1 Simplify 'default' expression (IDE0034) 2022-10-11 17:40:05 +02:00
Matthias Mailänder
6bd631618c Remove unnecessary value assignment (IDE0059) 2022-10-01 14:15:33 +03:00
RoosterDragon
3c66ca709a Fix some bugs in LongBitSet
- Use LongBitSetAllocator and not BitSetAllocator. Using the wrong allocator means all string based checks and displays would provide incorrect results.
- Remove LongBitSetAllocator.Mask which wasn't being calculated or Reset correctly. We can use world.AllPlayersMask to provide the same effect at use sites.
2022-09-29 21:58:17 +02:00
RoosterDragon
70c2ec15d3 Change spaces to tabs.
To follow code style.
2022-09-19 23:36:30 +02:00
Matthias Mailänder
d3a8b07f05 Remove unread private member (IDE0052) 2022-09-13 10:36:57 +03:00
Vapre
7754e486ee GpsDotEffect, ShouldRender, optimization. 2022-09-10 17:49:58 +02:00
Matthias Mailänder
e2284f660c Add documentation to TeslaZap. 2022-09-02 19:58:48 -05:00
RoosterDragon
1fc1bdc849 Fix frozen actors lacking tooltips if they have the cloak ability.
Since bbf5970bc1 we update frozen actors only when required.

In 8339c6843e a regression was fixed where actors created in line of sight would be invisible.

Here, we fix a related regression where cloaked units that are revealed, and then frozen when you move out of line of sight would lack tooltips.

The fix centers around the setting of the Hidden flag. In the old code this used CanBeViewedByPlayer which checks for visibility modifiers and then uses the default visibility. The bug with this code is that when a visibility modifier was not hiding the actor, then we would report the default visibility state instead. However the frozen visibility state applies here which means if the frozen actor is visible, then we consider the actor to be hidden and therefore tooltips will not appear. In the fixed version we only consider the modifiers. This means a visibility modifier such as Cloak can hide the frozen actor tooltips. But otherwise we do not consider the frozen actor to be hidden. This prevents a frozen actor from hiding its own tooltips in some unintended circular logic. Hidden now becomes just a flag to indicate if the visibility modifiers are overriding things, as intended.
2022-08-31 23:31:48 +03:00
Gustas
d3589c051d Add descriptions to all projectiles and warheads 2022-08-29 12:26:33 +03:00