Compare commits
13 Commits
devtest-20
...
playtest-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc5619e912 | ||
|
|
086889a713 | ||
|
|
b78d4baadf | ||
|
|
9aab94701d | ||
|
|
08e159d326 | ||
|
|
e699768f2b | ||
|
|
95ab853179 | ||
|
|
61bb6ef5d7 | ||
|
|
afc0985675 | ||
|
|
57f229c0d6 | ||
|
|
703a6e3073 | ||
|
|
a97df93e01 | ||
|
|
5720bde43b |
@@ -55,6 +55,12 @@ namespace OpenRA
|
||||
Log.Write("exception", "{0} Mod at Version {1}", mod.Title, mod.Version);
|
||||
}
|
||||
|
||||
if (Game.OrderManager != null && Game.OrderManager.World != null && Game.OrderManager.World.Map != null)
|
||||
{
|
||||
var map = Game.OrderManager.World.Map;
|
||||
Log.Write("exception", "on map {0} ({1} by {2}).", map.Uid, map.Title, map.Author);
|
||||
}
|
||||
|
||||
Log.Write("exception", "Operating System: {0} ({1})", Platform.CurrentPlatform, Environment.OSVersion);
|
||||
Log.Write("exception", "Runtime Version: {0}", Platform.RuntimeVersion);
|
||||
var rpt = BuildExceptionReport(e).ToString();
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
public object Create(ActorInitializer init) { return new WithCargo(init.Self, this); }
|
||||
}
|
||||
|
||||
public class WithCargo : IRenderModifier
|
||||
public class WithCargo : IRenderModifier, ITick
|
||||
{
|
||||
readonly Cargo cargo;
|
||||
readonly IFacing facing;
|
||||
@@ -45,6 +45,19 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
body = self.Trait<IBodyOrientation>();
|
||||
}
|
||||
|
||||
public void Tick(Actor self)
|
||||
{
|
||||
if (facing == null)
|
||||
return;
|
||||
|
||||
foreach (var c in cargo.Passengers)
|
||||
{
|
||||
var cargoFacing = c.TraitOrDefault<IFacing>();
|
||||
if (cargoFacing != null)
|
||||
cargoFacing.Facing = facing.Facing;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<IRenderable> ModifyRender(Actor self, WorldRenderer wr, IEnumerable<IRenderable> r)
|
||||
{
|
||||
foreach (var rr in r)
|
||||
@@ -55,10 +68,6 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
var i = 0;
|
||||
foreach (var c in cargo.Passengers)
|
||||
{
|
||||
var cargoFacing = c.TraitOrDefault<IFacing>();
|
||||
if (facing != null && cargoFacing != null)
|
||||
cargoFacing.Facing = facing.Facing;
|
||||
|
||||
var cargoPassenger = c.Trait<Passenger>();
|
||||
if (cargoInfo.DisplayTypes.Contains(cargoPassenger.Info.CargoType))
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common
|
||||
if (self.IsDead)
|
||||
return false;
|
||||
|
||||
if (!self.HasTrait<IPositionable>())
|
||||
if (!self.HasTrait<IOccupySpace>())
|
||||
return false;
|
||||
|
||||
if (!self.IsInWorld)
|
||||
|
||||
@@ -32,9 +32,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public override void Activate(Actor collector)
|
||||
{
|
||||
if (collector.Owner == collector.World.LocalPlayer)
|
||||
collector.Owner.Shroud.ResetExploration();
|
||||
|
||||
collector.Owner.Shroud.ResetExploration();
|
||||
base.Activate(collector);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Reveals the entire map.")]
|
||||
@@ -31,18 +29,15 @@ namespace OpenRA.Mods.Common.Traits
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
bool ShouldReveal(Player collectingPlayer)
|
||||
{
|
||||
if (info.IncludeAllies)
|
||||
return collectingPlayer.World.LocalPlayer != null &&
|
||||
collectingPlayer.Stances[collectingPlayer.World.LocalPlayer] == Stance.Ally;
|
||||
|
||||
return collectingPlayer == collectingPlayer.World.LocalPlayer;
|
||||
}
|
||||
|
||||
public override void Activate(Actor collector)
|
||||
{
|
||||
if (ShouldReveal(collector.Owner))
|
||||
if (info.IncludeAllies)
|
||||
{
|
||||
foreach (var player in collector.World.Players)
|
||||
if (collector.Owner.IsAlliedWith(player))
|
||||
player.Shroud.ExploreAll(player.World);
|
||||
}
|
||||
else
|
||||
collector.Owner.Shroud.ExploreAll(collector.World);
|
||||
|
||||
base.Activate(collector);
|
||||
|
||||
@@ -60,13 +60,23 @@ namespace OpenRA.Mods.Common.Traits
|
||||
visible = init.World.Players.ToDictionary(p => p, p => false);
|
||||
}
|
||||
|
||||
bool IsVisibleInner(Actor self, Player byPlayer)
|
||||
{
|
||||
// If fog is disabled visibility is determined by shroud
|
||||
if (!byPlayer.Shroud.FogEnabled)
|
||||
return self.OccupiesSpace.OccupiedCells()
|
||||
.Any(o => byPlayer.Shroud.IsExplored(o.First));
|
||||
|
||||
return visible[byPlayer];
|
||||
}
|
||||
|
||||
public bool IsVisible(Actor self, Player byPlayer)
|
||||
{
|
||||
if (byPlayer == null)
|
||||
return true;
|
||||
|
||||
var stance = self.Owner.Stances[byPlayer];
|
||||
return info.AlwaysVisibleStances.HasStance(stance) || visible[byPlayer];
|
||||
return info.AlwaysVisibleStances.HasStance(stance) || IsVisibleInner(self, byPlayer);
|
||||
}
|
||||
|
||||
public void Tick(Actor self)
|
||||
|
||||
@@ -28,6 +28,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
protected override bool IsVisibleInner(Actor self, Player byPlayer)
|
||||
{
|
||||
// If fog is disabled visibility is determined by shroud
|
||||
if (!byPlayer.Shroud.FogEnabled)
|
||||
return base.IsVisibleInner(self, byPlayer);
|
||||
|
||||
if (Info.Type == VisibilityType.Footprint)
|
||||
return self.OccupiesSpace.OccupiedCells()
|
||||
.Any(o => byPlayer.Shroud.IsVisible(o.First));
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class LoadIngamePlayerOrObserverUILogic
|
||||
{
|
||||
bool loadingObserverWidgets = false;
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public LoadIngamePlayerOrObserverUILogic(Widget widget, World world)
|
||||
{
|
||||
@@ -35,12 +37,15 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
sidebarTicker.OnTick = () =>
|
||||
{
|
||||
// Switch to observer mode after win/loss
|
||||
if (world.LocalPlayer.WinState != WinState.Undefined)
|
||||
if (world.LocalPlayer.WinState != WinState.Undefined && !loadingObserverWidgets)
|
||||
{
|
||||
loadingObserverWidgets = true;
|
||||
Game.RunAfterDelay(objectives != null ? objectives.Info.GameOverDelay : 0, () =>
|
||||
{
|
||||
playerRoot.RemoveChildren();
|
||||
Game.LoadWidget(world, "OBSERVER_WIDGETS", playerRoot, new WidgetArgs());
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -376,6 +376,9 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
foreach (var cell in t.Trait.RadarSignatureCells(t.Actor))
|
||||
{
|
||||
if (!world.Map.Contains(cell.First))
|
||||
continue;
|
||||
|
||||
var uv = cell.First.ToMPos(world.Map.TileShape);
|
||||
var color = cell.Second.ToArgb();
|
||||
if (isDiamond)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
using OpenRA.Mods.Common.Activities;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Mods.RA.Traits;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
@@ -20,17 +21,25 @@ namespace OpenRA.Mods.RA.Activities
|
||||
|
||||
readonly Cloak cloak;
|
||||
|
||||
readonly Infiltrates infiltrates;
|
||||
|
||||
public Infiltrate(Actor self, Actor target)
|
||||
: base(self, target)
|
||||
{
|
||||
this.target = target;
|
||||
|
||||
cloak = self.TraitOrDefault<Cloak>();
|
||||
|
||||
infiltrates = self.TraitOrDefault<Infiltrates>();
|
||||
}
|
||||
|
||||
protected override void OnInside(Actor self)
|
||||
{
|
||||
if (target.IsDead || target.Owner == self.Owner)
|
||||
if (target.IsDead)
|
||||
return;
|
||||
|
||||
var stance = self.Owner.Stances[target.Owner];
|
||||
if (!infiltrates.Info.ValidStances.HasStance(stance))
|
||||
return;
|
||||
|
||||
if (cloak != null && cloak.Info.UncloakOnInfiltrate)
|
||||
|
||||
@@ -24,21 +24,24 @@ namespace OpenRA.Mods.RA.Traits
|
||||
|
||||
[VoiceReference] public readonly string Voice = "Action";
|
||||
|
||||
[Desc("What diplomatic stances can be infiltrated by this actor.")]
|
||||
public readonly Stance ValidStances = Stance.Neutral | Stance.Enemy;
|
||||
|
||||
public object Create(ActorInitializer init) { return new Infiltrates(this); }
|
||||
}
|
||||
|
||||
class Infiltrates : IIssueOrder, IResolveOrder, IOrderVoice
|
||||
{
|
||||
readonly InfiltratesInfo info;
|
||||
public readonly InfiltratesInfo Info;
|
||||
|
||||
public Infiltrates(InfiltratesInfo info)
|
||||
{
|
||||
this.info = info;
|
||||
Info = info;
|
||||
}
|
||||
|
||||
public IEnumerable<IOrderTargeter> Orders
|
||||
{
|
||||
get { yield return new TargetTypeOrderTargeter(info.Types, "Infiltrate", 7, "enter", true, false); }
|
||||
get { yield return new InfiltrationOrderTargeter(Info); }
|
||||
}
|
||||
|
||||
public Order IssueOrder(Actor self, IOrderTargeter order, Target target, bool queued)
|
||||
@@ -77,13 +80,13 @@ namespace OpenRA.Mods.RA.Traits
|
||||
ai = order.TargetActor.Info;
|
||||
|
||||
var i = ai.Traits.GetOrDefault<ITargetableInfo>();
|
||||
return i != null && i.GetTargetTypes().Intersect(info.Types).Any();
|
||||
return i != null && i.GetTargetTypes().Intersect(Info.Types).Any();
|
||||
}
|
||||
|
||||
public string VoicePhraseForOrder(Actor self, Order order)
|
||||
{
|
||||
return order.OrderString == "Infiltrate" && IsValidOrder(self, order)
|
||||
? info.Voice : null;
|
||||
? Info.Voice : null;
|
||||
}
|
||||
|
||||
public void ResolveOrder(Actor self, Order order)
|
||||
@@ -102,4 +105,35 @@ namespace OpenRA.Mods.RA.Traits
|
||||
self.QueueActivity(new Infiltrate(self, target.Actor));
|
||||
}
|
||||
}
|
||||
|
||||
class InfiltrationOrderTargeter : UnitOrderTargeter
|
||||
{
|
||||
readonly InfiltratesInfo info;
|
||||
|
||||
public InfiltrationOrderTargeter(InfiltratesInfo info)
|
||||
: base("Infiltrate", 7, "enter", true, false)
|
||||
{
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public override bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor)
|
||||
{
|
||||
var stance = self.Owner.Stances[target.Owner];
|
||||
|
||||
if (!info.ValidStances.HasStance(stance))
|
||||
return false;
|
||||
|
||||
return target.TraitsImplementing<ITargetable>().Any(t => t.TargetTypes.Intersect(info.Types).Any());
|
||||
}
|
||||
|
||||
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor)
|
||||
{
|
||||
var stance = self.Owner.Stances[target.Owner];
|
||||
|
||||
if (!info.ValidStances.HasStance(stance))
|
||||
return false;
|
||||
|
||||
return target.Info.Traits.WithInterface<ITargetableInfo>().Any(t => t.GetTargetTypes().Intersect(info.Types).Any());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ namespace OpenRA.Renderer.Sdl2
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
GL.ClearColor(0, 0, 0, 0);
|
||||
GL.ClearColor(0, 0, 0, 1);
|
||||
ErrorHandler.CheckGlError();
|
||||
GL.Clear(ClearBufferMask.ColorBufferBit);
|
||||
ErrorHandler.CheckGlError();
|
||||
|
||||
@@ -151,7 +151,7 @@ ContentInstaller:
|
||||
.: speech.mix, tempicnh.mix, transit.mix
|
||||
CopyFilesFromCD:
|
||||
.: conquer.mix, desert.mix, general.mix, scores.mix, sounds.mix, temperat.mix, winter.mix
|
||||
ShippedSoundtracks: 2
|
||||
ShippedSoundtracks: 4
|
||||
MusicPackageMirrorList: http://www.openra.net/packages/cnc-music-mirrors.txt
|
||||
InstallShieldCABFileIds: 66, 45, 42, 65, 68, 67, 71, 47, 49, 60, 75, 73, 53
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ LST:
|
||||
Tooltip:
|
||||
Name: Landing Craft
|
||||
Buildable:
|
||||
Queue: Vehicle
|
||||
Queue: Vehicle.GDI
|
||||
BuildPaletteOrder: 1000
|
||||
Prerequisites: ~disabled
|
||||
Mobile:
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
mods/ra/bits/iconchevrons.shp
Normal file
BIN
mods/ra/bits/iconchevrons.shp
Normal file
Binary file not shown.
@@ -230,8 +230,6 @@ Rules:
|
||||
HP: 1000
|
||||
Mobile:
|
||||
Speed: 170
|
||||
RevealsShroud:
|
||||
Range: 50c0
|
||||
Armament@PRIMARY:
|
||||
Weapon: M60mg
|
||||
Armament@SECONDARY:
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
Filename: temperat.pal
|
||||
ShadowIndex: 3
|
||||
AllowModifiers: false
|
||||
PaletteFromFile@cameo-chevron:
|
||||
Name: cameo-chevron
|
||||
Filename: cameo-chevron.pal
|
||||
AllowModifiers: false
|
||||
PaletteFromFile@effect:
|
||||
Name: effect
|
||||
Filename: temperat.pal
|
||||
|
||||
@@ -67,7 +67,6 @@ Player:
|
||||
EnemyWatcher:
|
||||
VeteranProductionIconOverlay:
|
||||
Offset: 2, 2
|
||||
Image: cameo-chevron
|
||||
Sequence: idle
|
||||
Palette: cameo-chevron
|
||||
Image: iconchevrons
|
||||
Sequence: veteran
|
||||
|
||||
|
||||
@@ -382,10 +382,8 @@ rank:
|
||||
rank:
|
||||
Length: *
|
||||
|
||||
cameo-chevron:
|
||||
idle:
|
||||
Length: *
|
||||
BlendMode: Additive
|
||||
iconchevrons:
|
||||
veteran:
|
||||
|
||||
atomic:
|
||||
up: atomicup
|
||||
|
||||
Reference in New Issue
Block a user