diff --git a/.editorconfig b/.editorconfig index 83c30f627c3d..b75919d69aab 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,4 @@ -; Top-most http://editorconfig.org/ file +; Top-most https://editorconfig.org/ file root = true charset=utf-8 diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000000..ca8fb2bbb10b --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +patreon: orahosting diff --git a/AUTHORS b/AUTHORS index c93fd0257b23..c74d276cfaaf 100644 --- a/AUTHORS +++ b/AUTHORS @@ -216,7 +216,7 @@ Using Linguini by the Space Station 14 team licensed under Apache and MIT terms. This site or product includes IP2Location LITE data -available from http://www.ip2location.com. +available from https://www.ip2location.com. Finally, special thanks goes to the original teams at Westwood Studios and EA for creating the classic diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 67894ae9aa7e..3a7d532a0f92 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -70,7 +70,7 @@ members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at [http://contributor-covenant.org/version/1/4][version] +available at [https://contributor-covenant.org/version/1/4][version] -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ +[homepage]: https://contributor-covenant.org +[version]: https://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 43c4bf12d4c5..bd9ae96ba56e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ Help us keep OpenRA open and inclusive. Please read and follow our [Code of Cond * [Coding standard](https://github.com/OpenRA/OpenRA/wiki/Coding-Standard) * [Branches and Releases](https://github.com/OpenRA/OpenRA/wiki/Branches-and-Releases) -* [Licensing](http://www.gnu.org/licenses/quick-guide-gplv3.html) +* [Licensing](https://www.gnu.org/licenses/quick-guide-gplv3.html) Please `git rebase` to the latest revision of the bleed branch. diff --git a/COPYING b/COPYING index 94a9ed024d38..e60008693e01 100644 --- a/COPYING +++ b/COPYING @@ -1,7 +1,7 @@ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. @@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see -. +. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. +. diff --git a/INSTALL.md b/INSTALL.md index 3c2315e056d3..aac1b179d700 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -7,7 +7,7 @@ Windows ======= Compiling OpenRA requires the following dependencies: -* [Windows PowerShell >= 4.0](http://microsoft.com/powershell) (included by default in recent Windows 10 versions) +* [Windows PowerShell >= 4.0](https://microsoft.com/powershell) (included by default in recent Windows 10 versions) * [.NET 6 SDK](https://dotnet.microsoft.com/download/dotnet/6.0) (or via Visual Studio) To compile OpenRA, open the `OpenRA.sln` solution in the main folder, build it from the command-line with `dotnet` or use the Makefile analogue command `make all` scripted in PowerShell syntax. @@ -25,7 +25,7 @@ To compile OpenRA, run `make` from the command line (or `make RUNTIME=mono` if u The default behaviour on the x86_64 architecture is to download several pre-compiled native libraries using the Nuget packaging manager. If you prefer to use system libraries, compile instead using `make TARGETPLATFORM=unix-generic`. -If you choose to use system libraries, or your system is not x86_64, you will need to install [SDL 2](https://www.libsdl.org/download-2.0.php), [FreeType](http://gnuwin32.sourceforge.net/packages/freetype.htm), [OpenAL](https://openal-soft.org/), and [liblua 5.1](http://luabinaries.sourceforge.net/download.html) before compiling OpenRA. +If you choose to use system libraries, or your system is not x86_64, you will need to install [SDL 2](https://www.libsdl.org/download-2.0.php), [FreeType](https://gnuwin32.sourceforge.net/packages/freetype.htm), [OpenAL](https://openal-soft.org/), and [liblua 5.1](https://luabinaries.sourceforge.net/download.html) before compiling OpenRA. These can be installed using your package manager on various distros: diff --git a/OpenRA.Game/Map/CellCoordsRegion.cs b/OpenRA.Game/Map/CellCoordsRegion.cs index 6ec0d928b287..2f6914f2c850 100644 --- a/OpenRA.Game/Map/CellCoordsRegion.cs +++ b/OpenRA.Game/Map/CellCoordsRegion.cs @@ -64,6 +64,11 @@ public CellCoordsRegion(CPos topLeft, CPos bottomRight) BottomRight = bottomRight; } + public bool Contains(CPos cell) + { + return cell.X >= TopLeft.X && cell.X <= BottomRight.X && cell.Y >= TopLeft.Y && cell.Y <= BottomRight.Y; + } + public override string ToString() { return $"{TopLeft}->{BottomRight}"; diff --git a/OpenRA.Game/Primitives/Color.cs b/OpenRA.Game/Primitives/Color.cs index 3d54074baa19..58c7e7aa37b5 100644 --- a/OpenRA.Game/Primitives/Color.cs +++ b/OpenRA.Game/Primitives/Color.cs @@ -77,13 +77,13 @@ public static Color FromArgb(uint argb) static float SrgbToLinear(float c) { - // Standard gamma conversion equation: see e.g. http://entropymine.com/imageworsener/srgbformula/ + // Standard gamma conversion equation: see e.g. https://entropymine.com/imageworsener/srgbformula/ return c <= 0.04045f ? c / 12.92f : (float)Math.Pow((c + 0.055f) / 1.055f, 2.4f); } static float LinearToSrgb(float c) { - // Standard gamma conversion equation: see e.g. http://entropymine.com/imageworsener/srgbformula/ + // Standard gamma conversion equation: see e.g. https://entropymine.com/imageworsener/srgbformula/ return c <= 0.0031308f ? c * 12.92f : 1.055f * (float)Math.Pow(c, 1.0f / 2.4f) - 0.055f; } diff --git a/OpenRA.Mods.Cnc/FileFormats/LZOCompression.cs b/OpenRA.Mods.Cnc/FileFormats/LZOCompression.cs index a7e0037c027b..aec0c80d49f8 100644 --- a/OpenRA.Mods.Cnc/FileFormats/LZOCompression.cs +++ b/OpenRA.Mods.Cnc/FileFormats/LZOCompression.cs @@ -11,7 +11,7 @@ #region Additional Copyright & License Information /* * C# port of the crude minilzo source version 2.06 by Frank Razenberg - * The full LZO package can be found at http://www.oberhumer.com/opensource/lzo/ + * The full LZO package can be found at https://www.oberhumer.com/opensource/lzo/ * * Beware, you should never want to see C# code like this. You were warned. * I simply ran the MSVC preprocessor on the original source, changed the datatypes @@ -61,7 +61,7 @@ * * Markus F.X.J. Oberhumer * - * http://www.oberhumer.com/opensource/lzo/ + * https://www.oberhumer.com/opensource/lzo/ */ #endregion diff --git a/OpenRA.Mods.Cnc/Traits/World/TSEditorResourceLayer.cs b/OpenRA.Mods.Cnc/Traits/World/TSEditorResourceLayer.cs index 3b3e7ed294e2..3bf3b92e9a05 100644 --- a/OpenRA.Mods.Cnc/Traits/World/TSEditorResourceLayer.cs +++ b/OpenRA.Mods.Cnc/Traits/World/TSEditorResourceLayer.cs @@ -46,7 +46,7 @@ bool IsValidVeinNeighbour(CPos cell, CPos neighbour) return false; // Cell is automatically valid if it contains a veinhole actor - if (actorLayer.PreviewsAt(neighbour).Any(a => info.VeinholeActors.Contains(a.Info.Name))) + if (actorLayer.PreviewsAtCell(neighbour).Any(a => info.VeinholeActors.Contains(a.Info.Name))) return true; // Neighbour must be flat or a cardinal slope, unless the resource cell itself is a slope diff --git a/OpenRA.Mods.Cnc/Traits/World/TSVeinsRenderer.cs b/OpenRA.Mods.Cnc/Traits/World/TSVeinsRenderer.cs index a518860c2b90..1c18d69598f2 100644 --- a/OpenRA.Mods.Cnc/Traits/World/TSVeinsRenderer.cs +++ b/OpenRA.Mods.Cnc/Traits/World/TSVeinsRenderer.cs @@ -370,10 +370,10 @@ string IResourceRenderer.GetRenderedResourceType(CPos cell) string IResourceRenderer.GetRenderedResourceTooltip(CPos cell) { - if (renderIndices[cell] != null) - return info.Name; + if (renderIndices[cell] != null || borders[cell] != Adjacency.None) + return TranslationProvider.GetString(info.Name); - return borders[cell] != Adjacency.None ? info.Name : null; + return null; } IEnumerable IResourceRenderer.RenderUIPreview(WorldRenderer wr, string resourceType, int2 origin, float scale) diff --git a/OpenRA.Mods.Cnc/Traits/World/VoxelNormalsPalette.cs b/OpenRA.Mods.Cnc/Traits/World/VoxelNormalsPalette.cs index 1311f4151173..8de0bc71cfd7 100644 --- a/OpenRA.Mods.Cnc/Traits/World/VoxelNormalsPalette.cs +++ b/OpenRA.Mods.Cnc/Traits/World/VoxelNormalsPalette.cs @@ -59,7 +59,7 @@ public void LoadPalettes(WorldRenderer wr) wr.AddPalette(info.Name, new ImmutablePalette(data)); } - // Normal vector tables from http://www.sleipnirstuff.com/forum/viewtopic.php?t=8048 + // Normal vector tables from https://web.archive.org/web/20041022134721/https://www.sleipnirstuff.com/forum/viewtopic.php?t=8048 static readonly float[] TSNormals = { 0.671214f, 0.198492f, -0.714194f, diff --git a/OpenRA.Mods.Common/Activities/Air/FlyAttack.cs b/OpenRA.Mods.Common/Activities/Air/FlyAttack.cs index f2546fab6274..8b5fe82f9558 100644 --- a/OpenRA.Mods.Common/Activities/Air/FlyAttack.cs +++ b/OpenRA.Mods.Common/Activities/Air/FlyAttack.cs @@ -119,10 +119,14 @@ public override bool Tick(Actor self) if (useLastVisibleTarget && !lastVisibleTarget.IsValidFor(self)) return true; - // If all valid weapons have depleted their ammo and Rearmable trait exists, return to RearmActor to reload - // and resume the activity after reloading if AbortOnResupply is set to 'false' - if (rearmable != null && !useLastVisibleTarget && attackAircraft.Armaments.All(x => x.IsTraitPaused || !x.Weapon.IsValidAgainst(target, self.World, self))) + // If all weapons are invalid against the target + if (!useLastVisibleTarget && attackAircraft.Armaments.All(x => x.IsTraitPaused || !x.Weapon.IsValidAgainst(target, self.World, self))) { + // If Rearmable trait exists, return to RearmActor to reload and resume the activity after + // reloading if AbortOnResupply is set to 'false'. + if (rearmable == null) + return true; + // Attack moves never resupply if (source == AttackSource.AttackMove) return true; diff --git a/OpenRA.Mods.Common/EditorBrushes/EditorCopyPasteBrush.cs b/OpenRA.Mods.Common/EditorBrushes/EditorCopyPasteBrush.cs index c0e0a0b4c02e..23de19fe38c3 100644 --- a/OpenRA.Mods.Common/EditorBrushes/EditorCopyPasteBrush.cs +++ b/OpenRA.Mods.Common/EditorBrushes/EditorCopyPasteBrush.cs @@ -165,7 +165,7 @@ EditorClipboard CopySelectionContents() tiles.Add(cell, new ClipboardTile(mapTiles[cell], mapResources[cell], resourceLayerContents, mapHeight[cell])); if (copyFilters.HasFlag(MapCopyFilters.Actors)) - foreach (var preview in selection.SelectMany(editorActorLayer.PreviewsAt).Distinct()) + foreach (var preview in editorActorLayer.PreviewsInCellRegion(selection.CellCoords)) previews.TryAdd(preview.ID, preview); } @@ -182,6 +182,15 @@ public void Do() var sourcePos = clipboard.CellRegion.TopLeft; var pasteVec = new CVec(pastePosition.X - sourcePos.X, pastePosition.Y - sourcePos.Y); + if (copyFilters.HasFlag(MapCopyFilters.Actors)) + { + // Clear any existing actors in the paste cells. + var selectionSize = clipboard.CellRegion.BottomRight - clipboard.CellRegion.TopLeft; + var pasteRegion = new CellRegion(map.Grid.Type, pastePosition, pastePosition + selectionSize); + foreach (var regionActor in editorActorLayer.PreviewsInCellRegion(pasteRegion.CellCoords).ToList()) + editorActorLayer.Remove(regionActor); + } + foreach (var tileKeyValuePair in clipboard.Tiles) { var position = tileKeyValuePair.Key + pasteVec; @@ -209,12 +218,6 @@ public void Do() if (copyFilters.HasFlag(MapCopyFilters.Actors)) { - // Clear any existing actors in the paste cells. - var selectionSize = clipboard.CellRegion.BottomRight - clipboard.CellRegion.TopLeft; - var pasteRegion = new CellRegion(map.Grid.Type, pastePosition, pastePosition + selectionSize); - foreach (var regionActor in pasteRegion.SelectMany(editorActorLayer.PreviewsAt).ToHashSet()) - editorActorLayer.Remove(regionActor); - // Now place actors. foreach (var actorKeyValuePair in clipboard.Actors) { @@ -238,6 +241,13 @@ public void Do() public void Undo() { + if (copyFilters.HasFlag(MapCopyFilters.Actors)) + { + // Clear existing actors. + foreach (var regionActor in editorActorLayer.PreviewsInCellRegion(undoClipboard.CellRegion.CellCoords).ToList()) + editorActorLayer.Remove(regionActor); + } + foreach (var tileKeyValuePair in undoClipboard.Tiles) { var position = tileKeyValuePair.Key; @@ -262,10 +272,6 @@ public void Undo() if (copyFilters.HasFlag(MapCopyFilters.Actors)) { - // Clear existing actors. - foreach (var regionActor in undoClipboard.CellRegion.SelectMany(editorActorLayer.PreviewsAt).Distinct().ToList()) - editorActorLayer.Remove(regionActor); - // Place actors back again. foreach (var actor in undoClipboard.Actors.Values) editorActorLayer.Add(actor); diff --git a/OpenRA.Mods.Common/EditorBrushes/EditorDefaultBrush.cs b/OpenRA.Mods.Common/EditorBrushes/EditorDefaultBrush.cs index 612babc24b41..ba3decbc1227 100644 --- a/OpenRA.Mods.Common/EditorBrushes/EditorDefaultBrush.cs +++ b/OpenRA.Mods.Common/EditorBrushes/EditorDefaultBrush.cs @@ -120,7 +120,7 @@ public bool HandleMouseInput(MouseInput mi) worldPixel = worldRenderer.Viewport.ViewToWorldPx(mi.Location); var cell = worldRenderer.Viewport.ViewToWorld(mi.Location); - var underCursor = editorLayer.PreviewsAt(worldPixel).MinByOrDefault(CalculateActorSelectionPriority); + var underCursor = editorLayer.PreviewsAtWorldPixel(worldPixel).MinByOrDefault(CalculateActorSelectionPriority); var resourceUnderCursor = resourceLayer?.GetResource(cell).Type; if (underCursor != null) diff --git a/OpenRA.Mods.Common/Pathfinder/PathSearch.cs b/OpenRA.Mods.Common/Pathfinder/PathSearch.cs index c514a4d1ef35..24cb0258f2fa 100644 --- a/OpenRA.Mods.Common/Pathfinder/PathSearch.cs +++ b/OpenRA.Mods.Common/Pathfinder/PathSearch.cs @@ -123,7 +123,7 @@ public static PathSearch ToTargetCellOverGraph( /// /// Default: Diagonal distance heuristic. More information: - /// http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html + /// https://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html /// Layers are ignored and incur no additional cost. /// /// Locomotor used to provide terrain costs. @@ -137,7 +137,7 @@ public static Func DefaultCostEstimator(Locomotor locomotor, CP /// /// Default: Diagonal distance heuristic. More information: - /// http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html + /// https://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html /// Layers are ignored and incur no additional cost. /// /// Locomotor used to provide terrain costs. diff --git a/OpenRA.Mods.Common/Traits/AutoTarget.cs b/OpenRA.Mods.Common/Traits/AutoTarget.cs index 4194c7751aee..38f1123f907c 100644 --- a/OpenRA.Mods.Common/Traits/AutoTarget.cs +++ b/OpenRA.Mods.Common/Traits/AutoTarget.cs @@ -303,7 +303,9 @@ public Target ScanForTarget(Actor self, bool allowMove, bool allowTurn, bool ign if (attackStances != PlayerRelationship.None) { var range = Info.ScanRadius > 0 ? WDist.FromCells(Info.ScanRadius) : ab.GetMaximumRange(); - return ChooseTarget(self, ab, attackStances, range, allowMove, allowTurn); + var target = ChooseTarget(self, ab, attackStances, range, allowMove, allowTurn); + if (target.Type != TargetType.Invalid) + return target; } } } diff --git a/OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs b/OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs index 4466b31e6ebd..7f703d89cc77 100644 --- a/OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs +++ b/OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs @@ -38,6 +38,9 @@ public class ProductionQueueInfo : TraitInfo, IRulesetLoaded [Desc("Should the prerequisite remain enabled if the owner changes?")] public readonly bool Sticky = true; + [Desc("Player must pay for item upfront")] + public readonly bool PayUpFront = false; + [Desc("Should right clicking on the icon instantly cancel the production instead of putting it on hold?")] public readonly bool DisallowPaused = false; @@ -185,7 +188,16 @@ protected void ClearQueue() { // Refund the current item foreach (var item in Queue) + { + if (item.ResourcesPaid > 0) + { + playerResources.GiveResources(item.ResourcesPaid); + item.RemainingCost += item.ResourcesPaid; + } + playerResources.GiveCash(item.TotalCost - item.RemainingCost); + } + Queue.Clear(); } @@ -267,6 +279,11 @@ public virtual bool IsProducing(ProductionItem item) return Queue.Count > 0 && Queue[0] == item; } + public virtual bool IsInQueue(ActorInfo actor) + { + return Queue.Any(i => i.Item == actor.Name); + } + public ProductionItem CurrentItem() { return Queue.ElementAtOrDefault(0); @@ -293,12 +310,22 @@ public virtual IEnumerable BuildableItems() return Enumerable.Empty(); if (!Enabled) return Enumerable.Empty(); - if (developerMode.AllTech) + if (!Info.PayUpFront && developerMode.AllTech) return Producible.Keys; - + if (Info.PayUpFront && developerMode.AllTech) + return Producible.Keys.Where(a => GetProductionCost(a) <= playerResources.GetCashAndResources() || IsInQueue(a)); + if (Info.PayUpFront) + return buildableProducibles.Where(a => GetProductionCost(a) <= playerResources.GetCashAndResources() || IsInQueue(a)); return buildableProducibles; } + public virtual bool AnyItemsToBuild() + { + return Enabled + && (productionTraits.Length <= 0 || productionTraits.Any(p => p.IsTraitDisabled)) + && ((developerMode.AllTech && Producible.Keys.Count != 0) || buildableProducibles.Any()); + } + public bool CanBuild(ActorInfo actor) { if (!Producible.TryGetValue(actor, out var ps)) @@ -352,6 +379,13 @@ protected void CancelUnbuildableItems() if (buildableNames.Contains(Queue[i].Item)) continue; + // Refund spended resources + if (Queue[i].ResourcesPaid > 0) + { + playerResources.GiveResources(Queue[i].ResourcesPaid); + Queue[i].RemainingCost += Queue[i].ResourcesPaid; + } + // Refund what's been paid so far playerResources.GiveCash(Queue[i].TotalCost - Queue[i].RemainingCost); EndProduction(Queue[i]); @@ -369,6 +403,9 @@ public bool CanQueue(ActorInfo actor, out string notificationAudio, out string n if (!developerMode.AllTech) { + if (Info.PayUpFront && actor.TraitInfo().Cost > playerResources.GetCashAndResources()) + return false; + if (Info.QueueLimit > 0 && Queue.Count >= Info.QueueLimit) { notificationAudio = Info.LimitedAudio; @@ -444,6 +481,8 @@ public void ResolveOrder(Actor self, Order order) var amountToBuild = Math.Min(fromLimit, order.ExtraData); for (var n = 0; n < amountToBuild; n++) { + if (Info.PayUpFront && cost > playerResources.GetCashAndResources()) + return; var hasPlayedSound = false; BeginProduction(new ProductionItem(this, order.TargetString, cost, playerPower, () => self.World.AddFrameEndTask(_ => { @@ -540,6 +579,12 @@ protected bool CancelProductionInner(string itemName) else { // Refund what has been paid + if (item.ResourcesPaid > 0) + { + playerResources.GiveResources(item.ResourcesPaid); + item.RemainingCost += item.ResourcesPaid; + } + playerResources.GiveCash(item.TotalCost - item.RemainingCost); EndProduction(item); } @@ -560,9 +605,19 @@ public void EndProduction(ProductionItem item) protected virtual void BeginProduction(ProductionItem item, bool hasPriority) { + if (Info.PayUpFront) + { + if (playerResources.Resources > 0 && playerResources.Resources <= item.TotalCost) + item.ResourcesPaid = playerResources.Resources; + else if (playerResources.Resources > item.TotalCost) + item.ResourcesPaid = item.TotalCost; + + playerResources.TakeCash(item.TotalCost); + item.RemainingCost = 0; + } + if (Queue.Any(i => i.Item == item.Item && i.Infinite)) return; - if (hasPriority && Queue.Count > 1) Queue.Insert(1, item); else @@ -581,6 +636,12 @@ protected virtual void BeginProduction(ProductionItem item, bool hasPriority) for (var i = 1; i < queued.Count; i++) { // Refund what has been paid + if (queued[i].ResourcesPaid > 0) + { + playerResources.GiveResources(queued[i].ResourcesPaid); + queued[i].RemainingCost += queued[i].ResourcesPaid; + } + playerResources.GiveCash(queued[i].TotalCost - queued[i].RemainingCost); EndProduction(queued[i]); } @@ -645,10 +706,10 @@ public class ProductionItem public readonly ProductionQueue Queue; public readonly int TotalCost; public readonly Action OnComplete; - public int TotalTime { get; private set; } public int RemainingTime { get; private set; } - public int RemainingCost { get; private set; } + public int RemainingCost { get; set; } + public int ResourcesPaid { get; set; } public int RemainingTimeActual => (pm == null || pm.PowerState == PowerState.Normal) ? RemainingTime : RemainingTime * Queue.Info.LowPowerModifier / 100; @@ -669,6 +730,7 @@ public ProductionItem(ProductionQueue queue, string item, int cost, PowerManager Item = item; RemainingTime = TotalTime = 1; RemainingCost = TotalCost = cost; + ResourcesPaid = 0; OnComplete = onComplete; Queue = queue; this.pm = pm; @@ -685,7 +747,6 @@ public void Tick(PlayerResources pr) var time = Queue.GetBuildTime(ai, bi); if (time > 0) RemainingTime = TotalTime = time; - Started = true; } @@ -708,12 +769,23 @@ public void Tick(PlayerResources pr) return; } - var expectedRemainingCost = RemainingTime == 1 ? 0 : TotalCost * RemainingTime / Math.Max(1, TotalTime); - var costThisFrame = RemainingCost - expectedRemainingCost; - if (costThisFrame != 0 && !pr.TakeCash(costThisFrame, true)) - return; + if (!Queue.Info.PayUpFront) + { + var expectedRemainingCost = RemainingTime == 1 ? 0 : TotalCost * RemainingTime / Math.Max(1, TotalTime); + var costThisFrame = RemainingCost - expectedRemainingCost; + if (pr.Resources > 0 && pr.Resources <= costThisFrame) + ResourcesPaid += pr.Resources; + else if (pr.Resources > costThisFrame) + ResourcesPaid += costThisFrame; + if (costThisFrame != 0 && !pr.TakeCash(costThisFrame, true)) + { + ResourcesPaid -= pr.Resources; + return; + } + + RemainingCost -= costThisFrame; + } - RemainingCost -= costThisFrame; RemainingTime--; if (RemainingTime > 0) return; diff --git a/OpenRA.Mods.Common/Traits/ProductionQueueFromSelection.cs b/OpenRA.Mods.Common/Traits/ProductionQueueFromSelection.cs index 1c86547be483..c00b85e574a0 100644 --- a/OpenRA.Mods.Common/Traits/ProductionQueueFromSelection.cs +++ b/OpenRA.Mods.Common/Traits/ProductionQueueFromSelection.cs @@ -63,7 +63,7 @@ void INotifySelection.SelectionChanged() .FirstOrDefault(q => q.Enabled && types.Contains(q.Info.Type)); } - if (queue == null || !queue.BuildableItems().Any()) + if (queue == null || !queue.AnyItemsToBuild()) return; if (tabsWidget.Value != null) diff --git a/OpenRA.Mods.Common/Traits/Render/WithSpriteBody.cs b/OpenRA.Mods.Common/Traits/Render/WithSpriteBody.cs index 91ba850e9c51..feeb08ce5197 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithSpriteBody.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithSpriteBody.cs @@ -72,20 +72,22 @@ public WithSpriteBody(ActorInitializer init, WithSpriteBodyInfo info) protected WithSpriteBody(ActorInitializer init, WithSpriteBodyInfo info, Func baseFacing) : base(info) { - var rs = init.Self.Trait(); + var self = init.Self; + + var rs = self.Trait(); bool Paused() => IsTraitPaused && - DefaultAnimation.CurrentSequence.Name == NormalizeSequence(init.Self, Info.Sequence); + DefaultAnimation.CurrentSequence.Name == NormalizeSequence(self, Info.Sequence); Func subtractDAT = null; if (info.ForceToGround) - subtractDAT = () => new WVec(0, 0, -init.Self.World.Map.DistanceAboveTerrain(init.Self.CenterPosition).Length); + subtractDAT = () => new WVec(0, 0, -self.World.Map.DistanceAboveTerrain(self.CenterPosition).Length); - DefaultAnimation = new Animation(init.World, rs.GetImage(init.Self), baseFacing, Paused); + DefaultAnimation = new Animation(init.World, rs.GetImage(self), baseFacing, Paused); rs.Add(new AnimationWithOffset(DefaultAnimation, subtractDAT, () => IsTraitDisabled), info.Palette, info.IsPlayerPalette); // Cache the bounds from the default sequence to avoid flickering when the animation changes - boundsAnimation = new Animation(init.World, rs.GetImage(init.Self), baseFacing, Paused); + boundsAnimation = new Animation(init.World, rs.GetImage(self), baseFacing, Paused); boundsAnimation.PlayRepeating(info.Sequence); } diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs index 19e46b7a1176..2ee754ebd91f 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs @@ -39,7 +39,7 @@ public SupportPowerManager(ActorInitializer init) Self = init.Self; DevMode = Self.Trait(); TechTree = Self.Trait(); - RadarPings = Exts.Lazy(() => init.World.WorldActor.TraitOrDefault()); + RadarPings = Exts.Lazy(() => Self.World.WorldActor.TraitOrDefault()); init.World.ActorAdded += ActorAdded; init.World.ActorRemoved += ActorRemoved; diff --git a/OpenRA.Mods.Common/Traits/World/ActorSpawnManager.cs b/OpenRA.Mods.Common/Traits/World/ActorSpawnManager.cs index a8a067b7d025..a691dd93635e 100644 --- a/OpenRA.Mods.Common/Traits/World/ActorSpawnManager.cs +++ b/OpenRA.Mods.Common/Traits/World/ActorSpawnManager.cs @@ -114,6 +114,9 @@ void ITick.Tick(Actor self) // Always spawn at least one actor, plus // however many needed to reach the minimum. SpawnActor(self, spawnPoint); + + // choose new random SpawnPoint for each actor + spawnPoint = GetRandomSpawnPoint(self.World, self.World.SharedRandom); } while (actorsPresent < info.Minimum); } diff --git a/OpenRA.Mods.Common/Traits/World/EditorActorLayer.cs b/OpenRA.Mods.Common/Traits/World/EditorActorLayer.cs index e1acae47be00..0b730c0e45a2 100644 --- a/OpenRA.Mods.Common/Traits/World/EditorActorLayer.cs +++ b/OpenRA.Mods.Common/Traits/World/EditorActorLayer.cs @@ -40,8 +40,9 @@ public class EditorActorLayer : IWorldLoaded, ITickRender, IRender, IRadarSignat { readonly EditorActorLayerInfo info; readonly List previews = new(); - readonly Dictionary> cellMap = new(); + int2 cellOffset; + SpatiallyPartitioned cellMap; SpatiallyPartitioned screenMap; WorldRenderer worldRenderer; @@ -74,6 +75,12 @@ public void WorldLoaded(World world, WorldRenderer wr) foreach (var pr in Players.Players.Values) wr.UpdatePalettesForPlayer(pr.Name, pr.Color, false); + cellOffset = new int2(world.Map.AllCells.Min(c => c.X), world.Map.AllCells.Min((c) => c.Y)); + var cellOffsetMax = new int2(world.Map.AllCells.Max(c => c.X), world.Map.AllCells.Max((c) => c.Y)); + var mapCellSize = cellOffsetMax - cellOffset; + cellMap = new SpatiallyPartitioned( + mapCellSize.X, mapCellSize.Y, Exts.IntegerDivisionRoundingAwayFromZero(info.BinSize, world.Map.Grid.TileSize.Width)); + var ts = world.Map.Grid.TileSize; var width = world.Map.MapSize.X * ts.Width; var height = world.Map.MapSize.Y * ts.Height; @@ -102,7 +109,7 @@ public virtual IEnumerable Render(Actor self, WorldRenderer wr) if (wr.World.Type != WorldType.Editor) return NoRenderables; - return PreviewsInBox(wr.Viewport.TopLeft, wr.Viewport.BottomRight) + return PreviewsInScreenBox(wr.Viewport.TopLeft, wr.Viewport.BottomRight) .SelectMany(p => p.Render()); } @@ -117,7 +124,7 @@ public IEnumerable RenderAnnotations(Actor self, WorldRenderer wr) if (wr.World.Type != WorldType.Editor) return NoRenderables; - return PreviewsInBox(wr.Viewport.TopLeft, wr.Viewport.BottomRight) + return PreviewsInScreenBox(wr.Viewport.TopLeft, wr.Viewport.BottomRight) .SelectMany(p => p.RenderAnnotations()); } @@ -147,13 +154,9 @@ public void Add(EditorActorPreview preview, bool initialSetup = false) if (!preview.Bounds.IsEmpty) screenMap.Add(preview, preview.Bounds); - // Fallback to the actor's CenterPosition for the ActorMap if it has no Footprint - var footprint = preview.Footprint.Select(kv => kv.Key).ToArray(); - if (footprint.Length == 0) - footprint = new[] { worldRenderer.World.Map.CellContaining(preview.CenterPosition) }; - - foreach (var cell in footprint) - AddPreviewLocation(preview, cell); + var cellFootprintBounds = Footprint(preview).Select( + cell => new Rectangle(cell.X - cellOffset.X, cell.Y - cellOffset.Y, 1, 1)).Union(); + cellMap.Add(preview, cellFootprintBounds); preview.AddedToEditor(); @@ -166,26 +169,20 @@ public void Add(EditorActorPreview preview, bool initialSetup = false) } } + IEnumerable Footprint(EditorActorPreview preview) + { + // Fallback to the actor's CenterPosition for the ActorMap if it has no Footprint + if (preview.Footprint.Count == 0) + return new[] { worldRenderer.World.Map.CellContaining(preview.CenterPosition) }; + return preview.Footprint.Keys; + } + public void Remove(EditorActorPreview preview) { previews.Remove(preview); screenMap.Remove(preview); - // Fallback to the actor's CenterPosition for the ActorMap if it has no Footprint - var footprint = preview.Footprint.Select(kv => kv.Key).ToArray(); - if (footprint.Length == 0) - footprint = new[] { worldRenderer.World.Map.CellContaining(preview.CenterPosition) }; - - foreach (var cell in footprint) - { - if (!cellMap.TryGetValue(cell, out var list)) - continue; - - list.Remove(preview); - - if (list.Count == 0) - cellMap.Remove(cell); - } + cellMap.Remove(preview); preview.RemovedFromEditor(); UpdateNeighbours(preview.Footprint); @@ -236,49 +233,46 @@ void UpdateNeighbours(IReadOnlyDictionary footprint) { // Include actors inside the footprint too var cells = Util.ExpandFootprint(footprint.Keys, true); - foreach (var p in cells.SelectMany(c => PreviewsAt(c))) + foreach (var p in cells.SelectMany(PreviewsAtCell)) p.ReplaceInit(new RuntimeNeighbourInit(NeighbouringPreviews(p.Footprint))); } - void AddPreviewLocation(EditorActorPreview preview, CPos location) - { - if (!cellMap.TryGetValue(location, out var list)) - { - list = new List(); - cellMap.Add(location, list); - } - - list.Add(preview); - } - Dictionary NeighbouringPreviews(IReadOnlyDictionary footprint) { var cells = Util.ExpandFootprint(footprint.Keys, true).Except(footprint.Keys); - return cells.ToDictionary(c => c, c => PreviewsAt(c).Select(p => p.Info.Name).ToArray()); + return cells.ToDictionary(c => c, c => PreviewsAtCell(c).Select(p => p.Info.Name).ToArray()); } - public IEnumerable PreviewsInBox(int2 a, int2 b) + public IEnumerable PreviewsInScreenBox(int2 a, int2 b) { - return screenMap.InBox(Rectangle.FromLTRB(Math.Min(a.X, b.X), Math.Min(a.Y, b.Y), Math.Max(a.X, b.X), Math.Max(a.Y, b.Y))); + return PreviewsInScreenBox(Rectangle.FromLTRB(Math.Min(a.X, b.X), Math.Min(a.Y, b.Y), Math.Max(a.X, b.X), Math.Max(a.Y, b.Y))); } - public IEnumerable PreviewsInBox(Rectangle r) + public IEnumerable PreviewsInScreenBox(Rectangle r) { return screenMap.InBox(r); } - public IEnumerable PreviewsAt(CPos cell) + public IEnumerable PreviewsInCellRegion(CellCoordsRegion region) { - if (cellMap.TryGetValue(cell, out var list)) - return list; + return cellMap.InBox(Rectangle.FromLTRB( + region.TopLeft.X - cellOffset.X, + region.TopLeft.Y - cellOffset.Y, + region.BottomRight.X - cellOffset.X + 1, + region.BottomRight.Y - cellOffset.Y + 1)) + .Where(p => Footprint(p).Any(region.Contains)); + } - return Enumerable.Empty(); + public IEnumerable PreviewsAtCell(CPos cell) + { + return cellMap.At(new int2(cell.X - cellOffset.X, cell.Y - cellOffset.Y)) + .Where(p => Footprint(p).Any(fp => fp == cell)); } public SubCell FreeSubCellAt(CPos cell) { var map = worldRenderer.World.Map; - var previews = PreviewsAt(cell).ToList(); + var previews = PreviewsAtCell(cell).ToList(); if (previews.Count == 0) return map.Grid.DefaultSubCell; @@ -293,7 +287,7 @@ public SubCell FreeSubCellAt(CPos cell) return SubCell.Invalid; } - public IEnumerable PreviewsAt(int2 worldPx) + public IEnumerable PreviewsAtWorldPixel(int2 worldPx) { return screenMap.At(worldPx); } @@ -325,9 +319,9 @@ public List Save() public void PopulateRadarSignatureCells(Actor self, List<(CPos Cell, Color Color)> destinationBuffer) { - foreach (var previewsForCell in cellMap) - foreach (var preview in previewsForCell.Value) - destinationBuffer.Add((previewsForCell.Key, preview.RadarColor)); + foreach (var preview in cellMap.Items) + foreach (var cell in Footprint(preview)) + destinationBuffer.Add((cell, preview.RadarColor)); } public EditorActorPreview this[string id] diff --git a/OpenRA.Mods.Common/Traits/World/EditorActorPreview.cs b/OpenRA.Mods.Common/Traits/World/EditorActorPreview.cs index 0613a45362b6..fcef483161ba 100644 --- a/OpenRA.Mods.Common/Traits/World/EditorActorPreview.cs +++ b/OpenRA.Mods.Common/Traits/World/EditorActorPreview.cs @@ -68,8 +68,8 @@ public EditorActorPreview(WorldRenderer worldRenderer, string id, ActorReference if (!world.Map.Rules.Actors.TryGetValue(reference.Type.ToLowerInvariant(), out Info)) throw new InvalidDataException($"Actor {id} of unknown type {reference.Type.ToLowerInvariant()}"); - UpdateFromCellChange(); GenerateFootprint(); + UpdateFromCellChange(null); tooltip = Info.TraitInfos().FirstOrDefault(info => info.EnabledByDefault) as TooltipInfoBase ?? Info.TraitInfos().FirstOrDefault(info => info.EnabledByDefault); @@ -79,8 +79,7 @@ public EditorActorPreview(WorldRenderer worldRenderer, string id, ActorReference terrainRadarColorInfo = Info.TraitInfoOrDefault(); UpdateRadarColor(); - // TODO: updating all actors on the map is not very efficient. - onCellEntryChanged = _ => UpdateFromCellChange(); + onCellEntryChanged = cell => UpdateFromCellChange(cell); } public EditorActorPreview WithId(string id) @@ -88,8 +87,11 @@ public EditorActorPreview WithId(string id) return new EditorActorPreview(worldRenderer, id, reference.Clone(), Owner); } - void UpdateFromCellChange() + void UpdateFromCellChange(CPos? cellChanged) { + if (cellChanged != null && !Footprint.ContainsKey(cellChanged.Value)) + return; + CenterPosition = PreviewPosition(worldRenderer.World, reference); GeneratePreviews(); GenerateBounds(); @@ -169,8 +171,8 @@ public void AddedToEditor() foreach (var notify in Info.TraitInfos()) editorData[notify] = notify.AddedToEditor(this, worldRenderer.World); - // TODO: this should subscribe to ramp cell map as well. worldRenderer.World.Map.Height.CellEntryChanged += onCellEntryChanged; + worldRenderer.World.Map.Ramp.CellEntryChanged += onCellEntryChanged; } public void RemovedFromEditor() @@ -179,6 +181,7 @@ public void RemovedFromEditor() kv.Key.RemovedFromEditor(this, worldRenderer.World, kv.Value); worldRenderer.World.Map.Height.CellEntryChanged -= onCellEntryChanged; + worldRenderer.World.Map.Ramp.CellEntryChanged -= onCellEntryChanged; } public void AddInit(T init) where T : ActorInit diff --git a/OpenRA.Mods.Common/Traits/World/EditorResourceLayer.cs b/OpenRA.Mods.Common/Traits/World/EditorResourceLayer.cs index b0b4d063c423..c327d1660d29 100644 --- a/OpenRA.Mods.Common/Traits/World/EditorResourceLayer.cs +++ b/OpenRA.Mods.Common/Traits/World/EditorResourceLayer.cs @@ -185,7 +185,7 @@ void UpdateNetWorth(string oldResourceType, int oldDensity, string newResourceTy public int CalculateRegionValue(CellRegion sourceRegion) { var resourceValueInRegion = 0; - foreach (var cell in sourceRegion) + foreach (var cell in sourceRegion.CellCoords) { var mcell = cell.ToMPos(Map); if (Map.Resources.Contains(mcell) && Map.Resources[mcell].Type != 0) diff --git a/OpenRA.Mods.Common/UtilityCommands/CreateManPage.cs b/OpenRA.Mods.Common/UtilityCommands/CreateManPage.cs index 63ef62ec9c42..9866a2edde3e 100644 --- a/OpenRA.Mods.Common/UtilityCommands/CreateManPage.cs +++ b/OpenRA.Mods.Common/UtilityCommands/CreateManPage.cs @@ -65,7 +65,7 @@ void IUtilityCommand.Run(Utility utility, string[] args) Console.WriteLine(".SH FILES"); Console.WriteLine("Settings are stored in the ~/.openra user folder."); Console.WriteLine(".SH BUGS"); - Console.WriteLine("Known issues are tracked at http://bugs.openra.net"); + Console.WriteLine("Known issues are tracked at https://bugs.openra.net"); Console.WriteLine(".SH COPYRIGHT"); Console.WriteLine("Copyright (c) The OpenRA Developers and Contributors"); Console.WriteLine("This manual is part of OpenRA, which is free software. It is GNU GPL v3 licensed. See COPYING for details."); diff --git a/OpenRA.Mods.Common/Widgets/Logic/Editor/MapEditorSelectionLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Editor/MapEditorSelectionLogic.cs index 12b77d38975e..d2c73a3d2ebf 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Editor/MapEditorSelectionLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Editor/MapEditorSelectionLogic.cs @@ -11,7 +11,6 @@ using System; using System.Collections.Generic; -using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.Common.EditorBrushes; using OpenRA.Mods.Common.Traits; @@ -123,7 +122,7 @@ EditorClipboard CopySelectionContents() tiles.Add(cell, new ClipboardTile(mapTiles[cell], mapResources[cell], resourceLayer?.GetResource(cell), mapHeight[cell])); if (copyFilters.HasFlag(MapCopyFilters.Actors)) - foreach (var preview in selection.SelectMany(editorActorLayer.PreviewsAt).Distinct()) + foreach (var preview in editorActorLayer.PreviewsInCellRegion(selection.CellCoords)) previews.TryAdd(preview.ID, preview); } diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/ClassicProductionLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/ClassicProductionLogic.cs index b09ce9ded800..f7538b38c6a0 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/ClassicProductionLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/ClassicProductionLogic.cs @@ -42,7 +42,7 @@ void SelectTab(bool reverse) palette.PickUpCompletedBuilding(); } - button.IsDisabled = () => !queues.Any(q => q.BuildableItems().Any()); + button.IsDisabled = () => !queues.Any(q => q.AnyItemsToBuild()); button.OnMouseUp = mi => SelectTab(mi.Modifiers.HasModifier(Modifiers.Shift)); button.OnKeyPress = e => SelectTab(e.Modifiers.HasModifier(Modifiers.Shift)); button.OnClick = () => SelectTab(false); diff --git a/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs b/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs index b8f3b7e5c749..ad2e8fff21dd 100644 --- a/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs @@ -338,8 +338,11 @@ bool HandleLeftClick(ProductionItem item, ProductionIcon icon, int handleCount, if (buildable != null) { - // Queue a new item + if (CurrentQueue.Info.PayUpFront && currentQueue.GetProductionCost(buildable) > CurrentQueue.Actor.Owner.PlayerActor.Trait().GetCashAndResources()) + return false; Game.Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Sounds", ClickSound, null); + + // Queue a new item var canQueue = CurrentQueue.CanQueue(buildable, out var notification, out var textNotification); if (!CurrentQueue.AllQueued().Any()) @@ -366,7 +369,7 @@ bool HandleRightClick(ProductionItem item, ProductionIcon icon, int handleCount) Game.Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Sounds", ClickSound, null); - if (CurrentQueue.Info.DisallowPaused || item.Paused || item.Done || item.TotalCost == item.RemainingCost) + if (CurrentQueue.Info.DisallowPaused || item.Paused || item.Done || item.TotalCost == item.RemainingCost || !item.Started) { // Instantly cancel items that haven't started, have finished, or if the queue doesn't support pausing Game.Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Speech", CurrentQueue.Info.CancelledAudio, World.LocalPlayer.Faction.InternalName); diff --git a/configure-system-libraries.sh b/configure-system-libraries.sh index 0c9e3f35ea5e..1c2ceb1c3f49 100755 --- a/configure-system-libraries.sh +++ b/configure-system-libraries.sh @@ -3,7 +3,7 @@ #### # This file must stay /bin/sh and POSIX compliant for macOS and BSD portability. -# Copy-paste the entire script into http://shellcheck.net to check. +# Copy-paste the entire script into https://shellcheck.net to check. #### set -o errexit || exit $? diff --git a/fetch-geoip.sh b/fetch-geoip.sh index 2e121277678a..54a5c32acc97 100755 --- a/fetch-geoip.sh +++ b/fetch-geoip.sh @@ -3,7 +3,7 @@ #### # This file must stay /bin/sh and POSIX compliant for macOS and BSD portability. -# Copy-paste the entire script into http://shellcheck.net to check. +# Copy-paste the entire script into https://shellcheck.net to check. #### set -o errexit || exit $? diff --git a/glsl/combined.frag b/glsl/combined.frag index 30fb5017f099..cedc5d846cf1 100644 --- a/glsl/combined.frag +++ b/glsl/combined.frag @@ -51,7 +51,7 @@ vec3 hsv2rgb(vec3 c) float srgb2linear(float c) { - // Standard gamma conversion equation: see e.g. http://entropymine.com/imageworsener/srgbformula/ + // Standard gamma conversion equation: see e.g. https://entropymine.com/imageworsener/srgbformula/ return c <= 0.04045f ? c / 12.92f : pow((c + 0.055f) / 1.055f, 2.4f); } @@ -63,7 +63,7 @@ vec4 srgb2linear(vec4 c) float linear2srgb(float c) { - // Standard gamma conversion equation: see e.g. http://entropymine.com/imageworsener/srgbformula/ + // Standard gamma conversion equation: see e.g. https://entropymine.com/imageworsener/srgbformula/ return c <= 0.0031308 ? c * 12.92f : 1.055f * pow(c, 1.0f / 2.4f) - 0.055f; } diff --git a/launch-game.sh b/launch-game.sh index bef79bb19a17..c9ed268a3656 100755 --- a/launch-game.sh +++ b/launch-game.sh @@ -50,7 +50,7 @@ if [ "${rc}" != 0 ] && [ "${rc}" != 1 ]; then if [ -d Support/Logs ]; then LOGS="${PWD}/Support/Logs" fi - ERROR_MESSAGE=$(printf "%s has encountered a fatal error.\nPlease refer to the crash logs and FAQ for more information.\n\nLog files are located in %s\nThe FAQ is available at http://wiki.openra.net/FAQ" "OpenRA" "${LOGS}") + ERROR_MESSAGE=$(printf "%s has encountered a fatal error.\nPlease refer to the crash logs and FAQ for more information.\n\nLog files are located in %s\nThe FAQ is available at https://wiki.openra.net/FAQ" "OpenRA" "${LOGS}") if command -v zenity > /dev/null; then zenity --no-wrap --error --title "OpenRA" --no-markup --text "${ERROR_MESSAGE}" 2> /dev/null || : elif command -v kdialog > /dev/null; then diff --git a/mods/cnc/installer/downloads.yaml b/mods/cnc/installer/downloads.yaml index 4e80766a9cf5..c1f544d6d28c 100644 --- a/mods/cnc/installer/downloads.yaml +++ b/mods/cnc/installer/downloads.yaml @@ -1,7 +1,7 @@ basefiles: Base Freeware Content Type: ZipFile SHA1: 72f337464963fa37d3688eb03e80eefd33669a3d - MirrorList: http://www.openra.net/packages/cnc-mirrors.txt + MirrorList: https://www.openra.net/packages/cnc-mirrors.txt Extract: ^SupportDir|Content/cnc/conquer.mix: conquer.mix ^SupportDir|Content/cnc/desert.mix: desert.mix diff --git a/mods/d2k/bits/customtiles.r16 b/mods/d2k/bits/customtiles.r16 index 4f11e417db5e..0d80eafb8d2c 100644 Binary files a/mods/d2k/bits/customtiles.r16 and b/mods/d2k/bits/customtiles.r16 differ diff --git a/mods/d2k/installer/downloads.yaml b/mods/d2k/installer/downloads.yaml index 788ca2cad460..d0ff698e2e00 100644 --- a/mods/d2k/installer/downloads.yaml +++ b/mods/d2k/installer/downloads.yaml @@ -1,7 +1,7 @@ quickinstall: Quick Install Package Type: ZipFile SHA1: 7bcaa55408a5e6995b43a0d02862c4e8574cf861 - MirrorList: http://www.openra.net/packages/d2k-quickinstall-v3-mirrors.txt + MirrorList: https://www.openra.net/packages/d2k-quickinstall-v3-mirrors.txt Extract: ^SupportDir|Content/d2k/v3/BLOXBASE.R16: v3/BLOXBASE.R16 ^SupportDir|Content/d2k/v3/BLOXBAT.R16: v3/BLOXBAT.R16 @@ -269,7 +269,7 @@ quickinstall: Quick Install Package basefiles: Base Content Type: ZipFile SHA1: 399b9a6d5293298204d15ebe61145db155ed963c - MirrorList: http://www.openra.net/packages/d2k-base-v3-mirrors.txt + MirrorList: https://www.openra.net/packages/d2k-base-v3-mirrors.txt Extract: ^SupportDir|Content/d2k/v3/BLOXBASE.R16: v3/BLOXBASE.R16 ^SupportDir|Content/d2k/v3/BLOXBAT.R16: v3/BLOXBAT.R16 @@ -535,7 +535,7 @@ basefiles: Base Content patch106: Patch 1.06 Content Type: ZipFile SHA1: 86f3e468bdea6775d5744737ba5f375e5296e47c - MirrorList: http://www.openra.net/packages/d2k-patch106-v3-mirrors.txt + MirrorList: https://www.openra.net/packages/d2k-patch106-v3-mirrors.txt Extract: ^SupportDir|Content/d2k/v3/BLOXXMAS.R8: v3/BLOXXMAS.R8 ^SupportDir|Content/d2k/v3/DATA.R16: v3/DATA.R16 diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml index e11301b8fdc4..96489bd69128 100644 --- a/mods/d2k/mod.yaml +++ b/mods/d2k/mod.yaml @@ -274,7 +274,7 @@ ModContent: ContentPackage@patch: Title: 1.06 Patch Content Identifier: patch - TestFiles: ^SupportDir|Content/d2k/v3/DATA.R16, ^SupportDir|Content/d2k/v3/BLOXXMAS.R8 + TestFiles: ^SupportDir|Content/d2k/v3/DATA.R16 Sources: gruntmods Required: true Download: patch106 diff --git a/mods/d2k/rules/defaults.yaml b/mods/d2k/rules/defaults.yaml index 4f9bbe08dc67..f05220f8937a 100644 --- a/mods/d2k/rules/defaults.yaml +++ b/mods/d2k/rules/defaults.yaml @@ -308,7 +308,7 @@ AllowedTerrain: Sand, Rock, Transition, Concrete, Spice, SpiceSand, SpiceBlobs, Dune Locomotor: tank Targetable: - TargetTypes: Ground, Vehicle + TargetTypes: Ground, Vehicle, Husk RequiresForceFire: true WithColoredOverlay@husk: Color: 00000060 @@ -344,7 +344,7 @@ TransformOnCapture: ForceHealthPercentage: 20 InfiltrateForTransform: - Types: husk + Types: Husk ForceHealthPercentage: 20 ^AircraftHusk: diff --git a/mods/d2k/rules/infantry.yaml b/mods/d2k/rules/infantry.yaml index c832b3e0d2ce..8d5258f64b77 100644 --- a/mods/d2k/rules/infantry.yaml +++ b/mods/d2k/rules/infantry.yaml @@ -56,7 +56,7 @@ engineer: CaptureTypes: husk PlayerExperience: 10 Infiltrates: - Types: husk + Types: Husk ValidRelationships: Ally Captures@Cliff: CaptureTypes: cliff diff --git a/mods/d2k/tilesets/arrakis.yaml b/mods/d2k/tilesets/arrakis.yaml index 4aa13470f5c4..864a72232f48 100644 --- a/mods/d2k/tilesets/arrakis.yaml +++ b/mods/d2k/tilesets/arrakis.yaml @@ -4232,64 +4232,64 @@ Templates: 1: Rough Template@500: Id: 500 - Images: BLOXXMAS.R8 - Frames: 305 + Images: customtiles.r16 + Frames: 538 Size: 1,1 Categories: Rotten-Base Tiles: 0: Rough Template@501: Id: 501 - Images: BLOXXMAS.R8 - Frames: 325 + Images: customtiles.r16 + Frames: 558 Size: 1,1 Categories: Rotten-Base Tiles: 0: Sand Template@502: Id: 502 - Images: BLOXXMAS.R8 - Frames: 311 + Images: customtiles.r16 + Frames: 658 Size: 1,1 Categories: Rotten-Base Tiles: 0: Rough Template@503: Id: 503 - Images: BLOXXMAS.R8 - Frames: 312 + Images: customtiles.r16 + Frames: 659 Size: 1,1 Categories: Rotten-Base Tiles: 0: Rough Template@504: Id: 504 - Images: BLOXXMAS.R8 - Frames: 330 + Images: customtiles.r16 + Frames: 677 Size: 1,1 Categories: Rotten-Base Tiles: 0: Rough Template@505: Id: 505 - Images: BLOXXMAS.R8 - Frames: 316 + Images: customtiles.r16 + Frames: 556 Size: 1,1 Categories: Bridge Tiles: 0: Rough Template@506: Id: 506 - Images: BLOXXMAS.R8 - Frames: 297 + Images: customtiles.r16 + Frames: 537 Size: 1,1 Categories: Bridge Tiles: 0: Rough Template@507: Id: 507 - Images: BLOXXMAS.R8 - Frames: 356, 357 + Images: customtiles.r16 + Frames: 576, 577 Size: 2,1 Categories: Rotten-Base Tiles: @@ -4297,32 +4297,32 @@ Templates: 1: Rough Template@508: Id: 508 - Images: BLOXXMAS.R8 - Frames: 355 + Images: customtiles.r16 + Frames: 575 Size: 1,1 Categories: Rotten-Base Tiles: 0: Rough Template@509: Id: 509 - Images: BLOXXMAS.R8 - Frames: 375 + Images: customtiles.r16 + Frames: 595 Size: 1,1 Categories: Rotten-Base Tiles: 0: Rough Template@510: Id: 510 - Images: BLOXXMAS.R8 - Frames: 395 + Images: customtiles.r16 + Frames: 615 Size: 1,1 Categories: Rotten-Base Tiles: 0: Rough Template@511: Id: 511 - Images: BLOXXMAS.R8 - Frames: 414, 415, 434, 435 + Images: customtiles.r16 + Frames: 634, 635, 654, 655 Size: 2,2 Categories: Rotten-Base Tiles: @@ -4332,8 +4332,8 @@ Templates: 3: Rough Template@512: Id: 512 - Images: BLOXXMAS.R8 - Frames: 353, 354, 373, 374, 393, 394 + Images: customtiles.r16 + Frames: 573, 574, 593, 594, 613, 614 Size: 2,3 Categories: Bridge Tiles: @@ -4345,8 +4345,8 @@ Templates: 5: Rough Template@513: Id: 513 - Images: BLOXXMAS.R8 - Frames: 350, 351, 352, 370, 371, 372, 390, 391, 392 + Images: customtiles.r16 + Frames: 570, 571, 572, 590, 591, 592, 610, 611, 612 Size: 3,3 Categories: Bridge Tiles: @@ -4361,8 +4361,8 @@ Templates: 8: Rough Template@514: Id: 514 - Images: BLOXXMAS.R8 - Frames: 347, 348, 349, 367, 368, 369, 387, 388, 389 + Images: customtiles.r16 + Frames: 567, 568, 569, 587, 588, 589, 607, 608, 609 Size: 3,3 Categories: Bridge Tiles: @@ -4377,8 +4377,8 @@ Templates: 8: Rock Template@515: Id: 515 - Images: BLOXXMAS.R8 - Frames: 340, 341, 342, 343, 360, 361, 362, 363, 380, 381, 382, 383 + Images: customtiles.r16 + Frames: 560, 561, 562, 563, 580, 581, 582, 583, 600, 601, 602, 603 Size: 4,3 Categories: Bridge Tiles: @@ -4396,32 +4396,32 @@ Templates: 11: Cliff Template@516: Id: 516 - Images: BLOXXMAS.R8 - Frames: 717 + Images: customtiles.r16 + Frames: 620 Size: 1,1 Categories: Rotten-Base Tiles: 0: Cliff Template@517: Id: 517 - Images: BLOXXMAS.R8 - Frames: 718 + Images: customtiles.r16 + Frames: 621 Size: 1,1 Categories: Rotten-Base Tiles: 0: Rough Template@518: Id: 518 - Images: BLOXXMAS.R8 - Frames: 737 + Images: customtiles.r16 + Frames: 640 Size: 1,1 Categories: Rotten-Base Tiles: 0: Cliff Template@519: Id: 519 - Images: BLOXXMAS.R8 - Frames: 738, 739, 758, 759 + Images: customtiles.r16 + Frames: 641, 642, 661, 662 Size: 2,2 Categories: Rotten-Base Tiles: @@ -4431,8 +4431,8 @@ Templates: 3: Rough Template@520: Id: 520 - Images: BLOXXMAS.R8 - Frames: 652, 653, 672, 673 + Images: customtiles.r16 + Frames: 596, 597, 616, 617 Size: 2,2 Categories: Rotten-Base Tiles: @@ -6164,8 +6164,8 @@ Templates: 1: Rough Template@1085: Id: 1085 - Images: BLOXXMAS.R8 - Frames: 344, 345 + Images: customtiles.r16 + Frames: 564, 565 Size: 2,1 Categories: Bridge Tiles: @@ -6173,8 +6173,8 @@ Templates: 1: Transition Template@1086: Id: 1086 - Images: BLOXXMAS.R8 - Frames: 345, 346 + Images: customtiles.r16 + Frames: 565, 566 Size: 2,1 Categories: Bridge Tiles: @@ -6182,8 +6182,8 @@ Templates: 1: Cliff Template@1087: Id: 1087 - Images: BLOXXMAS.R8 - Frames: 364, 365 + Images: customtiles.r16 + Frames: 584, 585 Size: 2,1 Categories: Bridge Tiles: @@ -6191,8 +6191,8 @@ Templates: 1: Transition Template@1088: Id: 1088 - Images: BLOXXMAS.R8 - Frames: 365, 366 + Images: customtiles.r16 + Frames: 585, 586 Size: 2,1 Categories: Bridge Tiles: @@ -6200,8 +6200,8 @@ Templates: 1: Cliff Template@1089: Id: 1089 - Images: BLOXXMAS.R8 - Frames: 384, 385 + Images: customtiles.r16 + Frames: 604, 605 Size: 2,1 Categories: Bridge Tiles: @@ -6209,8 +6209,8 @@ Templates: 1: Transition Template@1090: Id: 1090 - Images: BLOXXMAS.R8 - Frames: 385, 386 + Images: customtiles.r16 + Frames: 605, 606 Size: 2,1 Categories: Bridge Tiles: @@ -6218,8 +6218,8 @@ Templates: 1: Cliff Template@1091: Id: 1091 - Images: BLOXXMAS.R8 - Frames: 1, 340, 2, 360 + Images: customtiles.r16 + Frames: 623, 560, 624, 580 Size: 2,2 Categories: Bridge Tiles: @@ -6229,8 +6229,8 @@ Templates: 3: Transition Template@1092: Id: 1092 - Images: BLOXXMAS.R8 - Frames: 343, 4, 363, 5 + Images: customtiles.r16 + Frames: 563, 625, 583, 626 Size: 2,2 Categories: Bridge Tiles: @@ -6240,8 +6240,8 @@ Templates: 3: Rock Template@1093: Id: 1093 - Images: BLOXXMAS.R8 - Frames: 2, 360, 3, 380 + Images: customtiles.r16 + Frames: 624, 580, 625, 600 Size: 2,2 Categories: Bridge Tiles: @@ -6251,8 +6251,8 @@ Templates: 3: Cliff Template@1094: Id: 1094 - Images: BLOXXMAS.R8 - Frames: 363, 5, 383, 6 + Images: customtiles.r16 + Frames: 583, 627, 603, 628 Size: 2,2 Categories: Bridge Tiles: @@ -6262,8 +6262,8 @@ Templates: 3: Rock Template@1095: Id: 1095 - Images: BLOXXMAS.R8 - Frames: 350, 351, 370, 371 + Images: customtiles.r16 + Frames: 570, 571, 590, 591 Size: 2,2 Categories: Bridge Tiles: @@ -6273,8 +6273,8 @@ Templates: 3: Transition Template@1096: Id: 1096 - Images: BLOXXMAS.R8 - Frames: 351, 352, 371, 372 + Images: customtiles.r16 + Frames: 571, 572, 591, 592 Size: 2,2 Categories: Bridge Tiles: @@ -6284,8 +6284,8 @@ Templates: 3: Cliff Template@1097: Id: 1097 - Images: BLOXXMAS.R8 - Frames: 367, 368, 387, 388 + Images: customtiles.r16 + Frames: 587, 588, 607, 608 Size: 2,2 Categories: Bridge Tiles: @@ -6295,8 +6295,8 @@ Templates: 3: Rock Template@1098: Id: 1098 - Images: BLOXXMAS.R8 - Frames: 368, 369, 388, 389 + Images: customtiles.r16 + Frames: 588, 589, 408, 409 Size: 2,2 Categories: Bridge Tiles: @@ -6306,8 +6306,8 @@ Templates: 3: Rock Template@1099: Id: 1099 - Images: BLOXXMAS.R8 - Frames: 341, 361 + Images: customtiles.r16 + Frames: 561, 581 Size: 1,2 Categories: Bridge Tiles: @@ -6315,8 +6315,8 @@ Templates: 1: Transition Template@1100: Id: 1100 - Images: BLOXXMAS.R8 - Frames: 342, 362 + Images: customtiles.r16 + Frames: 562, 582 Size: 1,2 Categories: Bridge Tiles: @@ -6324,8 +6324,8 @@ Templates: 1: Transition Template@1101: Id: 1101 - Images: BLOXXMAS.R8 - Frames: 353, 373 + Images: customtiles.r16 + Frames: 573, 593 Size: 1,2 Categories: Bridge Tiles: @@ -6333,8 +6333,8 @@ Templates: 1: Rough Template@1102: Id: 1102 - Images: BLOXXMAS.R8 - Frames: 354, 374 + Images: customtiles.r16 + Frames: 574, 594 Size: 1,2 Categories: Bridge Tiles: @@ -6342,8 +6342,8 @@ Templates: 1: Rough Template@1103: Id: 1103 - Images: BLOXXMAS.R8 - Frames: 361, 381 + Images: customtiles.r16 + Frames: 581, 601 Size: 1,2 Categories: Bridge Tiles: @@ -6351,8 +6351,8 @@ Templates: 1: Cliff Template@1104: Id: 1104 - Images: BLOXXMAS.R8 - Frames: 362, 382 + Images: customtiles.r16 + Frames: 582, 602 Size: 1,2 Categories: Bridge Tiles: @@ -6360,8 +6360,8 @@ Templates: 1: Cliff Template@1105: Id: 1105 - Images: BLOXXMAS.R8 - Frames: 297, 393 + Images: customtiles.r16 + Frames: 593, 613 Size: 1,2 Categories: Bridge Tiles: @@ -6369,8 +6369,8 @@ Templates: 1: Rough Template@1106: Id: 1106 - Images: BLOXXMAS.R8 - Frames: 316, 394 + Images: customtiles.r16 + Frames: 594, 614 Size: 1,2 Categories: Bridge Tiles: @@ -6386,8 +6386,8 @@ Templates: 0: Rock Template@1108: Id: 1108 - Images: BLOXXMAS.R8 - Frames: 289, 290, 309, 310 + Images: customtiles.r16 + Frames: 636, 637, 656, 657 Size: 2,2 Categories: Rotten-Base Tiles: @@ -6397,8 +6397,8 @@ Templates: 3: Rough Template@1109: Id: 1109 - Images: BLOXXMAS.R8 - Frames: 347, 348 + Images: customtiles.r16 + Frames: 567, 568 Size: 2,1 Categories: Bridge Tiles: @@ -6406,8 +6406,8 @@ Templates: 1: Rough Template@1110: Id: 1110 - Images: BLOXXMAS.R8 - Frames: 348, 349 + Images: customtiles.r16 + Frames: 568, 569 Size: 2,1 Categories: Bridge Tiles: @@ -6415,8 +6415,8 @@ Templates: 1: Rough Template@1111: Id: 1111 - Images: BLOXXMAS.R8 - Frames: 390, 391 + Images: customtiles.r16 + Frames: 610, 611 Size: 2,1 Categories: Bridge Tiles: @@ -6424,8 +6424,8 @@ Templates: 1: Rough Template@1112: Id: 1112 - Images: BLOXXMAS.R8 - Frames: 391, 392 + Images: customtiles.r16 + Frames: 611, 612 Size: 2,1 Categories: Bridge Tiles: diff --git a/mods/ra/installer/downloads.yaml b/mods/ra/installer/downloads.yaml index 96f5d24f1f2f..60db7323498c 100644 --- a/mods/ra/installer/downloads.yaml +++ b/mods/ra/installer/downloads.yaml @@ -1,7 +1,7 @@ quickinstall: Quick Install Package Type: ZipFile SHA1: 44241f68e69db9511db82cf83c174737ccda300b - MirrorList: http://www.openra.net/packages/ra-quickinstall-mirrors.txt + MirrorList: https://www.openra.net/packages/ra-quickinstall-mirrors.txt Extract: ^SupportDir|Content/ra/v2/allies.mix: allies.mix ^SupportDir|Content/ra/v2/conquer.mix: conquer.mix @@ -46,7 +46,7 @@ quickinstall: Quick Install Package basefiles: Base Freeware Content Type: ZipFile SHA1: aa022b208a3b45b4a45c00fdae22ccf3c6de3e5c - MirrorList: http://www.openra.net/packages/ra-base-mirrors.txt + MirrorList: https://www.openra.net/packages/ra-base-mirrors.txt Extract: ^SupportDir|Content/ra/v2/allies.mix: allies.mix ^SupportDir|Content/ra/v2/conquer.mix: conquer.mix @@ -63,7 +63,7 @@ basefiles: Base Freeware Content aftermath: Aftermath Expansion Files Type: ZipFile SHA1: d511d4363b485e11c63eecf96d4365d42ec4ef5e - MirrorList: http://www.openra.net/packages/ra-aftermath-mirrors.txt + MirrorList: https://www.openra.net/packages/ra-aftermath-mirrors.txt Extract: ^SupportDir|Content/ra/v2/expand/chrotnk1.aud: expand/chrotnk1.aud ^SupportDir|Content/ra/v2/expand/expand2.mix: expand/expand2.mix @@ -96,6 +96,6 @@ aftermath: Aftermath Expansion Files cncdesert: C&C Desert Tileset Type: ZipFile SHA1: 039849f16e39e4722e8c838a393c8a0d6529fd59 - MirrorList: http://www.openra.net/packages/ra-cncdesert-mirrors.txt + MirrorList: https://www.openra.net/packages/ra-cncdesert-mirrors.txt Extract: ^SupportDir|Content/ra/v2/cnc/desert.mix: cnc/desert.mix diff --git a/mods/ts/installer/downloads.yaml b/mods/ts/installer/downloads.yaml index 96f79ba54a7f..eab6dfcef056 100644 --- a/mods/ts/installer/downloads.yaml +++ b/mods/ts/installer/downloads.yaml @@ -1,7 +1,7 @@ basefiles: Base Freeware Content Type: ZipFile SHA1: 824df30de0004ad13fac29cf16450caafee9fb1b - MirrorList: http://www.openra.net/packages/ts-mirrors.txt + MirrorList: https://www.openra.net/packages/ts-mirrors.txt Extract: ^SupportDir|Content/ts/cache.mix: cache.mix ^SupportDir|Content/ts/conquer.mix: conquer.mix @@ -21,7 +21,7 @@ basefiles: Base Freeware Content fstorm: Expansion Freeware Content Type: ZipFile SHA1: 8bff90870a9348b72cbe91314aec7d3a50311aa9 - MirrorList: http://www.openra.net/packages/fs-mirrors.txt + MirrorList: https://www.openra.net/packages/fs-mirrors.txt Extract: ^SupportDir|Content/ts/firestorm/c_kodiak.shp: firestorm/c_kodiak.shp ^SupportDir|Content/ts/firestorm/coremk.shp: firestorm/coremk.shp @@ -205,7 +205,7 @@ fstorm: Expansion Freeware Content quickinstall: Quick Install Package Type: ZipFile SHA1: d9339e7b6ecf624ac6ca91d25c58b88fb88a49d2 - MirrorList: http://www.openra.net/packages/ts-quickinstall-mirrors.txt + MirrorList: https://www.openra.net/packages/ts-quickinstall-mirrors.txt Extract: ^SupportDir|Content/ts/cache.mix: cache.mix ^SupportDir|Content/ts/conquer.mix: conquer.mix diff --git a/packaging/functions.sh b/packaging/functions.sh index 7f8e42cf0a2d..b346d0e78db6 100755 --- a/packaging/functions.sh +++ b/packaging/functions.sh @@ -3,7 +3,7 @@ #### # This file must stay /bin/sh and POSIX compliant for macOS and BSD portability. -# Copy-paste the entire script into http://shellcheck.net to check. +# Copy-paste the entire script into https://shellcheck.net to check. #### # Compile and publish the core engine and specified mod assemblies to the target directory diff --git a/packaging/linux/openra-mimeinfo.xml.discord.in b/packaging/linux/openra-mimeinfo.xml.discord.in index fd8e5ddf43db..a87d1dc54e6a 100644 --- a/packaging/linux/openra-mimeinfo.xml.discord.in +++ b/packaging/linux/openra-mimeinfo.xml.discord.in @@ -1,5 +1,5 @@ - + diff --git a/packaging/linux/openra-mimeinfo.xml.in b/packaging/linux/openra-mimeinfo.xml.in index f4b7e3780536..2240980c0ac5 100644 --- a/packaging/linux/openra-mimeinfo.xml.in +++ b/packaging/linux/openra-mimeinfo.xml.in @@ -1,5 +1,5 @@ - + diff --git a/packaging/linux/openra.appimage.in b/packaging/linux/openra.appimage.in index ff21037dce34..f5dcaf59f505 100755 --- a/packaging/linux/openra.appimage.in +++ b/packaging/linux/openra.appimage.in @@ -58,7 +58,7 @@ if [ "${rc}" != 0 ] && [ "${rc}" != 1 ]; then if [ -d Support/Logs ]; then LOGS="${PWD}/Support/Logs" fi - ERROR_MESSAGE=$(printf "%s has encountered a fatal error.\nPlease refer to the crash logs and FAQ for more information.\n\nLog files are located in %s\nThe FAQ is available at http://wiki.openra.net/FAQ" "{MODNAME}" "${LOGS}") + ERROR_MESSAGE=$(printf "%s has encountered a fatal error.\nPlease refer to the crash logs and FAQ for more information.\n\nLog files are located in %s\nThe FAQ is available at https://wiki.openra.net/FAQ" "{MODNAME}" "${LOGS}") if command -v zenity > /dev/null; then zenity --no-wrap --error --title "{MODNAME}" --no-markup --text "${ERROR_MESSAGE}" 2> /dev/null || : elif command -v kdialog > /dev/null; then diff --git a/packaging/linux/openra.in b/packaging/linux/openra.in index dc7474c1745a..3a02e3e87bbe 100755 --- a/packaging/linux/openra.in +++ b/packaging/linux/openra.in @@ -29,7 +29,7 @@ if [ "${rc}" != 0 ] && [ "${rc}" != 1 ]; then if [ -d Support/Logs ]; then LOGS="${PWD}/Support/Logs" fi - ERROR_MESSAGE=$(printf "%s has encountered a fatal error.\nPlease refer to the crash logs and FAQ for more information.\n\nLog files are located in %s\nThe FAQ is available at http://wiki.openra.net/FAQ" "{MODNAME}" "${LOGS}") + ERROR_MESSAGE=$(printf "%s has encountered a fatal error.\nPlease refer to the crash logs and FAQ for more information.\n\nLog files are located in %s\nThe FAQ is available at https://wiki.openra.net/FAQ" "{MODNAME}" "${LOGS}") if command -v zenity > /dev/null; then zenity --no-wrap --error --title "{MODNAME}" --no-markup --text "${ERROR_MESSAGE}" 2> /dev/null || : elif command -v kdialog > /dev/null; then diff --git a/packaging/linux/openra.metainfo.xml.in b/packaging/linux/openra.metainfo.xml.in index 72928a8a4bc8..1d8126f1d73f 100644 --- a/packaging/linux/openra.metainfo.xml.in +++ b/packaging/linux/openra.metainfo.xml.in @@ -45,6 +45,7 @@ https://www.openra.net https://github.com/OpenRA/OpenRA/issues + https://www.patreon.com/orahosting paul_at_chote.net The OpenRA Developers diff --git a/packaging/macos/Info.plist.in b/packaging/macos/Info.plist.in index 7897c7414fc8..337f8c992a7b 100644 --- a/packaging/macos/Info.plist.in +++ b/packaging/macos/Info.plist.in @@ -1,5 +1,5 @@ - + CFBundleDevelopmentRegion diff --git a/packaging/macos/buildpackage.sh b/packaging/macos/buildpackage.sh index c25657df1f2e..7a06b9b62e1e 100755 --- a/packaging/macos/buildpackage.sh +++ b/packaging/macos/buildpackage.sh @@ -121,7 +121,7 @@ mkdir -p "${TEMPLATE_DIR}/Contents/MacOS/arm64" echo "APPL????" > "${TEMPLATE_DIR}/Contents/PkgInfo" cp Info.plist.in "${TEMPLATE_DIR}/Contents/Info.plist" modify_plist "{DEV_VERSION}" "${TAG}" "${TEMPLATE_DIR}/Contents/Info.plist" -modify_plist "{FAQ_URL}" "http://wiki.openra.net/FAQ" "${TEMPLATE_DIR}/Contents/Info.plist" +modify_plist "{FAQ_URL}" "https://wiki.openra.net/FAQ" "${TEMPLATE_DIR}/Contents/Info.plist" modify_plist "{MINIMUM_SYSTEM_VERSION}" "10.11" "${TEMPLATE_DIR}/Contents/Info.plist" # Compile universal (x86_64 + arm64) arch-specific apphosts diff --git a/packaging/macos/entitlements.plist b/packaging/macos/entitlements.plist index dcfe14ccd438..570ad63c260b 100644 --- a/packaging/macos/entitlements.plist +++ b/packaging/macos/entitlements.plist @@ -1,5 +1,5 @@ - + com.apple.security.cs.allow-jit diff --git a/packaging/windows/OpenRA.nsi b/packaging/windows/OpenRA.nsi index 84380e548493..b45180828135 100644 --- a/packaging/windows/OpenRA.nsi +++ b/packaging/windows/OpenRA.nsi @@ -12,7 +12,7 @@ ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License -; along with OpenRA. If not, see . +; along with OpenRA. If not, see . !include "MUI2.nsh" !include "FileFunc.nsh" @@ -193,7 +193,7 @@ Section "-Uninstaller" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}" "InstallLocation" "$INSTDIR" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}" "DisplayIcon" "$INSTDIR\ra.ico" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}" "Publisher" "OpenRA developers" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}" "URLInfoAbout" "http://openra.net" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}" "URLInfoAbout" "https://openra.net" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}" "DisplayVersion" "${TAG}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}" "NoModify" "1" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}" "NoRepair" "1"