Commit Graph

30464 Commits

Author SHA1 Message Date
darkademic
3a5358ad7c Copy LineGraphWidget. 2025-07-17 10:34:35 +03:00
JovialFeline
74ead504ec Use support sequences for scripted powers 2025-07-14 22:04:08 +03:00
michaeldgg2
8833e95f21 PBOG: remove the resource check and let IsCellBuildable() extension method handle it 2025-07-14 21:52:41 +03:00
michaeldgg2
d657a72107 Remove BuildingInfo.AllowPlacementOnResources and use TerrainTypes to check whether a building can be placed on particular cell 2025-07-14 21:52:41 +03:00
michaeldgg2
abc3a79330 ResourceLayer: use BuildingInfo.TerrainTypes to check, if a resource can be placed underneath the building 2025-07-14 21:52:41 +03:00
Ashley Newson
25571df2b6 Refactor ExperimentalMapGenerator into reusable methods
This change lifts large portions of ExperimentalMapGenerator's logic
into a new "Terraformer" class with highly documented methods that can
theoretically be used by alternative map generator classes. Some
additional refactoring may occur in future, subject to the practical
needs of additional map generators. ClearMapGenerator is also
simplified.

This is not a pure refactor and contains some algorithmic and
behavioral changes, as well as few minor bug fixes. Notably:

- The logic for obstructing unreachable water has been somewhat
  replaced.

- In CnC, where water is already unplayable, EMG no longer obstructs
  water. (RA still does, as water is playable there.)

- Mountain (cliff) generation is now somewhat more effective. This
  increases the number of cliffs seen on many presets. Settings should
  no longer use "Mountains: 1000".

- PlayableSpace logic has been consolidated into Terraformer.

- PlayableSpace.Playability no longer exists as PartiallyPlayable
  became redundant. Its uses have been replaced with a simple
  boolean. Consequently, some defunct code and configuration has been
  removed.

- Adjust MultiBrush replaceability contract painting behavior to be
  more intuitive.

- Fix off-by-one error in map bounds computation.

- Fix some usages of mixed up MersenneTwisters.
2025-07-14 20:09:10 +03:00
Matthias Mailänder
e4f289921c Drop dependency on Newtonsoft.Json 2025-07-14 16:09:36 +03:00
toasted-dev
444e849241 Changelog: Fix typos.
Updated the Chinook Transport helicopter's description to correct the spelling of "detachment".

Corrected the description of the mutated lifeform by changing "expose" to "exposed" for grammatical accuracy.
2025-07-14 15:50:33 +03:00
Vapre
2e3a30c9ca Fix error IDE0028: Collection initialization can be simplified. 2025-07-07 20:33:59 +03:00
N.N
18870cbb03 D2k Starport
- OG fly path and Frigate behaviour
- BulkProductionQueue
- ProductionStarport trait
- OG palette widget behavior for Bulk queue
- Purchase button for each BulkProduction
- Delivery timer for each BulkProduction
2025-06-30 20:19:21 +03:00
N.N
fcae6a26d1 D2k Multibrush 2025-06-30 19:44:36 +03:00
Vapre
aa05081636 DensePathGraph, only traverse layers if enabled for locomotor. 2025-06-30 18:36:44 +03:00
Михаил Васильев
368ac277d0 Fix typo in NOD08a mission description 2025-06-17 15:36:54 +03:00
Михаил Васильев
631cbb1421 Fix 07a mission description 2025-06-17 15:23:35 +03:00
Gustas
6fe039f62e Add cursors to dump sheets command 2025-06-14 16:43:30 +02:00
Gustas
f5ecb9ad99 Add tileset to dump sheets 2025-06-14 16:43:30 +02:00
Gustas
84378969c3 Make palettes and tilesets optional 2025-06-14 16:43:30 +02:00
Gustas
4c04d4fa30 Add death types 2025-06-14 16:12:36 +02:00
Gustas
abec71c42d Use common util and unseal class 2025-06-14 16:12:36 +02:00
Gustas
03c24da611 Give XP to minelayer 2025-06-14 13:22:49 +02:00
Gustas
4be3add30a Dispose of old update rules 2025-06-14 11:58:49 +02:00
Gustas
c27511dd66 Add colors to verbose utilities 2025-06-14 11:56:16 +02:00
Gustas
12cb5997f0 Print the list of warnings 2025-06-14 11:56:16 +02:00
Ashley Newson
ad19506836 Fix TilingPath bugs affecting unofficial mods
TilingPath had some bugs when working with single-point segments,
which exist outside of the official mods. This change fixes a few
problems:

