Commit Graph

548 Commits

Author SHA1 Message Date
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
CrazyAlex25
2d05e10819 Modify build properties 2021-04-12 00:44:17 +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
Andre Mohren
3f510b6d93 Make ISpriteLoader aware of the source file name. 2021-03-27 17:36:59 +01: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
teinarss
6b74093c04 Add readonly to structs 2021-03-14 15:17:57 +01: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
teinarss
ed295ae315 Change throw exceptions to use nameof in parameter 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
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
Paul Chote
b0aa32cd1b Support multiple palettes in TerrainSpriteLayer. 2021-01-16 22:09:08 +01:00
Paul Chote
53db1230ab Move default tileset parsing to Mods.Common. 2021-01-11 21:57:55 +01:00
Paul Chote
995c33a942 Remove Ruleset.TileSet. 2021-01-11 21:57:55 +01:00
Paul Chote
2782620081 Add ITemplatedTerrainInfo interface. 2021-01-11 21:57:55 +01:00
Paul Chote
87790069e9 Add ITerrainInfo interface. 2021-01-11 21:57:55 +01:00
Paul Chote
0a374e2264 Move ownership of tile sprites to the terrain renderer. 2021-01-11 21:57:55 +01:00
Paul Chote
8edd9de278 Replace ITintableRenderable with IModifyableRenderable. 2021-01-06 00:06:51 +01:00
teinarss
5e74e58b22 Add support for dotnet core for Windows 2021-01-01 19:42:01 +01:00
Paul Chote
62fa3b7c9c Rename SpriteFrameType enums. 2020-12-25 18:51:25 +01:00
Paul Chote
ce09b402d0 Fix definition and use of non-indexed sprite color channels.
Our SpriteFrameType names refer to the byte channel order rather than
the bit order, meaning that SpriteFrameType.BGRA corresponds to the
standard Color.ToArgb() etc byte order when the (little-endian) integer
is read as 4 individual bytes.

The previous code did not account for the fact that non-indexed Png
uses big-endian storage for its RGBA colours, and that SheetBuilder
had the color channels incorrectly swapped to match and cancel this out.

New SpriteFrameType enums are introduced to distinguish between BGRA
(little-endian) and RGBA (big-endian) formats, and also for 24bit data
without alpha. The channel swizzling / alpha creation is now handled
when copying into the texture atlas, removing the need for non-png
ISpriteLoader implementations to allocate an additional temporary array
and reorder the channels during load.
2020-12-25 18:51:25 +01:00
Paul Chote
25071b813e Prevent concrete from spawning underneath already placed building bibs.
This is the equivalent to reverting 83b61ab.
2020-12-05 17:06:04 +00:00
Paul Chote
20fe59e844 Output compiled binaries to ./bin. 2020-11-24 17:53:48 +01:00
abcdefg30
d6c0926856 Remove LaysTerrain 2020-11-15 16:33:32 +01:00
abcdefg30
99ec119ffd Move LaysTerrain functionality to D2kBuilding 2020-11-15 16:33:32 +01:00
abcdefg30
6b2920cc91 Introduce D2kBuilding 2020-11-15 16:33:32 +01:00
teinarss
13581c030d Use in parameter for Target 2020-11-06 22:02:24 +01:00
Paul Chote
1a3dfdc67f Remove BuildingInfluence from LaysTerrain. 2020-10-26 16:51:12 +01:00
Paul Chote
8d2156fb30 Remove BuildingInfluence from BuildableTerrainLayer. 2020-10-26 16:51:12 +01:00
Mustafa Alperen Seki
be88c33399 Add a lobby option to disable Concrete in D2k. 2020-10-06 13:29:33 +02:00
Mustafa Alperen Seki
7372da150a Make LaysTerrain Conditional. 2020-10-06 13:29:33 +02:00
Paul Chote
b985edbc29 Add ModData to ILintRulesPass.Run. 2020-09-12 17:52:46 +02:00
teinarss
27f1a7ab27 Use out var syntax 2020-08-19 18:11:07 +01:00
Paul Chote
46cf56d6ff Remove editor-specific resource rendering.
Mods must manually move their *ResourceRenderer definitions from
World onto BaseWorld to restore resource rendering in the editor.
2020-08-15 18:43:40 +02:00
Paul Chote
ef69a3de66 Use nameof() in PaletteReference. 2020-08-15 13:41:45 +02:00
teinarss
19b02875c7 Use Tuple syntax 2020-08-15 10:37:10 +01:00
Andre Mohren
006a87692a Removed unused imports. 2020-07-28 18:22:51 +02:00
Paul Chote
01e955ca37 Implement TS-style terrain lighting. 2020-07-13 14:02:02 +02:00