Compare commits
25 Commits
playtest-2
...
playtest-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6e56560d4 | ||
|
|
1f047d439f | ||
|
|
5233ae4770 | ||
|
|
562e07264a | ||
|
|
4dab4ed73f | ||
|
|
a97ddffa53 | ||
|
|
8e589e3c16 | ||
|
|
96f72ce842 | ||
|
|
d8de477edb | ||
|
|
694fb6831a | ||
|
|
c16a515224 | ||
|
|
e2eae7973b | ||
|
|
9e3c938706 | ||
|
|
ef665df2e9 | ||
|
|
271a3eea8d | ||
|
|
2f6315b816 | ||
|
|
ac8d408ba7 | ||
|
|
0fdd49c96a | ||
|
|
e390cf8ab0 | ||
|
|
64d700cd70 | ||
|
|
d3db9d3710 | ||
|
|
9eb05a43f9 | ||
|
|
3165ec5359 | ||
|
|
f4699132d6 | ||
|
|
086bdfb4bd |
@@ -36,9 +36,6 @@ namespace OpenRA.Editor
|
||||
Rules.LoadRules(Game.modData.Manifest, new Map());
|
||||
|
||||
surface1.AfterChange += MakeDirty;
|
||||
|
||||
string path = Directory.GetCurrentDirectory();
|
||||
Icon = new Icon(path + Path.DirectorySeparatorChar + "OpenRA.Editor" + Path.DirectorySeparatorChar + "OpenRA.Editor.Icon.ico");
|
||||
}
|
||||
|
||||
void MakeDirty() { dirty = true; }
|
||||
@@ -349,9 +346,11 @@ namespace OpenRA.Editor
|
||||
|
||||
void ImportLegacyMapClicked(object sender, EventArgs e)
|
||||
{
|
||||
var currentDirectory = Directory.GetCurrentDirectory();
|
||||
using (var ofd = new OpenFileDialog { Filter = "Legacy maps (*.ini;*.mpr)|*.ini;*.mpr" })
|
||||
if (DialogResult.OK == ofd.ShowDialog())
|
||||
{
|
||||
Directory.SetCurrentDirectory( currentDirectory );
|
||||
/* massive hack: we should be able to call NewMap() with the imported Map object,
|
||||
* but something's not right internally in it, unless loaded via the real maploader */
|
||||
|
||||
|
||||
@@ -73,5 +73,17 @@ namespace OpenRA
|
||||
{
|
||||
return mi.GetCustomAttributes(typeof(T), true).Length != 0;
|
||||
}
|
||||
|
||||
public static T[] GetCustomAttributes<T>( this MemberInfo mi, bool inherit )
|
||||
where T : class
|
||||
{
|
||||
return (T[])mi.GetCustomAttributes( typeof( T ), inherit );
|
||||
}
|
||||
|
||||
public static T[] GetCustomAttributes<T>( this ParameterInfo mi )
|
||||
where T : class
|
||||
{
|
||||
return (T[])mi.GetCustomAttributes( typeof( T ), true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,9 +179,9 @@ namespace OpenRA.FileFormats
|
||||
|
||||
foreach( var field in type.GetFields() )
|
||||
{
|
||||
var load = (LoadAttribute[])field.GetCustomAttributes( typeof( LoadAttribute ), false );
|
||||
var loadUsing = (LoadUsingAttribute[])field.GetCustomAttributes( typeof( LoadUsingAttribute ), false );
|
||||
var fromYamlKey = (FieldFromYamlKeyAttribute[])field.GetCustomAttributes( typeof( FieldFromYamlKeyAttribute ), false );
|
||||
var load = field.GetCustomAttributes<LoadAttribute>( false );
|
||||
var loadUsing = field.GetCustomAttributes<LoadUsingAttribute>( false );
|
||||
var fromYamlKey = field.GetCustomAttributes<FieldFromYamlKeyAttribute>( false );
|
||||
if( loadUsing.Length != 0 )
|
||||
ret[ field ] = ( _1, fieldType, yaml ) => loadUsing[ 0 ].LoaderFunc( field )( yaml );
|
||||
else if( fromYamlKey.Length != 0 )
|
||||
|
||||
@@ -151,16 +151,9 @@ namespace OpenRA
|
||||
public void QueueActivity( IActivity nextActivity )
|
||||
{
|
||||
if( currentActivity == null )
|
||||
{
|
||||
currentActivity = nextActivity;
|
||||
return;
|
||||
}
|
||||
var act = currentActivity;
|
||||
while( act.NextActivity != null )
|
||||
{
|
||||
act = act.NextActivity;
|
||||
}
|
||||
act.NextActivity = nextActivity;
|
||||
else
|
||||
currentActivity.Queue( nextActivity );
|
||||
}
|
||||
|
||||
public void CancelActivity()
|
||||
|
||||
@@ -279,6 +279,36 @@ namespace OpenRA
|
||||
|
||||
JoinLocal();
|
||||
StartGame(modData.Manifest.ShellmapUid);
|
||||
|
||||
Game.BeforeGameStart += () => Widget.OpenWindow("INGAME_ROOT");
|
||||
|
||||
Game.ConnectionStateChanged += () =>
|
||||
{
|
||||
Widget.CloseWindow();
|
||||
switch( Game.orderManager.Connection.ConnectionState )
|
||||
{
|
||||
case ConnectionState.PreConnecting:
|
||||
Widget.OpenWindow("MAINMENU_BG");
|
||||
break;
|
||||
case ConnectionState.Connecting:
|
||||
Widget.OpenWindow("CONNECTING_BG");
|
||||
break;
|
||||
case ConnectionState.NotConnected:
|
||||
Widget.OpenWindow("CONNECTION_FAILED_BG");
|
||||
break;
|
||||
case ConnectionState.Connected:
|
||||
var lobby = Widget.OpenWindow("SERVER_LOBBY");
|
||||
lobby.GetWidget<ChatDisplayWidget>("CHAT_DISPLAY").ClearChat();
|
||||
lobby.GetWidget("CHANGEMAP_BUTTON").Visible = true;
|
||||
lobby.GetWidget("LOCKTEAMS_CHECKBOX").Visible = true;
|
||||
lobby.GetWidget("DISCONNECT_BUTTON").Visible = true;
|
||||
//r.GetWidget("INGAME_ROOT").GetWidget<ChatDisplayWidget>("CHAT_DISPLAY").ClearChat();
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
modData.WidgetLoader.LoadWidget( Widget.RootWidget, "PERF_BG" );
|
||||
Widget.OpenWindow("MAINMENU_BG");
|
||||
|
||||
ResetTimer();
|
||||
}
|
||||
@@ -310,8 +340,8 @@ namespace OpenRA
|
||||
LobbyInfo.GlobalSettings.Mods = Settings.Game.Mods;
|
||||
JoinLocal();
|
||||
StartGame(shellmap);
|
||||
|
||||
Widget.RootWidget.CloseWindow();
|
||||
|
||||
Widget.CloseWindow();
|
||||
Widget.OpenWindow("MAINMENU_BG");
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace OpenRA
|
||||
public readonly SheetBuilder SheetBuilder;
|
||||
public readonly CursorSheetBuilder CursorSheetBuilder;
|
||||
public readonly Dictionary<string, MapStub> AvailableMaps;
|
||||
public readonly WidgetLoader WidgetLoader;
|
||||
public ILoadScreen LoadScreen = null;
|
||||
|
||||
public ModData( params string[] mods )
|
||||
@@ -39,6 +40,7 @@ namespace OpenRA
|
||||
SheetBuilder = new SheetBuilder( TextureChannel.Red );
|
||||
CursorSheetBuilder = new CursorSheetBuilder( this );
|
||||
AvailableMaps = FindMaps( mods );
|
||||
WidgetLoader = new WidgetLoader( this );
|
||||
}
|
||||
|
||||
// TODO: Do this nicer
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using OpenRA.FileFormats;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
@@ -30,19 +31,61 @@ namespace OpenRA
|
||||
public static Action<string> MissingTypeAction =
|
||||
s => { throw new InvalidOperationException("Cannot locate type: {0}".F(s)); };
|
||||
|
||||
public T CreateObject<T>(string classname)
|
||||
public T CreateObject<T>(string className)
|
||||
{
|
||||
foreach (var mod in ModAssemblies)
|
||||
{
|
||||
var fullTypeName = mod.Second + "." + classname;
|
||||
var obj = mod.First.CreateInstance(fullTypeName);
|
||||
if (obj != null)
|
||||
return (T)obj;
|
||||
}
|
||||
return CreateObject<T>( className, new Dictionary<string, object>() );
|
||||
}
|
||||
|
||||
MissingTypeAction(classname);
|
||||
public T CreateObject<T>( string className, Dictionary<string, object> args )
|
||||
{
|
||||
foreach( var mod in ModAssemblies )
|
||||
{
|
||||
var type = mod.First.GetType( mod.Second + "." + className, false );
|
||||
if( type == null ) continue;
|
||||
var ctors = type.GetConstructors().Where( x => x.HasAttribute<UseCtorAttribute>() ).ToList();
|
||||
if( ctors.Count == 0 )
|
||||
return (T)CreateBasic( type );
|
||||
else if( ctors.Count == 1 )
|
||||
return (T)CreateUsingArgs( ctors[ 0 ], args );
|
||||
else
|
||||
throw new InvalidOperationException( "ObjectCreator: UseCtor on multiple constructors; invalid." );
|
||||
}
|
||||
MissingTypeAction(className);
|
||||
return default(T);
|
||||
}
|
||||
|
||||
public object CreateBasic( Type type )
|
||||
{
|
||||
return type.GetConstructor( new Type[ 0 ] ).Invoke( new object[ 0 ] );
|
||||
}
|
||||
|
||||
public object CreateUsingArgs( ConstructorInfo ctor, Dictionary<string, object> args )
|
||||
{
|
||||
var p = ctor.GetParameters();
|
||||
var a = new object[ p.Length ];
|
||||
for( int i = 0 ; i < p.Length ; i++ )
|
||||
{
|
||||
var attrs = p[ i ].GetCustomAttributes<ParamAttribute>();
|
||||
if( attrs.Length != 1 ) throw new InvalidOperationException( "ObjectCreator: argument in [UseCtor] doesn't have [Param]" );
|
||||
a[ i ] = args[ attrs[ 0 ].ParamName ];
|
||||
}
|
||||
return ctor.Invoke( a );
|
||||
}
|
||||
|
||||
[AttributeUsage( AttributeTargets.Parameter )]
|
||||
public class ParamAttribute : Attribute
|
||||
{
|
||||
public string ParamName { get; private set; }
|
||||
|
||||
public ParamAttribute( string paramName )
|
||||
{
|
||||
ParamName = paramName;
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage( AttributeTargets.Constructor )]
|
||||
public class UseCtorAttribute : Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,11 +207,11 @@ namespace OpenRA
|
||||
|
||||
public struct CellInfo
|
||||
{
|
||||
public float MinCost;
|
||||
public int MinCost;
|
||||
public int2 Path;
|
||||
public bool Seen;
|
||||
|
||||
public CellInfo( float minCost, int2 path, bool seen )
|
||||
public CellInfo( int minCost, int2 path, bool seen )
|
||||
{
|
||||
MinCost = minCost;
|
||||
Path = path;
|
||||
@@ -221,10 +221,10 @@ namespace OpenRA
|
||||
|
||||
public struct PathDistance : IComparable<PathDistance>
|
||||
{
|
||||
public float EstTotal;
|
||||
public int EstTotal;
|
||||
public int2 Location;
|
||||
|
||||
public PathDistance(float estTotal, int2 location)
|
||||
public PathDistance(int estTotal, int2 location)
|
||||
{
|
||||
EstTotal = estTotal;
|
||||
Location = location;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace OpenRA
|
||||
World world;
|
||||
public CellInfo[ , ] cellInfo;
|
||||
public PriorityQueue<PathDistance> queue;
|
||||
public Func<int2, float> heuristic;
|
||||
public Func<int2, int> heuristic;
|
||||
Func<int2, bool> customBlock;
|
||||
public bool checkForBlocked;
|
||||
public Actor ignoreBuilding;
|
||||
@@ -58,7 +58,7 @@ namespace OpenRA
|
||||
return this;
|
||||
}
|
||||
|
||||
public PathSearch WithHeuristic(Func<int2, float> h)
|
||||
public PathSearch WithHeuristic(Func<int2, int> h)
|
||||
{
|
||||
heuristic = h;
|
||||
return this;
|
||||
@@ -66,7 +66,7 @@ namespace OpenRA
|
||||
|
||||
public PathSearch WithoutLaneBias()
|
||||
{
|
||||
LaneBias = 0f;
|
||||
LaneBias = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace OpenRA
|
||||
return this;
|
||||
}
|
||||
|
||||
float LaneBias = .5f;
|
||||
int LaneBias = 1;
|
||||
|
||||
public int2 Expand( World world )
|
||||
{
|
||||
@@ -91,7 +91,7 @@ namespace OpenRA
|
||||
|
||||
var thisCost = Mobile.MovementCostForCell(mobileInfo, world, p.Location);
|
||||
|
||||
if (thisCost == float.PositiveInfinity)
|
||||
if (thisCost == int.MaxValue)
|
||||
return p.Location;
|
||||
|
||||
foreach( int2 d in directions )
|
||||
@@ -102,9 +102,9 @@ namespace OpenRA
|
||||
if( cellInfo[ newHere.X, newHere.Y ].Seen )
|
||||
continue;
|
||||
|
||||
var costHere = (float)Mobile.MovementCostForCell(mobileInfo, world, newHere);
|
||||
var costHere = Mobile.MovementCostForCell(mobileInfo, world, newHere);
|
||||
|
||||
if (costHere == float.PositiveInfinity)
|
||||
if (costHere == int.MaxValue)
|
||||
continue;
|
||||
|
||||
if (!Mobile.CanEnterCell(mobileInfo, world, uim, bim, newHere, ignoreBuilding, checkForBlocked))
|
||||
@@ -114,10 +114,11 @@ namespace OpenRA
|
||||
continue;
|
||||
|
||||
var est = heuristic( newHere );
|
||||
if( est == float.PositiveInfinity )
|
||||
if( est == int.MaxValue )
|
||||
continue;
|
||||
|
||||
float cellCost = (float)(((d.X * d.Y != 0) ? 1.414213563f : 1.0f) * costHere);
|
||||
int cellCost = costHere;
|
||||
if( d.X * d.Y != 0 ) cellCost = ( cellCost * 34 ) / 24;
|
||||
|
||||
// directional bonuses for smoother flow!
|
||||
var ux = (newHere.X + (inReverse ? 1 : 0) & 1);
|
||||
@@ -128,7 +129,7 @@ namespace OpenRA
|
||||
if (uy == 0 && d.X < 0) cellCost += LaneBias;
|
||||
else if (uy == 1 && d.X > 0) cellCost += LaneBias;
|
||||
|
||||
float newCost = (float)(cellInfo[ p.Location.X, p.Location.Y ].MinCost + cellCost);
|
||||
int newCost = cellInfo[ p.Location.X, p.Location.Y ].MinCost + cellCost;
|
||||
|
||||
if( newCost >= cellInfo[ newHere.X, newHere.Y ].MinCost )
|
||||
continue;
|
||||
@@ -199,18 +200,18 @@ namespace OpenRA
|
||||
var cellInfo = new CellInfo[ world.Map.MapSize.X, world.Map.MapSize.Y ];
|
||||
for( int x = 0 ; x < world.Map.MapSize.X ; x++ )
|
||||
for( int y = 0 ; y < world.Map.MapSize.Y ; y++ )
|
||||
cellInfo[ x, y ] = new CellInfo( float.PositiveInfinity, new int2( x, y ), false );
|
||||
cellInfo[ x, y ] = new CellInfo( int.MaxValue, new int2( x, y ), false );
|
||||
return cellInfo;
|
||||
}
|
||||
|
||||
public static Func<int2, float> DefaultEstimator( int2 destination )
|
||||
public static Func<int2, int> DefaultEstimator( int2 destination )
|
||||
{
|
||||
return here =>
|
||||
{
|
||||
int2 d = ( here - destination ).Abs();
|
||||
int diag = Math.Min( d.X, d.Y );
|
||||
int straight = Math.Abs( d.X - d.Y );
|
||||
return 1.5f * diag + straight;
|
||||
return (3400 * diag / 24) + (100 * straight);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.Traits;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenRA.Traits.Activities
|
||||
{
|
||||
public class Drag : IActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
IActivity NextActivity { get; set; }
|
||||
|
||||
float2 endLocation;
|
||||
float2 startLocation;
|
||||
@@ -31,14 +31,29 @@ namespace OpenRA.Traits.Activities
|
||||
public IActivity Tick( Actor self )
|
||||
{
|
||||
self.CenterLocation = float2.Lerp(startLocation, endLocation, (float)ticks/(length-1));
|
||||
Log.Write("debug", "drag #{0} {1} {2}", self.ActorID, ticks, self.CenterLocation);
|
||||
|
||||
if (++ticks >= length)
|
||||
return NextActivity;
|
||||
|
||||
{
|
||||
self.Trait<Mobile>().IsMoving = false;
|
||||
return NextActivity;
|
||||
}
|
||||
self.Trait<Mobile>().IsMoving = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { }
|
||||
|
||||
public void Queue( IActivity activity )
|
||||
{
|
||||
if( NextActivity != null )
|
||||
NextActivity.Queue( activity );
|
||||
else
|
||||
NextActivity = activity;
|
||||
}
|
||||
|
||||
public IEnumerable<float2> GetCurrentPath()
|
||||
{
|
||||
yield return endLocation;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,11 +10,8 @@
|
||||
|
||||
namespace OpenRA.Traits.Activities
|
||||
{
|
||||
class Idle : IActivity
|
||||
class Idle : CancelableActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
public IActivity Tick(Actor self) { return NextActivity; }
|
||||
public void Cancel(Actor self) {}
|
||||
public override IActivity Tick(Actor self) { return NextActivity; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,18 +15,14 @@ using System.Linq;
|
||||
|
||||
namespace OpenRA.Traits.Activities
|
||||
{
|
||||
public class Move : IActivity
|
||||
public class Move : CancelableActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
int2? destination;
|
||||
int nearEnough;
|
||||
public List<int2> path;
|
||||
Func<Actor, Mobile, List<int2>> getPath;
|
||||
public Actor ignoreBuilding;
|
||||
bool cancellable = true;
|
||||
|
||||
MovePart move;
|
||||
int ticksBeforePathing;
|
||||
|
||||
const int avgTicksBeforePathing = 5;
|
||||
@@ -49,7 +45,6 @@ namespace OpenRA.Traits.Activities
|
||||
.WithoutLaneBias());
|
||||
this.destination = destination;
|
||||
this.nearEnough = 0;
|
||||
this.cancellable = false;
|
||||
}
|
||||
|
||||
public Move( int2 destination, int nearEnough )
|
||||
@@ -115,27 +110,16 @@ namespace OpenRA.Traits.Activities
|
||||
List<int2> EvalPath( Actor self, Mobile mobile )
|
||||
{
|
||||
var path = getPath(self, mobile).TakeWhile(a => a != mobile.toCell).ToList();
|
||||
|
||||
Log.Write("debug", "EvalPath #{0} {1}",
|
||||
self.ActorID, string.Join(" ", path.Select(a => a.ToString()).ToArray()));
|
||||
|
||||
mobile.PathHash = HashList(path);
|
||||
Log.Write("debug", "EvalPathHash #{0} {1}",
|
||||
self.ActorID, mobile.PathHash);
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
public IActivity Tick( Actor self )
|
||||
public override IActivity Tick( Actor self )
|
||||
{
|
||||
var mobile = self.Trait<Mobile>();
|
||||
|
||||
if( move != null )
|
||||
{
|
||||
move.TickMove( self, mobile, this );
|
||||
return this;
|
||||
}
|
||||
|
||||
if (destination == mobile.toCell)
|
||||
return NextActivity;
|
||||
|
||||
@@ -168,24 +152,20 @@ namespace OpenRA.Traits.Activities
|
||||
if( firstFacing != mobile.Facing )
|
||||
{
|
||||
path.Add( nextCell.Value );
|
||||
Log.Write("debug", "Turn: #{0} from {1} to {2}",
|
||||
self.ActorID, mobile.Facing, firstFacing);
|
||||
|
||||
return new Turn( firstFacing ) { NextActivity = this };
|
||||
return Util.SequenceActivities( new Turn( firstFacing ), this ).Tick( self );
|
||||
}
|
||||
else
|
||||
{
|
||||
mobile.toCell = nextCell.Value;
|
||||
move = new MoveFirstHalf(
|
||||
var move = new MoveFirstHalf(
|
||||
this,
|
||||
Util.CenterOfCell( mobile.fromCell ),
|
||||
Util.BetweenCells( mobile.fromCell, mobile.toCell ),
|
||||
mobile.Facing,
|
||||
mobile.Facing,
|
||||
0 );
|
||||
|
||||
move.TickMove( self, mobile, this );
|
||||
|
||||
return this;
|
||||
return move.Tick( self );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,23 +239,32 @@ namespace OpenRA.Traits.Activities
|
||||
return nextCell;
|
||||
}
|
||||
|
||||
public void Cancel( Actor self )
|
||||
protected override bool OnCancel()
|
||||
{
|
||||
if (!cancellable) return;
|
||||
|
||||
path = new List<int2>();
|
||||
NextActivity = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
abstract class MovePart
|
||||
public override IEnumerable<float2> GetCurrentPath()
|
||||
{
|
||||
if( path != null )
|
||||
return Enumerable.Reverse(path).Select( c => Util.CenterOfCell(c) );
|
||||
if( destination != null )
|
||||
return new float2[] { destination.Value };
|
||||
return new float2[ 0 ];
|
||||
}
|
||||
|
||||
abstract class MovePart : IActivity
|
||||
{
|
||||
public readonly Move move;
|
||||
public readonly float2 from, to;
|
||||
public readonly int fromFacing, toFacing;
|
||||
public int moveFraction;
|
||||
public readonly int moveFractionTotal;
|
||||
|
||||
public MovePart( float2 from, float2 to, int fromFacing, int toFacing, int startingFraction )
|
||||
public MovePart( Move move, float2 from, float2 to, int fromFacing, int toFacing, int startingFraction )
|
||||
{
|
||||
this.move = move;
|
||||
this.from = from;
|
||||
this.to = to;
|
||||
this.fromFacing = fromFacing;
|
||||
@@ -284,18 +273,40 @@ namespace OpenRA.Traits.Activities
|
||||
this.moveFractionTotal = (int)(( to - from ).Length*3);
|
||||
}
|
||||
|
||||
public void TickMove( Actor self, Mobile mobile, Move parent )
|
||||
public void Cancel( Actor self )
|
||||
{
|
||||
moveFraction += (int)mobile.MovementSpeedForCell(self, mobile.toCell);
|
||||
if( moveFraction >= moveFractionTotal )
|
||||
move.Cancel( self );
|
||||
}
|
||||
|
||||
public void Queue( IActivity activity )
|
||||
{
|
||||
move.Queue( activity );
|
||||
}
|
||||
|
||||
public IActivity Tick( Actor self )
|
||||
{
|
||||
var mobile = self.Trait<Mobile>();
|
||||
var ret = InnerTick( self, mobile );
|
||||
mobile.IsMoving = ( ret is MovePart );
|
||||
|
||||
if( moveFraction > moveFractionTotal )
|
||||
moveFraction = moveFractionTotal;
|
||||
UpdateCenterLocation( self, mobile );
|
||||
if( moveFraction >= moveFractionTotal )
|
||||
{
|
||||
parent.move = OnComplete( self, mobile, parent );
|
||||
if( parent.move == null )
|
||||
UpdateCenterLocation( self, mobile );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
IActivity InnerTick( Actor self, Mobile mobile )
|
||||
{
|
||||
moveFraction += (int)mobile.MovementSpeedForCell(self, mobile.toCell);
|
||||
if( moveFraction <= moveFractionTotal )
|
||||
return this;
|
||||
|
||||
var next = OnComplete( self, mobile, move );
|
||||
if( next != null )
|
||||
return next;
|
||||
|
||||
return move;
|
||||
}
|
||||
|
||||
void UpdateCenterLocation( Actor self, Mobile mobile )
|
||||
@@ -311,12 +322,17 @@ namespace OpenRA.Traits.Activities
|
||||
}
|
||||
|
||||
protected abstract MovePart OnComplete( Actor self, Mobile mobile, Move parent );
|
||||
|
||||
public IEnumerable<float2> GetCurrentPath()
|
||||
{
|
||||
return move.GetCurrentPath();
|
||||
}
|
||||
}
|
||||
|
||||
class MoveFirstHalf : MovePart
|
||||
{
|
||||
public MoveFirstHalf( float2 from, float2 to, int fromFacing, int toFacing, int startingFraction )
|
||||
: base( from, to, fromFacing, toFacing, startingFraction )
|
||||
public MoveFirstHalf( Move move, float2 from, float2 to, int fromFacing, int toFacing, int startingFraction )
|
||||
: base( move, from, to, fromFacing, toFacing, startingFraction )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -328,6 +344,7 @@ namespace OpenRA.Traits.Activities
|
||||
if( ( nextCell - mobile.toCell ) != ( mobile.toCell - mobile.fromCell ) )
|
||||
{
|
||||
var ret = new MoveFirstHalf(
|
||||
move,
|
||||
Util.BetweenCells( mobile.fromCell, mobile.toCell ),
|
||||
Util.BetweenCells( mobile.toCell, nextCell.Value ),
|
||||
mobile.Facing,
|
||||
@@ -341,6 +358,7 @@ namespace OpenRA.Traits.Activities
|
||||
parent.path.Add( nextCell.Value );
|
||||
}
|
||||
var ret2 = new MoveSecondHalf(
|
||||
move,
|
||||
Util.BetweenCells( mobile.fromCell, mobile.toCell ),
|
||||
Util.CenterOfCell( mobile.toCell ),
|
||||
mobile.Facing,
|
||||
@@ -353,8 +371,8 @@ namespace OpenRA.Traits.Activities
|
||||
|
||||
class MoveSecondHalf : MovePart
|
||||
{
|
||||
public MoveSecondHalf( float2 from, float2 to, int fromFacing, int toFacing, int startingFraction )
|
||||
: base( from, to, fromFacing, toFacing, startingFraction )
|
||||
public MoveSecondHalf( Move move, float2 from, float2 to, int fromFacing, int toFacing, int startingFraction )
|
||||
: base( move, from, to, fromFacing, toFacing, startingFraction )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -10,18 +10,13 @@
|
||||
|
||||
namespace OpenRA.Traits.Activities
|
||||
{
|
||||
public class RemoveSelf : IActivity
|
||||
public class RemoveSelf : CancelableActivity
|
||||
{
|
||||
bool isCanceled;
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (isCanceled) return NextActivity;
|
||||
if (IsCanceled) return NextActivity;
|
||||
self.Destroy();
|
||||
return null;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { isCanceled = true; NextActivity = null; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,11 +8,13 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenRA.Traits.Activities
|
||||
{
|
||||
class Sell : IActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
IActivity NextActivity { get; set; }
|
||||
|
||||
bool started;
|
||||
|
||||
@@ -55,5 +57,18 @@ namespace OpenRA.Traits.Activities
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { /* never gonna give you up.. */ }
|
||||
|
||||
public void Queue( IActivity activity )
|
||||
{
|
||||
if( NextActivity != null )
|
||||
NextActivity.Queue( activity );
|
||||
else
|
||||
NextActivity = activity;
|
||||
}
|
||||
|
||||
public IEnumerable<float2> GetCurrentPath()
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,9 +12,8 @@ using System.Linq;
|
||||
|
||||
namespace OpenRA.Traits.Activities
|
||||
{
|
||||
public class Turn : IActivity
|
||||
public class Turn : CancelableActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
int desiredFacing;
|
||||
|
||||
public Turn( int desiredFacing )
|
||||
@@ -22,8 +21,9 @@ namespace OpenRA.Traits.Activities
|
||||
this.desiredFacing = desiredFacing;
|
||||
}
|
||||
|
||||
public IActivity Tick( Actor self )
|
||||
public override IActivity Tick( Actor self )
|
||||
{
|
||||
if (IsCanceled) return NextActivity;
|
||||
var facing = self.Trait<IFacing>();
|
||||
|
||||
if( desiredFacing == facing.Facing )
|
||||
@@ -32,11 +32,5 @@ namespace OpenRA.Traits.Activities
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel( Actor self )
|
||||
{
|
||||
desiredFacing = self.Trait<IFacing>().Facing;
|
||||
NextActivity = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace OpenRA.Traits
|
||||
foreach (var t in y.NodesDict["TerrainSpeeds"].Nodes)
|
||||
{
|
||||
var speed = (float)FieldLoader.GetValue("speed", typeof(float),t.Value.Value);
|
||||
var cost = t.Value.NodesDict.ContainsKey("PathingCost") ? (float)FieldLoader.GetValue("cost", typeof(float), t.Value.NodesDict["PathingCost"].Value) : 1f/speed;
|
||||
var cost = t.Value.NodesDict.ContainsKey("PathingCost") ? (int)FieldLoader.GetValue("cost", typeof(int), t.Value.NodesDict["PathingCost"].Value) : (int)(10000/speed);
|
||||
ret.Add(t.Key, new TerrainInfo{Speed = speed, Cost = cost});
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace OpenRA.Traits
|
||||
|
||||
public class TerrainInfo
|
||||
{
|
||||
public float Cost = float.PositiveInfinity;
|
||||
public int Cost = int.MaxValue;
|
||||
public float Speed = 0;
|
||||
}
|
||||
}
|
||||
@@ -57,6 +57,7 @@ namespace OpenRA.Traits
|
||||
{
|
||||
public readonly Actor self;
|
||||
public readonly MobileInfo Info;
|
||||
public bool IsMoving { get; internal set; }
|
||||
|
||||
int __facing;
|
||||
int2 __fromCell, __toCell;
|
||||
@@ -66,22 +67,14 @@ namespace OpenRA.Traits
|
||||
public int Facing
|
||||
{
|
||||
get { return __facing; }
|
||||
set
|
||||
{
|
||||
if (__facing == value)
|
||||
return; // not interesting unless it changes
|
||||
|
||||
__facing = value;
|
||||
Log.Write("debug", "#{0} set Facing={1}", self.ActorID, value);
|
||||
Log.Write("debug", "{0}", new StackTrace());
|
||||
}
|
||||
set { __facing = value; }
|
||||
}
|
||||
|
||||
[Sync]
|
||||
public int Altitude
|
||||
{
|
||||
get { return __altitude; }
|
||||
set { __altitude = value; Log.Write("debug", "#{0} set Altitude={1}", self.ActorID, value); }
|
||||
set { __altitude = value; }
|
||||
}
|
||||
|
||||
public int ROT { get { return Info.ROT; } }
|
||||
@@ -111,9 +104,6 @@ namespace OpenRA.Traits
|
||||
__fromCell = from;
|
||||
__toCell = to;
|
||||
AddInfluence();
|
||||
|
||||
Log.Write("debug", "#{0} set location = {1} {2}", self.ActorID, from, to);
|
||||
Log.Write("debug", "{0}", new StackTrace());
|
||||
}
|
||||
|
||||
UnitInfluence uim;
|
||||
@@ -250,7 +240,7 @@ namespace OpenRA.Traits
|
||||
|
||||
public static bool CanEnterCell( MobileInfo mobileInfo, World world, UnitInfluence uim, BuildingInfluence bim, int2 cell, Actor ignoreActor, bool checkTransientActors )
|
||||
{
|
||||
if (MovementCostForCell(mobileInfo, world, cell) == float.PositiveInfinity)
|
||||
if (MovementCostForCell(mobileInfo, world, cell) == int.MaxValue)
|
||||
return false;
|
||||
|
||||
// Check for buildings
|
||||
@@ -295,19 +285,14 @@ namespace OpenRA.Traits
|
||||
}
|
||||
}
|
||||
|
||||
public float MovementCostForCell( Actor self, int2 cell )
|
||||
{
|
||||
return MovementCostForCell( Info, self.World, cell );
|
||||
}
|
||||
|
||||
public static float MovementCostForCell(MobileInfo info, World world, int2 cell)
|
||||
public static int MovementCostForCell(MobileInfo info, World world, int2 cell)
|
||||
{
|
||||
if (!world.Map.IsInMap(cell.X,cell.Y))
|
||||
return float.PositiveInfinity;
|
||||
return int.MaxValue;
|
||||
|
||||
var type = world.GetTerrainType(cell);
|
||||
if (!info.TerrainSpeeds.ContainsKey(type))
|
||||
return float.PositiveInfinity;
|
||||
return int.MaxValue;
|
||||
|
||||
return info.TerrainSpeeds[type].Cost;
|
||||
}
|
||||
@@ -323,15 +308,7 @@ namespace OpenRA.Traits
|
||||
.TraitsImplementing<ISpeedModifier>()
|
||||
.Select(t => t.GetSpeedModifier())
|
||||
.Product();
|
||||
return Info.Speed * Info.TerrainSpeeds[type].Speed * modifier;
|
||||
}
|
||||
|
||||
public IEnumerable<float2> GetCurrentPath(Actor self)
|
||||
{
|
||||
var move = self.GetCurrentActivity() as Move;
|
||||
if (move == null || move.path == null) return new float2[] { };
|
||||
|
||||
return Enumerable.Reverse(move.path).Select( c => Util.CenterOfCell(c) );
|
||||
return Info.Speed * Info.TerrainSpeeds[type].Speed * modifier / 100f;
|
||||
}
|
||||
|
||||
public void AddInfluence()
|
||||
|
||||
@@ -164,7 +164,7 @@ namespace OpenRA.Traits
|
||||
if (mobile != null)
|
||||
{
|
||||
var alt = new float2(0, -mobile.Altitude);
|
||||
var path = mobile.GetCurrentPath(self);
|
||||
var path = self.GetCurrentActivity().GetCurrentPath();
|
||||
var start = self.CenterLocation + alt;
|
||||
|
||||
var c = Color.Green;
|
||||
|
||||
@@ -112,9 +112,7 @@ namespace OpenRA.Traits
|
||||
|
||||
public interface IMove : ITeleportable
|
||||
{
|
||||
float MovementCostForCell(Actor self, int2 cell);
|
||||
float MovementSpeedForCell(Actor self, int2 cell);
|
||||
IEnumerable<float2> GetCurrentPath(Actor self);
|
||||
int Altitude { get; set; }
|
||||
}
|
||||
|
||||
@@ -171,9 +169,41 @@ namespace OpenRA.Traits
|
||||
|
||||
public interface IActivity
|
||||
{
|
||||
IActivity NextActivity { get; set; }
|
||||
IActivity Tick(Actor self);
|
||||
void Cancel(Actor self);
|
||||
void Queue(IActivity activity);
|
||||
IEnumerable<float2> GetCurrentPath();
|
||||
}
|
||||
|
||||
public abstract class CancelableActivity : IActivity
|
||||
{
|
||||
protected IActivity NextActivity { get; private set; }
|
||||
protected bool IsCanceled { get; private set; }
|
||||
|
||||
public abstract IActivity Tick( Actor self );
|
||||
protected virtual bool OnCancel() { return true; }
|
||||
|
||||
public void Cancel( Actor self )
|
||||
{
|
||||
IsCanceled = OnCancel();
|
||||
if( IsCanceled )
|
||||
NextActivity = null;
|
||||
else
|
||||
NextActivity.Cancel( self );
|
||||
}
|
||||
|
||||
public void Queue( IActivity activity )
|
||||
{
|
||||
if( NextActivity != null )
|
||||
NextActivity.Queue( activity );
|
||||
else
|
||||
NextActivity = activity;
|
||||
}
|
||||
|
||||
public virtual IEnumerable<float2> GetCurrentPath()
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
public interface IRenderOverlay { void Render(); }
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace OpenRA.Traits
|
||||
static float2[] fvecs = Graphics.Util.MakeArray<float2>( 32,
|
||||
i => -float2.FromAngle( i / 16.0f * (float)Math.PI ) * new float2( 1f, 1.3f ) );
|
||||
|
||||
public static int _GetFacing( float2 d, int currentFacing )
|
||||
public static int GetFacing( float2 d, int currentFacing )
|
||||
{
|
||||
if (float2.WithinEpsilon(d, float2.Zero, 0.001f))
|
||||
return currentFacing;
|
||||
@@ -53,13 +53,6 @@ namespace OpenRA.Traits
|
||||
return highest * 8;
|
||||
}
|
||||
|
||||
public static int GetFacing(float2 d, int currentFacing)
|
||||
{
|
||||
var result = _GetFacing(d, currentFacing);
|
||||
Log.Write("debug", "GetFacing {0} {1} => {2}", d, currentFacing, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static int GetNearestFacing( int facing, int desiredFacing )
|
||||
{
|
||||
var turn = desiredFacing - facing;
|
||||
@@ -113,7 +106,7 @@ namespace OpenRA.Traits
|
||||
public static IActivity SequenceActivities(params IActivity[] acts)
|
||||
{
|
||||
return acts.Reverse().Aggregate(
|
||||
(next, a) => { a.NextActivity = next; return a; });
|
||||
(next, a) => { a.Queue( next ); return a; });
|
||||
}
|
||||
|
||||
public static Color ArrayToColor(int[] x) { return Color.FromArgb(x[0], x[1], x[2]); }
|
||||
|
||||
@@ -14,56 +14,37 @@ namespace OpenRA.Widgets.Delegates
|
||||
{
|
||||
public class ConnectionDialogsDelegate : IWidgetDelegate
|
||||
{
|
||||
public ConnectionDialogsDelegate()
|
||||
[ObjectCreator.UseCtor]
|
||||
public ConnectionDialogsDelegate( [ObjectCreator.Param( "widget" )] Widget widget )
|
||||
{
|
||||
var r = Widget.RootWidget;
|
||||
r.GetWidget("CONNECTION_BUTTON_ABORT").OnMouseUp = mi => {
|
||||
r.GetWidget("CONNECTION_BUTTON_ABORT").Parent.Visible = false;
|
||||
widget.GetWidget("CONNECTION_BUTTON_ABORT").OnMouseUp = mi => {
|
||||
widget.GetWidget("CONNECTION_BUTTON_ABORT").Parent.Visible = false;
|
||||
Game.Disconnect();
|
||||
return true;
|
||||
};
|
||||
r.GetWidget("CONNECTION_BUTTON_CANCEL").OnMouseUp = mi => {
|
||||
r.GetWidget("CONNECTION_BUTTON_CANCEL").Parent.Visible = false;
|
||||
|
||||
widget.GetWidget<LabelWidget>("CONNECTING_DESC").GetText = () =>
|
||||
"Connecting to {0}:{1}...".F(Game.CurrentHost, Game.CurrentPort);
|
||||
}
|
||||
}
|
||||
|
||||
public class ConnectionFailedDelegate : IWidgetDelegate
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public ConnectionFailedDelegate( [ObjectCreator.Param( "widget" )] Widget widget )
|
||||
{
|
||||
widget.GetWidget("CONNECTION_BUTTON_CANCEL").OnMouseUp = mi => {
|
||||
widget.GetWidget("CONNECTION_BUTTON_CANCEL").Parent.Visible = false;
|
||||
Game.Disconnect();
|
||||
return true;
|
||||
};
|
||||
r.GetWidget("CONNECTION_BUTTON_RETRY").OnMouseUp = mi => {
|
||||
widget.GetWidget("CONNECTION_BUTTON_RETRY").OnMouseUp = mi => {
|
||||
Game.JoinServer(Game.CurrentHost, Game.CurrentPort);
|
||||
return true;
|
||||
};
|
||||
|
||||
r.GetWidget<LabelWidget>("CONNECTING_DESC").GetText = () =>
|
||||
"Connecting to {0}:{1}...".F(Game.CurrentHost, Game.CurrentPort);
|
||||
|
||||
r.GetWidget<LabelWidget>("CONNECTION_FAILED_DESC").GetText = () =>
|
||||
widget.GetWidget<LabelWidget>("CONNECTION_FAILED_DESC").GetText = () =>
|
||||
"Could not connect to {0}:{1}".F(Game.CurrentHost, Game.CurrentPort);
|
||||
|
||||
Game.ConnectionStateChanged += () =>
|
||||
{
|
||||
r.CloseWindow();
|
||||
switch( Game.orderManager.Connection.ConnectionState )
|
||||
{
|
||||
case ConnectionState.PreConnecting:
|
||||
r.OpenWindow("MAINMENU_BG");
|
||||
break;
|
||||
case ConnectionState.Connecting:
|
||||
r.OpenWindow("CONNECTING_BG");
|
||||
break;
|
||||
case ConnectionState.NotConnected:
|
||||
r.OpenWindow("CONNECTION_FAILED_BG");
|
||||
break;
|
||||
case ConnectionState.Connected:
|
||||
r.OpenWindow("SERVER_LOBBY");
|
||||
|
||||
var lobby = r.GetWidget("SERVER_LOBBY");
|
||||
lobby.GetWidget<ChatDisplayWidget>("CHAT_DISPLAY").ClearChat();
|
||||
lobby.GetWidget("CHANGEMAP_BUTTON").Visible = true;
|
||||
lobby.GetWidget("LOCKTEAMS_CHECKBOX").Visible = true;
|
||||
lobby.GetWidget("DISCONNECT_BUTTON").Visible = true;
|
||||
r.GetWidget("INGAME_ROOT").GetWidget<ChatDisplayWidget>("CHAT_DISPLAY").ClearChat();
|
||||
break;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,26 +14,18 @@ using System.Net;
|
||||
namespace OpenRA.Widgets.Delegates
|
||||
{
|
||||
public class CreateServerMenuDelegate : IWidgetDelegate
|
||||
{
|
||||
public CreateServerMenuDelegate()
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public CreateServerMenuDelegate( [ObjectCreator.Param( "widget" )] Widget cs )
|
||||
{
|
||||
var settings = Game.Settings;
|
||||
|
||||
var r = Widget.RootWidget;
|
||||
var cs = r.GetWidget("CREATESERVER_BG");
|
||||
r.GetWidget("MAINMENU_BUTTON_CREATE").OnMouseUp = mi => {
|
||||
r.OpenWindow("CREATESERVER_BG");
|
||||
return true;
|
||||
};
|
||||
|
||||
cs.GetWidget("BUTTON_CANCEL").OnMouseUp = mi => {
|
||||
r.CloseWindow();
|
||||
Widget.CloseWindow();
|
||||
return true;
|
||||
};
|
||||
|
||||
cs.GetWidget("BUTTON_START").OnMouseUp = mi => {
|
||||
r.OpenWindow("SERVER_LOBBY");
|
||||
|
||||
var map = Game.modData.AvailableMaps.FirstOrDefault(m => m.Value.Selectable).Key;
|
||||
|
||||
settings.Server.Name = cs.GetWidget<TextFieldWidget>("GAME_TITLE").Text;
|
||||
|
||||
@@ -27,7 +27,8 @@ namespace OpenRA.Widgets.Delegates
|
||||
public static Color CurrentColorPreview1;
|
||||
public static Color CurrentColorPreview2;
|
||||
|
||||
public LobbyDelegate()
|
||||
[ObjectCreator.UseCtor]
|
||||
public LobbyDelegate( [ObjectCreator.Param( "widget" )] Widget lobby )
|
||||
{
|
||||
Game.LobbyInfoChanged += UpdateCurrentMap;
|
||||
UpdateCurrentMap();
|
||||
@@ -35,9 +36,7 @@ namespace OpenRA.Widgets.Delegates
|
||||
CurrentColorPreview1 = Game.Settings.Player.Color1;
|
||||
CurrentColorPreview2 = Game.Settings.Player.Color2;
|
||||
|
||||
var r = Widget.RootWidget;
|
||||
var lobby = r.GetWidget("SERVER_LOBBY");
|
||||
Players = Widget.RootWidget.GetWidget("SERVER_LOBBY").GetWidget("PLAYERS");
|
||||
Players = lobby.GetWidget("PLAYERS");
|
||||
LocalPlayerTemplate = Players.GetWidget("TEMPLATE_LOCAL");
|
||||
RemotePlayerTemplate = Players.GetWidget("TEMPLATE_REMOTE");
|
||||
EmptySlotTemplate = Players.GetWidget("TEMPLATE_EMPTY");
|
||||
@@ -74,8 +73,7 @@ namespace OpenRA.Widgets.Delegates
|
||||
var mapButton = lobby.GetWidget("CHANGEMAP_BUTTON");
|
||||
mapButton.OnMouseUp = mi =>
|
||||
{
|
||||
r.GetWidget("MAP_CHOOSER").SpecialOneArg(MapUid);
|
||||
r.OpenWindow("MAP_CHOOSER");
|
||||
Widget.OpenWindow("MAP_CHOOSER").SpecialOneArg(MapUid); // WTF
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
@@ -14,13 +14,17 @@ namespace OpenRA.Widgets.Delegates
|
||||
{
|
||||
public class MainMenuButtonsDelegate : IWidgetDelegate
|
||||
{
|
||||
public MainMenuButtonsDelegate()
|
||||
[ObjectCreator.UseCtor]
|
||||
public MainMenuButtonsDelegate( [ObjectCreator.Param( "widget" )] Widget widget )
|
||||
{
|
||||
// Main menu is the default window
|
||||
Widget.WindowList.Push("MAINMENU_BG");
|
||||
Widget.RootWidget.GetWidget("MAINMENU_BUTTON_QUIT").OnMouseUp = mi => { Game.Exit(); return true; };
|
||||
widget.GetWidget( "MAINMENU_BUTTON_JOIN" ).OnMouseUp = mi => { Widget.OpenWindow( "JOINSERVER_BG" ); return true; };
|
||||
widget.GetWidget( "MAINMENU_BUTTON_CREATE" ).OnMouseUp = mi => { Widget.OpenWindow( "CREATESERVER_BG" ); return true; };
|
||||
widget.GetWidget( "MAINMENU_BUTTON_SETTINGS" ).OnMouseUp = mi => { Widget.OpenWindow( "SETTINGS_MENU" ); return true; };
|
||||
widget.GetWidget( "MAINMENU_BUTTON_MUSIC" ).OnMouseUp = mi => { Widget.OpenWindow( "MUSIC_MENU" ); return true; };
|
||||
widget.GetWidget( "MAINMENU_BUTTON_QUIT" ).OnMouseUp = mi => { Game.Exit(); return true; };
|
||||
|
||||
var version = Widget.RootWidget.GetWidget("MAINMENU_BG").GetWidget<LabelWidget>("VERSION_STRING");
|
||||
var version = widget.GetWidget<LabelWidget>("VERSION_STRING");
|
||||
|
||||
if (FileSystem.Exists("VERSION"))
|
||||
{
|
||||
|
||||
@@ -17,10 +17,10 @@ namespace OpenRA.Widgets.Delegates
|
||||
public class MapChooserDelegate : IWidgetDelegate
|
||||
{
|
||||
MapStub Map = null;
|
||||
public MapChooserDelegate()
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public MapChooserDelegate( [ObjectCreator.Param( "widget" )] Widget bg )
|
||||
{
|
||||
var r = Widget.RootWidget;
|
||||
var bg = r.GetWidget("MAP_CHOOSER");
|
||||
bg.SpecialOneArg = (map) => RefreshMapList(map);
|
||||
var ml = bg.GetWidget<ListBoxWidget>("MAP_LIST");
|
||||
|
||||
@@ -33,13 +33,13 @@ namespace OpenRA.Widgets.Delegates
|
||||
bg.GetWidget("BUTTON_OK").OnMouseUp = mi =>
|
||||
{
|
||||
Game.IssueOrder(Order.Command("map " + Map.Uid));
|
||||
r.CloseWindow();
|
||||
Widget.CloseWindow();
|
||||
return true;
|
||||
};
|
||||
|
||||
bg.GetWidget("BUTTON_CANCEL").OnMouseUp = mi =>
|
||||
{
|
||||
r.CloseWindow();
|
||||
Widget.CloseWindow();
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
@@ -24,15 +24,10 @@ namespace OpenRA.Widgets.Delegates
|
||||
|
||||
bg.GetWidget("BUTTON_CLOSE").OnMouseUp = mi => {
|
||||
Game.Settings.Save();
|
||||
Widget.RootWidget.CloseWindow();
|
||||
Widget.CloseWindow();
|
||||
return true;
|
||||
};
|
||||
|
||||
Widget.RootWidget.GetWidget("MAINMENU_BUTTON_MUSIC").OnMouseUp = mi => {
|
||||
Widget.RootWidget.OpenWindow("MUSIC_MENU");
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
bg.GetWidget("BUTTON_PLAY").OnMouseUp = mi =>
|
||||
{
|
||||
if (CurrentSong == null)
|
||||
|
||||
@@ -23,28 +23,20 @@ namespace OpenRA.Widgets.Delegates
|
||||
GameServer currentServer = null;
|
||||
Widget ServerTemplate;
|
||||
|
||||
public ServerBrowserDelegate()
|
||||
[ObjectCreator.UseCtor]
|
||||
public ServerBrowserDelegate( [ObjectCreator.Param( "widget" )] Widget widget )
|
||||
{
|
||||
var r = Widget.RootWidget;
|
||||
var bg = r.GetWidget("JOINSERVER_BG");
|
||||
var dc = r.GetWidget("DIRECTCONNECT_BG");
|
||||
var bg = widget.GetWidget("JOINSERVER_BG");
|
||||
|
||||
MasterServerQuery.OnComplete += games => RefreshServerList(games);
|
||||
|
||||
r.GetWidget("MAINMENU_BUTTON_JOIN").OnMouseUp = mi =>
|
||||
{
|
||||
r.OpenWindow("JOINSERVER_BG");
|
||||
widget.GetWidget("JOINSERVER_PROGRESS_TITLE").Visible = true;
|
||||
widget.GetWidget<LabelWidget>("JOINSERVER_PROGRESS_TITLE").Text = "Fetching game list...";
|
||||
|
||||
r.GetWidget("JOINSERVER_PROGRESS_TITLE").Visible = true;
|
||||
r.GetWidget<LabelWidget>("JOINSERVER_PROGRESS_TITLE").Text = "Fetching game list...";
|
||||
bg.Children.RemoveAll(a => GameButtons.Contains(a));
|
||||
GameButtons.Clear();
|
||||
|
||||
bg.Children.RemoveAll(a => GameButtons.Contains(a));
|
||||
GameButtons.Clear();
|
||||
|
||||
MasterServerQuery.Refresh(Game.Settings.Server.MasterServer);
|
||||
|
||||
return true;
|
||||
};
|
||||
MasterServerQuery.Refresh(Game.Settings.Server.MasterServer);
|
||||
|
||||
bg.GetWidget("SERVER_INFO").IsVisible = () => currentServer != null;
|
||||
var preview = bg.GetWidget<MapPreviewWidget>("MAP_PREVIEW");
|
||||
@@ -70,8 +62,8 @@ namespace OpenRA.Widgets.Delegates
|
||||
|
||||
bg.GetWidget("REFRESH_BUTTON").OnMouseUp = mi =>
|
||||
{
|
||||
r.GetWidget("JOINSERVER_PROGRESS_TITLE").Visible = true;
|
||||
r.GetWidget<LabelWidget>("JOINSERVER_PROGRESS_TITLE").Text = "Fetching game list...";
|
||||
widget.GetWidget("JOINSERVER_PROGRESS_TITLE").Visible = true;
|
||||
widget.GetWidget<LabelWidget>("JOINSERVER_PROGRESS_TITLE").Text = "Fetching game list...";
|
||||
|
||||
bg.Children.RemoveAll(a => GameButtons.Contains(a));
|
||||
GameButtons.Clear();
|
||||
@@ -83,16 +75,14 @@ namespace OpenRA.Widgets.Delegates
|
||||
|
||||
bg.GetWidget("CANCEL_BUTTON").OnMouseUp = mi =>
|
||||
{
|
||||
r.CloseWindow();
|
||||
Widget.CloseWindow();
|
||||
return true;
|
||||
};
|
||||
|
||||
bg.GetWidget("DIRECTCONNECT_BUTTON").OnMouseUp = mi =>
|
||||
{
|
||||
r.CloseWindow();
|
||||
|
||||
dc.GetWidget<TextFieldWidget>("SERVER_ADDRESS").Text = Game.Settings.Player.LastServer;
|
||||
r.OpenWindow("DIRECTCONNECT_BG");
|
||||
Widget.CloseWindow();
|
||||
Widget.OpenWindow("DIRECTCONNECT_BG");
|
||||
return true;
|
||||
};
|
||||
|
||||
@@ -119,33 +109,10 @@ namespace OpenRA.Widgets.Delegates
|
||||
return false;
|
||||
}
|
||||
|
||||
r.CloseWindow();
|
||||
Widget.CloseWindow();
|
||||
Game.JoinServer(currentServer.Address.Split(':')[0], int.Parse(currentServer.Address.Split(':')[1]));
|
||||
return true;
|
||||
};
|
||||
|
||||
// Direct Connect
|
||||
dc.GetWidget("JOIN_BUTTON").OnMouseUp = mi =>
|
||||
{
|
||||
|
||||
var address = dc.GetWidget<TextFieldWidget>("SERVER_ADDRESS").Text;
|
||||
var cpts = address.Split(':').ToArray();
|
||||
if (cpts.Length != 2)
|
||||
return true;
|
||||
|
||||
Game.Settings.Player.LastServer = address;
|
||||
Game.Settings.Save();
|
||||
|
||||
r.CloseWindow();
|
||||
Game.JoinServer(cpts[0], int.Parse(cpts[1]));
|
||||
return true;
|
||||
};
|
||||
|
||||
dc.GetWidget("CANCEL_BUTTON").OnMouseUp = mi =>
|
||||
{
|
||||
r.CloseWindow();
|
||||
return r.GetWidget("MAINMENU_BUTTON_JOIN").OnMouseUp(mi);
|
||||
};
|
||||
}
|
||||
|
||||
MapStub CurrentMap()
|
||||
@@ -205,4 +172,37 @@ namespace OpenRA.Widgets.Delegates
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class DirectConnectDelegate : IWidgetDelegate
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public DirectConnectDelegate( [ObjectCreator.Param( "widget" )] Widget widget )
|
||||
{
|
||||
var dc = widget.GetWidget("DIRECTCONNECT_BG");
|
||||
|
||||
dc.GetWidget<TextFieldWidget>("SERVER_ADDRESS").Text = Game.Settings.Player.LastServer;
|
||||
|
||||
dc.GetWidget("JOIN_BUTTON").OnMouseUp = mi =>
|
||||
{
|
||||
|
||||
var address = dc.GetWidget<TextFieldWidget>("SERVER_ADDRESS").Text;
|
||||
var cpts = address.Split(':').ToArray();
|
||||
if (cpts.Length != 2)
|
||||
return true;
|
||||
|
||||
Game.Settings.Player.LastServer = address;
|
||||
Game.Settings.Save();
|
||||
|
||||
Widget.CloseWindow();
|
||||
Game.JoinServer(cpts[0], int.Parse(cpts[1]));
|
||||
return true;
|
||||
};
|
||||
|
||||
dc.GetWidget("CANCEL_BUTTON").OnMouseUp = mi =>
|
||||
{
|
||||
Widget.CloseWindow();
|
||||
return widget.GetWidget("MAINMENU_BUTTON_JOIN").OnMouseUp(mi);
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,17 +150,9 @@ namespace OpenRA.Widgets.Delegates
|
||||
|
||||
bg.GetWidget("BUTTON_CLOSE").OnMouseUp = mi => {
|
||||
Game.Settings.Save();
|
||||
Widget.RootWidget.CloseWindow();
|
||||
Widget.CloseWindow();
|
||||
return true;
|
||||
};
|
||||
|
||||
// Menu Buttons
|
||||
Widget.RootWidget.GetWidget("MAINMENU_BUTTON_SETTINGS").OnMouseUp = mi => {
|
||||
Widget.RootWidget.OpenWindow("SETTINGS_MENU");
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
string open = null;
|
||||
|
||||
@@ -44,13 +44,13 @@ namespace OpenRA.Widgets.Delegates
|
||||
|
||||
bg.GetWidget("BUTTON_CLOSE").OnMouseUp = mi => {
|
||||
player.Stop();
|
||||
Widget.RootWidget.CloseWindow();
|
||||
Widget.CloseWindow();
|
||||
return true;
|
||||
};
|
||||
|
||||
// Menu Buttons
|
||||
Widget.RootWidget.GetWidget("MAINMENU_BUTTON_VIDEOPLAYER").OnMouseUp = mi => {
|
||||
Widget.RootWidget.OpenWindow("VIDEOPLAYER_MENU");
|
||||
Widget.OpenWindow("VIDEOPLAYER_MENU");
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace OpenRA.Widgets
|
||||
public string Width = "0";
|
||||
public string Height = "0";
|
||||
public string Delegate = null;
|
||||
public string EventHandler = null;
|
||||
public bool ClickThrough = true;
|
||||
public bool Visible = true;
|
||||
public readonly List<Widget> Children = new List<Widget>();
|
||||
@@ -35,7 +36,7 @@ namespace OpenRA.Widgets
|
||||
public Widget Parent = null;
|
||||
|
||||
static List<string> Delegates = new List<string>();
|
||||
public static Stack<string> WindowList = new Stack<string>();
|
||||
public static Stack<Widget> WindowList = new Stack<Widget>();
|
||||
|
||||
// Common Funcs that most widgets will want
|
||||
public Action<object> SpecialOneArg = (arg) => {};
|
||||
@@ -47,24 +48,13 @@ namespace OpenRA.Widgets
|
||||
public Func<bool> IsVisible;
|
||||
|
||||
public Widget() { IsVisible = () => Visible; }
|
||||
|
||||
public static Widget RootWidget {
|
||||
get
|
||||
{
|
||||
if (rootWidget == null)
|
||||
{
|
||||
rootWidget = new ContainerWidget();
|
||||
foreach( var file in Game.modData.Manifest.ChromeLayout.Select( a => MiniYaml.FromFile( a ) ) )
|
||||
foreach( var w in file )
|
||||
rootWidget.AddChild( WidgetLoader.LoadWidget( w ) );
|
||||
|
||||
rootWidget.Initialize();
|
||||
rootWidget.InitDelegates();
|
||||
}
|
||||
return rootWidget;
|
||||
}
|
||||
|
||||
public static Widget RootWidget
|
||||
{
|
||||
get { return rootWidget; }
|
||||
set { rootWidget = value; }
|
||||
}
|
||||
private static Widget rootWidget = null;
|
||||
private static Widget rootWidget = new ContainerWidget();
|
||||
|
||||
public Widget(Widget widget)
|
||||
{
|
||||
@@ -132,14 +122,15 @@ namespace OpenRA.Widgets
|
||||
Evaluator.Evaluate(Y, substitutions),
|
||||
width,
|
||||
height);
|
||||
}
|
||||
|
||||
// Non-static func definitions
|
||||
|
||||
if (Delegate != null && !Delegates.Contains(Delegate))
|
||||
Delegates.Add(Delegate);
|
||||
|
||||
foreach (var child in Children)
|
||||
child.Initialize();
|
||||
public void PostInit()
|
||||
{
|
||||
if( Delegate != null )
|
||||
{
|
||||
var createDict = new Dictionary<string, object> { { "widget", this } };
|
||||
Game.modData.ObjectCreator.CreateObject<IWidgetDelegate>( Delegate, createDict );
|
||||
}
|
||||
}
|
||||
|
||||
public void InitDelegates()
|
||||
@@ -322,20 +313,19 @@ namespace OpenRA.Widgets
|
||||
return (widget != null)? (T) widget : null;
|
||||
}
|
||||
|
||||
public void CloseWindow()
|
||||
public static void CloseWindow()
|
||||
{
|
||||
RootWidget.GetWidget(WindowList.Pop()).Visible = false;
|
||||
if (WindowList.Count > 0)
|
||||
RootWidget.GetWidget(WindowList.Peek()).Visible = true;
|
||||
RootWidget.Children.Remove( WindowList.Pop() );
|
||||
if( WindowList.Count > 0 )
|
||||
rootWidget.Children.Add( WindowList.Peek() );
|
||||
}
|
||||
|
||||
public Widget OpenWindow(string id)
|
||||
public static Widget OpenWindow(string id)
|
||||
{
|
||||
if (WindowList.Count > 0)
|
||||
RootWidget.GetWidget(WindowList.Peek()).Visible = false;
|
||||
WindowList.Push(id);
|
||||
var window = RootWidget.GetWidget(id);
|
||||
window.Visible = true;
|
||||
var window = Game.modData.WidgetLoader.LoadWidget( rootWidget, id );
|
||||
if( WindowList.Count > 0 )
|
||||
rootWidget.Children.Remove( WindowList.Peek() );
|
||||
WindowList.Push( window );
|
||||
return window;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,29 +8,57 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
class WidgetLoader
|
||||
public class WidgetLoader
|
||||
{
|
||||
public static Widget LoadWidget(MiniYamlNode node)
|
||||
// foreach( var file in Game.modData.Manifest.ChromeLayout.Select( a => MiniYaml.FromFile( a ) ) )
|
||||
// foreach( var w in file )
|
||||
// rootWidget.AddChild( WidgetLoader.LoadWidget( w ) );
|
||||
|
||||
// rootWidget.Initialize();
|
||||
// rootWidget.InitDelegates();
|
||||
|
||||
Dictionary<string, MiniYamlNode> widgets = new Dictionary<string, MiniYamlNode>();
|
||||
|
||||
public WidgetLoader( ModData modData )
|
||||
{
|
||||
foreach( var file in modData.Manifest.ChromeLayout.Select( a => MiniYaml.FromFile( a ) ) )
|
||||
foreach( var w in file )
|
||||
widgets.Add( w.Key.Substring( w.Key.IndexOf( '@' ) + 1 ), w );
|
||||
}
|
||||
|
||||
public Widget LoadWidget( Widget parent, string w )
|
||||
{
|
||||
return LoadWidget( parent, widgets[ w ] );
|
||||
}
|
||||
|
||||
public Widget LoadWidget( Widget parent, MiniYamlNode node)
|
||||
{
|
||||
var widget = NewWidget(node.Key);
|
||||
parent.AddChild( widget );
|
||||
|
||||
foreach (var child in node.Value.Nodes)
|
||||
if (child.Key != "Children")
|
||||
FieldLoader.LoadField(widget, child.Key, child.Value.Value);
|
||||
|
||||
widget.Initialize();
|
||||
|
||||
foreach (var child in node.Value.Nodes)
|
||||
{
|
||||
if (child.Key == "Children")
|
||||
foreach (var c in child.Value.Nodes)
|
||||
widget.AddChild(LoadWidget(c));
|
||||
else
|
||||
FieldLoader.LoadField(widget, child.Key, child.Value.Value);
|
||||
}
|
||||
LoadWidget( widget, c);
|
||||
|
||||
widget.PostInit();
|
||||
return widget;
|
||||
}
|
||||
|
||||
static Widget NewWidget(string widgetType)
|
||||
Widget NewWidget(string widgetType)
|
||||
{
|
||||
widgetType = widgetType.Split('@')[0];
|
||||
return Game.CreateObject<Widget>(widgetType + "Widget");
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public static void PlayFullscreenFMVThen(World w, string movie, Action then)
|
||||
{
|
||||
var playerRoot = Widget.RootWidget.OpenWindow("FMVPLAYER");
|
||||
var playerRoot = Widget.OpenWindow("FMVPLAYER");
|
||||
var player = playerRoot.GetWidget<VqaPlayerWidget>("PLAYER");
|
||||
w.DisableTick = true;
|
||||
player.Load(movie);
|
||||
@@ -44,7 +44,7 @@ namespace OpenRA.Mods.RA
|
||||
if (music)
|
||||
Sound.PlayMusic();
|
||||
|
||||
Widget.RootWidget.CloseWindow();
|
||||
Widget.CloseWindow();
|
||||
w.DisableTick = false;
|
||||
then();
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@ using OpenRA.Traits.Activities;
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
/* non-turreted attack */
|
||||
public class Attack : IActivity
|
||||
public class Attack : CancelableActivity
|
||||
{
|
||||
Target Target;
|
||||
int Range;
|
||||
@@ -26,10 +26,17 @@ namespace OpenRA.Mods.RA.Activities
|
||||
Range = range;
|
||||
}
|
||||
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
public IActivity Tick( Actor self )
|
||||
public override IActivity Tick( Actor self )
|
||||
{
|
||||
var attack = self.Trait<AttackBase>();
|
||||
var ret = InnerTick( self, attack );
|
||||
attack.IsAttacking = ( ret == this );
|
||||
return ret;
|
||||
}
|
||||
|
||||
IActivity InnerTick( Actor self, AttackBase attack )
|
||||
{
|
||||
if (IsCanceled) return NextActivity;
|
||||
var facing = self.Trait<IFacing>();
|
||||
if (!Target.IsValid)
|
||||
return NextActivity;
|
||||
@@ -37,7 +44,7 @@ namespace OpenRA.Mods.RA.Activities
|
||||
var targetCell = Util.CellContaining(Target.CenterLocation);
|
||||
|
||||
if ((targetCell - self.Location).LengthSquared >= Range * Range)
|
||||
return new Move( Target, Range ) { NextActivity = this };
|
||||
return Util.SequenceActivities( new Move( Target, Range ), this );
|
||||
|
||||
var desiredFacing = Util.GetFacing((targetCell - self.Location).ToFloat2(), 0);
|
||||
var renderUnit = self.TraitOrDefault<RenderUnit>();
|
||||
@@ -47,15 +54,12 @@ namespace OpenRA.Mods.RA.Activities
|
||||
if (Util.QuantizeFacing(facing.Facing, numDirs)
|
||||
!= Util.QuantizeFacing(desiredFacing, numDirs))
|
||||
{
|
||||
return new Turn( desiredFacing ) { NextActivity = this };
|
||||
return Util.SequenceActivities( new Turn( desiredFacing ), this );
|
||||
}
|
||||
|
||||
var attack = self.Trait<AttackBase>();
|
||||
attack.target = Target;
|
||||
attack.DoAttack(self);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { Target = Target.None; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
@@ -24,7 +25,7 @@ namespace OpenRA.Mods.RA.Activities
|
||||
|
||||
Action a;
|
||||
bool interruptable;
|
||||
public IActivity NextActivity { get; set; }
|
||||
IActivity NextActivity { get; set; }
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
{
|
||||
@@ -40,5 +41,18 @@ namespace OpenRA.Mods.RA.Activities
|
||||
a = null;
|
||||
NextActivity = null;
|
||||
}
|
||||
|
||||
public void Queue( IActivity activity )
|
||||
{
|
||||
if( NextActivity != null )
|
||||
NextActivity.Queue( activity );
|
||||
else
|
||||
NextActivity = activity;
|
||||
}
|
||||
|
||||
public IEnumerable<float2> GetCurrentPath()
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,16 +12,15 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
class CaptureBuilding : IActivity
|
||||
class CaptureBuilding : CancelableActivity
|
||||
{
|
||||
Target target;
|
||||
|
||||
public CaptureBuilding(Actor target) { this.target = Target.FromActor(target); }
|
||||
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (IsCanceled) return NextActivity;
|
||||
if (!target.IsValid) return NextActivity;
|
||||
if ((target.Actor.Location - self.Location).Length > 1)
|
||||
return NextActivity;
|
||||
@@ -41,7 +40,5 @@ namespace OpenRA.Mods.RA.Activities
|
||||
});
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { target = Target.None; NextActivity = null; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Traits.Activities;
|
||||
|
||||
@@ -15,7 +16,7 @@ namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class DeliverResources : IActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
IActivity NextActivity { get; set; }
|
||||
|
||||
bool isDocking;
|
||||
|
||||
@@ -32,25 +33,38 @@ namespace OpenRA.Mods.RA.Activities
|
||||
harv.ChooseNewProc(self, null);
|
||||
|
||||
if (harv.LinkedProc == null) // no procs exist; check again in 1s.
|
||||
return new Wait(25) { NextActivity = this };
|
||||
return Util.SequenceActivities( new Wait(25), this );
|
||||
|
||||
var proc = harv.LinkedProc;
|
||||
|
||||
if( self.Location != proc.Location + proc.Trait<IAcceptOre>().DeliverOffset )
|
||||
{
|
||||
return new Move(proc.Location + proc.Trait<IAcceptOre>().DeliverOffset, 0) { NextActivity = this };
|
||||
return Util.SequenceActivities( new Move(proc.Location + proc.Trait<IAcceptOre>().DeliverOffset, 0), this );
|
||||
}
|
||||
else if (!isDocking)
|
||||
{
|
||||
isDocking = true;
|
||||
proc.Trait<IAcceptOre>().OnDock(self, this);
|
||||
}
|
||||
return new Wait(10) { NextActivity = this };
|
||||
return Util.SequenceActivities( new Wait(10), this );
|
||||
}
|
||||
|
||||
public void Cancel(Actor self)
|
||||
{
|
||||
// TODO: allow canceling of deliver orders?
|
||||
}
|
||||
|
||||
public void Queue( IActivity activity )
|
||||
{
|
||||
if( NextActivity != null )
|
||||
NextActivity.Queue( activity );
|
||||
else
|
||||
NextActivity = activity;
|
||||
}
|
||||
|
||||
public IEnumerable<float2> GetCurrentPath()
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,15 +13,15 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
class Demolish : IActivity
|
||||
class Demolish : CancelableActivity
|
||||
{
|
||||
Target target;
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
public Demolish( Actor target ) { this.target = Target.FromActor(target); }
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
{
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if( IsCanceled ) return NextActivity;
|
||||
if (!target.IsValid) return NextActivity;
|
||||
if ((target.Actor.Location - self.Location).Length > 1)
|
||||
return NextActivity;
|
||||
@@ -31,7 +31,5 @@ namespace OpenRA.Mods.RA.Activities
|
||||
() => { if (target.IsValid) target.Actor.Kill(self); })));
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { target = Target.None; NextActivity = null; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,10 +12,8 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
class EnterTransport : IActivity
|
||||
class EnterTransport : CancelableActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
bool isCanceled;
|
||||
public Actor transport;
|
||||
|
||||
public EnterTransport(Actor self, Actor transport)
|
||||
@@ -23,9 +21,9 @@ namespace OpenRA.Mods.RA.Activities
|
||||
this.transport = transport;
|
||||
}
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (isCanceled) return NextActivity;
|
||||
if (IsCanceled) return NextActivity;
|
||||
if (transport == null || !transport.IsInWorld) return NextActivity;
|
||||
|
||||
var cargo = transport.Trait<Cargo>();
|
||||
@@ -43,7 +41,5 @@ namespace OpenRA.Mods.RA.Activities
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { isCanceled = true; NextActivity = null; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,26 +9,23 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class Fly : IActivity
|
||||
public class Fly : CancelableActivity
|
||||
{
|
||||
public readonly float2 Pos;
|
||||
bool isCanceled;
|
||||
|
||||
public Fly(float2 pos) { Pos = pos; }
|
||||
public Fly(int2 pos) { Pos = Util.CenterOfCell(pos); }
|
||||
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
var cruiseAltitude = self.Info.Traits.Get<PlaneInfo>().CruiseAltitude;
|
||||
|
||||
if (isCanceled) return NextActivity;
|
||||
if (IsCanceled) return NextActivity;
|
||||
|
||||
var d = Pos - self.CenterLocation;
|
||||
if (d.LengthSquared < 50) /* close enough */
|
||||
@@ -47,7 +44,10 @@ namespace OpenRA.Mods.RA.Activities
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { isCanceled = true; NextActivity = null; }
|
||||
public override IEnumerable<float2> GetCurrentPath()
|
||||
{
|
||||
yield return Pos;
|
||||
}
|
||||
}
|
||||
|
||||
public static class FlyUtil
|
||||
|
||||
@@ -12,15 +12,15 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class FlyAttack : IActivity
|
||||
public class FlyAttack : CancelableActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
Target Target;
|
||||
|
||||
public FlyAttack(Target target) { Target = target; }
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (IsCanceled) return NextActivity;
|
||||
if (!Target.IsValid)
|
||||
return NextActivity;
|
||||
|
||||
@@ -33,29 +33,22 @@ namespace OpenRA.Mods.RA.Activities
|
||||
new FlyTimed(50),
|
||||
this);
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { Target = Target.None; NextActivity = null; }
|
||||
}
|
||||
|
||||
public class FlyCircle : IActivity
|
||||
public class FlyCircle : CancelableActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
int2 Target;
|
||||
bool isCanceled;
|
||||
|
||||
public FlyCircle(int2 target) { Target = target; }
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (isCanceled)
|
||||
return NextActivity;
|
||||
if( IsCanceled ) return NextActivity;
|
||||
|
||||
return Util.SequenceActivities(
|
||||
new Fly(Util.CenterOfCell(Target)),
|
||||
new FlyTimed(50),
|
||||
this);
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { isCanceled = true; NextActivity = null; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,46 +12,37 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class FlyTimed : IActivity
|
||||
public class FlyTimed : CancelableActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
int remainingTicks;
|
||||
|
||||
public FlyTimed(int ticks) { remainingTicks = ticks; }
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if( IsCanceled ) return NextActivity;
|
||||
var targetAltitude = self.Info.Traits.Get<PlaneInfo>().CruiseAltitude;
|
||||
if (remainingTicks-- == 0) return NextActivity;
|
||||
FlyUtil.Fly(self, targetAltitude);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { remainingTicks = 0; NextActivity = null; }
|
||||
}
|
||||
|
||||
public class FlyOffMap : IActivity
|
||||
public class FlyOffMap : CancelableActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
bool isCanceled;
|
||||
public bool Interruptible = true;
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
var targetAltitude = self.Info.Traits.Get<PlaneInfo>().CruiseAltitude;
|
||||
if (isCanceled || !self.World.Map.IsInMap(self.Location)) return NextActivity;
|
||||
if (IsCanceled || !self.World.Map.IsInMap(self.Location)) return NextActivity;
|
||||
FlyUtil.Fly(self, targetAltitude);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self)
|
||||
protected override bool OnCancel()
|
||||
{
|
||||
if (Interruptible)
|
||||
{
|
||||
isCanceled = true;
|
||||
NextActivity = null;
|
||||
}
|
||||
return Interruptible;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ using OpenRA.Traits.Activities;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class Follow : IActivity
|
||||
public class Follow : CancelableActivity
|
||||
{
|
||||
Target Target;
|
||||
int Range;
|
||||
@@ -24,24 +24,18 @@ namespace OpenRA.Mods.RA.Activities
|
||||
Range = range;
|
||||
}
|
||||
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
public IActivity Tick( Actor self )
|
||||
public override IActivity Tick( Actor self )
|
||||
{
|
||||
if (!Target.IsValid)
|
||||
return NextActivity;
|
||||
if (IsCanceled) return NextActivity;
|
||||
if (!Target.IsValid) return NextActivity;
|
||||
|
||||
var inRange = ( Util.CellContaining( Target.CenterLocation ) - self.Location ).LengthSquared < Range * Range;
|
||||
|
||||
if( !inRange )
|
||||
return new Move( Target, Range ) { NextActivity = this };
|
||||
if( inRange ) return this;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self)
|
||||
{
|
||||
Target = Target.None;
|
||||
var ret = new Move( Target, Range );
|
||||
ret.Queue( this );
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,21 +15,21 @@ using OpenRA.Traits.Activities;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class Harvest : IActivity
|
||||
public class Harvest : CancelableActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
bool isHarvesting = false;
|
||||
|
||||
public IActivity Tick( Actor self )
|
||||
public override IActivity Tick( Actor self )
|
||||
{
|
||||
if( isHarvesting ) return this;
|
||||
if( IsCanceled ) return NextActivity;
|
||||
if( NextActivity != null ) return NextActivity;
|
||||
|
||||
var harv = self.Trait<Harvester>();
|
||||
harv.LastHarvestedCell = self.Location;
|
||||
|
||||
if( harv.IsFull )
|
||||
return new DeliverResources { NextActivity = NextActivity };
|
||||
return Util.SequenceActivities( new DeliverResources(), NextActivity );
|
||||
|
||||
if (HarvestThisTile(self))
|
||||
return this;
|
||||
@@ -72,7 +72,5 @@ namespace OpenRA.Mods.RA.Activities
|
||||
}));
|
||||
self.QueueActivity(new Harvest());
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,17 +14,15 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class HeliAttack : IActivity
|
||||
public class HeliAttack : CancelableActivity
|
||||
{
|
||||
Target target;
|
||||
public HeliAttack( Target target ) { this.target = target; }
|
||||
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (!target.IsValid)
|
||||
return NextActivity;
|
||||
if (IsCanceled) return NextActivity;
|
||||
if (!target.IsValid) return NextActivity;
|
||||
|
||||
var limitedAmmo = self.TraitOrDefault<LimitedAmmo>();
|
||||
if (limitedAmmo != null && !limitedAmmo.HasAmmo())
|
||||
@@ -53,7 +51,5 @@ namespace OpenRA.Mods.RA.Activities
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { target = Target.None; NextActivity = null; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
class HeliFly : IActivity
|
||||
class HeliFly : CancelableActivity
|
||||
{
|
||||
public readonly float2 Dest;
|
||||
public HeliFly(float2 dest)
|
||||
@@ -22,13 +22,9 @@ namespace OpenRA.Mods.RA.Activities
|
||||
Dest = dest;
|
||||
}
|
||||
|
||||
public IActivity NextActivity { get; set; }
|
||||
bool isCanceled;
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (isCanceled)
|
||||
return NextActivity;
|
||||
if (IsCanceled) return NextActivity;
|
||||
|
||||
var info = self.Info.Traits.Get<HelicopterInfo>();
|
||||
var aircraft = self.Trait<Aircraft>();
|
||||
@@ -58,6 +54,9 @@ namespace OpenRA.Mods.RA.Activities
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { isCanceled = true; NextActivity = null; }
|
||||
public override IEnumerable<float2> GetCurrentPath()
|
||||
{
|
||||
yield return Dest;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,17 +12,15 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
class HeliLand : IActivity
|
||||
class HeliLand : CancelableActivity
|
||||
{
|
||||
public HeliLand(bool requireSpace) { this.requireSpace = requireSpace; }
|
||||
|
||||
bool requireSpace;
|
||||
bool isCanceled;
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (isCanceled) return NextActivity;
|
||||
if (IsCanceled) return NextActivity;
|
||||
var aircraft = self.Trait<Aircraft>();
|
||||
if (aircraft.Altitude == 0)
|
||||
return NextActivity;
|
||||
@@ -33,7 +31,5 @@ namespace OpenRA.Mods.RA.Activities
|
||||
--aircraft.Altitude;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { isCanceled = true; NextActivity = null; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,11 +14,8 @@ using OpenRA.Traits.Activities;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class HeliReturn : IActivity
|
||||
public class HeliReturn : CancelableActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
bool isCanceled;
|
||||
|
||||
static Actor ChooseHelipad(Actor self)
|
||||
{
|
||||
var rearmBuildings = self.Info.Traits.Get<HelicopterInfo>().RearmBuildings;
|
||||
@@ -27,9 +24,9 @@ namespace OpenRA.Mods.RA.Activities
|
||||
!Reservable.IsReserved(a));
|
||||
}
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (isCanceled) return NextActivity;
|
||||
if (IsCanceled) return NextActivity;
|
||||
var dest = ChooseHelipad(self);
|
||||
|
||||
var initialFacing = self.Info.Traits.Get<AircraftInfo>().InitialFacing;
|
||||
@@ -54,7 +51,5 @@ namespace OpenRA.Mods.RA.Activities
|
||||
new Rearm(),
|
||||
NextActivity);
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { isCanceled = true; NextActivity = null; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Mods.RA.Render;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Mods.RA.Render;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.RA.Activities
|
||||
this.delay = delay;
|
||||
}
|
||||
|
||||
public IActivity NextActivity { get; set; }
|
||||
IActivity NextActivity { get; set; }
|
||||
|
||||
bool active = true;
|
||||
public IActivity Tick(Actor self)
|
||||
@@ -43,5 +43,18 @@ namespace OpenRA.Mods.RA.Activities
|
||||
active = false;
|
||||
NextActivity = null;
|
||||
}
|
||||
|
||||
public void Queue( IActivity activity )
|
||||
{
|
||||
if( NextActivity != null )
|
||||
NextActivity.Queue( activity );
|
||||
else
|
||||
NextActivity = activity;
|
||||
}
|
||||
|
||||
public IEnumerable<float2> GetCurrentPath()
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,14 +12,14 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
class Infiltrate : IActivity
|
||||
class Infiltrate : CancelableActivity
|
||||
{
|
||||
Actor target;
|
||||
public Infiltrate(Actor target) { this.target = target; }
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (IsCanceled) return NextActivity;
|
||||
if (target == null || target.IsDead()) return NextActivity;
|
||||
if (target.Owner == self.Owner) return NextActivity;
|
||||
|
||||
@@ -30,7 +30,5 @@ namespace OpenRA.Mods.RA.Activities
|
||||
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { target = null; NextActivity = null; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,21 +14,18 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class Land : IActivity
|
||||
public class Land : CancelableActivity
|
||||
{
|
||||
bool isCanceled;
|
||||
Target Target;
|
||||
|
||||
public Land(Target t) { Target = t; }
|
||||
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (!Target.IsValid)
|
||||
Cancel(self);
|
||||
|
||||
if (isCanceled) return NextActivity;
|
||||
if (IsCanceled) return NextActivity;
|
||||
|
||||
var d = Target.CenterLocation - self.CenterLocation;
|
||||
if (d.LengthSquared < 50) /* close enough */
|
||||
@@ -49,7 +46,5 @@ namespace OpenRA.Mods.RA.Activities
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { isCanceled = true; NextActivity = null; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,14 +17,11 @@ namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
// assumes you have Minelayer on that unit
|
||||
|
||||
class LayMines : IActivity
|
||||
class LayMines : CancelableActivity
|
||||
{
|
||||
bool canceled = false;
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
public IActivity Tick( Actor self )
|
||||
public override IActivity Tick( Actor self )
|
||||
{
|
||||
if (canceled) return NextActivity;
|
||||
if (IsCanceled) return NextActivity;
|
||||
|
||||
var limitedAmmo = self.TraitOrDefault<LimitedAmmo>();
|
||||
if (!limitedAmmo.HasAmmo())
|
||||
@@ -37,8 +34,11 @@ namespace OpenRA.Mods.RA.Activities
|
||||
if (rearmTarget == null)
|
||||
return new Wait(20);
|
||||
|
||||
return new Move(Util.CellContaining(rearmTarget.CenterLocation), rearmTarget)
|
||||
{ NextActivity = new Rearm() { NextActivity = new Repair(rearmTarget) { NextActivity = this } } };
|
||||
return Util.SequenceActivities(
|
||||
new Move(Util.CellContaining(rearmTarget.CenterLocation), rearmTarget),
|
||||
new Rearm(),
|
||||
new Repair(rearmTarget),
|
||||
this );
|
||||
}
|
||||
|
||||
var ml = self.Trait<Minelayer>();
|
||||
@@ -46,14 +46,14 @@ namespace OpenRA.Mods.RA.Activities
|
||||
ShouldLayMine(self, self.Location))
|
||||
{
|
||||
LayMine(self);
|
||||
return new Wait(20) { NextActivity = this }; // a little wait after placing each mine, for show
|
||||
return Util.SequenceActivities( new Wait(20), this ); // a little wait after placing each mine, for show
|
||||
}
|
||||
|
||||
for (var n = 0; n < 20; n++) // dont get stuck forever here
|
||||
{
|
||||
var p = ml.minefield.Random(self.World.SharedRandom);
|
||||
if (ShouldLayMine(self, p))
|
||||
return new Move(p, 0) { NextActivity = this };
|
||||
return Util.SequenceActivities( new Move(p, 0), this );
|
||||
}
|
||||
|
||||
// todo: return somewhere likely to be safe (near fix) so we're not sitting out in the minefield.
|
||||
@@ -80,7 +80,5 @@ namespace OpenRA.Mods.RA.Activities
|
||||
new OwnerInit( self.Owner ),
|
||||
}));
|
||||
}
|
||||
|
||||
public void Cancel( Actor self ) { canceled = true; NextActivity = null; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
class Leap : IActivity
|
||||
class Leap : CancelableActivity
|
||||
{
|
||||
Target target;
|
||||
float2 initialLocation;
|
||||
@@ -31,12 +31,12 @@ namespace OpenRA.Mods.RA.Activities
|
||||
Sound.Play("dogg5p.aud", self.CenterLocation);
|
||||
}
|
||||
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (!target.IsValid)
|
||||
return NextActivity;
|
||||
if( t == 0 && IsCanceled ) return NextActivity;
|
||||
if (!target.IsValid) return NextActivity;
|
||||
|
||||
self.Trait<AttackLeap>().IsLeaping = true;
|
||||
|
||||
t += (1f / delay);
|
||||
|
||||
@@ -49,12 +49,11 @@ namespace OpenRA.Mods.RA.Activities
|
||||
|
||||
if (target.IsActor)
|
||||
target.Actor.Kill(self);
|
||||
self.Trait<AttackLeap>().IsLeaping = false;
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { target = new Target(); NextActivity = null; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,17 +14,15 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class Rearm : IActivity
|
||||
public class Rearm : CancelableActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
bool isCanceled;
|
||||
int remainingTicks = ticksPerPip;
|
||||
|
||||
const int ticksPerPip = 25 * 2;
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (isCanceled) return NextActivity;
|
||||
if (IsCanceled) return NextActivity;
|
||||
var limitedAmmo = self.TraitOrDefault<LimitedAmmo>();
|
||||
if (limitedAmmo == null) return NextActivity;
|
||||
|
||||
@@ -43,7 +41,5 @@ namespace OpenRA.Mods.RA.Activities
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { isCanceled = true; NextActivity = null; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,18 +14,16 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class Repair : IActivity
|
||||
public class Repair : CancelableActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
bool isCanceled;
|
||||
int remainingTicks;
|
||||
Actor host;
|
||||
|
||||
public Repair(Actor host) { this.host = host; }
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (isCanceled) return NextActivity;
|
||||
if (IsCanceled) return NextActivity;
|
||||
if (host != null && !host.IsInWorld) return NextActivity;
|
||||
if (remainingTicks == 0)
|
||||
{
|
||||
@@ -58,7 +56,5 @@ namespace OpenRA.Mods.RA.Activities
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { isCanceled = true; NextActivity = null; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,16 +12,15 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
class RepairBuilding : IActivity
|
||||
class RepairBuilding : CancelableActivity
|
||||
{
|
||||
Target target;
|
||||
|
||||
public RepairBuilding(Actor target) { this.target = Target.FromActor(target); }
|
||||
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
{
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (IsCanceled) return NextActivity;
|
||||
if (!target.IsValid) return NextActivity;
|
||||
if ((target.Actor.Location - self.Location).Length > 1)
|
||||
return NextActivity;
|
||||
@@ -34,8 +33,6 @@ namespace OpenRA.Mods.RA.Activities
|
||||
self.Destroy();
|
||||
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { target = Target.None; NextActivity = null; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,11 +14,8 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class ReturnToBase : IActivity
|
||||
public class ReturnToBase : CancelableActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
bool isCanceled;
|
||||
bool isCalculated;
|
||||
Actor dest;
|
||||
|
||||
@@ -88,9 +85,9 @@ namespace OpenRA.Mods.RA.Activities
|
||||
this.dest = dest;
|
||||
}
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (isCanceled) return NextActivity;
|
||||
if (IsCanceled) return NextActivity;
|
||||
if (!isCalculated)
|
||||
Calculate(self);
|
||||
|
||||
@@ -101,7 +98,5 @@ namespace OpenRA.Mods.RA.Activities
|
||||
new Land(Target.FromActor(dest)),
|
||||
NextActivity);
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { isCanceled = true; NextActivity = null; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,10 +13,8 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class Teleport : IActivity
|
||||
public class Teleport : CancelableActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
int2 destination;
|
||||
|
||||
public Teleport(int2 destination)
|
||||
@@ -24,12 +22,10 @@ namespace OpenRA.Mods.RA.Activities
|
||||
this.destination = destination;
|
||||
}
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
self.TraitsImplementing<IMove>().FirstOrDefault().SetPosition(self, destination);
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,12 +17,11 @@ using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
class Transform : IActivity
|
||||
class Transform : CancelableActivity
|
||||
{
|
||||
string actor = null;
|
||||
int2 offset;
|
||||
string[] sounds = null;
|
||||
bool isCanceled;
|
||||
int facing;
|
||||
|
||||
RenderBuilding rb;
|
||||
@@ -34,10 +33,7 @@ namespace OpenRA.Mods.RA.Activities
|
||||
this.facing = facing;
|
||||
rb = self.TraitOrDefault<RenderBuilding>();
|
||||
}
|
||||
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
|
||||
void DoTransform(Actor self)
|
||||
{
|
||||
// Hack: repeat the first frame of the make anim instead
|
||||
@@ -70,9 +66,9 @@ namespace OpenRA.Mods.RA.Activities
|
||||
}
|
||||
|
||||
bool started = false;
|
||||
public IActivity Tick( Actor self )
|
||||
public override IActivity Tick( Actor self )
|
||||
{
|
||||
if (isCanceled) return NextActivity;
|
||||
if (IsCanceled) return NextActivity;
|
||||
if (started) return this;
|
||||
|
||||
if (rb == null)
|
||||
@@ -88,7 +84,5 @@ namespace OpenRA.Mods.RA.Activities
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { isCanceled = true; NextActivity = null; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,11 +16,8 @@ using System.Drawing;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class UnloadCargo : IActivity
|
||||
public class UnloadCargo : CancelableActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
bool isCanceled;
|
||||
|
||||
int2? ChooseExitTile(Actor self, Actor cargo)
|
||||
{
|
||||
// is anyone still hogging this tile?
|
||||
@@ -38,16 +35,16 @@ namespace OpenRA.Mods.RA.Activities
|
||||
return null;
|
||||
}
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (isCanceled) return NextActivity;
|
||||
if (IsCanceled) return NextActivity;
|
||||
|
||||
// if we're a thing that can turn, turn to the
|
||||
// right facing for the unload animation
|
||||
var facing = self.TraitOrDefault<IFacing>();
|
||||
var unloadFacing = self.Info.Traits.Get<CargoInfo>().UnloadFacing;
|
||||
if (facing != null && facing.Facing != unloadFacing)
|
||||
return new Turn(unloadFacing) { NextActivity = this };
|
||||
return Util.SequenceActivities( new Turn(unloadFacing), this );
|
||||
|
||||
// todo: handle the BS of open/close sequences, which are inconsistent,
|
||||
// for reasons that probably make good sense to the westwood guys.
|
||||
@@ -82,7 +79,5 @@ namespace OpenRA.Mods.RA.Activities
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self) { NextActivity = null; isCanceled = true; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,11 +12,11 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class Wait : IActivity
|
||||
public class Wait : CancelableActivity
|
||||
{
|
||||
int remainingTicks;
|
||||
bool interruptable = true;
|
||||
|
||||
|
||||
public Wait(int period) { remainingTicks = period; }
|
||||
public Wait(int period, bool interruptable)
|
||||
{
|
||||
@@ -24,20 +24,17 @@ namespace OpenRA.Mods.RA.Activities
|
||||
this.interruptable = interruptable;
|
||||
}
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
public override IActivity Tick(Actor self)
|
||||
{
|
||||
if (remainingTicks-- == 0) return NextActivity;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Cancel(Actor self)
|
||||
protected override bool OnCancel()
|
||||
{
|
||||
if (!interruptable)
|
||||
return;
|
||||
|
||||
if( !interruptable ) return false;
|
||||
remainingTicks = 0;
|
||||
NextActivity = null;
|
||||
return true;
|
||||
}
|
||||
public IActivity NextActivity { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,18 +70,8 @@ namespace OpenRA.Mods.RA
|
||||
|| Info.RepairBuildings.Contains( a.Info.Name );
|
||||
}
|
||||
|
||||
public virtual IEnumerable<float2> GetCurrentPath(Actor self)
|
||||
{
|
||||
var move = self.GetCurrentActivity() as Activities.Fly;
|
||||
if (move == null) return new float2[] { };
|
||||
|
||||
return new float2[] { move.Pos };
|
||||
}
|
||||
|
||||
public bool CanEnterCell(int2 location) { return true; }
|
||||
|
||||
public float MovementCostForCell(Actor self, int2 cell) { return 1f; }
|
||||
|
||||
public float MovementSpeedForCell(Actor self, int2 cell)
|
||||
{
|
||||
var modifier = self
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public class AttackBase : IIssueOrder, IResolveOrder, ITick, IExplodeModifier, IOrderCursor, IOrderVoice
|
||||
{
|
||||
public bool IsAttacking { get; internal set; }
|
||||
public Target target;
|
||||
|
||||
public List<Weapon> Weapons = new List<Weapon>();
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
class AttackLeap : AttackBase
|
||||
{
|
||||
internal bool IsLeaping;
|
||||
|
||||
public AttackLeap(Actor self)
|
||||
: base(self) {}
|
||||
|
||||
@@ -27,7 +29,7 @@ namespace OpenRA.Mods.RA
|
||||
base.Tick(self);
|
||||
|
||||
if (!target.IsValid) return;
|
||||
if (self.GetCurrentActivity() is Leap) return;
|
||||
if (IsLeaping) return;
|
||||
|
||||
var weapon = self.Trait<AttackBase>().Weapons[0].Info;
|
||||
if (weapon.Range * Game.CellSize * weapon.Range * Game.CellSize
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace OpenRA.Mods.RA
|
||||
if (target != null)
|
||||
attack.ResolveOrder(self, new Order("Attack", self, target));
|
||||
else
|
||||
if (self.GetCurrentActivity() is Attack)
|
||||
if (attack.IsAttacking)
|
||||
self.CancelActivity();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.RA.Effects
|
||||
|
||||
public void Tick( World world )
|
||||
{
|
||||
if (--framesLeft == 0 || a.IsDead())
|
||||
if (--framesLeft == 0 || !a.IsInWorld || a.IsDead())
|
||||
world.AddFrameEndTask(w => w.Remove(this));
|
||||
}
|
||||
|
||||
|
||||
@@ -171,13 +171,5 @@ namespace OpenRA.Mods.RA
|
||||
return float2.FromAngle((float)self.World.SharedRandom.NextDouble() * 3.14f);
|
||||
return (5 / d.LengthSquared) * d;
|
||||
}
|
||||
|
||||
public override IEnumerable<float2> GetCurrentPath(Actor self)
|
||||
{
|
||||
var move = self.GetCurrentActivity() as Activities.HeliFly;
|
||||
if (move == null) return new float2[] { };
|
||||
|
||||
return new float2[] { move.Dest };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public void Damaged(Actor self, AttackInfo e)
|
||||
{
|
||||
if (self.GetCurrentActivity() is IdleAnimation)
|
||||
if (self.GetCurrentActivity() is Activities.IdleAnimation)
|
||||
self.CancelActivity();
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
using System.Drawing;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Traits.Activities;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
@@ -61,7 +62,7 @@ namespace OpenRA.Mods.RA
|
||||
// Animate the spawn -> exit transition
|
||||
var speed = move.MovementSpeedForCell(self, exit);
|
||||
var length = speed > 0 ? (int)( ( to - spawn ).Length*3 / speed ) : 0;
|
||||
newUnit.QueueActivity(new Traits.Activities.Drag(spawn, to, length));
|
||||
newUnit.QueueActivity(new Drag(spawn, to, length));
|
||||
|
||||
// Log.Write("debug", "length={0} facing={1} exit={2} spawn={3}", length, facing.Facing, exit, spawn);
|
||||
|
||||
@@ -72,7 +73,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
target = rp.rallyPoint;
|
||||
// Todo: Move implies unit has Mobile
|
||||
newUnit.QueueActivity(new Traits.Activities.Move(target, 1));
|
||||
newUnit.QueueActivity(new Move(target, 1));
|
||||
}
|
||||
|
||||
if (newUnit.Owner == self.World.LocalPlayer)
|
||||
|
||||
@@ -30,10 +30,9 @@ namespace OpenRA.Mods.RA.Render
|
||||
|
||||
bool ChooseMoveAnim(Actor self)
|
||||
{
|
||||
if (!(self.GetCurrentActivity() is Move) && !(self.GetCurrentActivity() is Drag)) // A bit of a hack
|
||||
return false;
|
||||
|
||||
var mobile = self.Trait<Mobile>();
|
||||
if( !mobile.IsMoving ) return false;
|
||||
|
||||
if (float2.WithinEpsilon(self.CenterLocation, Util.CenterOfCell(mobile.toCell), 2)) return false;
|
||||
|
||||
var seq = IsProne(self) ? "crawl" : "run";
|
||||
|
||||
@@ -24,13 +24,11 @@ namespace OpenRA.Mods.RA.Render
|
||||
|
||||
public override void Tick(Actor self)
|
||||
{
|
||||
var isAttacking = self.GetCurrentActivity() is Attack;
|
||||
|
||||
var attack = self.TraitOrDefault<AttackBase>();
|
||||
|
||||
if (attack != null)
|
||||
anim.ReplaceAnim((attack.IsReloading() ? "empty-" : "")
|
||||
+ (isAttacking ? "aim" : "idle"));
|
||||
+ (attack.IsAttacking ? "aim" : "idle"));
|
||||
base.Tick(self);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,6 +339,8 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
{
|
||||
if (unit.Traits.Contains<BuildingInfo>())
|
||||
world.OrderGenerator = new PlaceBuildingOrderGenerator(CurrentQueue.self, item);
|
||||
else
|
||||
StartProduction( world, item );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,9 +21,6 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
|
||||
var gameRoot = r.GetWidget("INGAME_ROOT");
|
||||
var optionsBG = gameRoot.GetWidget("INGAME_OPTIONS_BG");
|
||||
|
||||
Game.BeforeGameStart += () => r.OpenWindow("INGAME_ROOT");
|
||||
Game.AfterGameStart += () => gameRoot.GetWidget<RadarBinWidget>("INGAME_RADAR_BIN").SetWorld(Game.world);
|
||||
|
||||
r.GetWidget("INGAME_OPTIONS_BUTTON").OnMouseUp = mi => {
|
||||
optionsBG.Visible = !optionsBG.Visible;
|
||||
return true;
|
||||
@@ -36,12 +33,12 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
|
||||
};
|
||||
|
||||
optionsBG.GetWidget("SETTINGS").OnMouseUp = mi => {
|
||||
r.OpenWindow("SETTINGS_MENU");
|
||||
Widget.OpenWindow("SETTINGS_MENU");
|
||||
return true;
|
||||
};
|
||||
|
||||
optionsBG.GetWidget("MUSIC").OnMouseUp = mi => {
|
||||
r.OpenWindow("MUSIC_MENU");
|
||||
Widget.OpenWindow("MUSIC_MENU");
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
@@ -163,6 +163,9 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
int updateTicks = 0;
|
||||
public override void Tick(World w)
|
||||
{
|
||||
if( world != w )
|
||||
SetWorld( w );
|
||||
|
||||
var hasRadarNew = world.Queries.OwnedBy[world.LocalPlayer]
|
||||
.WithTrait<ProvidesRadar>()
|
||||
.Any(a => a.Trait.IsActive);
|
||||
|
||||
@@ -5,7 +5,6 @@ Background@SERVER_LOBBY:
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:800
|
||||
Height:600
|
||||
Visible:false
|
||||
Children:
|
||||
Label@LOBBY_TITLE:
|
||||
X:0
|
||||
@@ -396,7 +395,6 @@ Background@MAP_CHOOSER:
|
||||
Delegate:MapChooserDelegate
|
||||
Width:800
|
||||
Height:600
|
||||
Visible:false
|
||||
Children:
|
||||
Label@MAPCHOOSER_TITLE:
|
||||
X:0
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
Container@INGAME_ROOT:
|
||||
Id:INGAME_ROOT
|
||||
Delegate:IngameChromeDelegate
|
||||
Visible:false
|
||||
Children:
|
||||
WorldInteractionController:
|
||||
X:0
|
||||
@@ -281,7 +280,6 @@ Background@FMVPLAYER:
|
||||
Id:FMVPLAYER
|
||||
Width:WINDOW_RIGHT
|
||||
Height:WINDOW_BOTTOM
|
||||
Visible: false
|
||||
Background:dialog4
|
||||
Children:
|
||||
VqaPlayer:
|
||||
|
||||
@@ -103,7 +103,6 @@ Background@MUSIC_MENU:
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width: 450
|
||||
Height: 250
|
||||
Visible: false
|
||||
Children:
|
||||
Label@SETTINGS_LABEL_TITLE:
|
||||
Id:SETTINGS_LABEL_TITLE
|
||||
|
||||
@@ -5,7 +5,6 @@ Background@CREATESERVER_BG:
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:400
|
||||
Height:240
|
||||
Visible:false
|
||||
Children:
|
||||
Label@LABEL_TITLE:
|
||||
Id:LABEL_TITLE
|
||||
@@ -100,7 +99,6 @@ Background@JOINSERVER_BG:
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:700
|
||||
Height:410
|
||||
Visible:false
|
||||
Children:
|
||||
Label@JOINSERVER_LABEL_TITLE:
|
||||
Id:JOINSERVER_LABEL_TITLE
|
||||
@@ -252,7 +250,6 @@ Background@DIRECTCONNECT_BG:
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:400
|
||||
Height:155
|
||||
Visible:false
|
||||
Children:
|
||||
Label@DIRECTCONNECT_LABEL_TITLE:
|
||||
Id:DIRECTCONNECT_LABEL_TITLE
|
||||
@@ -296,12 +293,11 @@ Background@DIRECTCONNECT_BG:
|
||||
Bold:True
|
||||
Background@CONNECTION_FAILED_BG:
|
||||
Id:CONNECTION_FAILED_BG
|
||||
Delegate:ConnectionDialogsDelegate
|
||||
Delegate:ConnectionFailedDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:450
|
||||
Height:150
|
||||
Visible:false
|
||||
Children:
|
||||
Label@CONNECTION_FAILED_TITLE:
|
||||
Id:CONNECTION_FAILED_TITLE
|
||||
@@ -343,7 +339,6 @@ Background@CONNECTING_BG:
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:450
|
||||
Height:150
|
||||
Visible:false
|
||||
Children:
|
||||
Label@CONNECTING_TITLE:
|
||||
Id:CONNECTING_TITLE
|
||||
|
||||
@@ -5,7 +5,6 @@ Background@SETTINGS_MENU:
|
||||
Y:(WINDOW_BOTTOM- HEIGHT)/2
|
||||
Width: 450
|
||||
Height: 350
|
||||
Visible: false
|
||||
Children:
|
||||
Label@SETTINGS_LABEL_TITLE:
|
||||
Id:SETTINGS_LABEL_TITLE
|
||||
|
||||
@@ -5,7 +5,6 @@ Background@VIDEOPLAYER_MENU:
|
||||
Y:(WINDOW_BOTTOM- HEIGHT)/2
|
||||
Width: 700
|
||||
Height: 680
|
||||
Visible: false
|
||||
Children:
|
||||
Label@VIDEOPLAYER_TITLE:
|
||||
X:0
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
Mobile:
|
||||
Crushes: crate
|
||||
TerrainSpeeds:
|
||||
Clear: 60%
|
||||
Rough: 40%
|
||||
Road: 100%
|
||||
Ore: 70%
|
||||
Beach: 40%
|
||||
Clear: 60
|
||||
Rough: 40
|
||||
Road: 100
|
||||
Ore: 70
|
||||
Beach: 40
|
||||
ROT: 5
|
||||
Selectable:
|
||||
Voice: VehicleVoice
|
||||
@@ -32,11 +32,11 @@
|
||||
Mobile:
|
||||
Crushes: wall, crate
|
||||
TerrainSpeeds:
|
||||
Clear: 80%
|
||||
Rough: 70%
|
||||
Road: 100%
|
||||
Ore: 90%
|
||||
Beach: 70%
|
||||
Clear: 80
|
||||
Rough: 70
|
||||
Road: 100
|
||||
Ore: 90
|
||||
Beach: 70
|
||||
ROT: 5
|
||||
Selectable:
|
||||
Voice: VehicleVoice
|
||||
@@ -85,12 +85,12 @@
|
||||
Mobile:
|
||||
Crushes: crate
|
||||
TerrainSpeeds:
|
||||
Clear: 90%
|
||||
Rough: 80%
|
||||
Road: 100%
|
||||
Ore: 90%
|
||||
Clear: 90
|
||||
Rough: 80
|
||||
Road: 100
|
||||
Ore: 90
|
||||
PathingCost: 200
|
||||
Beach: 80%
|
||||
Beach: 80
|
||||
Selectable:
|
||||
Voice: GenericVoice
|
||||
Targetable:
|
||||
@@ -151,7 +151,7 @@
|
||||
Mobile:
|
||||
Crushes: crate
|
||||
TerrainSpeeds:
|
||||
Water: 100%
|
||||
Water: 100
|
||||
Selectable:
|
||||
Voice: GenericVoice
|
||||
Targetable:
|
||||
|
||||
@@ -136,11 +136,11 @@ World:
|
||||
SpatialBins:
|
||||
BinSize: 4
|
||||
Shroud:
|
||||
# CrateSpawner:
|
||||
# Minimum: 1
|
||||
# Maximum: 3
|
||||
# SpawnInterval: 120
|
||||
# WaterChance: 0
|
||||
CrateSpawner:
|
||||
Minimum: 1
|
||||
Maximum: 3
|
||||
SpawnInterval: 120
|
||||
WaterChance: 0
|
||||
|
||||
CRATE:
|
||||
Tooltip:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,286 +1,286 @@
|
||||
Container@INGAME_ROOT:
|
||||
Id:INGAME_ROOT
|
||||
Delegate:IngameChromeDelegate
|
||||
Visible:false
|
||||
Children:
|
||||
WorldInteractionController:
|
||||
X:0
|
||||
Y:0
|
||||
Width:WINDOW_RIGHT
|
||||
Height:WINDOW_BOTTOM
|
||||
ViewportScrollController:
|
||||
X:0
|
||||
Y:0
|
||||
Width:WINDOW_RIGHT
|
||||
Height:WINDOW_BOTTOM
|
||||
Timer@GAME_TIMER:
|
||||
Id:GAME_TIMER
|
||||
X: WINDOW_RIGHT/2
|
||||
Y: 10
|
||||
Background@POSTGAME_BG:
|
||||
Id:POSTGAME_BG
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:400
|
||||
Height:100
|
||||
Background:dialog4
|
||||
Visible:false
|
||||
Children:
|
||||
Label@TEXT:
|
||||
Id:TEXT
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:(PARENT_BOTTOM - HEIGHT)/2
|
||||
Width:200
|
||||
Height:40
|
||||
Align:Center
|
||||
Bold:True
|
||||
SpecialPowerBin@INGAME_POWERS_BIN:
|
||||
Id:INGAME_POWERS_BIN
|
||||
X:0
|
||||
Y:25
|
||||
BuildPalette@INGAME_BUILD_PALETTE:
|
||||
Id:INGAME_BUILD_PALETTE
|
||||
X:WINDOW_RIGHT - 250
|
||||
Y:280
|
||||
Width:250
|
||||
Height:500
|
||||
Button@INGAME_OPTIONS_BUTTON:
|
||||
Id:INGAME_OPTIONS_BUTTON
|
||||
X:0
|
||||
Y:0
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Options
|
||||
Bold:True
|
||||
Button@INGAME_DIPLOMACY_BUTTON:
|
||||
Id:INGAME_DIPLOMACY_BUTTON
|
||||
X:162
|
||||
Y:0
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Diplomacy
|
||||
Bold:True
|
||||
Button@INGAME_DEVELOPERMODE_BUTTON:
|
||||
Id:INGAME_DEVELOPERMODE_BUTTON
|
||||
X:324
|
||||
Y:0
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Developer Mode
|
||||
Visible:false
|
||||
Bold:True
|
||||
RadarBin@INGAME_RADAR_BIN:
|
||||
Id:INGAME_RADAR_BIN
|
||||
PowerBin@INGAME_POWER_BIN:
|
||||
Id:INGAME_POWER_BIN
|
||||
MoneyBin@INGAME_MONEY_BIN:
|
||||
Id:INGAME_MONEY_BIN
|
||||
X:WINDOW_RIGHT - WIDTH
|
||||
Y:0
|
||||
Width:320
|
||||
Height: 32
|
||||
SplitOreAndCash:No
|
||||
Children:
|
||||
OrderButton@SELL:
|
||||
Id:SELL
|
||||
Delegate:OrderButtonsChromeDelegate
|
||||
X:3
|
||||
Y:0
|
||||
Width:30
|
||||
Height:30
|
||||
Image:sell
|
||||
Description:Sell
|
||||
LongDesc:Sell buildings, reclaiming a \nproportion of their build cost
|
||||
OrderButton@POWER_DOWN:
|
||||
Id:POWER_DOWN
|
||||
Delegate:OrderButtonsChromeDelegate
|
||||
X:39
|
||||
Y:0
|
||||
Width:30
|
||||
Height:30
|
||||
Image:power
|
||||
Description:Powerdown
|
||||
LongDesc:Disable unneeded structures so their \npower can be used elsewhere
|
||||
OrderButton@REPAIR:
|
||||
Id:REPAIR
|
||||
Delegate:OrderButtonsChromeDelegate
|
||||
X:75
|
||||
Y:0
|
||||
Width:30
|
||||
Height:30
|
||||
Image:repair
|
||||
Description:Repair
|
||||
LongDesc:Repair damaged buildings
|
||||
WorldTooltip:
|
||||
Background@INGAME_OPTIONS_BG:
|
||||
Id:INGAME_OPTIONS_BG
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:300
|
||||
Height:320
|
||||
Visible:false
|
||||
Children:
|
||||
Label@LABEL_TITLE:
|
||||
Id:LABEL_TITLE
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:20
|
||||
Width:250
|
||||
Height:25
|
||||
Text:Options
|
||||
Align:Center
|
||||
Bold:True
|
||||
Button@RESUME:
|
||||
Id:RESUME
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:60
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Resume
|
||||
Bold:True
|
||||
Button@SETTINGS:
|
||||
Id:SETTINGS
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:100
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Settings
|
||||
Bold:True
|
||||
Button@MUSIC:
|
||||
Id:MUSIC
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:140
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Music
|
||||
Bold:True
|
||||
Button@SURRENDER:
|
||||
Id:SURRENDER
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:180
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Surrender
|
||||
Bold:True
|
||||
Button@DISCONNECT:
|
||||
Id:DISCONNECT
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:220
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Disconnect
|
||||
Bold:True
|
||||
Button@QUIT:
|
||||
Id:QUIT
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:260
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Quit
|
||||
Bold:True
|
||||
Background@DIPLOMACY_BG:
|
||||
Id:DIPLOMACY_BG
|
||||
Delegate:DiplomacyDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:450
|
||||
Height:400
|
||||
Visible:false
|
||||
Children:
|
||||
Label@LABEL_TITLE:
|
||||
Id:LABEL_TITLE
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:20
|
||||
Width:250
|
||||
Height:25
|
||||
Text:Diplomacy
|
||||
Align:Center
|
||||
Bold:True
|
||||
ChatDisplay@CHAT_DISPLAY:
|
||||
Id:CHAT_DISPLAY
|
||||
X:250
|
||||
Y:WINDOW_BOTTOM - HEIGHT - 30
|
||||
Width: 760
|
||||
Height: 200
|
||||
ClickThrough: True
|
||||
DrawBackground: False
|
||||
RemoveTime:250
|
||||
ChatEntry@CHAT_ENTRY:
|
||||
Id:CHAT_ENTRY
|
||||
X:250
|
||||
Y:WINDOW_BOTTOM - HEIGHT
|
||||
Width: 760
|
||||
Height: 30
|
||||
ClickThrough: True
|
||||
Background@DEVELOPERMODE_BG:
|
||||
Id:DEVELOPERMODE_BG
|
||||
Delegate:DeveloperModeDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:350
|
||||
Height:330
|
||||
Visible:false
|
||||
Children:
|
||||
Label@LABEL_TITLE:
|
||||
Id:LABEL_TITLE
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:20
|
||||
Width:250
|
||||
Height:25
|
||||
Text:Developer Mode
|
||||
Align:Center
|
||||
Checkbox@CHECKBOX_SHROUD
|
||||
Id:CHECKBOX_SHROUD
|
||||
X:30
|
||||
Y:50
|
||||
Height:20
|
||||
Width:PARENT_RIGHT - 30
|
||||
Text:Disable Shroud
|
||||
Checkbox@CHECKBOX_UNITDEBUG:
|
||||
Id:CHECKBOX_UNITDEBUG
|
||||
X:30
|
||||
Y:80
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Show Occupied Cells
|
||||
Checkbox@CHECKBOX_PATHDEBUG:
|
||||
Id:CHECKBOX_PATHDEBUG
|
||||
X:30
|
||||
Y:110
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Show Unit Paths
|
||||
Button@GIVE_CASH
|
||||
Id:GIVE_CASH
|
||||
X:30
|
||||
Y:140
|
||||
Width:200
|
||||
Height:20
|
||||
Text: Give Cash
|
||||
Checkbox@INSTANT_BUILD
|
||||
Id:INSTANT_BUILD
|
||||
X:30
|
||||
Y:170
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Instant Build Speed
|
||||
Checkbox@INSTANT_CHARGE
|
||||
Id:INSTANT_CHARGE
|
||||
X:30
|
||||
Y:200
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Instant Charge Time (Special Powers)
|
||||
Checkbox@ENABLE_TECH
|
||||
Id:ENABLE_TECH
|
||||
X:30
|
||||
Y:230
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Build Everything
|
||||
Button@GIVE_EXPLORATION
|
||||
Id:GIVE_EXPLORATION
|
||||
X:30
|
||||
Y:260
|
||||
Width:200
|
||||
Height:20
|
||||
Text: Give Exploration
|
||||
Container@INGAME_ROOT:
|
||||
Id:INGAME_ROOT
|
||||
Delegate:IngameChromeDelegate
|
||||
Visible:true
|
||||
Children:
|
||||
WorldInteractionController:
|
||||
X:0
|
||||
Y:0
|
||||
Width:WINDOW_RIGHT
|
||||
Height:WINDOW_BOTTOM
|
||||
ViewportScrollController:
|
||||
X:0
|
||||
Y:0
|
||||
Width:WINDOW_RIGHT
|
||||
Height:WINDOW_BOTTOM
|
||||
Timer@GAME_TIMER:
|
||||
Id:GAME_TIMER
|
||||
X: WINDOW_RIGHT/2
|
||||
Y: 10
|
||||
Background@POSTGAME_BG:
|
||||
Id:POSTGAME_BG
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:400
|
||||
Height:100
|
||||
Background:dialog4
|
||||
Visible:false
|
||||
Children:
|
||||
Label@TEXT:
|
||||
Id:TEXT
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:(PARENT_BOTTOM - HEIGHT)/2
|
||||
Width:200
|
||||
Height:40
|
||||
Align:Center
|
||||
Bold:True
|
||||
SpecialPowerBin@INGAME_POWERS_BIN:
|
||||
Id:INGAME_POWERS_BIN
|
||||
X:0
|
||||
Y:25
|
||||
BuildPalette@INGAME_BUILD_PALETTE:
|
||||
Id:INGAME_BUILD_PALETTE
|
||||
X:WINDOW_RIGHT - 250
|
||||
Y:280
|
||||
Width:250
|
||||
Height:500
|
||||
Button@INGAME_OPTIONS_BUTTON:
|
||||
Id:INGAME_OPTIONS_BUTTON
|
||||
X:0
|
||||
Y:0
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Options
|
||||
Bold:True
|
||||
Button@INGAME_DIPLOMACY_BUTTON:
|
||||
Id:INGAME_DIPLOMACY_BUTTON
|
||||
X:162
|
||||
Y:0
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Diplomacy
|
||||
Bold:True
|
||||
Button@INGAME_DEVELOPERMODE_BUTTON:
|
||||
Id:INGAME_DEVELOPERMODE_BUTTON
|
||||
X:324
|
||||
Y:0
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Developer Mode
|
||||
Visible:false
|
||||
Bold:True
|
||||
RadarBin@INGAME_RADAR_BIN:
|
||||
Id:INGAME_RADAR_BIN
|
||||
PowerBin@INGAME_POWER_BIN:
|
||||
Id:INGAME_POWER_BIN
|
||||
MoneyBin@INGAME_MONEY_BIN:
|
||||
Id:INGAME_MONEY_BIN
|
||||
X:WINDOW_RIGHT - WIDTH
|
||||
Y:0
|
||||
Width:320
|
||||
Height: 32
|
||||
SplitOreAndCash:No
|
||||
Children:
|
||||
OrderButton@SELL:
|
||||
Id:SELL
|
||||
Delegate:OrderButtonsChromeDelegate
|
||||
X:3
|
||||
Y:0
|
||||
Width:30
|
||||
Height:30
|
||||
Image:sell
|
||||
Description:Sell
|
||||
LongDesc:Sell buildings, reclaiming a \nproportion of their build cost
|
||||
OrderButton@POWER_DOWN:
|
||||
Id:POWER_DOWN
|
||||
Delegate:OrderButtonsChromeDelegate
|
||||
X:39
|
||||
Y:0
|
||||
Width:30
|
||||
Height:30
|
||||
Image:power
|
||||
Description:Powerdown
|
||||
LongDesc:Disable unneeded structures so their \npower can be used elsewhere
|
||||
OrderButton@REPAIR:
|
||||
Id:REPAIR
|
||||
Delegate:OrderButtonsChromeDelegate
|
||||
X:75
|
||||
Y:0
|
||||
Width:30
|
||||
Height:30
|
||||
Image:repair
|
||||
Description:Repair
|
||||
LongDesc:Repair damaged buildings
|
||||
WorldTooltip:
|
||||
Background@INGAME_OPTIONS_BG:
|
||||
Id:INGAME_OPTIONS_BG
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:300
|
||||
Height:320
|
||||
Visible:false
|
||||
Children:
|
||||
Label@LABEL_TITLE:
|
||||
Id:LABEL_TITLE
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:20
|
||||
Width:250
|
||||
Height:25
|
||||
Text:Options
|
||||
Align:Center
|
||||
Bold:True
|
||||
Button@RESUME:
|
||||
Id:RESUME
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:60
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Resume
|
||||
Bold:True
|
||||
Button@SETTINGS:
|
||||
Id:SETTINGS
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:100
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Settings
|
||||
Bold:True
|
||||
Button@MUSIC:
|
||||
Id:MUSIC
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:140
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Music
|
||||
Bold:True
|
||||
Button@SURRENDER:
|
||||
Id:SURRENDER
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:180
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Surrender
|
||||
Bold:True
|
||||
Button@DISCONNECT:
|
||||
Id:DISCONNECT
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:220
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Disconnect
|
||||
Bold:True
|
||||
Button@QUIT:
|
||||
Id:QUIT
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:260
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Quit
|
||||
Bold:True
|
||||
Background@DIPLOMACY_BG:
|
||||
Id:DIPLOMACY_BG
|
||||
Delegate:DiplomacyDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:450
|
||||
Height:400
|
||||
Visible:false
|
||||
Children:
|
||||
Label@LABEL_TITLE:
|
||||
Id:LABEL_TITLE
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:20
|
||||
Width:250
|
||||
Height:25
|
||||
Text:Diplomacy
|
||||
Align:Center
|
||||
Bold:True
|
||||
ChatDisplay@CHAT_DISPLAY:
|
||||
Id:CHAT_DISPLAY
|
||||
X:250
|
||||
Y:WINDOW_BOTTOM - HEIGHT - 30
|
||||
Width: 760
|
||||
Height: 200
|
||||
ClickThrough: True
|
||||
DrawBackground: False
|
||||
RemoveTime:250
|
||||
ChatEntry@CHAT_ENTRY:
|
||||
Id:CHAT_ENTRY
|
||||
X:250
|
||||
Y:WINDOW_BOTTOM - HEIGHT
|
||||
Width: 760
|
||||
Height: 30
|
||||
ClickThrough: True
|
||||
Background@DEVELOPERMODE_BG:
|
||||
Id:DEVELOPERMODE_BG
|
||||
Delegate:DeveloperModeDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:350
|
||||
Height:330
|
||||
Visible:false
|
||||
Children:
|
||||
Label@LABEL_TITLE:
|
||||
Id:LABEL_TITLE
|
||||
X:(PARENT_RIGHT - WIDTH)/2
|
||||
Y:20
|
||||
Width:250
|
||||
Height:25
|
||||
Text:Developer Mode
|
||||
Align:Center
|
||||
Checkbox@CHECKBOX_SHROUD
|
||||
Id:CHECKBOX_SHROUD
|
||||
X:30
|
||||
Y:50
|
||||
Height:20
|
||||
Width:PARENT_RIGHT - 30
|
||||
Text:Disable Shroud
|
||||
Checkbox@CHECKBOX_UNITDEBUG:
|
||||
Id:CHECKBOX_UNITDEBUG
|
||||
X:30
|
||||
Y:80
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Show Occupied Cells
|
||||
Checkbox@CHECKBOX_PATHDEBUG:
|
||||
Id:CHECKBOX_PATHDEBUG
|
||||
X:30
|
||||
Y:110
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Show Unit Paths
|
||||
Button@GIVE_CASH
|
||||
Id:GIVE_CASH
|
||||
X:30
|
||||
Y:140
|
||||
Width:200
|
||||
Height:20
|
||||
Text: Give Cash
|
||||
Checkbox@INSTANT_BUILD
|
||||
Id:INSTANT_BUILD
|
||||
X:30
|
||||
Y:170
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Instant Build Speed
|
||||
Checkbox@INSTANT_CHARGE
|
||||
Id:INSTANT_CHARGE
|
||||
X:30
|
||||
Y:200
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Instant Charge Time (Special Powers)
|
||||
Checkbox@ENABLE_TECH
|
||||
Id:ENABLE_TECH
|
||||
X:30
|
||||
Y:230
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Build Everything
|
||||
Button@GIVE_EXPLORATION
|
||||
Id:GIVE_EXPLORATION
|
||||
X:30
|
||||
Y:260
|
||||
Width:200
|
||||
Height:20
|
||||
Text: Give Exploration
|
||||
|
||||
@@ -1,253 +1,253 @@
|
||||
Background@MAINMENU_BG:
|
||||
Id:MAINMENU_BG
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:250
|
||||
Height:290
|
||||
Delegate:MainMenuButtonsDelegate
|
||||
Children:
|
||||
Label@MAINMENU_LABEL_TITLE:
|
||||
Id:MAINMENU_LABEL_TITLE
|
||||
X:0
|
||||
Y:20
|
||||
Width:250
|
||||
Height:25
|
||||
Text:OpenRA Main Menu
|
||||
Align:Center
|
||||
Bold:True
|
||||
Button@MAINMENU_BUTTON_JOIN:
|
||||
Id:MAINMENU_BUTTON_JOIN
|
||||
X:45
|
||||
Y:70
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Join Game
|
||||
Bold:True
|
||||
Button@MAINMENU_BUTTON_CREATE:
|
||||
Id:MAINMENU_BUTTON_CREATE
|
||||
X:45
|
||||
Y:110
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Create Game
|
||||
Bold:True
|
||||
Button@MAINMENU_BUTTON_SETTINGS:
|
||||
Id:MAINMENU_BUTTON_SETTINGS
|
||||
X:45
|
||||
Y:150
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Settings
|
||||
Bold:True
|
||||
Button@MAINMENU_BUTTON_MUSIC:
|
||||
Id:MAINMENU_BUTTON_MUSIC
|
||||
X:45
|
||||
Y:190
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Music
|
||||
Bold:True
|
||||
Button@MAINMENU_BUTTON_QUIT:
|
||||
Id:MAINMENU_BUTTON_QUIT
|
||||
X:45
|
||||
Y:230
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Quit
|
||||
Bold:True
|
||||
Button@MAINMENU_BUTTON_VIDEOPLAYER:
|
||||
Id:MAINMENU_BUTTON_VIDEOPLAYER
|
||||
Visible:false
|
||||
X:45
|
||||
Y:260
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Video Player
|
||||
Bold:True
|
||||
Label@VERSION_STRING:
|
||||
Id:VERSION_STRING
|
||||
X:WINDOW_RIGHT - PARENT_LEFT - WIDTH - 15
|
||||
Y:WINDOW_BOTTOM - PARENT_TOP - 25
|
||||
Width:400
|
||||
Height:35
|
||||
Text:
|
||||
Align:Right
|
||||
Bold:True
|
||||
Background@PERF_BG:
|
||||
ClickThrough:true
|
||||
Id:PERF_BG
|
||||
Background:dialog4
|
||||
Delegate:PerfDebugDelegate
|
||||
X:10
|
||||
Y:WINDOW_BOTTOM - 250
|
||||
Width: 210
|
||||
Height: 250
|
||||
Children:
|
||||
PerfGraph@GRAPH:
|
||||
Id:GRAPH
|
||||
X:5
|
||||
Y:5
|
||||
Width:200
|
||||
Height:200
|
||||
Label@TEXT:
|
||||
Id:TEXT
|
||||
Bold: false
|
||||
X:20
|
||||
Y:205
|
||||
Width:170
|
||||
Height:40
|
||||
Background@MUSIC_MENU:
|
||||
Id:MUSIC_MENU
|
||||
Delegate:MusicPlayerDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width: 450
|
||||
Height: 250
|
||||
Visible: false
|
||||
Children:
|
||||
Label@SETTINGS_LABEL_TITLE:
|
||||
Id:SETTINGS_LABEL_TITLE
|
||||
X:0
|
||||
Y:20
|
||||
Width:450
|
||||
Height:25
|
||||
Text:Music
|
||||
Align:Center
|
||||
Bold:True
|
||||
Button@BUTTON_CLOSE:
|
||||
Id:BUTTON_CLOSE
|
||||
X:PARENT_RIGHT - 180
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Close
|
||||
Bold:True
|
||||
Container@BUTTONS:
|
||||
X:PARENT_RIGHT - 150
|
||||
Y:50
|
||||
Children:
|
||||
Button@BUTTON_PLAY:
|
||||
Id:BUTTON_PLAY
|
||||
X:35
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
Children:
|
||||
Image@IMAGE_PLAY:
|
||||
Id:IMAGE_PLAY
|
||||
X:0
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
ImageCollection:music
|
||||
ImageName:play
|
||||
Button@BUTTON_PAUSE:
|
||||
Id:BUTTON_PAUSE
|
||||
Visible:false
|
||||
X:35
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
Children:
|
||||
Image@IMAGE_PAUSE:
|
||||
Id:IMAGE_PAUSE
|
||||
X:0
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
ImageCollection:music
|
||||
ImageName:pause
|
||||
Button@BUTTON_STOP:
|
||||
Id:BUTTON_STOP
|
||||
X:70
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
Children:
|
||||
Image@IMAGE_STOP:
|
||||
Id:IMAGE_STOP
|
||||
X:0
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
ImageCollection:music
|
||||
ImageName:stop
|
||||
Button@BUTTON_NEXT:
|
||||
Id:BUTTON_NEXT
|
||||
X:105
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
Children:
|
||||
Image@IMAGE_NEXT:
|
||||
Id:IMAGE_NEXT
|
||||
X:0
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
ImageCollection:music
|
||||
ImageName:next
|
||||
Button@BUTTON_PREV:
|
||||
Id:BUTTON_PREV
|
||||
X:0
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
Children:
|
||||
Image@IMAGE_PREV:
|
||||
Id:IMAGE_PREV
|
||||
X:0
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
ImageCollection:music
|
||||
ImageName:prev
|
||||
Label@TIME:
|
||||
Id:TIME
|
||||
X:PARENT_RIGHT - 150
|
||||
Y:75
|
||||
Width:140
|
||||
Height:25
|
||||
Align: Center
|
||||
ListBox@MUSIC_LIST:
|
||||
Id:MUSIC_LIST
|
||||
X:10
|
||||
Y:50
|
||||
Width:280
|
||||
Height:140
|
||||
Children:
|
||||
Label@MUSIC_TEMPLATE:
|
||||
Id:MUSIC_TEMPLATE
|
||||
Width:PARENT_RIGHT-28
|
||||
Height:25
|
||||
ClickThrough:false
|
||||
X:2
|
||||
Y:0
|
||||
Visible:false
|
||||
Children:
|
||||
Label@TITLE:
|
||||
Id:TITLE
|
||||
X:5
|
||||
Width:PARENT_RIGHT - 10
|
||||
Height:PARENT_BOTTOM
|
||||
Align: Left
|
||||
Label@LENGTH:
|
||||
Id:LENGTH
|
||||
X:5
|
||||
Width:PARENT_RIGHT - 10
|
||||
Height:PARENT_BOTTOM
|
||||
Align: Right
|
||||
Checkbox@SHUFFLE:
|
||||
Id:SHUFFLE
|
||||
X:PARENT_RIGHT - 150
|
||||
Y:110
|
||||
Width:100
|
||||
Height:20
|
||||
Text:Shuffle
|
||||
Checkbox@REPEAT:
|
||||
Id:REPEAT
|
||||
X:PARENT_RIGHT - 150
|
||||
Y:140
|
||||
Width:100
|
||||
Height:20
|
||||
Text:Loop
|
||||
Background@MAINMENU_BG:
|
||||
Id:MAINMENU_BG
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:250
|
||||
Height:290
|
||||
Delegate:MainMenuButtonsDelegate
|
||||
Children:
|
||||
Label@MAINMENU_LABEL_TITLE:
|
||||
Id:MAINMENU_LABEL_TITLE
|
||||
X:0
|
||||
Y:20
|
||||
Width:250
|
||||
Height:25
|
||||
Text:OpenRA Main Menu
|
||||
Align:Center
|
||||
Bold:True
|
||||
Button@MAINMENU_BUTTON_JOIN:
|
||||
Id:MAINMENU_BUTTON_JOIN
|
||||
X:45
|
||||
Y:70
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Join Game
|
||||
Bold:True
|
||||
Button@MAINMENU_BUTTON_CREATE:
|
||||
Id:MAINMENU_BUTTON_CREATE
|
||||
X:45
|
||||
Y:110
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Create Game
|
||||
Bold:True
|
||||
Button@MAINMENU_BUTTON_SETTINGS:
|
||||
Id:MAINMENU_BUTTON_SETTINGS
|
||||
X:45
|
||||
Y:150
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Settings
|
||||
Bold:True
|
||||
Button@MAINMENU_BUTTON_MUSIC:
|
||||
Id:MAINMENU_BUTTON_MUSIC
|
||||
X:45
|
||||
Y:190
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Music
|
||||
Bold:True
|
||||
Button@MAINMENU_BUTTON_QUIT:
|
||||
Id:MAINMENU_BUTTON_QUIT
|
||||
X:45
|
||||
Y:230
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Quit
|
||||
Bold:True
|
||||
Button@MAINMENU_BUTTON_VIDEOPLAYER:
|
||||
Id:MAINMENU_BUTTON_VIDEOPLAYER
|
||||
Visible:false
|
||||
X:45
|
||||
Y:260
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Video Player
|
||||
Bold:True
|
||||
Label@VERSION_STRING:
|
||||
Id:VERSION_STRING
|
||||
X:WINDOW_RIGHT - PARENT_LEFT - WIDTH - 15
|
||||
Y:WINDOW_BOTTOM - PARENT_TOP - 25
|
||||
Width:400
|
||||
Height:35
|
||||
Text:
|
||||
Align:Right
|
||||
Bold:True
|
||||
Background@PERF_BG:
|
||||
ClickThrough:true
|
||||
Id:PERF_BG
|
||||
Background:dialog4
|
||||
Delegate:PerfDebugDelegate
|
||||
X:10
|
||||
Y:WINDOW_BOTTOM - 250
|
||||
Width: 210
|
||||
Height: 250
|
||||
Children:
|
||||
PerfGraph@GRAPH:
|
||||
Id:GRAPH
|
||||
X:5
|
||||
Y:5
|
||||
Width:200
|
||||
Height:200
|
||||
Label@TEXT:
|
||||
Id:TEXT
|
||||
Bold: false
|
||||
X:20
|
||||
Y:205
|
||||
Width:170
|
||||
Height:40
|
||||
Background@MUSIC_MENU:
|
||||
Id:MUSIC_MENU
|
||||
Delegate:MusicPlayerDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width: 450
|
||||
Height: 250
|
||||
Visible: true
|
||||
Children:
|
||||
Label@SETTINGS_LABEL_TITLE:
|
||||
Id:SETTINGS_LABEL_TITLE
|
||||
X:0
|
||||
Y:20
|
||||
Width:450
|
||||
Height:25
|
||||
Text:Music
|
||||
Align:Center
|
||||
Bold:True
|
||||
Button@BUTTON_CLOSE:
|
||||
Id:BUTTON_CLOSE
|
||||
X:PARENT_RIGHT - 180
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Close
|
||||
Bold:True
|
||||
Container@BUTTONS:
|
||||
X:PARENT_RIGHT - 150
|
||||
Y:50
|
||||
Children:
|
||||
Button@BUTTON_PLAY:
|
||||
Id:BUTTON_PLAY
|
||||
X:35
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
Children:
|
||||
Image@IMAGE_PLAY:
|
||||
Id:IMAGE_PLAY
|
||||
X:0
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
ImageCollection:music
|
||||
ImageName:play
|
||||
Button@BUTTON_PAUSE:
|
||||
Id:BUTTON_PAUSE
|
||||
Visible:false
|
||||
X:35
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
Children:
|
||||
Image@IMAGE_PAUSE:
|
||||
Id:IMAGE_PAUSE
|
||||
X:0
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
ImageCollection:music
|
||||
ImageName:pause
|
||||
Button@BUTTON_STOP:
|
||||
Id:BUTTON_STOP
|
||||
X:70
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
Children:
|
||||
Image@IMAGE_STOP:
|
||||
Id:IMAGE_STOP
|
||||
X:0
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
ImageCollection:music
|
||||
ImageName:stop
|
||||
Button@BUTTON_NEXT:
|
||||
Id:BUTTON_NEXT
|
||||
X:105
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
Children:
|
||||
Image@IMAGE_NEXT:
|
||||
Id:IMAGE_NEXT
|
||||
X:0
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
ImageCollection:music
|
||||
ImageName:next
|
||||
Button@BUTTON_PREV:
|
||||
Id:BUTTON_PREV
|
||||
X:0
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
Children:
|
||||
Image@IMAGE_PREV:
|
||||
Id:IMAGE_PREV
|
||||
X:0
|
||||
Y:0
|
||||
Width:25
|
||||
Height:25
|
||||
ImageCollection:music
|
||||
ImageName:prev
|
||||
Label@TIME:
|
||||
Id:TIME
|
||||
X:PARENT_RIGHT - 150
|
||||
Y:75
|
||||
Width:140
|
||||
Height:25
|
||||
Align: Center
|
||||
ListBox@MUSIC_LIST:
|
||||
Id:MUSIC_LIST
|
||||
X:10
|
||||
Y:50
|
||||
Width:280
|
||||
Height:140
|
||||
Children:
|
||||
Label@MUSIC_TEMPLATE:
|
||||
Id:MUSIC_TEMPLATE
|
||||
Width:PARENT_RIGHT-28
|
||||
Height:25
|
||||
ClickThrough:false
|
||||
X:2
|
||||
Y:0
|
||||
Visible:false
|
||||
Children:
|
||||
Label@TITLE:
|
||||
Id:TITLE
|
||||
X:5
|
||||
Width:PARENT_RIGHT - 10
|
||||
Height:PARENT_BOTTOM
|
||||
Align: Left
|
||||
Label@LENGTH:
|
||||
Id:LENGTH
|
||||
X:5
|
||||
Width:PARENT_RIGHT - 10
|
||||
Height:PARENT_BOTTOM
|
||||
Align: Right
|
||||
Checkbox@SHUFFLE:
|
||||
Id:SHUFFLE
|
||||
X:PARENT_RIGHT - 150
|
||||
Y:110
|
||||
Width:100
|
||||
Height:20
|
||||
Text:Shuffle
|
||||
Checkbox@REPEAT:
|
||||
Id:REPEAT
|
||||
X:PARENT_RIGHT - 150
|
||||
Y:140
|
||||
Width:100
|
||||
Height:20
|
||||
Text:Loop
|
||||
|
||||
@@ -1,372 +1,372 @@
|
||||
Background@CREATESERVER_BG:
|
||||
Id:CREATESERVER_BG
|
||||
Delegate:CreateServerMenuDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:400
|
||||
Height:240
|
||||
Visible:false
|
||||
Children:
|
||||
Label@LABEL_TITLE:
|
||||
Id:LABEL_TITLE
|
||||
X:0
|
||||
Y:20
|
||||
Width:400
|
||||
Height:25
|
||||
Text:Create Server
|
||||
Align:Center
|
||||
Bold:True
|
||||
Label@GAME_TITLE_LABEL:
|
||||
Id:GAME_TITLE_LABEL
|
||||
X:50
|
||||
Y:59
|
||||
Width:95
|
||||
Height:25
|
||||
Align: Right
|
||||
Text:Game Title:
|
||||
TextField@GAME_TITLE:
|
||||
Id:GAME_TITLE
|
||||
X:150
|
||||
Y:60
|
||||
Width:210
|
||||
MaxLength:50
|
||||
Height:25
|
||||
Text:OpenRA Game
|
||||
Label@EXTERNAL_PORT_LABEL:
|
||||
Id:EXTERNAL_PORT_LABEL
|
||||
X:50
|
||||
Y:94
|
||||
Width:95
|
||||
Height:25
|
||||
Align: Right
|
||||
Text:External Port:
|
||||
TextField@EXTERNAL_PORT:
|
||||
Id:EXTERNAL_PORT
|
||||
X:150
|
||||
Y:95
|
||||
Width:50
|
||||
MaxLength:5
|
||||
Height:25
|
||||
Text:OpenRA Game
|
||||
Label@LISTEN_PORT_LABEL:
|
||||
Id:LISTEN_PORT_LABEL
|
||||
X:210
|
||||
Y:94
|
||||
Width:95
|
||||
Height:25
|
||||
Align: Right
|
||||
Text:Listen Port:
|
||||
TextField@LISTEN_PORT:
|
||||
Id:LISTEN_PORT
|
||||
X:310
|
||||
Y:95
|
||||
Width:50
|
||||
MaxLength:5
|
||||
Height:25
|
||||
Checkbox@CHECKBOX_ONLINE:
|
||||
Id:CHECKBOX_ONLINE
|
||||
X:165
|
||||
Y:130
|
||||
Width:300
|
||||
Height:20
|
||||
Text:Advertise game Online
|
||||
Checkbox@CHECKBOX_CHEATS:
|
||||
Id:CHECKBOX_CHEATS
|
||||
X:165
|
||||
Y:160
|
||||
Width:300
|
||||
Height:20
|
||||
Text:Allow Cheats
|
||||
Button@BUTTON_START:
|
||||
Id:BUTTON_START
|
||||
X:130
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Create
|
||||
Bold:True
|
||||
Button@BUTTON_CANCEL:
|
||||
Id:BUTTON_CANCEL
|
||||
X:260
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Cancel
|
||||
Bold:True
|
||||
Background@JOINSERVER_BG:
|
||||
Id:JOINSERVER_BG
|
||||
Delegate:ServerBrowserDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:700
|
||||
Height:410
|
||||
Visible:false
|
||||
Children:
|
||||
Label@JOINSERVER_LABEL_TITLE:
|
||||
Id:JOINSERVER_LABEL_TITLE
|
||||
X:0
|
||||
Y:20
|
||||
Width:PARENT_RIGHT
|
||||
Height:25
|
||||
Text:Join Server
|
||||
Align:Center
|
||||
Bold:True
|
||||
ListBox@SERVER_LIST:
|
||||
Id:SERVER_LIST
|
||||
X:20
|
||||
Y:50
|
||||
Width:390
|
||||
Height:300
|
||||
Children:
|
||||
Label@SERVER_TEMPLATE:
|
||||
Id:SERVER_TEMPLATE
|
||||
Width:PARENT_RIGHT-28
|
||||
Height:25
|
||||
ClickThrough:false
|
||||
X:2
|
||||
Y:0
|
||||
Visible:false
|
||||
Label@JOINSERVER_PROGRESS_TITLE:
|
||||
Id:JOINSERVER_PROGRESS_TITLE
|
||||
X:150
|
||||
Y:PARENT_BOTTOM / 2 - HEIGHT
|
||||
Width:150
|
||||
Height:30
|
||||
Background:dialog4
|
||||
Text:Fetching games...
|
||||
Align:Center
|
||||
Container@SERVER_INFO:
|
||||
Id:SERVER_INFO
|
||||
X:0
|
||||
Y:0
|
||||
Width:PARENT_RIGHT
|
||||
Height:PARENT_BOTTOM
|
||||
Visible:false
|
||||
Children:
|
||||
Label@SERVER_IP_LABEL:
|
||||
Id:SERVER_IP_LABEL
|
||||
X:PARENT_RIGHT - 200 - WIDTH
|
||||
Y:50
|
||||
Align:Right
|
||||
Width:70
|
||||
Height:20
|
||||
Text:Server:
|
||||
Bold:True
|
||||
Label@SERVER_IP:
|
||||
Id:SERVER_IP
|
||||
X:PARENT_RIGHT - 195
|
||||
Y:50
|
||||
Align:Left
|
||||
Width:70
|
||||
Height:20
|
||||
Label@SERVER_MODS_LABEL:
|
||||
Id:SERVER_MODS_LABEL
|
||||
X:PARENT_RIGHT - 200 - WIDTH
|
||||
Y:70
|
||||
Align:Right
|
||||
Width:70
|
||||
Height:20
|
||||
Text:Mods:
|
||||
Bold:True
|
||||
Label@SERVER_MODS:
|
||||
Id:SERVER_MODS
|
||||
X:PARENT_RIGHT - 195
|
||||
Y:70
|
||||
Align:Left
|
||||
Width:70
|
||||
Height:20
|
||||
Label@MAP_TITLE_LABEL:
|
||||
Id:MAP_TITLE_LABEL
|
||||
X:PARENT_RIGHT - 200 - WIDTH
|
||||
Y:90
|
||||
Align:Right
|
||||
Width:70
|
||||
Height:20
|
||||
Text:Map:
|
||||
Bold:True
|
||||
Label@MAP_TITLE:
|
||||
Id:MAP_TITLE
|
||||
X:PARENT_RIGHT - 195
|
||||
Y:90
|
||||
Align:Left
|
||||
Width:70
|
||||
Height:20
|
||||
Label@MAP_PLAYERS_LABEL:
|
||||
Id:MAP_PLAYERS_LABEL
|
||||
X:PARENT_RIGHT - 200 - WIDTH
|
||||
Y:110
|
||||
Align:Right
|
||||
Width:70
|
||||
Height:20
|
||||
Text:Players:
|
||||
Bold:True
|
||||
Label@MAP_PLAYERS:
|
||||
Id:MAP_PLAYERS
|
||||
X:PARENT_RIGHT - 195
|
||||
Y:110
|
||||
Align:Left
|
||||
Width:70
|
||||
Height:20
|
||||
MapPreview@MAP_PREVIEW:
|
||||
Id:MAP_PREVIEW
|
||||
X:PARENT_RIGHT-241
|
||||
Y:140
|
||||
Width:192
|
||||
Height:192
|
||||
Button@DIRECTCONNECT_BUTTON:
|
||||
Id:DIRECTCONNECT_BUTTON
|
||||
X:20
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Direct Connect
|
||||
Bold:True
|
||||
Button@REFRESH_BUTTON:
|
||||
Id:REFRESH_BUTTON
|
||||
X:160
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Refresh
|
||||
Bold:True
|
||||
Button@JOIN_BUTTON:
|
||||
Id:JOIN_BUTTON
|
||||
X:PARENT_RIGHT - 140 - 130
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Join
|
||||
Bold:True
|
||||
Button@CANCEL_BUTTON:
|
||||
Id:CANCEL_BUTTON
|
||||
X:PARENT_RIGHT - 140
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Cancel
|
||||
Bold:True
|
||||
Background@DIRECTCONNECT_BG:
|
||||
Id:DIRECTCONNECT_BG
|
||||
Delegate:ServerBrowserDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:400
|
||||
Height:155
|
||||
Visible:false
|
||||
Children:
|
||||
Label@DIRECTCONNECT_LABEL_TITLE:
|
||||
Id:DIRECTCONNECT_LABEL_TITLE
|
||||
X:0
|
||||
Y:20
|
||||
Width:400
|
||||
Height:25
|
||||
Text:Direct Connect
|
||||
Align:Center
|
||||
Bold:True
|
||||
Label@ADDRESS_LABEL:
|
||||
Id:ADDRESS_LABEL
|
||||
X:50
|
||||
Y:59
|
||||
Width:95
|
||||
Height:25
|
||||
Align:Right
|
||||
Text:Server Address:
|
||||
TextField@SERVER_ADDRESS:
|
||||
Id:SERVER_ADDRESS
|
||||
X:150
|
||||
Y:60
|
||||
Width:200
|
||||
MaxLength:50
|
||||
Height:25
|
||||
Button@JOIN_BUTTON:
|
||||
Id:JOIN_BUTTON
|
||||
X:130
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Join
|
||||
Bold:True
|
||||
Button@CANCEL_BUTTON:
|
||||
Id:CANCEL_BUTTON
|
||||
X:260
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Cancel
|
||||
Bold:True
|
||||
Background@CONNECTION_FAILED_BG:
|
||||
Id:CONNECTION_FAILED_BG
|
||||
Delegate:ConnectionDialogsDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:450
|
||||
Height:150
|
||||
Visible:false
|
||||
Children:
|
||||
Label@CONNECTION_FAILED_TITLE:
|
||||
Id:CONNECTION_FAILED_TITLE
|
||||
X:0
|
||||
Y:20
|
||||
Width:450
|
||||
Height:25
|
||||
Text:Connection Failed
|
||||
Align:Center
|
||||
Bold:True
|
||||
Label@CONNECTION_FAILED_DESC:
|
||||
Id:CONNECTION_FAILED_DESC
|
||||
X:0
|
||||
Y:60
|
||||
Width:PARENT_RIGHT
|
||||
Height:25
|
||||
Text:Could not connect to AAA.BBB.CCC.DDD:EEEE
|
||||
Align:Center
|
||||
Button@CONNECTION_BUTTON_RETRY:
|
||||
Id:CONNECTION_BUTTON_RETRY
|
||||
X:PARENT_RIGHT - 360
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Retry
|
||||
Bold:True
|
||||
Button@CONNECTION_BUTTON_CANCEL:
|
||||
Id:CONNECTION_BUTTON_CANCEL
|
||||
X:PARENT_RIGHT - 180
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Cancel
|
||||
Bold:True
|
||||
Background@CONNECTING_BG:
|
||||
Id:CONNECTING_BG
|
||||
Delegate:ConnectionDialogsDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:450
|
||||
Height:150
|
||||
Visible:false
|
||||
Children:
|
||||
Label@CONNECTING_TITLE:
|
||||
Id:CONNECTING_TITLE
|
||||
X:0
|
||||
Y:20
|
||||
Width:450
|
||||
Height:25
|
||||
Text:Connecting
|
||||
Align:Center
|
||||
Bold:True
|
||||
Label@CONNECTING_DESC:
|
||||
Id:CONNECTING_DESC
|
||||
X:0
|
||||
Y:60
|
||||
Width:PARENT_RIGHT
|
||||
Height:25
|
||||
Text:Connecting to AAA.BBB.CCC.DDD:EEEE...
|
||||
Align:Center
|
||||
Button@CONNECTION_BUTTON_ABORT:
|
||||
Id:CONNECTION_BUTTON_ABORT
|
||||
X:PARENT_RIGHT - 180
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Abort
|
||||
Bold:True
|
||||
Background@CREATESERVER_BG:
|
||||
Id:CREATESERVER_BG
|
||||
Delegate:CreateServerMenuDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:400
|
||||
Height:240
|
||||
Visible:true
|
||||
Children:
|
||||
Label@LABEL_TITLE:
|
||||
Id:LABEL_TITLE
|
||||
X:0
|
||||
Y:20
|
||||
Width:400
|
||||
Height:25
|
||||
Text:Create Server
|
||||
Align:Center
|
||||
Bold:True
|
||||
Label@GAME_TITLE_LABEL:
|
||||
Id:GAME_TITLE_LABEL
|
||||
X:50
|
||||
Y:59
|
||||
Width:95
|
||||
Height:25
|
||||
Align: Right
|
||||
Text:Game Title:
|
||||
TextField@GAME_TITLE:
|
||||
Id:GAME_TITLE
|
||||
X:150
|
||||
Y:60
|
||||
Width:210
|
||||
MaxLength:50
|
||||
Height:25
|
||||
Text:OpenRA Game
|
||||
Label@EXTERNAL_PORT_LABEL:
|
||||
Id:EXTERNAL_PORT_LABEL
|
||||
X:50
|
||||
Y:94
|
||||
Width:95
|
||||
Height:25
|
||||
Align: Right
|
||||
Text:External Port:
|
||||
TextField@EXTERNAL_PORT:
|
||||
Id:EXTERNAL_PORT
|
||||
X:150
|
||||
Y:95
|
||||
Width:50
|
||||
MaxLength:5
|
||||
Height:25
|
||||
Text:OpenRA Game
|
||||
Label@LISTEN_PORT_LABEL:
|
||||
Id:LISTEN_PORT_LABEL
|
||||
X:210
|
||||
Y:94
|
||||
Width:95
|
||||
Height:25
|
||||
Align: Right
|
||||
Text:Listen Port:
|
||||
TextField@LISTEN_PORT:
|
||||
Id:LISTEN_PORT
|
||||
X:310
|
||||
Y:95
|
||||
Width:50
|
||||
MaxLength:5
|
||||
Height:25
|
||||
Checkbox@CHECKBOX_ONLINE:
|
||||
Id:CHECKBOX_ONLINE
|
||||
X:165
|
||||
Y:130
|
||||
Width:300
|
||||
Height:20
|
||||
Text:Advertise game Online
|
||||
Checkbox@CHECKBOX_CHEATS:
|
||||
Id:CHECKBOX_CHEATS
|
||||
X:165
|
||||
Y:160
|
||||
Width:300
|
||||
Height:20
|
||||
Text:Allow Cheats
|
||||
Button@BUTTON_START:
|
||||
Id:BUTTON_START
|
||||
X:130
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Create
|
||||
Bold:True
|
||||
Button@BUTTON_CANCEL:
|
||||
Id:BUTTON_CANCEL
|
||||
X:260
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Cancel
|
||||
Bold:True
|
||||
Background@JOINSERVER_BG:
|
||||
Id:JOINSERVER_BG
|
||||
Delegate:ServerBrowserDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:700
|
||||
Height:410
|
||||
Visible:true
|
||||
Children:
|
||||
Label@JOINSERVER_LABEL_TITLE:
|
||||
Id:JOINSERVER_LABEL_TITLE
|
||||
X:0
|
||||
Y:20
|
||||
Width:PARENT_RIGHT
|
||||
Height:25
|
||||
Text:Join Server
|
||||
Align:Center
|
||||
Bold:True
|
||||
ListBox@SERVER_LIST:
|
||||
Id:SERVER_LIST
|
||||
X:20
|
||||
Y:50
|
||||
Width:390
|
||||
Height:300
|
||||
Children:
|
||||
Label@SERVER_TEMPLATE:
|
||||
Id:SERVER_TEMPLATE
|
||||
Width:PARENT_RIGHT-28
|
||||
Height:25
|
||||
ClickThrough:false
|
||||
X:2
|
||||
Y:0
|
||||
Visible:false
|
||||
Label@JOINSERVER_PROGRESS_TITLE:
|
||||
Id:JOINSERVER_PROGRESS_TITLE
|
||||
X:150
|
||||
Y:PARENT_BOTTOM / 2 - HEIGHT
|
||||
Width:150
|
||||
Height:30
|
||||
Background:dialog4
|
||||
Text:Fetching games...
|
||||
Align:Center
|
||||
Container@SERVER_INFO:
|
||||
Id:SERVER_INFO
|
||||
X:0
|
||||
Y:0
|
||||
Width:PARENT_RIGHT
|
||||
Height:PARENT_BOTTOM
|
||||
Visible:false
|
||||
Children:
|
||||
Label@SERVER_IP_LABEL:
|
||||
Id:SERVER_IP_LABEL
|
||||
X:PARENT_RIGHT - 200 - WIDTH
|
||||
Y:50
|
||||
Align:Right
|
||||
Width:70
|
||||
Height:20
|
||||
Text:Server:
|
||||
Bold:True
|
||||
Label@SERVER_IP:
|
||||
Id:SERVER_IP
|
||||
X:PARENT_RIGHT - 195
|
||||
Y:50
|
||||
Align:Left
|
||||
Width:70
|
||||
Height:20
|
||||
Label@SERVER_MODS_LABEL:
|
||||
Id:SERVER_MODS_LABEL
|
||||
X:PARENT_RIGHT - 200 - WIDTH
|
||||
Y:70
|
||||
Align:Right
|
||||
Width:70
|
||||
Height:20
|
||||
Text:Mods:
|
||||
Bold:True
|
||||
Label@SERVER_MODS:
|
||||
Id:SERVER_MODS
|
||||
X:PARENT_RIGHT - 195
|
||||
Y:70
|
||||
Align:Left
|
||||
Width:70
|
||||
Height:20
|
||||
Label@MAP_TITLE_LABEL:
|
||||
Id:MAP_TITLE_LABEL
|
||||
X:PARENT_RIGHT - 200 - WIDTH
|
||||
Y:90
|
||||
Align:Right
|
||||
Width:70
|
||||
Height:20
|
||||
Text:Map:
|
||||
Bold:True
|
||||
Label@MAP_TITLE:
|
||||
Id:MAP_TITLE
|
||||
X:PARENT_RIGHT - 195
|
||||
Y:90
|
||||
Align:Left
|
||||
Width:70
|
||||
Height:20
|
||||
Label@MAP_PLAYERS_LABEL:
|
||||
Id:MAP_PLAYERS_LABEL
|
||||
X:PARENT_RIGHT - 200 - WIDTH
|
||||
Y:110
|
||||
Align:Right
|
||||
Width:70
|
||||
Height:20
|
||||
Text:Players:
|
||||
Bold:True
|
||||
Label@MAP_PLAYERS:
|
||||
Id:MAP_PLAYERS
|
||||
X:PARENT_RIGHT - 195
|
||||
Y:110
|
||||
Align:Left
|
||||
Width:70
|
||||
Height:20
|
||||
MapPreview@MAP_PREVIEW:
|
||||
Id:MAP_PREVIEW
|
||||
X:PARENT_RIGHT-241
|
||||
Y:140
|
||||
Width:192
|
||||
Height:192
|
||||
Button@DIRECTCONNECT_BUTTON:
|
||||
Id:DIRECTCONNECT_BUTTON
|
||||
X:20
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Direct Connect
|
||||
Bold:True
|
||||
Button@REFRESH_BUTTON:
|
||||
Id:REFRESH_BUTTON
|
||||
X:160
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Refresh
|
||||
Bold:True
|
||||
Button@JOIN_BUTTON:
|
||||
Id:JOIN_BUTTON
|
||||
X:PARENT_RIGHT - 140 - 130
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Join
|
||||
Bold:True
|
||||
Button@CANCEL_BUTTON:
|
||||
Id:CANCEL_BUTTON
|
||||
X:PARENT_RIGHT - 140
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Cancel
|
||||
Bold:True
|
||||
Background@DIRECTCONNECT_BG:
|
||||
Id:DIRECTCONNECT_BG
|
||||
Delegate:ServerBrowserDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:400
|
||||
Height:155
|
||||
Visible:true
|
||||
Children:
|
||||
Label@DIRECTCONNECT_LABEL_TITLE:
|
||||
Id:DIRECTCONNECT_LABEL_TITLE
|
||||
X:0
|
||||
Y:20
|
||||
Width:400
|
||||
Height:25
|
||||
Text:Direct Connect
|
||||
Align:Center
|
||||
Bold:True
|
||||
Label@ADDRESS_LABEL:
|
||||
Id:ADDRESS_LABEL
|
||||
X:50
|
||||
Y:59
|
||||
Width:95
|
||||
Height:25
|
||||
Align:Right
|
||||
Text:Server Address:
|
||||
TextField@SERVER_ADDRESS:
|
||||
Id:SERVER_ADDRESS
|
||||
X:150
|
||||
Y:60
|
||||
Width:200
|
||||
MaxLength:50
|
||||
Height:25
|
||||
Button@JOIN_BUTTON:
|
||||
Id:JOIN_BUTTON
|
||||
X:130
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Join
|
||||
Bold:True
|
||||
Button@CANCEL_BUTTON:
|
||||
Id:CANCEL_BUTTON
|
||||
X:260
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:120
|
||||
Height:25
|
||||
Text:Cancel
|
||||
Bold:True
|
||||
Background@CONNECTION_FAILED_BG:
|
||||
Id:CONNECTION_FAILED_BG
|
||||
Delegate:ConnectionFailedDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:450
|
||||
Height:150
|
||||
Visible:true
|
||||
Children:
|
||||
Label@CONNECTION_FAILED_TITLE:
|
||||
Id:CONNECTION_FAILED_TITLE
|
||||
X:0
|
||||
Y:20
|
||||
Width:450
|
||||
Height:25
|
||||
Text:Connection Failed
|
||||
Align:Center
|
||||
Bold:True
|
||||
Label@CONNECTION_FAILED_DESC:
|
||||
Id:CONNECTION_FAILED_DESC
|
||||
X:0
|
||||
Y:60
|
||||
Width:PARENT_RIGHT
|
||||
Height:25
|
||||
Text:Could not connect to AAA.BBB.CCC.DDD:EEEE
|
||||
Align:Center
|
||||
Button@CONNECTION_BUTTON_RETRY:
|
||||
Id:CONNECTION_BUTTON_RETRY
|
||||
X:PARENT_RIGHT - 360
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Retry
|
||||
Bold:True
|
||||
Button@CONNECTION_BUTTON_CANCEL:
|
||||
Id:CONNECTION_BUTTON_CANCEL
|
||||
X:PARENT_RIGHT - 180
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Cancel
|
||||
Bold:True
|
||||
Background@CONNECTING_BG:
|
||||
Id:CONNECTING_BG
|
||||
Delegate:ConnectionDialogsDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:450
|
||||
Height:150
|
||||
Visible:true
|
||||
Children:
|
||||
Label@CONNECTING_TITLE:
|
||||
Id:CONNECTING_TITLE
|
||||
X:0
|
||||
Y:20
|
||||
Width:450
|
||||
Height:25
|
||||
Text:Connecting
|
||||
Align:Center
|
||||
Bold:True
|
||||
Label@CONNECTING_DESC:
|
||||
Id:CONNECTING_DESC
|
||||
X:0
|
||||
Y:60
|
||||
Width:PARENT_RIGHT
|
||||
Height:25
|
||||
Text:Connecting to AAA.BBB.CCC.DDD:EEEE...
|
||||
Align:Center
|
||||
Button@CONNECTION_BUTTON_ABORT:
|
||||
Id:CONNECTION_BUTTON_ABORT
|
||||
X:PARENT_RIGHT - 180
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Abort
|
||||
Bold:True
|
||||
|
||||
@@ -1,207 +1,207 @@
|
||||
Background@SETTINGS_MENU:
|
||||
Id:SETTINGS_MENU
|
||||
Delegate:SettingsMenuDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM- HEIGHT)/2
|
||||
Width: 450
|
||||
Height: 350
|
||||
Visible: false
|
||||
Children:
|
||||
Label@SETTINGS_LABEL_TITLE:
|
||||
Id:SETTINGS_LABEL_TITLE
|
||||
X:0
|
||||
Y:20
|
||||
Width:450
|
||||
Height:25
|
||||
Text:Settings
|
||||
Align:Center
|
||||
Bold:True
|
||||
Button@BUTTON_CLOSE:
|
||||
Id:BUTTON_CLOSE
|
||||
X:PARENT_RIGHT - 180
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Close
|
||||
Bold:True
|
||||
Container@TAB_CONTAINER:
|
||||
Id:TAB_CONTAINER
|
||||
X:0
|
||||
Y:50
|
||||
Width:PARENT_RIGHT
|
||||
Height:25
|
||||
Children:
|
||||
Button@GENERAL:
|
||||
Id:GENERAL
|
||||
X:45
|
||||
Y:0
|
||||
Width:90
|
||||
Height:25
|
||||
Text:General
|
||||
Bold:True
|
||||
Button@AUDIO:
|
||||
Id:AUDIO
|
||||
X:135
|
||||
Y:0
|
||||
Width:90
|
||||
Height:25
|
||||
Text:Audio
|
||||
Bold:True
|
||||
Button@DISPLAY:
|
||||
Id:DISPLAY
|
||||
X:225
|
||||
Y:0
|
||||
Width:90
|
||||
Height:25
|
||||
Text:Display
|
||||
Bold:True
|
||||
Button@DEBUG:
|
||||
Id:DEBUG
|
||||
X:315
|
||||
Y:0
|
||||
Width:90
|
||||
Height:25
|
||||
Text:Debug
|
||||
Bold:True
|
||||
Container@GENERAL_PANE:
|
||||
Id:GENERAL_PANE
|
||||
X:37
|
||||
Y:100
|
||||
Width:PARENT_RIGHT - 37
|
||||
Height:PARENT_BOTTOM - 100
|
||||
Visible: true
|
||||
Children:
|
||||
Label@SETTINGS_PLAYER_NAME:
|
||||
Id:SETTINGS_PLAYER_NAME
|
||||
X:0
|
||||
Y:10
|
||||
Text: Player Name:
|
||||
TextField@NAME:
|
||||
Id:NAME
|
||||
Text:Name
|
||||
Width:139
|
||||
Height:25
|
||||
X:90
|
||||
Y:0
|
||||
MaxLength:16
|
||||
Checkbox@EDGE_SCROLL:
|
||||
Id:EDGE_SCROLL
|
||||
X:0
|
||||
Y:30
|
||||
Width:200
|
||||
Height:20
|
||||
Text: Enable Edge Scrolling
|
||||
Checkbox@INVERSE_SCROLL:
|
||||
Id:INVERSE_SCROLL
|
||||
X:0
|
||||
Y:60
|
||||
Width:200
|
||||
Height:20
|
||||
Text: Invert Mouse Drag Scrolling
|
||||
Container@AUDIO_PANE:
|
||||
Id:AUDIO_PANE
|
||||
X:37
|
||||
Y:100
|
||||
Width:PARENT_RIGHT - 37
|
||||
Height:PARENT_BOTTOM - 100
|
||||
Visible: false
|
||||
Children:
|
||||
Label@SOUND_VOLUME_LABEL:
|
||||
Id:SOUND_VOLUME_LABEL
|
||||
X:0
|
||||
Y:10
|
||||
Text: Sound Volume
|
||||
Slider@SOUND_VOLUME:
|
||||
Id:SOUND_VOLUME
|
||||
X:100
|
||||
Y:0
|
||||
Width:250
|
||||
Height:20
|
||||
Ticks:5
|
||||
Label@MUSIC_VOLUME_LABEL:
|
||||
Id:MUSIC_VOLUME_LABEL
|
||||
X:0
|
||||
Y:40
|
||||
Text: Music Volume
|
||||
Slider@MUSIC_VOLUME:
|
||||
Id:MUSIC_VOLUME
|
||||
X:100
|
||||
Y:30
|
||||
Width:250
|
||||
Height:20
|
||||
Ticks:5
|
||||
Container@DISPLAY_PANE:
|
||||
Id:DISPLAY_PANE
|
||||
X:37
|
||||
Y:100
|
||||
Width:PARENT_RIGHT - 37
|
||||
Height:PARENT_BOTTOM - 100
|
||||
Visible: false
|
||||
Children:
|
||||
Checkbox@FULLSCREEN_CHECKBOX:
|
||||
Id:FULLSCREEN_CHECKBOX
|
||||
X:0
|
||||
Y:0
|
||||
Width:300
|
||||
Height:20
|
||||
Text:Fullscreen
|
||||
Label@RESOLUTION_LABEL:
|
||||
Id:RESOLUTION_LABEL
|
||||
X:0
|
||||
Y:50
|
||||
Text: Window Resolution:
|
||||
TextField@SCREEN_WIDTH:
|
||||
Id:SCREEN_WIDTH
|
||||
Text:Width
|
||||
Width:50
|
||||
Height:25
|
||||
X:130
|
||||
Y:40
|
||||
MaxLength:5
|
||||
Label@X:
|
||||
Id:X
|
||||
Text:x
|
||||
X:185
|
||||
Y:50
|
||||
TextField@SCREEN_HEIGHT:
|
||||
Id:SCREEN_HEIGHT
|
||||
Text:Height
|
||||
Width:50
|
||||
Height:25
|
||||
X:195
|
||||
Y:40
|
||||
MaxLength:5
|
||||
Label@RESTART:
|
||||
Id:RESTART
|
||||
Text: Restart Game To Apply Changes
|
||||
X:0
|
||||
Y:PARENT_BOTTOM - 30
|
||||
Container@DEBUG_PANE:
|
||||
Id:DEBUG_PANE
|
||||
X:37
|
||||
Y:100
|
||||
Width:PARENT_RIGHT - 37
|
||||
Height:PARENT_BOTTOM - 100
|
||||
Visible: false
|
||||
Children:
|
||||
Checkbox@PERFDEBUG_CHECKBOX:
|
||||
Id:PERFDEBUG_CHECKBOX
|
||||
X:0
|
||||
Y:0
|
||||
Width:300
|
||||
Height:20
|
||||
Text:Show Performance Information
|
||||
Checkbox@SYNCREPORTS_CHECKBOX:
|
||||
Id:SYNCREPORTS_CHECKBOX
|
||||
X:0
|
||||
Y:30
|
||||
Width:300
|
||||
Height:20
|
||||
Text:Collect Sync Reports
|
||||
Checkbox@GAMETIME_CHECKBOX:
|
||||
Id:GAMETIME_CHECKBOX
|
||||
X:0
|
||||
Y:60
|
||||
Width:300
|
||||
Height:20
|
||||
Text:Show Game Time Counter
|
||||
Background@SETTINGS_MENU:
|
||||
Id:SETTINGS_MENU
|
||||
Delegate:SettingsMenuDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM- HEIGHT)/2
|
||||
Width: 450
|
||||
Height: 350
|
||||
Visible: true
|
||||
Children:
|
||||
Label@SETTINGS_LABEL_TITLE:
|
||||
Id:SETTINGS_LABEL_TITLE
|
||||
X:0
|
||||
Y:20
|
||||
Width:450
|
||||
Height:25
|
||||
Text:Settings
|
||||
Align:Center
|
||||
Bold:True
|
||||
Button@BUTTON_CLOSE:
|
||||
Id:BUTTON_CLOSE
|
||||
X:PARENT_RIGHT - 180
|
||||
Y:PARENT_BOTTOM - 45
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Close
|
||||
Bold:True
|
||||
Container@TAB_CONTAINER:
|
||||
Id:TAB_CONTAINER
|
||||
X:0
|
||||
Y:50
|
||||
Width:PARENT_RIGHT
|
||||
Height:25
|
||||
Children:
|
||||
Button@GENERAL:
|
||||
Id:GENERAL
|
||||
X:45
|
||||
Y:0
|
||||
Width:90
|
||||
Height:25
|
||||
Text:General
|
||||
Bold:True
|
||||
Button@AUDIO:
|
||||
Id:AUDIO
|
||||
X:135
|
||||
Y:0
|
||||
Width:90
|
||||
Height:25
|
||||
Text:Audio
|
||||
Bold:True
|
||||
Button@DISPLAY:
|
||||
Id:DISPLAY
|
||||
X:225
|
||||
Y:0
|
||||
Width:90
|
||||
Height:25
|
||||
Text:Display
|
||||
Bold:True
|
||||
Button@DEBUG:
|
||||
Id:DEBUG
|
||||
X:315
|
||||
Y:0
|
||||
Width:90
|
||||
Height:25
|
||||
Text:Debug
|
||||
Bold:True
|
||||
Container@GENERAL_PANE:
|
||||
Id:GENERAL_PANE
|
||||
X:37
|
||||
Y:100
|
||||
Width:PARENT_RIGHT - 37
|
||||
Height:PARENT_BOTTOM - 100
|
||||
Visible: true
|
||||
Children:
|
||||
Label@SETTINGS_PLAYER_NAME:
|
||||
Id:SETTINGS_PLAYER_NAME
|
||||
X:0
|
||||
Y:10
|
||||
Text: Player Name:
|
||||
TextField@NAME:
|
||||
Id:NAME
|
||||
Text:Name
|
||||
Width:139
|
||||
Height:25
|
||||
X:90
|
||||
Y:0
|
||||
MaxLength:16
|
||||
Checkbox@EDGE_SCROLL:
|
||||
Id:EDGE_SCROLL
|
||||
X:0
|
||||
Y:30
|
||||
Width:200
|
||||
Height:20
|
||||
Text: Enable Edge Scrolling
|
||||
Checkbox@INVERSE_SCROLL:
|
||||
Id:INVERSE_SCROLL
|
||||
X:0
|
||||
Y:60
|
||||
Width:200
|
||||
Height:20
|
||||
Text: Invert Mouse Drag Scrolling
|
||||
Container@AUDIO_PANE:
|
||||
Id:AUDIO_PANE
|
||||
X:37
|
||||
Y:100
|
||||
Width:PARENT_RIGHT - 37
|
||||
Height:PARENT_BOTTOM - 100
|
||||
Visible: false
|
||||
Children:
|
||||
Label@SOUND_VOLUME_LABEL:
|
||||
Id:SOUND_VOLUME_LABEL
|
||||
X:0
|
||||
Y:10
|
||||
Text: Sound Volume
|
||||
Slider@SOUND_VOLUME:
|
||||
Id:SOUND_VOLUME
|
||||
X:100
|
||||
Y:0
|
||||
Width:250
|
||||
Height:20
|
||||
Ticks:5
|
||||
Label@MUSIC_VOLUME_LABEL:
|
||||
Id:MUSIC_VOLUME_LABEL
|
||||
X:0
|
||||
Y:40
|
||||
Text: Music Volume
|
||||
Slider@MUSIC_VOLUME:
|
||||
Id:MUSIC_VOLUME
|
||||
X:100
|
||||
Y:30
|
||||
Width:250
|
||||
Height:20
|
||||
Ticks:5
|
||||
Container@DISPLAY_PANE:
|
||||
Id:DISPLAY_PANE
|
||||
X:37
|
||||
Y:100
|
||||
Width:PARENT_RIGHT - 37
|
||||
Height:PARENT_BOTTOM - 100
|
||||
Visible: false
|
||||
Children:
|
||||
Checkbox@FULLSCREEN_CHECKBOX:
|
||||
Id:FULLSCREEN_CHECKBOX
|
||||
X:0
|
||||
Y:0
|
||||
Width:300
|
||||
Height:20
|
||||
Text:Fullscreen
|
||||
Label@RESOLUTION_LABEL:
|
||||
Id:RESOLUTION_LABEL
|
||||
X:0
|
||||
Y:50
|
||||
Text: Window Resolution:
|
||||
TextField@SCREEN_WIDTH:
|
||||
Id:SCREEN_WIDTH
|
||||
Text:Width
|
||||
Width:50
|
||||
Height:25
|
||||
X:130
|
||||
Y:40
|
||||
MaxLength:5
|
||||
Label@X:
|
||||
Id:X
|
||||
Text:x
|
||||
X:185
|
||||
Y:50
|
||||
TextField@SCREEN_HEIGHT:
|
||||
Id:SCREEN_HEIGHT
|
||||
Text:Height
|
||||
Width:50
|
||||
Height:25
|
||||
X:195
|
||||
Y:40
|
||||
MaxLength:5
|
||||
Label@RESTART:
|
||||
Id:RESTART
|
||||
Text: Restart Game To Apply Changes
|
||||
X:0
|
||||
Y:PARENT_BOTTOM - 30
|
||||
Container@DEBUG_PANE:
|
||||
Id:DEBUG_PANE
|
||||
X:37
|
||||
Y:100
|
||||
Width:PARENT_RIGHT - 37
|
||||
Height:PARENT_BOTTOM - 100
|
||||
Visible: false
|
||||
Children:
|
||||
Checkbox@PERFDEBUG_CHECKBOX:
|
||||
Id:PERFDEBUG_CHECKBOX
|
||||
X:0
|
||||
Y:0
|
||||
Width:300
|
||||
Height:20
|
||||
Text:Show Performance Information
|
||||
Checkbox@SYNCREPORTS_CHECKBOX:
|
||||
Id:SYNCREPORTS_CHECKBOX
|
||||
X:0
|
||||
Y:30
|
||||
Width:300
|
||||
Height:20
|
||||
Text:Collect Sync Reports
|
||||
Checkbox@GAMETIME_CHECKBOX:
|
||||
Id:GAMETIME_CHECKBOX
|
||||
X:0
|
||||
Y:60
|
||||
Width:300
|
||||
Height:20
|
||||
Text:Show Game Time Counter
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
Mobile:
|
||||
Crushes: atmine, crate
|
||||
TerrainSpeeds:
|
||||
Clear: 60%
|
||||
Rough: 40%
|
||||
Road: 100%
|
||||
Ore: 90%
|
||||
Beach: 40%
|
||||
Clear: 60
|
||||
Rough: 40
|
||||
Road: 100
|
||||
Ore: 90
|
||||
Beach: 40
|
||||
ROT: 5
|
||||
Selectable:
|
||||
Voice: VehicleVoice
|
||||
@@ -30,11 +30,11 @@
|
||||
Mobile:
|
||||
Crushes: wall, atmine, crate
|
||||
TerrainSpeeds:
|
||||
Clear: 80%
|
||||
Rough: 70%
|
||||
Road: 100%
|
||||
Ore: 70%
|
||||
Beach: 70%
|
||||
Clear: 80
|
||||
Rough: 70
|
||||
Road: 100
|
||||
Ore: 70
|
||||
Beach: 70
|
||||
ROT: 5
|
||||
Selectable:
|
||||
Voice: VehicleVoice
|
||||
@@ -62,11 +62,11 @@
|
||||
Mobile:
|
||||
Crushes: apmine, crate
|
||||
TerrainSpeeds:
|
||||
Clear: 90%
|
||||
Rough: 80%
|
||||
Road: 100%
|
||||
Ore: 100%
|
||||
Beach: 80%
|
||||
Clear: 90
|
||||
Rough: 80
|
||||
Road: 100
|
||||
Ore: 100
|
||||
Beach: 80
|
||||
Selectable:
|
||||
Voice: GenericVoice
|
||||
Targetable:
|
||||
@@ -88,7 +88,7 @@
|
||||
Mobile:
|
||||
Crushes: crate
|
||||
TerrainSpeeds:
|
||||
Water: 100%
|
||||
Water: 100
|
||||
Selectable:
|
||||
Voice: ShipVoice
|
||||
Targetable:
|
||||
@@ -208,4 +208,4 @@
|
||||
Footprint: ____ ____
|
||||
Dimensions: 4,2
|
||||
Health:
|
||||
HP: 1000
|
||||
HP: 1000
|
||||
|
||||
@@ -112,11 +112,11 @@ World:
|
||||
ChooseBuildTabOnSelect:
|
||||
BridgeLayer:
|
||||
Bridges: bridge1, bridge2, br1, br2, br3
|
||||
# CrateDrop:
|
||||
# Minimum: 1
|
||||
# Maximum: 3
|
||||
# SpawnInterval: 120
|
||||
# WaterChance: .2
|
||||
CrateDrop:
|
||||
Minimum: 1
|
||||
Maximum: 3
|
||||
SpawnInterval: 120
|
||||
WaterChance: .2
|
||||
PaletteFromCurrentTheatre:
|
||||
Name: terrain
|
||||
PlayerColorPalette:
|
||||
|
||||
BIN
mods/ra_perf/maps/spiral stress test/map.bin
Executable file
BIN
mods/ra_perf/maps/spiral stress test/map.bin
Executable file
Binary file not shown.
1
mods/ra_perf/maps/spiral stress test/map.uid
Executable file
1
mods/ra_perf/maps/spiral stress test/map.uid
Executable file
@@ -0,0 +1 @@
|
||||
6de045c3d70e7dd222bc5266534201a9013c6f05
|
||||
43
mods/ra_perf/maps/spiral stress test/map.yaml
Executable file
43
mods/ra_perf/maps/spiral stress test/map.yaml
Executable file
@@ -0,0 +1,43 @@
|
||||
Selectable: True
|
||||
|
||||
MapFormat: 3
|
||||
|
||||
Title: (TEST) spiral stress test
|
||||
|
||||
Author: Bob
|
||||
|
||||
PlayerCount: 2
|
||||
|
||||
Tileset: SNOW
|
||||
|
||||
MapSize: 64,64
|
||||
|
||||
TopLeft: 1,1
|
||||
|
||||
BottomRight: 63,63
|
||||
|
||||
Players:
|
||||
PlayerReference@Neutral:
|
||||
Name: Neutral
|
||||
Palette:
|
||||
Race: allies
|
||||
OwnsWorld: True
|
||||
NonCombatant: True
|
||||
Playable: False
|
||||
DefaultStartingUnits: False
|
||||
Color: 255,238,238,238
|
||||
Color2: 255,44,28,24
|
||||
InitialCash: 0
|
||||
Allies:
|
||||
Enemies:
|
||||
|
||||
Actors:
|
||||
|
||||
Waypoints:
|
||||
wp0: 1,1
|
||||
wp1: 62,62
|
||||
|
||||
Smudges:
|
||||
|
||||
Rules:
|
||||
|
||||
Reference in New Issue
Block a user