- Avoid unbounded length zero-cost, zero-progression loops that could
  be formed by an arbitrary number of single-point corners. These
  could pop up arbitrarily in the middle of paths.
- Avoid zero-progression loops short-circuiting looped paths.
- Fix missing end type matching during back-tracing stage.
- Enhance lint check to ensure starts/ends have a valid directions.
- Remove some dead code.
2025-06-13 18:52:05 +03:00
Matthias Mailänder
0b13ee3e49 Update to lowest supported Windows server image. 2025-06-12 20:04:35 +03:00
Ashley Newson
c92a6be4af Respect MultiBrush weights when path tiling
Allows biasing path tiling towards or away from using certain
MultiBrushes using their existing weight property. Note that the
probability of brush selection depends on multiple factors, not just
their direct weight.
2025-06-08 16:29:03 +03:00
Ashley Newson
561466d822 Fix Path Tiling tool rally confusion and crash
If the path being planned by the Path Tiling tool overlaps itself such
that a later rally intersects an earlier line, attempting to interact
with this later rally caused the UI to instead select the rally
associated with the earlier line. This at best leads to user confusion
and at worst leads to a crash if they then drag the rally over another
rally.

This commit fixes the UI logic to correctly identify the rally being
clicked on.
2025-06-08 16:14:50 +03:00
Ashley Newson
c6ed381085 Remove empty Path Tiling Tool dropdown tooltips
I'd accidentally copy-pasted the wrong item template in the original
TilingPathToolLogic implementation. This change uses the normal
tooltipless LABEL_DROPDOWN_TEMPLATE.
2025-06-08 16:03:05 +03:00
Bryan Quigley
aae2ec109b Add 2 obstacles to europe to help AI
AI likes to make a naval building in the top right tiny water area.
This PR adds 2 rocks to that area blocking any building so the AI
is not going to waste time on it.
2025-06-08 15:58:18 +03:00
Ashley Newson
9c8470d18e Preview clipboard when copy-pasting in the map editor 2025-05-31 10:39:39 +03:00
Ashley Newson
c4332c808b Fix copy-paste editor crash for RectangularIsometric
EditorBlit was incorrectly using CellRegion.Contains instead of
CellRegion.CellCoords.Contains (i.e. CellCoordsRegion.Contains). This
resulted in a crash upon attempting to paste within the editor for
RectangularIsometric maps (such as in TS).

This change updates the code to use the correct region type and fixes
the crash.
2025-05-31 10:31:23 +03:00
JovialFeline
1cdc823bca Add The Tiberium Strain mission (CnC) 2025-05-30 16:10:51 +03:00
Ashley Newson
5c7188be81 Avoid denoising unbiased resources in map generator
Resource placement is usually biased by mpspawns or resources spawns
(mines or blossom trees), which feed into a mutilplier for the
resource noise. Previously, all cells outside of the circle of
influence of a bias source got a multiplier of zero, essentially
giving them no noise pattern. This could lead to ugly horizontal
streaks of resources for which the layout was determined only by the
internals of PriorityArray.

This change fixes this by ensuring the noise multiplier has a
baseline value of 1.
2025-05-30 15:31:19 +03:00
Ashley Newson
2a0e787ae7 Check for and fix non-unit MultiBrush segment steps
TilingPath's algorithms are designed on the assumption that MultiBrush
segments use unit steps in their point sequences. Non-unit
sequences can result in incorrect or suboptimal tilings.

