Compare commits

..

8 Commits

Author SHA1 Message Date
teinarss
24c069b263 Add support for dotnet core for Windows 2020-12-25 11:23:23 +01:00
teinarss
73bba97aaa Update MasterServerPinger to modern approach 2020-12-22 20:57:40 +01:00
abcdefg30
d6e9cdab5b Add the 9th Dark Tournament map as "Oil Spill" 2020-12-21 21:08:39 +01:00
Paul Chote
1a177bc2de Remove unused variables from Map.SavePreview. 2020-12-19 13:07:01 +01:00
Paul Chote
e0b3e631fe Remove obsolete null checks. 2020-12-19 13:07:01 +01:00
Paul Chote
2518a353af Add lint test for invalid map tiles. 2020-12-19 13:07:01 +01:00
Paul Chote
989800efff Fix missing tiles in upstream maps. 2020-12-19 13:07:01 +01:00
Paul Chote
c02846e2cb Replace invalid tiles on map load. 2020-12-19 13:07:01 +01:00
29 changed files with 707 additions and 123 deletions

View File

@@ -33,9 +33,16 @@ jobs:
- name: Clone Repository
uses: actions/checkout@v2
- name: Install .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Check Code
shell: powershell
run: |
# Work around runtime failures on the GH Actions runner
dotnet nuget locals all --clear
.\make.ps1 check
dotnet build OpenRA.Test\OpenRA.Test.csproj -c Debug --nologo -p:TargetPlatform=win-x64
dotnet test bin\OpenRA.Test.dll --test-adapter-path:.

View File

@@ -69,6 +69,11 @@ jobs:
- name: Clone Repository
uses: actions/checkout@v2
- name: Install .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Prepare Environment
run: |
echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> ${GITHUB_ENV}

View File

