Skip to content

Commit

Permalink
Engine update.
Browse files Browse the repository at this point in the history
  • Loading branch information
MustaphaTR committed Jun 24, 2019
1 parent 25d8a25 commit f0f8e6e
Show file tree
Hide file tree
Showing 38 changed files with 407 additions and 586 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected override void OnFirstRun(Actor self)
var cells = w.Map.AllCells.Where(c => aircraft.CanLand(c)).Select(c => w.Map.CenterOfCell(c));
var cell = w.Map.CellContaining(WorldUtils.PositionClosestTo(cells, self.CenterPosition));

QueueChild(self, new HeliFly(self, Target.FromCell(w, cell)));
QueueChild(self, new Fly(self, Target.FromCell(w, cell)));
}

// Turn to the required facing.
Expand Down
3 changes: 2 additions & 1 deletion OpenRA.Mods.RA2/Traits/AirstrikeMaster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ class AirstrikeSlaveEntry : BaseSpawnerSlaveEntry

int respawnTicks = 0;

public AirstrikeMaster(ActorInitializer init, AirstrikeMasterInfo info) : base(init, info)
public AirstrikeMaster(ActorInitializer init, AirstrikeMasterInfo info)
: base(init, info)
{
Info = info;
}
Expand Down
3 changes: 2 additions & 1 deletion OpenRA.Mods.RA2/Traits/AirstrikeSlave.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public class AirstrikeSlave : BaseSpawnerSlave, INotifyBecomingIdle

AirstrikeMaster spawnerMaster;