This change ensures point sequences are validated for unit steps, and
fixes a non-compliant cliff tile across all tilesets.
2025-05-30 15:22:53 +03:00
Ashley Newson
7538943f59 Convert Direction.cs to enums and extensions
- Converts OpenRA.Mods.Common/MapGenerator/Direction.cs over to using
  Direction and DirectionMask enums
- Moves direction-related utilities into Exts classes.
- Simplifies some direction utility logic.

Only very small numerical precision behavioral changes.
2025-05-30 15:15:15 +03:00
JovialFeline
99253702c5 Add IsDead checks to Fall of Greece 1 2025-05-20 22:25:52 +03:00
Ashley Newson
5c09d5d828 Support PickAny templates in MultiBrushes
Allows PickAny templates to be used in MultiBrushes, which can be
painted with random selection. This avoids the need to define various
separate MultiBrushes for each tile combination.

Note that all combinations count as part of a single MultiBrush, which
may influence selection weighting.

This MultiBrush feature is not presently used in OpenRA's official
mods, but is useful for unofficial mods using more general PickAny
templates.
2025-05-19 22:18:12 +03:00
Ashley Newson
daf36769d6 Add additional MultiBrush segments for RA and CnC
Adds MultiBrush definitions for River (RA and CnC) and WaterCliff (RA
only), allowing them to be tiled with the Path Tiling tool.

A small enhancement to the MultiBrush and TilingPathTool code is added
to allow the inner type to be derived from start and end types. This
allows segments that interface between types (such as WaterCliff to
Beach) to be usable when tiling either WaterCliffs or Beach. Whilst
this makes the inner types of many of the existing MultiBrushes
redundant, no simplification is performed as part of this change.
2025-05-19 22:01:25 +03:00
Михаил Васильев
ba444de014 Fix link to Lua API in README.md 2025-05-19 21:33:04 +03:00
Paul Chote
6a67906823 Improve --check-yaml robustness against bogus maps. 2025-05-19 21:30:07 +03:00
Paul Chote
681edb1879 Fix button order in save browser. 2025-05-15 23:14:48 +03:00
Paul Chote
b7d929de5a Precache generated map for the host. 2025-05-15 23:08:13 +03:00
Paul Chote
6ffd786d5b Add Generate Map tab to the lobby map chooser. 2025-05-15 23:08:13 +03:00
Paul Chote
979483b63c Add MapClassification.Generated.
Generated maps are created at runtime using a
mod-defined trait. They are embedded directly
into replays and save games as they exist in
memory only, and disappear after the game exits.
2025-05-15 23:08:13 +03:00
Paul Chote
6be947bbf0 Support serializing/loading ReadWriteZipFile as base64 string. 2025-05-15 23:08:13 +03:00
Paul Chote
5292919917 Move Boundary Shape option before Players. 2025-05-15 23:08:13 +03:00
Paul Chote
497b5e30ad Extract a MapSizeLabel helper method. 2025-05-15 23:08:13 +03:00
Paul Chote
4f1b17b832 Allow MapGeneratorSettings to be initialized from MapGenerationArgs. 2025-05-15 23:08:13 +03:00
Ashley Newson
ad08045e5f Add path auto-tiling tool to map editor
Exposes the TilingPath code used by the map generator as a map editor
tool to help automate the process of tiling sequences of templates
together.

No additional template stitching definitions are added as part of this
commit. As such, the tool currently only supports the same auto tiling
as the map generator does. This includes:

- RA and CnC support.
- Beaches, land cliffs, and roads.

Support for additional mods and templates can be added in follow-ups
by adding the necessary MultiBrush definitions.

Related changes included in this commit to support this work include:

- Add support for sparse EditorBlits.
- Add support for MultiBrush to EditorBlitSource conversion.
- Add support for EditorBlitSource previewing.
- Adjust the "Road" types used in segmented MultiBrush definitions.
2025-05-15 22:41:43 +03:00
michaeldgg2
d3d949176d ProductionTabsWidget: fix updating tabs when new production building is built 2025-05-11 22:20:04 +03:00