@@ -168,10 +168,7 @@ namespace OpenRA.Graphics
for (var x = 0; x < template.Size.X; x++)
{
var tile = new TerrainTile(template.Id, (byte)(i++));
var tileInfo = tileset.GetTileInfo(tile);
// Empty tile
if (tileInfo == null)
if (!tileset.TryGetTileInfo(tile, out var tileInfo))
continue;
var sprite = TileSprite(tile);

View File

@@ -206,6 +206,8 @@ namespace OpenRA
public readonly MiniYaml NotificationDefinitions;
public readonly MiniYaml TranslationDefinitions;
public readonly Dictionary<CPos, TerrainTile> ReplacedInvalidTerrainTiles = new Dictionary<CPos, TerrainTile>();
// Generated data
public readonly MapGrid Grid;
public IReadOnlyPackage Package { get; private set; }
@@ -287,7 +289,6 @@ namespace OpenRA
this.modData = modData;
var size = new Size(width, height);
Grid = modData.Manifest.Get<MapGrid>();
var tileRef = new TerrainTile(tileset.Templates.First().Key, 0);
Title = "Name your map here";
Author = "Your name here";
@@ -310,7 +311,7 @@ namespace OpenRA
Tiles.CellEntryChanged += UpdateRamp;
}
Tiles.Clear(tileRef);
Tiles.Clear(tileset.DefaultTerrainTile);
PostInit();
}
@@ -430,12 +431,18 @@ namespace OpenRA
foreach (var uv in AllCells.MapCoords)
CustomTerrain[uv] = byte.MaxValue;
// Cache initial ramp state
// Replace invalid tiles and cache ramp state
var tileset = Rules.TileSet;
foreach (var uv in AllCells)
foreach (var uv in AllCells.MapCoords)
{
var tile = tileset.GetTileInfo(Tiles[uv]);
Ramp[uv] = tile != null ? tile.RampType : (byte)0;
if (!tileset.TryGetTileInfo(Tiles[uv], out var info))
{
ReplacedInvalidTerrainTiles[uv.ToCPos(this)] = Tiles[uv];
Tiles[uv] = tileset.DefaultTerrainTile;
info = tileset.GetTileInfo(tileset.DefaultTerrainTile);
}
Ramp[uv] = info.RampType;
}
AllEdgeCells = UpdateEdgeCells();
@@ -443,8 +450,7 @@ namespace OpenRA
void UpdateRamp(CPos cell)
{
var tile = Rules.TileSet.GetTileInfo(Tiles[cell]);
Ramp[cell] = tile != null ? tile.RampType : (byte)0;
Ramp[cell] = Rules.TileSet.GetTileInfo(Tiles[cell]).RampType;
}
void InitializeCellProjection()
@@ -670,32 +676,26 @@ namespace OpenRA
Color left, right;
var tileset = Rules.TileSet;
var type = tileset.GetTileInfo(Tiles[uv]);
if (type != null)
if (type.MinColor != type.MaxColor)
{
if (type.MinColor != type.MaxColor)
{
left = Exts.ColorLerp(Game.CosmeticRandom.NextFloat(), type.MinColor, type.MaxColor);
right = Exts.ColorLerp(Game.CosmeticRandom.NextFloat(), type.MinColor, type.MaxColor);
}
else
left = right = type.MinColor;
if (tileset.MinHeightColorBrightness != 1.0f || tileset.MaxHeightColorBrightness != 1.0f)
{
var scale = float2.Lerp(tileset.MinHeightColorBrightness, tileset.MaxHeightColorBrightness, Height[uv] * 1f / Grid.MaximumTerrainHeight);
left = Color.FromArgb((int)(scale * left.R).Clamp(0, 255), (int)(scale * left.G).Clamp(0, 255), (int)(scale * left.B).Clamp(0, 255));
right = Color.FromArgb((int)(scale * right.R).Clamp(0, 255), (int)(scale * right.G).Clamp(0, 255), (int)(scale * right.B).Clamp(0, 255));
}
left = Exts.ColorLerp(Game.CosmeticRandom.NextFloat(), type.MinColor, type.MaxColor);
right = Exts.ColorLerp(Game.CosmeticRandom.NextFloat(), type.MinColor, type.MaxColor);
}
else
left = right = Color.Black;
left = right = type.MinColor;
if (tileset.MinHeightColorBrightness != 1.0f || tileset.MaxHeightColorBrightness != 1.0f)
{
var scale = float2.Lerp(tileset.MinHeightColorBrightness, tileset.MaxHeightColorBrightness, Height[uv] * 1f / Grid.MaximumTerrainHeight);
left = Color.FromArgb((int)(scale * left.R).Clamp(0, 255), (int)(scale * left.G).Clamp(0, 255), (int)(scale * left.B).Clamp(0, 255));
right = Color.FromArgb((int)(scale * right.R).Clamp(0, 255), (int)(scale * right.G).Clamp(0, 255), (int)(scale * right.B).Clamp(0, 255));
}
return (left, right);
}
public byte[] SavePreview()
{
var tileset = Rules.TileSet;
var actorTypes = Rules.Actors.Values.Where(a => a.HasTraitInfo<IMapPreviewSignatureInfo>());
var actors = ActorDefinitions.Where(a => actorTypes.Where(ai => ai.Name == a.Value.Value).Any());
var positions = new List<(MPos Position, Color Color)>();
@@ -715,76 +715,73 @@ namespace OpenRA
foreach (var worldimpsi in worldimpsis)
worldimpsi.PopulateMapPreviewSignatureCells(this, worldActorInfo, null, positions);
using (var stream = new MemoryStream())
var isRectangularIsometric = Grid.Type == MapGridType.RectangularIsometric;
// Fudge the heightmap offset by adding as much extra as we need / can.
// This tries to correct for our incorrect assumption that MPos == PPos
var heightOffset = Math.Min(Grid.MaximumTerrainHeight, MapSize.Y - Bounds.Bottom);
var width = Bounds.Width;
var height = Bounds.Height + heightOffset;
var bitmapWidth = width;
if (isRectangularIsometric)
bitmapWidth = 2 * bitmapWidth - 1;
var stride = bitmapWidth * 4;
var pxStride = 4;
var minimapData = new byte[stride * height];
(Color Left, Color Right) terrainColor = default((Color, Color));
for (var y = 0; y < height; y++)
{
var isRectangularIsometric = Grid.Type == MapGridType.RectangularIsometric;
// Fudge the heightmap offset by adding as much extra as we need / can.
// This tries to correct for our incorrect assumption that MPos == PPos
var heightOffset = Math.Min(Grid.MaximumTerrainHeight, MapSize.Y - Bounds.Bottom);
var width = Bounds.Width;
var height = Bounds.Height + heightOffset;
var bitmapWidth = width;
if (isRectangularIsometric)
bitmapWidth = 2 * bitmapWidth - 1;
var stride = bitmapWidth * 4;
var pxStride = 4;
var minimapData = new byte[stride * height];
(Color Left, Color Right) terrainColor = default((Color, Color));
for (var y = 0; y < height; y++)
for (var x = 0; x < width; x++)
{
for (var x = 0; x < width; x++)
var uv = new MPos(x + Bounds.Left, y + Bounds.Top);
// FirstOrDefault will return a (MPos.Zero, Color.Transparent) if positions is empty
var actorColor = positions.FirstOrDefault(ap => ap.Position == uv).Color;
if (actorColor.A == 0)
terrainColor = GetTerrainColorPair(uv);
if (isRectangularIsometric)
{
var uv = new MPos(x + Bounds.Left, y + Bounds.Top);
// FirstOrDefault will return a (MPos.Zero, Color.Transparent) if positions is empty
var actorColor = positions.FirstOrDefault(ap => ap.Position == uv).Color;
if (actorColor.A == 0)
terrainColor = GetTerrainColorPair(uv);
if (isRectangularIsometric)
// Odd rows are shifted right by 1px
var dx = uv.V & 1;
var xOffset = pxStride * (2 * x + dx);
if (x + dx > 0)
{
// Odd rows are shifted right by 1px
var dx = uv.V & 1;
var xOffset = pxStride * (2 * x + dx);
if (x + dx > 0)
{
var z = y * stride + xOffset - pxStride;
var c = actorColor.A == 0 ? terrainColor.Left : actorColor;
minimapData[z++] = c.R;
minimapData[z++] = c.G;
minimapData[z++] = c.B;
minimapData[z] = c.A;
}
if (xOffset < stride)
{
var z = y * stride + xOffset;
var c = actorColor.A == 0 ? terrainColor.Right : actorColor;
minimapData[z++] = c.R;
minimapData[z++] = c.G;
minimapData[z++] = c.B;
minimapData[z] = c.A;
}
}
else
{
var z = y * stride + pxStride * x;
var z = y * stride + xOffset - pxStride;
var c = actorColor.A == 0 ? terrainColor.Left : actorColor;
minimapData[z++] = c.R;
minimapData[z++] = c.G;
minimapData[z++] = c.B;
minimapData[z] = c.A;
}
if (xOffset < stride)
{
var z = y * stride + xOffset;
var c = actorColor.A == 0 ? terrainColor.Right : actorColor;
minimapData[z++] = c.R;
minimapData[z++] = c.G;
minimapData[z++] = c.B;
minimapData[z] = c.A;
}
}
else
{
var z = y * stride + pxStride * x;
var c = actorColor.A == 0 ? terrainColor.Left : actorColor;
minimapData[z++] = c.R;
minimapData[z++] = c.G;
minimapData[z++] = c.B;
minimapData[z] = c.A;
}
}
var png = new Png(minimapData, bitmapWidth, height);
return png.Save();
}
var png = new Png(minimapData, bitmapWidth, height);
return png.Save();
}
public bool Contains(CPos cell)