public AirstrikeSlave(ActorInitializer init, AirstrikeSlaveInfo info) : base(init, info)
public AirstrikeSlave(ActorInitializer init, AirstrikeSlaveInfo info)
: base(init, info)
{
Info = info;
ammoPools = init.Self.TraitsImplementing<AmmoPool>().ToArray();
Expand Down
3 changes: 2 additions & 1 deletion OpenRA.Mods.RA2/Traits/BaseSpawnMaster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public class BaseSpawnerMaster : ConditionalTrait<BaseSpawnerMasterInfo>, INotif
ExitInfo[] exits;
RallyPoint rallyPoint;

public BaseSpawnerMaster(ActorInitializer init, BaseSpawnerMasterInfo info) : base(info)
public BaseSpawnerMaster(ActorInitializer init, BaseSpawnerMasterInfo info)
: base(info)
{
self = init.Self;

Expand Down
3 changes: 2 additions & 1 deletion OpenRA.Mods.RA2/Traits/CarrierMaster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ class CarrierSlaveEntry : BaseSpawnerSlaveEntry

int respawnTicks = 0;

public CarrierMaster(ActorInitializer init, CarrierMasterInfo info) : base(init, info)
public CarrierMaster(ActorInitializer init, CarrierMasterInfo info)
: base(init, info)
{
Info = info;
}
Expand Down
7 changes: 3 additions & 4 deletions OpenRA.Mods.RA2/Traits/CarrierSlave.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public class CarrierSlave : BaseSpawnerSlave, INotifyBecomingIdle

CarrierMaster spawnerMaster;

public CarrierSlave(ActorInitializer init, CarrierSlaveInfo info) : base(init, info)
public CarrierSlave(ActorInitializer init, CarrierSlaveInfo info)
: base(init, info)
{
Info = info;
ammoPools = init.Self.TraitsImplementing<AmmoPool>().ToArray();
Expand All @@ -57,9 +58,7 @@ public void EnterSpawner(Actor self)

var aircraft = self.TraitOrDefault<Aircraft>();
if (self.TraitOrDefault<AttackAircraft>() != null) // Let attack planes approach me first, before landing.
if (aircraft != null && aircraft.Info.VTOL == true)
self.QueueActivity(new HeliFly(self, target, WDist.Zero, Info.LandingDistance));
else
if (aircraft != null)
self.QueueActivity(new Fly(self, target, WDist.Zero, Info.LandingDistance));

self.QueueActivity(new EnterCarrierMaster(self, target, spawnerMaster, EnterBehaviour.Exit));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ void OnUndeployCompleted()
undeployedToken = conditionManager.GrantCondition(self, Info.UndeployedCondition);

if (Info.TakeOffOnUndeploy)
self.QueueActivity(new HeliFly(self, Target.FromCell(self.World, self.Location)));
self.QueueActivity(new Fly(self, Target.FromCell(self.World, self.Location)));

deployState = DeployState.Undeployed;
}
Expand Down
3 changes: 2 additions & 1 deletion OpenRA.Mods.RA2/Traits/MissileSpawnerMaster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public class MissileSpawnerMaster : BaseSpawnerMaster, IPips, ITick, INotifyAtta

int respawnTicks = 0;

public MissileSpawnerMaster(ActorInitializer init, MissileSpawnerMasterInfo info) : base(init, info)
public MissileSpawnerMaster(ActorInitializer init, MissileSpawnerMasterInfo info)
: base(init, info)
{
Info = info;
}
Expand Down
3 changes: 2 additions & 1 deletion OpenRA.Mods.RA2/Traits/MissileSpawnerSlave.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class MissileSpawnerSlave : BaseSpawnerSlave
{
public CarrierSlaveInfo Info { get; private set; }

public MissileSpawnerSlave(ActorInitializer init, MissileSpawnerSlaveInfo info) : base(init, info) { }
public MissileSpawnerSlave(ActorInitializer init, MissileSpawnerSlaveInfo info)
: base(init, info) { }
}
}
8 changes: 6 additions & 2 deletions OpenRA.Mods.RA2/UtilityCommands/ImportRA2MapCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,10 @@ class ImportRA2MapCommand : IUtilityCommand
static readonly Dictionary<byte, byte[]> ResourceFromOverlay = new Dictionary<byte, byte[]>()
{
// "tib" - Regular Tiberium
{ 0x01, new byte[] { 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
{
0x01, new byte[]
{
0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,

// Should be "tib2"
Expand All @@ -338,7 +341,8 @@ class ImportRA2MapCommand : IUtilityCommand

// Should be "tib3"
0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C,
0x9D, 0x9E, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6 }
0x9D, 0x9E, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6
}
},

// "btib" - Blue Tiberium
Expand Down
2 changes: 1 addition & 1 deletion mod.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
MOD_ID="rv"

# The OpenRA engine version to use for this project.
ENGINE_VERSION="5b6bb80"
ENGINE_VERSION="3620c9f"

# .dll filenames compiled by the mod solution for use by the runtime assembly check
WHITELISTED_MOD_ASSEMBLIES="OpenRA.Mods.RA2.dll"
Expand Down
15 changes: 10 additions & 5 deletions mods/rv/chrome/assetbrowser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Background@ASSETBROWSER_PANEL:
LogicTicker@ANIMATION_TICKER:
ColorPreviewManager@COLOR_MANAGER:
Label@ASSETBROWSER_TITLE:
Y: 20
Y: 23
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Text: Asset Browser
Label@SOURCE_SELECTOR_DESC:
X: 20
Y: 35
Y: 36
Width: 160
Height: 25
Font: TinyBold
Expand All @@ -43,14 +43,17 @@ Background@ASSETBROWSER_PANEL:
X: 2
Y: 0
Visible: false
EnableChildMouseOver: True
Children:
Label@TITLE:
LabelWithTooltip@TITLE:
X: 10
Width: PARENT_RIGHT - 20
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP
Label@FILENAME_DESC:
X: 20
Y: 370
Y: 371
Width: 160
Height: 25
Font: TinyBold
Expand All @@ -63,7 +66,7 @@ Background@ASSETBROWSER_PANEL:
Height: 25
Label@PALETTE_DESC:
X: PARENT_RIGHT - WIDTH - 270
Y: 60
Y: 61
Width: 150
Height: 25
Font: Bold
Expand Down Expand Up @@ -190,6 +193,7 @@ Background@ASSETBROWSER_PANEL:
MinimumValue: 0
Label@FRAME_COUNT:
X: 445
Y: 1
Width: 40
Height: 25
Font: TinyBold
Expand All @@ -202,3 +206,4 @@ Background@ASSETBROWSER_PANEL:
Height: 25
Font: Bold
Text: Close
TooltipContainer@TOOLTIP_CONTAINER:
5 changes: 1 addition & 4 deletions mods/rv/chrome/ingame-observer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ Container@OBSERVER_WIDGETS:
Y: 13
Width: 36
Height: 20
BaseLine: 1
Key: ReplaySpeedSlow
TooltipText: Slow speed
TooltipContainer: TOOLTIP_CONTAINER
Expand All @@ -138,7 +137,6 @@ Container@OBSERVER_WIDGETS:
Y: 13
Width: 38
Height: 20
BaseLine: 1
Key: ReplaySpeedRegular
TooltipText: Regular speed
TooltipContainer: TOOLTIP_CONTAINER
Expand All @@ -149,7 +147,6 @@ Container@OBSERVER_WIDGETS:
Y: 13
Width: 38
Height: 20
BaseLine: 1
Key: ReplaySpeedFast
TooltipText: Fast speed
TooltipContainer: TOOLTIP_CONTAINER
Expand All @@ -160,7 +157,6 @@ Container@OBSERVER_WIDGETS:
Y: 13
Width: 38
Height: 20
BaseLine: 1
Key: ReplaySpeedMax
TooltipText: Maximum speed
TooltipContainer: TOOLTIP_CONTAINER
Expand Down Expand Up @@ -891,6 +887,7 @@ Container@OBSERVER_WIDGETS:
Y: 0
Width: 0
Height: PARENT_BOTTOM
TooltipContainer: TOOLTIP_CONTAINER
ScrollItem@COMBAT_PLAYER_TEMPLATE:
X: 0
Y: 0
Expand Down
2 changes: 1 addition & 1 deletion mods/rv/chrome/mainmenu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Container@MAINMENU:
Children:
Label@MAINMENU_LABEL_TITLE:
X: 0
Y: 20
Y: 22
Width: 200
Height: 30
Text: OpenRA
Expand Down
44 changes: 26 additions & 18 deletions mods/rv/mod.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Metadata:
Title: Red Alert 2: Romanov's Vengeance
Description: The Soviet Union is back!\nThis time to conquer the United States...
Version: 5b6bb80
Version: 3620c9f
Author: the RV mod team

# TODO: Rename to AudioBag once BagFile is gone from OpenRA/OpenRA
Expand Down Expand Up @@ -87,7 +87,7 @@ Packages:

MapFolders:
rv|maps: System
~^maps/rv/5b6bb80: User
~^maps/rv/3620c9f: User

Rules:
rv|rules/proxy-actors.yaml
Expand Down Expand Up @@ -270,30 +270,38 @@ ChromeMetrics:
rv|metrics.yaml

Fonts:
Tiny:
Font: common|FreeSans.ttf
Size: 10
Ascender: 8
TinyBold:
Font: common|FreeSansBold.ttf
Size: 10
Ascender: 8
Small:
Font: common|FreeSans.ttf
Size: 12
Ascender: 9
Regular:
Font: common|FreeSans.ttf
Size:14
Size: 14
Ascender: 11
Bold:
Font: common|FreeSansBold.ttf
Size:14
Title:
Size: 14
Ascender: 11
MediumBold:
Font: common|FreeSansBold.ttf
Size:32
Size: 18
Ascender: 14
BigBold:
Font: common|FreeSansBold.ttf
Size:24
MediumBold:
Font: common|FreeSansBold.ttf
Size:18
Small:
Font: common|FreeSans.ttf
Size:12
Tiny:
Font: common|FreeSans.ttf
Size:10
TinyBold:
Size: 24
Ascender: 18
Title:
Font: common|FreeSansBold.ttf
Size:10
Size: 32
Ascender: 26

# Our maps may not work on RA2 mod, but RA2's maps would work here.
SupportsMapsFrom: rv, ra2
Expand Down
20 changes: 6 additions & 14 deletions mods/rv/rules/ai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ Player:
BaseBuilderBotModule@test:
RequiresCondition: enable-test-ai
BuildingQueues: Building.Allies, Building.Soviets
DefenseQueues: Support.Allies, Support.France, Support.Soviets
DefenseQueues: Support.Allies, Support.Soviets
MinimumExcessPower: 60
MaximumExcessPower: 160
ExcessPowerIncrement: 40
Expand All @@ -291,8 +291,8 @@ Player:
nahand: 3
gaweap: 4
naweap: 4
# gadept: 1
# nadept: 1
gadept: 1
nadept: 1
gaairc: 1
# naheli: 1
naradr: 1
Expand All @@ -311,8 +311,8 @@ Player:
nahand: 40
gaweap: 20
naweap: 20
# gadept: 1
# nadept: 1
gadept: 1
nadept: 1
gaairc: 10
# naheli: 10
naradr: 10
Expand All @@ -332,14 +332,6 @@ Player:
gagap: 1
namisl: 2
gaweat: 2
PlugSpawnerBotModule@test:
RequiresCondition: enable-test-ai && powerplug
Plug: gapowrup
Pluggables: gapowr
Interval: 750
GrantConditionOnPrerequisite@powerplug:
Condition: powerplug
Prerequisites: gacnst, gapowr.pluggable, gaairc, ~techlevel.2
HarvesterBotModule@test:
RequiresCondition: enable-test-ai
BuildingRepairBotModule@test:
Expand All @@ -359,7 +351,7 @@ Player:
McvFactoryTypes: gaweap, naweap
UnitBuilderBotModule@test:
RequiresCondition: enable-test-ai
UnitQueues: Infantry.Allies, Infantry.USA, Infantry.UK, Infantry.Soviets, Infantry.Cuba, Infantry.Iraq, Infantry.Vietnam, Infantry.Soviets, Vehicle.Allies, Vehicle.Germany, Vehicle.Soviets, Vehicle.USSR, Vehicle.Libya, Aircraft.Allies, Aircraft.Korea, Aircraft.Soviets, Ship.Allies, Ship.Soviets, Power.Allies, Power.Soviets
UnitQueues: Infantry.Allies, Infantry.Soviets, Vehicle.Allies, Vehicle.Soviets, Aircraft.Allies, Aircraft.Soviets, Ship.Allies, Ship.Soviets, Power.Allies, Power.Soviets
UnitsToBuild:
e1: 180
e2: 180
Expand Down

0 comments on commit f0f8e6e

Please sign in to comment.