Commit Graph

28680 Commits

Author SHA1 Message Date
Matthias Mailänder
fe15748cc0 Wrap console logging with time stamp. 2022-04-21 13:26:55 +03:00
Matthias Mailänder
aaa3b49496 Update Mono.NAT 2022-04-21 13:11:45 +03:00
RoosterDragon
ecb7c16751 Tweak handling of nullable types in LUA doc generation.
The types for Int32 and Boolean are currently replaced with friendly names of int and bool for the docs. Ensure we apply the same handling when these are nullable types, changing the output from Int32? and Boolean? to int? and bool?
2022-04-18 13:02:05 +02:00
RoosterDragon
d2935672ca Fix the shape of the IPathFinder interface, ensure all path searches use it.
Some path searches, using PathSearch, were created directly at the callsite rather than using the pathfinder trait. This means some searches did not not benefit from the performance checks done in the pathfinder trait. It also means the pathfinder trait was not responsible for all pathing done in the game. Fix this with the following changes:
- Create a sensible shape for the IPathFinder interface and promote it to a trait interface, allowing theoretical replacements of the implementation. Ensure none of the concrete classes in OpenRA.Mods.Common.Pathfinder are exposed in the interface to ensure this is possible.
- Update the PathFinder class to implement the interface, and update several callsites manually running pathfinding code to instead call the IPathFinder interface.
- Overall, this allows any implementation of the IPathFinder interface to intercept and control all path searching performed by the game. Previously some searches would not have used it, and no alternate implementations were possible as the existing implementation was hardcoded into the interface shape.

Additionally:
- Move the responsibility of finding paths on completed path searches from pathfinder to path search, which is a more sensible location.
- Clean up the pathfinder pre-search optimizations.
2022-04-18 11:18:43 +01:00
RoosterDragon
2583a7af31 After NotBefore<> support to control initialization order.
Requires<T> means that trait of type T will be initialized first, and asserts that at least one exists. The new NotBefore<T> means that trait of type T will be initialized first, but allows no traits.

This allows traits to control initialization order for optional dependencies. They want to be initialized second so they can rely on the dependencies having been initialized. But if the dependencies are optional then to not throw if none are present.

We apply this to Locomotor which was previously using AddFrameEndTask to work around trait order initialization. This improves the user experience as the initialization is applied whilst the loading screen is still visible, rather than the game starting and creating jank by performing initialization on the first tick.
2022-04-18 10:31:47 +01:00
Mustafa Alperen Seki
62e7c7a318 Make PortableChrono PausableConditional. 2022-04-17 12:14:50 +02:00
Mustafa Alperen Seki
9de8d8854d Pass PortableChrono instead of PortableChronoInfo to PortableChronoOrderGenerator. 2022-04-17 12:14:50 +02:00
Matthias Mailänder
648c56bca1 Don't crash when joining a game after asset installation. 2022-04-17 00:27:36 +03:00
Matthias Mailänder
0f90713aba Added addition error logging to graphics.log when SDL fails 2022-04-16 22:37:05 +02:00
Mustafa Alperen Seki
30f14dcc4c Fix Army Spectator tab not using FactionImages. 2022-04-15 18:17:49 +02:00
RoosterDragon
ac0969d688 Use nameof instead of hardcoded strings in reflection calls.
This helps improve the safety of code the uses reflection when methods may get renamed, and helps navigating code as the nameof will show up when searching for references to members.
2022-04-14 19:58:15 +02:00
Gustas
b254eb0f3d Add dynamic map refresh 2022-04-14 16:16:38 +02:00
Gustas
61df7974b0 Make the delete button not call MapCache every frame 2022-04-14 16:16:38 +02:00
tomas
515aba0ee7 Update SDL to 2.0.20 2022-04-13 20:13:01 +02:00
Matthias Mailänder
af3362c62f Use string.Contains(char) instead of string.Contains(string)
with single characters
2022-04-13 20:09:57 +02:00
Matthias Mailänder
3bc28ba6e2 Use inline string replacement. 2022-04-13 20:09:57 +02:00
dnqbob
4f43b157a8 Add place variant building for BaseBuilderBotModule.
1. If it follow the refinery placing logic, then we can use Facings in PlaceBuildingVariants to help BaseBuilderBotModule "rotates" it to minefield.