View File

@@ -23,6 +23,8 @@ namespace OpenRA
}
public override int GetHashCode() { return Type.GetHashCode() ^ Index.GetHashCode(); }
public override string ToString() { return Type + "," + Index; }
}
public struct ResourceTile

View File

@@ -221,25 +221,30 @@ namespace OpenRA
public byte GetTerrainIndex(TerrainTile r)
{
if (!Templates.TryGetValue(r.Type, out var tpl))
return defaultWalkableTerrainIndex;
if (tpl.Contains(r.Index))
{
var tile = tpl[r.Index];
if (tile != null && tile.TerrainType != byte.MaxValue)
return tile.TerrainType;
}
var tile = Templates[r.Type][r.Index];
if (tile.TerrainType != byte.MaxValue)
return tile.TerrainType;
return defaultWalkableTerrainIndex;
}
public TerrainTileInfo GetTileInfo(TerrainTile r)
{
if (!Templates.TryGetValue(r.Type, out var tpl))
return null;
return tpl.Contains(r.Index) ? tpl[r.Index] : null;
return Templates[r.Type][r.Index];
}
public bool TryGetTileInfo(TerrainTile r, out TerrainTileInfo info)
{
if (!Templates.TryGetValue(r.Type, out var tpl) || !tpl.Contains(r.Index))
{
info = null;
return false;
}
info = tpl[r.Index];
return info != null;
}
public TerrainTile DefaultTerrainTile { get { return new TerrainTile(Templates.First().Key, 0); } }
}
}

View File

@@ -42,14 +42,8 @@ namespace OpenRA
var resolvedPath = FileSystem.FileSystem.ResolveAssemblyPath(path, manifest, mods);
if (resolvedPath == null)
throw new FileNotFoundException("Assembly `{0}` not found.".F(path));
#if !MONO
var loader = new AssemblyLoader(resolvedPath);
var platformType = loader.LoadDefaultAssembly();
assemblyList.Add(platformType);
#else
LoadAssembly(assemblyList, resolvedPath);
#endif
}
AppDomain.CurrentDomain.AssemblyResolve += ResolveAssembly;
@@ -66,6 +60,7 @@ namespace OpenRA
if (!ResolvedAssemblies.TryGetValue(hash, out var assembly))
{
#if MONO
assembly = Assembly.LoadFile(resolvedPath);
ResolvedAssemblies.Add(hash, assembly);
@@ -80,6 +75,11 @@ namespace OpenRA
LoadAssembly(assemblyList, depedencyPath);
}
}
#else
var loader = new AssemblyLoader(resolvedPath);
assembly = loader.LoadDefaultAssembly();
ResolvedAssemblies.Add(hash, assembly);
#endif
}
assemblyList.Add(assembly);

View File

@@ -9,7 +9,8 @@
*/
#endregion
// Not used/usable on Mono. Only used for Dotnet Core. Based on https://github.com/natemcmaster/DotNetCorePlugins
// Not used/usable on Mono. Only used for Dotnet Core.
// Based on https://github.com/natemcmaster/DotNetCorePlugins and used under the terms of the Apache 2.0 license
#if !MONO
using System;
using System.Collections.Generic;

View File

@@ -89,9 +89,6 @@ namespace OpenRA.Mods.Common.Widgets
var tile = world.Map.Tiles[cell];
var tileInfo = world.Map.Rules.TileSet.GetTileInfo(tile);
if (tileInfo == null)
return false;
var terrainType = world.Map.Rules.TileSet.TerrainInfo[tileInfo.TerrainType];
if (mapResources[cell].Type == ResourceType.ResourceType)

View File