2. If it is a normal building, BaseBuilderBotModule will place a random variant actor.
2022-04-12 22:28:03 +02:00
penev92
f74d1c3cf8 Adjusted D2k mission player colors
PlayerReference colors in D2k missions only affect chat text and minimap colors because actors use specific palette colors.
So using the colors from the original game's minimap.
2022-04-12 22:15:02 +02:00
penev92
2866342522 Add missing PlayerReferences in D2k map import 2022-04-12 22:15:02 +02:00
tomas
8e19463450 Fix desync handling 2022-04-12 21:56:46 +02:00
abcdefg30
dab8ee4f94 Load campaign and utils Lua scripts before map scripts 2022-04-12 21:54:11 +02:00
Mustafa Alperen Seki
c71af0e613 Make NukePower MissileImage optional. 2022-04-12 21:52:29 +02:00
Mustafa Alperen Seki
60b123c641 Split NukePower MissileImage from MissileWeapon. 2022-04-12 21:52:29 +02:00
Matthias Mailänder
0260884369 Added translation support for server orders. 2022-04-03 19:23:26 +02:00
Matthias Mailänder
ee95d2591f Code cleanup. 2022-04-03 19:23:26 +02:00
Matthias Mailänder
7735107deb Add a script trigger overlay. 2022-04-02 18:01:00 +02:00
Matthias Mailänder
058fb51f4c Reduce the menu button size to save space. 2022-04-02 18:01:00 +02:00
Matthias Mailänder
0e7ad43425 Remove unused parameters. 2022-04-01 23:30:26 +02:00
RoosterDragon
ea243b8558 Fix crash in TSEditorResourceLayer when adding resources.
Ensure cells are within map bounds when checking if adjacent cells should be cleared during resource placement.
2022-03-26 23:07:41 +01:00
abcdefg30
e685731b33 Add an update rule for the removal of AttackFrontal's FacingTolerance 2022-03-13 11:16:47 +01:00
abcdefg30
889425ab0f Remove AttackFrontal's FacingTolerance and define it explicitly in rules 2022-03-13 11:16:47 +01:00
dnqbob
9049ae6f20 Add a backawrd moving option for mobile 2022-03-13 10:46:04 +01:00
Vapre
83357af14c WorldRenderer, replace foreach ActorsWithTraits with ApplyToActorsWithTrait. #18798. 2022-03-13 10:45:01 +01:00
Matthias Mailänder
00356b8bbd Setup Tiberian Sun forest fires. 2022-03-12 17:16:43 +01:00
Mustafa Alperen Seki
b54a724aea Add ability to override CannotPlaceNotification per queue. 2022-03-12 12:55:41 +01:00
Matthias Mailänder
a6cb20a4ec Fix overlapping tracks when vehicle rotates.
Also optimize the function slightly.
2022-03-12 12:53:59 +01:00
Matthias Mailänder
5220da1bae This can never be null. 2022-03-12 12:53:59 +01:00
Mustafa Alperen Seki
2f1edd4516 Remove Replacable actors for LineBuild too. 2022-03-11 22:32:08 +01:00
Mustafa Alperen Seki
a7004b2db7 Check for placeablilty of LineBuild Segment instead of the Post. 2022-03-11 22:32:08 +01:00
Mustafa Alperen Seki
153bd14f9e Add Force-Move undeploy to D2k Thumper Infantry. 2022-03-11 22:29:45 +01:00
Leo512bit
d2611ebfb4 Added fsmap to music.ymal and set the lose music to it.
Signed-off-by: Leo512bit <leonardmatthewteyssier@gmail.com>
2022-03-11 21:36:43 +01:00
Ivaylo Draganov
eadc8ad689 Change color of labels that correspond to disabled inputs
- Add a new widget type for input and extend it from other input widgets
- Add a new label type that can be linked to an input widget
- Change the label color when the input's disabled state changes
2022-03-07 21:01:33 +01:00
Mustafa Alperen Seki
0203476da9 Update variables for Flash lua function. 2022-03-05 15:19:01 +01:00
Mustafa Alperen Seki
7e4c3acda3 Fix ZRamp only allowing integer values. 2022-03-02 19:41:49 +01:00
darkademic
e082497a1a Corrected StartBurstReport sound synchronisation when used with FireDelay. 2022-02-26 10:40:19 -06:00
Matthias Mailänder
9605e5ad9c Use the new MiniYAML GitHub syntax. 2022-02-26 17:04:50 +01:00
Matthias Mailänder
da4fb27fca Use modern string syntax. 2022-02-26 17:04:50 +01:00
penev92
57d3321d0f Make WithDockingAnimation optional
The `Refinery` trait has a hardcoded usage of `SpriteHarvesterDockSequence`, which requires the harvester to have `WithDockingAnimation`, making it inconvenient-at-best to NOT have a docking/unloading animation.
2022-02-23 22:06:07 +01:00
IceReaper
fa8bfc6ca0 Allow mods to implement new building placement conditions and cursors. 2022-02-22 01:20:38 +02:00
penev92
0f1ff3f2fc Recommend the MiniYAML language server extension
Recommends  https://marketplace.visualstudio.com/items?itemName=openra.oraide-vscode  as a VSCode extension for the OpenRA workspace.
2022-02-20 16:30:38 +01:00