@@ -0,0 +1,25 @@
#region Copyright & License Information
/*
* Copyright 2007-2020 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Linq;
namespace OpenRA.Mods.Common.Lint
{
public class CheckMapTiles : ILintMapPass
{
public void Run(Action<string> emitError, Action<string> emitWarning, ModData modData, Map map)
{
foreach (var kv in map.ReplacedInvalidTerrainTiles)
emitError("Cell {0} references invalid terrain tile {1}.".F(kv.Key, kv.Value));
}
}
}

View File

@@ -13,6 +13,7 @@ using System;
using System.Collections.Generic;
using System.Net;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using BeaconLib;
using OpenRA.Network;
using OpenRA.Server;
@@ -107,7 +108,7 @@ namespace OpenRA.Mods.Common.Server
{
isBusy = true;
Action a = () =>
Task.Run(() =>
{
try
{
@@ -160,9 +161,7 @@ namespace OpenRA.Mods.Common.Server
}
isBusy = false;
};
a.BeginInvoke(null, null);
});
}
}
}

View File

@@ -78,10 +78,7 @@ namespace OpenRA.Mods.Common.Traits
for (var x = 0; x < TerrainTemplate.Size.X; x++)
{
var tile = new TerrainTile(TerrainTemplate.Id, (byte)i++);
var tileInfo = world.Map.Rules.TileSet.GetTileInfo(tile);
// Empty tile
if (tileInfo == null)
if (!world.Map.Rules.TileSet.TryGetTileInfo(tile, out var tileInfo))
continue;
var sprite = wr.Theater.TileSprite(tile, 0);

View File

@@ -81,10 +81,7 @@ namespace OpenRA.Mods.Common.Widgets
for (var x = 0; x < Template.Size.X; x++)
{
var tile = new TerrainTile(Template.Id, (byte)(i++));
var tileInfo = tileset.GetTileInfo(tile);
// Empty tile
if (tileInfo == null)
if (!tileset.TryGetTileInfo(tile, out var tileInfo))
continue;
var sprite = worldRenderer.Theater.TileSprite(tile, 0);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -0,0 +1,309 @@
MapFormat: 11
RequiresMod: ra
Title: Oil Spill
Author: Super Newbie
Tileset: DESERT
MapSize: 120,120
Bounds: 1,1,118,118
Visibility: Lobby
Categories: Minigame
Players:
PlayerReference@Neutral:
Name: Neutral
OwnsWorld: True
NonCombatant: True
Faction: england
PlayerReference@Creeps:
Name: Creeps
NonCombatant: True
Faction: england
Enemies: Multi0, Multi1, Multi2, Multi3
PlayerReference@Multi0:
Name: Multi0
Playable: True
AllowBots: False
LockFaction: True
Faction: allies
Enemies: Creeps
PlayerReference@Multi1:
Name: Multi1
Playable: True
AllowBots: False
LockFaction: True
Faction: allies
Enemies: Creeps
PlayerReference@Multi2:
Name: Multi2
Playable: True
AllowBots: False
LockFaction: True
Faction: allies
Enemies: Creeps
PlayerReference@Multi3:
Name: Multi3
Playable: True
AllowBots: False
LockFaction: True
Faction: allies
Enemies: Creeps
Actors:
Actor1: rock1
Owner: Neutral
Location: 112,21
Actor2: tc01
Owner: Neutral
Location: 50,4
Actor3: tc01
Owner: Neutral
Location: 117,23
Actor4: tc01
Owner: Neutral
Location: 115,31
Actor5: tc01
Owner: Neutral
Location: 113,13
Actor6: tc01
Owner: Neutral
Location: 108,3
Actor7: v37
Owner: Neutral
Location: 66,3
Actor8: v30
Owner: Neutral
Location: 69,2
Actor9: v31
Owner: Neutral
Location: 48,3
Actor10: v24
Owner: Neutral
Location: 46,3
Actor12: v24
Owner: Neutral
Location: 117,102
Actor13: tc01
Owner: Neutral
Location: 94,116
Actor14: tc01
Owner: Neutral
Location: 102,111
Actor15: t08
Owner: Neutral
Location: 105,4
Actor18: rock6
Owner: Neutral
Location: 15,114
Actor19: rock7
Owner: Neutral
Location: 41,112
Actor20: rock6
Owner: Neutral
Location: 74,113
Actor21: tc01
Owner: Neutral
Location: 31,113
Actor22: tc01
Owner: Neutral
Location: 62,113
Actor23: t08
Owner: Neutral
Location: 74,112
Actor24: v25
Owner: Neutral
Location: 116,99
Actor26: tc01
Owner: Neutral
Location: 3,30
Actor25: tc01
Owner: Neutral
Location: 4,36
Actor27: rock2
Owner: Neutral
Location: 5,81
Actor28: v21
Owner: Neutral
Location: 3,88
Actor29: v30
Owner: Neutral
Location: 2,91
Actor30: t08
Owner: Neutral
Location: 5,41
Actor31: tc01
Owner: Neutral
Location: 72,34
Actor32: t08
Owner: Neutral
Location: 71,34
Actor33: tc01
Owner: Neutral
Location: 82,44
Actor36: oilb
Owner: Neutral
Location: 51,51
Actor37: oilb
Owner: Neutral
Location: 67,51
Actor38: oilb
Owner: Neutral
Location: 51,67
Actor39: oilb
Owner: Neutral
Location: 67,67
Actor44: oilb
Owner: Neutral
Location: 46,82
Actor45: oilb
Owner: Neutral
Location: 36,72
Actor46: oilb
Owner: Neutral
Location: 72,82
Actor47: oilb
Owner: Neutral
Location: 36,46
Actor48: oilb
Owner: Neutral
Location: 46,36
Actor49: oilb
Owner: Neutral
Location: 82,46
Actor50: oilb
Owner: Neutral
Location: 72,36
Actor53: oilb
Owner: Neutral
Location: 59,34
Actor54: oilb
Owner: Neutral
Location: 34,59
Actor55: oilb
Owner: Neutral
Location: 59,84
Actor56: oilb
Owner: Neutral
Location: 84,59
OilBottomLeft2: oilb
Location: 18,96
Owner: Neutral
OilBottomLeft1: oilb
Location: 22,100
Owner: Neutral
OilBottomRight2: oilb
Owner: Neutral
Location: 96,100
OilBottomRight1: oilb
Owner: Neutral
Location: 100,96
OilTopLeft2: oilb
Owner: Neutral
Location: 22,18
OilTopLeft1: oilb
Owner: Neutral
Location: 18,22
OilTopRight2: oilb
Location: 100,22
Owner: Neutral
OilTopRight1: oilb
Location: 96,18
Owner: Neutral
Actor65: fcom
Owner: Neutral
Location: 48,96
Actor69: fcom
Owner: Neutral
Location: 70,96
Actor70: fcom
Owner: Neutral
Location: 22,70
Actor72: fcom
Owner: Neutral
Location: 22,48
Actor73: fcom
Owner: Neutral
Location: 48,22
Actor71: fcom
Owner: Neutral
Location: 70,22
Actor74: fcom
Owner: Neutral
Location: 96,48
Actor75: fcom
Owner: Neutral
Location: 96,70
Actor77: oilb
Owner: Neutral
Location: 82,72
Actor80: oilb
Owner: Neutral
Location: 46,20
Actor81: oilb
Owner: Neutral
Location: 72,20
Actor82: oilb
Owner: Neutral
Location: 46,98
Actor83: oilb
Owner: Neutral
Location: 72,98
Actor84: oilb
Owner: Neutral
Location: 20,72
Actor85: oilb
Owner: Neutral
Location: 20,46
Actor86: oilb
Owner: Neutral
Location: 98,46
Actor87: oilb
Owner: Neutral
Location: 98,72
OilTopLeft3: oilb
Owner: Neutral
Location: 29,29
OilBottomLeft3: oilb
Location: 29,89
Owner: Neutral
OilTopRight3: oilb
Location: 89,29
Owner: Neutral
OilBottomRight3: oilb
Owner: Neutral
Location: 89,89
Spawn0: mpspawn
Owner: Neutral
Location: 31,31
Spawn1: mpspawn
Owner: Neutral
Location: 87,31
Spawn2: mpspawn
Owner: Neutral
Location: 31,87
Spawn3: mpspawn
Owner: Neutral
Location: 87,87
FCOMTopLeft: fcom
Owner: Neutral
Location: 31,31
FCOMTopRight: fcom
Owner: Neutral
Location: 87,31
FCOMBottomLeft: fcom
Owner: Neutral
Location: 31,87
FCOMBottomRight: fcom
Owner: Neutral
Location: 87,87
Rules: rules.yaml
Sequences: sequences.yaml

View File

@@ -0,0 +1,27 @@
--[[
Copyright 2007-2020 The OpenRA Developers (see AUTHORS)
This file is part of OpenRA, which is free software. It is made
available to you under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version. For more
information, see COPYING.
]]
SpawnBuildings =
{
{ FCOMTopLeft, OilTopLeft1, OilTopLeft2, OilTopLeft3 },
{ FCOMTopRight, OilTopRight1, OilTopRight2, OilTopRight3 },
{ FCOMBottomLeft, OilBottomLeft1, OilBottomLeft2, OilBottomLeft3 },
{ FCOMBottomRight, OilBottomRight1, OilBottomRight2, OilBottomRight3 },
}
WorldLoaded = function()
for i = 0, 4 do
local player = Player.GetPlayer("Multi" .. i)
if player then
Utils.Do(SpawnBuildings[player.Spawn], function(actor)
actor.Owner = player
end)
end
end
end

View File

@@ -0,0 +1,215 @@
World:
LuaScript:
Scripts: oil-spill.lua
SpawnMPUnits:
DropdownVisible: False
MPStartUnits@mcvonly:
BaseActor: fcom
FCOM:
MustBeDestroyed:
RequiredForShortGame: true
Power:
Amount: 50
Health:
HP: 110000
Production:
Produces: Building, Defense
RepairableBuilding:
RepairStep: 700
PlayerExperience: 25
RepairingNotification: Repairing
WithBuildingRepairDecoration:
Image: allyrepair
Sequence: repair
Position: Center
Palette: player
IsPlayerPalette: True
ProductionBar@Building:
ProductionType: Building
ProductionBar@Defense:
ProductionType: Defense
Color: 8A8A8A
BaseBuilding:
ProvidesPrerequisite@buildingname:
OILB:
CashTrickler:
Interval: 250
Amount: 100
SpawnActorOnDeath:
Actor: OILB.Husk
OwnerType: InternalName
OILB.Husk:
Inherits: ^TechBuilding
Inherits@shape: ^2x2Shape
Selectable:
Priority: 0
Bounds: 48,48
CapturableProgressBar:
CapturableProgressBlink:
Building:
Footprint: xx xx
Dimensions: 2,2
Tooltip:
Name: Husk (Oil Derrick)
CaptureManager:
Capturable:
Types: building-husk
TransformOnCapture:
IntoActor: OILB
ForceHealthPercentage: 50
Targetable:
TargetTypes: building-husk
E6:
Captures@husk:
RequiresCondition: !global-reusable-engineers
CaptureTypes: building-husk
PlayerExperience: 25
CaptureDelay: 200
EnterCursor: goldwrench
Captures@husk-reusable:
RequiresCondition: global-reusable-engineers
CaptureTypes: building-husk
PlayerExperience: 25
CaptureDelay: 375
EnterCursor: goldwrench
ConsumedByCapture: False
WEAP:
Buildable:
Prerequisites: ~disabled
PROC:
Buildable:
Prerequisites: ~disabled
SILO:
Buildable:
Prerequisites: ~disabled
BRIK:
Buildable:
Prerequisites: ~disabled
POWR:
Power:
Amount: 125
-SpawnActorsOnSell:
-MustBeDestroyed:
APWR:
Power:
Amount: 250
-SpawnActorsOnSell:
-MustBeDestroyed:
TENT:
Buildable:
Prerequisites: fcom
-SpawnActorsOnSell:
-MustBeDestroyed:
DOME:
Buildable:
Prerequisites: anypower
-SpawnActorsOnSell:
-MustBeDestroyed:
SYRD:
Buildable:
Prerequisites: fcom
-MustBeDestroyed:
SPEN:
Buildable:
Prerequisites: fcom
-MustBeDestroyed:
STEK:
Buildable:
Prerequisites: dome, tent
-SpawnActorsOnSell:
-MustBeDestroyed:
AFLD:
Buildable:
Prerequisites: dome
-SpawnActorsOnSell:
-MustBeDestroyed:
AirstrikePower@spyplane:
Prerequisites: afld
AirstrikePower@parabombs:
Prerequisites: afld
HPAD:
Buildable:
Prerequisites: dome
-SpawnActorsOnSell:
-MustBeDestroyed:
FIX:
Buildable:
Prerequisites: dome
-SpawnActorsOnSell:
-MustBeDestroyed:
IRON:
Buildable:
Prerequisites: stek
PDOX:
Buildable:
Prerequisites: atek
ChronoshiftPower@chronoshift:
-Prerequisites:
-ChronoshiftPower@advancedchronoshift:
ATEK:
Buildable:
Prerequisites: dome, tent
-SpawnActorsOnSell:
-MustBeDestroyed:
FTUR:
Buildable:
Prerequisites: tent
-SpawnActorsOnSell:
GUN:
Buildable:
Prerequisites: tent
-SpawnActorsOnSell:
GAP:
Buildable:
Prerequisites: atek
-SpawnActorsOnSell:
AGUN:
Buildable:
Prerequisites: dome
-SpawnActorsOnSell:
TSLA:
Buildable:
Prerequisites: dome
-SpawnActorsOnSell:
MECH:
Buildable:
Prerequisites: dome
E1:
Buildable:
Prerequisites: ~disabled
E3:
Buildable:
Prerequisites: ~disabled
E7:
Buildable:
Prerequisites: ~disabled

View File

@@ -0,0 +1,4 @@
oilb.husk: oilb
idle: oilb
Start: 1
Offset: 0,-6

Binary file not shown.

Binary file not shown.

View File

@@ -104,7 +104,7 @@ install_assemblies_mono() {
# TARGETPLATFORM: Platform type (win-x86, win-x64, osx-x64, linux-x64, unix-generic)
# COPY_GENERIC_LAUNCHER: If set to True the OpenRA.exe will also be copied (True, False)
# COPY_CNC_DLL: If set to True the OpenRA.Mods.Cnc.dll will also be copied (True, False)
# COPY_D2K_DLL: If set to True the OpenRA.Mods.D2k.dll and OpenRA.Mods.Cnc.dll will also be copied (True, False)
# COPY_D2K_DLL: If set to True the OpenRA.Mods.D2k.dll will also be copied (True, False)
# Used by:
# Windows packaging
install_assemblies() {
@@ -141,7 +141,7 @@ install_data() {
DEST_PATH="${2}"
shift 2
"${SRC_PATH}"/fetch-geoip.sh
"${SRC_PATH}"/fetch-geoip.sh
echo "Installing engine files to ${DEST_PATH}"
for FILE in VERSION AUTHORS COPYING IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP "global mix database.dat"; do