Compare commits
34 Commits
release-20
...
playtest-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06b20c8ba5 | ||
|
|
9b484b53ec | ||
|
|
9620b4ed46 | ||
|
|
d8908c44d0 | ||
|
|
cfe705531a | ||
|
|
9a2fd38ab6 | ||
|
|
911e7f62de | ||
|
|
403b81bdc9 | ||
|
|
a0714b00b3 | ||
|
|
d5239ee77a | ||
|
|
03ec97f302 | ||
|
|
3255f95ee9 | ||
|
|
4c8fd5e73d | ||
|
|
7179ef0f45 | ||
|
|
6d5918b11d | ||
|
|
81c484d1c9 | ||
|
|
de1044c24c | ||
|
|
e4c31939d9 | ||
|
|
7f48d6796e | ||
|
|
4fd77aec8e | ||
|
|
92fece01de | ||
|
|
d8d987f844 | ||
|
|
de429a4c62 | ||
|
|
c0ca35a4ff | ||
|
|
1bff8559fb | ||
|
|
de98274165 | ||
|
|
59e2228b2a | ||
|
|
96d1408d45 | ||
|
|
ff45ae2d16 | ||
|
|
47950c9113 | ||
|
|
f402ec7898 | ||
|
|
a3c0448e15 | ||
|
|
699b4b1154 | ||
|
|
911db3feb1 |
19
OpenRA.Editor/MapSelect.Designer.cs
generated
19
OpenRA.Editor/MapSelect.Designer.cs
generated
@@ -52,11 +52,13 @@
|
||||
this.txtTitle = new System.Windows.Forms.TextBox();
|
||||
this.lblMapName = new System.Windows.Forms.Label();
|
||||
this.lblMinimap = new System.Windows.Forms.Label();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbMinimap)).BeginInit();
|
||||
this.pnlBottom.SuspendLayout();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// MapList
|
||||
@@ -85,9 +87,9 @@
|
||||
//
|
||||
// MapIconsList
|
||||
//
|
||||
this.MapIconsList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("MapIconsList.ImageStream")));
|
||||
this.MapIconsList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
|
||||
this.MapIconsList.ImageSize = new System.Drawing.Size(24, 24);
|
||||
this.MapIconsList.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.MapIconsList.Images.SetKeyName(0, "mapicon");
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
@@ -141,6 +143,7 @@
|
||||
//
|
||||
// pnlBottom
|
||||
//
|
||||
this.pnlBottom.Controls.Add(this.pictureBox1);
|
||||
this.pnlBottom.Controls.Add(this.txtPathOut);
|
||||
this.pnlBottom.Controls.Add(this.lblPathOut);
|
||||
this.pnlBottom.Controls.Add(this.lblPath);
|
||||
@@ -301,6 +304,16 @@
|
||||
this.lblMinimap.TabIndex = 6;
|
||||
this.lblMinimap.Text = "Map preview:";
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
|
||||
this.pictureBox1.Location = new System.Drawing.Point(336, -9);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(54, 35);
|
||||
this.pictureBox1.TabIndex = 7;
|
||||
this.pictureBox1.TabStop = false;
|
||||
this.pictureBox1.Visible = false;
|
||||
//
|
||||
// MapSelect
|
||||
//
|
||||
this.AcceptButton = this.btnOk;
|
||||
@@ -327,6 +340,7 @@
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.PerformLayout();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -356,5 +370,6 @@
|
||||
public System.Windows.Forms.Label lblPathOut;
|
||||
public System.Windows.Forms.Label lblPath;
|
||||
public System.Windows.Forms.TextBox txtPathOut;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using OpenRA.FileFormats;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Graphics;
|
||||
|
||||
namespace OpenRA.Editor
|
||||
@@ -19,11 +13,11 @@ namespace OpenRA.Editor
|
||||
public MapSelect()
|
||||
{
|
||||
InitializeComponent();
|
||||
MapIconsList.Images.Add(pictureBox1.Image);
|
||||
}
|
||||
|
||||
private void MapSelect_Load(object sender, EventArgs e)
|
||||
void MapSelect_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
DirectoryInfo directory = new DirectoryInfo(MapFolderPath);
|
||||
DirectoryInfo[] directories = directory.GetDirectories();
|
||||
MapList.Items.Clear();
|
||||
@@ -33,20 +27,14 @@ namespace OpenRA.Editor
|
||||
ListViewItem map1 = new ListViewItem(subDirectory.Name);
|
||||
map1.ImageIndex = 0;
|
||||
MapList.Items.Add(map1);
|
||||
|
||||
}
|
||||
if (txtNew.Text == "unnamed")
|
||||
{
|
||||
//dumb indian code
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// hack
|
||||
if (txtNew.Text != "unnamed")
|
||||
MapList.Items[0].Selected = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void MapList_SelectedIndexChanged(object sender, EventArgs e)
|
||||
void MapList_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (MapList.SelectedItems.Count == 1)
|
||||
{
|
||||
@@ -69,7 +57,7 @@ namespace OpenRA.Editor
|
||||
}
|
||||
}
|
||||
|
||||
private void txtPathOut_TextChanged(object sender, EventArgs e)
|
||||
void txtPathOut_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
MapFolderPath = txtPathOut.Text;
|
||||
}
|
||||
|
||||
@@ -120,73 +120,58 @@
|
||||
<metadata name="MapIconsList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="MapIconsList.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABW
|
||||
DgAAAk1TRnQBSQFMAwEBAAEoAQABKAEAARgBAAEYAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABYAMA
|
||||
ARgDAAEBAQABIAYAASQhAAEBAx8BLAM/AW8DSQGJAzYBWQMYASIDAQECDAADHQEqA0gBhQNCAXYDDwEU
|
||||
AwEBAgMNARIDMwFSA0MBdwNRAacDDwEU/wAwAAEBAwMBBAM0BFQBwgFlAVMBUgH0AV4CWAHYA0oBjQMW
|
||||
AR4DAgEDAwABAQMCAQMDGgElA00BlAEIAQkBJgH9A1ABpAM1AVcDQQFzA1MBugJDAVMB4wJTAVQBsgMA
|
||||
AQH/ADAAAQEDDAEQA0IBdAFVAVQBUQHYAZkBiAGBAf8Bo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aKWP4HlASMKLj9xX4WrXWzhdMxUFlkaI1tPDAZE9
|
||||
Htc4wWuhOas5Y/oXgUezYDdZdmK2N6zzCfuB1V1GFkulNswT5cFllms73f+QMIWwjCDjGJnUW1rbfu2z
|
||||
wvXJk85pUH5gieNJdugvd8QV7RSc0TjgiMwevkvH3np1xa/+ZplZE9jecNh14UcPmO8VmnLyfzGr/feU
|
||||
mB/dY7VjybItdSZhrb6+fvEYY6PuMWOMn7ZbGeILfQNYmnN+mO1o/OBdCw74HAMsMjR8NjL/r+Yx+p3H
|
||||
XhjKZs93uxMZr4Z/uOb54qWf3bGf4pw3EpC1UPYsS3g0EU9K4uBsI86zYHPOY3MOp4zuRRLyDfT1O941
|
||||
Mrzvb86Bob4h+0r6zcEmdiFICA2vvT55kLFBYOJhnYt9or06TOmCJ7HTbGxgADpndmaJMU29QxAQKvTo
|
||||
vhnHkN1nX12/OlgCNoT3CZsIvgRWc9ao2IT/bTD3+BID7N1/zisBWCKOBB/CagKf8PboJP8CoUmu3yhA
|
||||
ga8AAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -439,10 +439,6 @@ namespace OpenRA.Editor
|
||||
float OffsetY = t.Centered ? t.Bitmap.Height / 2 - TileSet.TileSize / 2 : 0;
|
||||
float DrawY = TileSet.TileSize * p.Y * Zoom + Offset.Y - OffsetY;
|
||||
|
||||
float width = t.Bitmap.Width * Zoom;
|
||||
float height = t.Bitmap.Height * Zoom;
|
||||
RectangleF sourceRect = new RectangleF(0, 0, t.Bitmap.Width, t.Bitmap.Height);
|
||||
RectangleF destRect = new RectangleF(DrawX, DrawY, width, height);
|
||||
g.DrawRectangle(CordonPen,
|
||||
DrawX, DrawY,
|
||||
t.Bitmap.Width * Zoom, t.Bitmap.Height * Zoom);
|
||||
|
||||
@@ -267,7 +267,14 @@ namespace OpenRA
|
||||
Renderer.SheetSize = Settings.Game.SheetSize;
|
||||
Renderer = new Renderer();
|
||||
|
||||
LobbyInfo.GlobalSettings.Mods = Settings.Game.Mods;
|
||||
Console.WriteLine("Available mods:");
|
||||
foreach(var mod in ModData.AllMods)
|
||||
Console.WriteLine("\t{0}: {1} ({2})", mod.Key, mod.Value.Title, mod.Value.Version);
|
||||
|
||||
// Discard any invalid mods
|
||||
LobbyInfo.GlobalSettings.Mods = Settings.Game.Mods.Where(m => ModData.AllMods.ContainsKey(m)).ToArray();
|
||||
Console.WriteLine("Loading mods: {0}",string.Join(",",LobbyInfo.GlobalSettings.Mods));
|
||||
|
||||
modData = new ModData( LobbyInfo.GlobalSettings.Mods );
|
||||
|
||||
Sound.Initialize();
|
||||
|
||||
@@ -69,6 +69,7 @@ namespace OpenRA.GameRules
|
||||
// Behaviour settings
|
||||
public bool ViewportEdgeScroll = true;
|
||||
public bool InverseDragScroll = false;
|
||||
public float ViewportEdgeScrollStep = 0.1f; // 0.1f equals 10 - Gecko
|
||||
|
||||
// Internal game settings
|
||||
public int Timestep = 40;
|
||||
@@ -133,16 +134,11 @@ namespace OpenRA.GameRules
|
||||
{
|
||||
var root = new List<MiniYamlNode>();
|
||||
foreach( var kv in Sections )
|
||||
root.Add( new MiniYamlNode( kv.Key, SectionYaml( kv.Value ) ) );
|
||||
root.Add( new MiniYamlNode( kv.Key, FieldSaver.Save(kv.Value) ) );
|
||||
|
||||
root.WriteToFile(SettingsFile);
|
||||
}
|
||||
|
||||
MiniYaml SectionYaml(object section)
|
||||
{
|
||||
return FieldSaver.SaveDifferences(section, Activator.CreateInstance(section.GetType()));
|
||||
}
|
||||
|
||||
void LoadSectionYaml(MiniYaml yaml, object section)
|
||||
{
|
||||
object defaults = Activator.CreateInstance(section.GetType());
|
||||
|
||||
@@ -19,6 +19,35 @@ namespace OpenRA
|
||||
{
|
||||
public class ModData
|
||||
{
|
||||
public static readonly Dictionary<string,Mod> AllMods = ValidateMods(Directory.GetDirectories("mods").Select(x => x.Substring(5)).ToArray());
|
||||
|
||||
public static Dictionary<string,Mod> ValidateMods(string[] mods)
|
||||
{
|
||||
var ret = new Dictionary<string,Mod>();
|
||||
foreach (var m in mods)
|
||||
{
|
||||
if (!File.Exists("mods" + Path.DirectorySeparatorChar + m + Path.DirectorySeparatorChar + "mod.yaml"))
|
||||
continue;
|
||||
|
||||
var yaml = new MiniYaml( null, MiniYaml.FromFile("mods" + Path.DirectorySeparatorChar + m + Path.DirectorySeparatorChar + "mod.yaml"));
|
||||
if (!yaml.NodesDict.ContainsKey("Metadata"))
|
||||
{
|
||||
System.Console.WriteLine("Invalid mod: "+m);
|
||||
continue;
|
||||
}
|
||||
|
||||
ret.Add(m,FieldLoader.Load<Mod>(yaml.NodesDict["Metadata"]));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public class Mod
|
||||
{
|
||||
public string Title;
|
||||
public string Description;
|
||||
public string Version;
|
||||
}
|
||||
|
||||
public readonly Manifest Manifest;
|
||||
public readonly ObjectCreator ObjectCreator;
|
||||
public readonly SheetBuilder SheetBuilder;
|
||||
@@ -28,7 +57,7 @@ namespace OpenRA
|
||||
public ILoadScreen LoadScreen = null;
|
||||
|
||||
public ModData( params string[] mods )
|
||||
{
|
||||
{
|
||||
Manifest = new Manifest( mods );
|
||||
ObjectCreator = new ObjectCreator( Manifest );
|
||||
LoadScreen = ObjectCreator.CreateObject<ILoadScreen>(Manifest.LoadScreen);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
@@ -230,6 +230,7 @@
|
||||
<Compile Include="Traits\Valued.cs" />
|
||||
<Compile Include="Traits\World\BibLayer.cs" />
|
||||
<Compile Include="Widgets\Delegates\DeveloperModeDelegate.cs" />
|
||||
<Compile Include="Widgets\ScrollingTextWidget.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
|
||||
58
OpenRA.Game/Server/MasterServerQuery.cs
Normal file → Executable file
58
OpenRA.Game/Server/MasterServerQuery.cs
Normal file → Executable file
@@ -14,15 +14,20 @@ using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Server
|
||||
{
|
||||
static class MasterServerQuery
|
||||
{
|
||||
public static event Action<GameServer[]> OnComplete = _ => { };
|
||||
public static event Action<string> OnVersion = _ => { };
|
||||
|
||||
static GameServer[] Games = { };
|
||||
public static string ClientVersion = "";
|
||||
public static string ServerVersion = "";
|
||||
static AutoResetEvent ev = new AutoResetEvent(false);
|
||||
static AutoResetEvent ev2 = new AutoResetEvent(false);
|
||||
|
||||
public static void Refresh(string masterServerUrl)
|
||||
{
|
||||
@@ -30,9 +35,7 @@ namespace OpenRA.Server
|
||||
{
|
||||
try
|
||||
{
|
||||
var wc = new WebClient();
|
||||
var data = wc.DownloadData(new Uri(masterServerUrl + "list.php"));
|
||||
var str = Encoding.UTF8.GetString(data);
|
||||
var str = GetData(new Uri(masterServerUrl + "list.php"));
|
||||
|
||||
var yaml = MiniYaml.FromString(str);
|
||||
|
||||
@@ -48,10 +51,59 @@ namespace OpenRA.Server
|
||||
}).Start();
|
||||
}
|
||||
|
||||
public static void GetMOTD(string masterServerUrl)
|
||||
{
|
||||
new Thread(() =>
|
||||
{
|
||||
var motd = Widget.RootWidget.GetWidget<ScrollingTextWidget>("MOTD_SCROLLER");
|
||||
if (motd != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
motd.Text = GetData(new Uri(masterServerUrl + "motd.php?v=" + ClientVersion));
|
||||
motd.ResetScroll();
|
||||
}
|
||||
catch
|
||||
{
|
||||
motd.Text = "Welcome to OpenRA. MOTD unable to be loaded from server.";
|
||||
motd.ResetScroll();
|
||||
}
|
||||
}
|
||||
|
||||
ev.Set();
|
||||
}).Start();
|
||||
}
|
||||
|
||||
public static void Tick()
|
||||
{
|
||||
if (ev.WaitOne(TimeSpan.FromMilliseconds(0)))
|
||||
OnComplete(Games);
|
||||
if (ev2.WaitOne(TimeSpan.FromMilliseconds(0)))
|
||||
OnVersion(ServerVersion);
|
||||
}
|
||||
|
||||
static string GetData(Uri uri)
|
||||
{
|
||||
var wc = new WebClient();
|
||||
var data = wc.DownloadData(uri);
|
||||
return Encoding.UTF8.GetString(data);
|
||||
}
|
||||
|
||||
public static void GetCurrentVersion(string masterServerUrl)
|
||||
{
|
||||
new Thread(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
ServerVersion = GetData(new Uri(masterServerUrl + "VERSION"));
|
||||
}
|
||||
catch
|
||||
{
|
||||
ServerVersion = "";
|
||||
}
|
||||
|
||||
ev2.Set();
|
||||
}).Start();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -164,7 +164,8 @@ namespace OpenRA.Server
|
||||
|
||||
static int ChooseFreeSlot()
|
||||
{
|
||||
return lobbyInfo.Slots.First(s => !s.Closed && s.Bot == null).Index;
|
||||
return lobbyInfo.Slots.First(s => !s.Closed && s.Bot == null
|
||||
&& !lobbyInfo.Clients.Any( c => c.Slot == s.Index )).Index;
|
||||
}
|
||||
|
||||
static void AcceptConnection()
|
||||
|
||||
12
OpenRA.Game/Widgets/Delegates/MainMenuButtonsDelegate.cs
Normal file → Executable file
12
OpenRA.Game/Widgets/Delegates/MainMenuButtonsDelegate.cs
Normal file → Executable file
@@ -9,6 +9,9 @@
|
||||
#endregion
|
||||
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Server;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
|
||||
namespace OpenRA.Widgets.Delegates
|
||||
{
|
||||
@@ -31,7 +34,16 @@ namespace OpenRA.Widgets.Delegates
|
||||
var s = FileSystem.Open("VERSION");
|
||||
version.Text = s.ReadAllText();
|
||||
s.Close();
|
||||
MasterServerQuery.OnVersion += v => { if (!string.IsNullOrEmpty(v)) version.Text += "\nLatest: " + v; };
|
||||
MasterServerQuery.GetCurrentVersion(Game.Settings.Server.MasterServer);
|
||||
}
|
||||
else
|
||||
{
|
||||
version.Text = "Dev Build";
|
||||
}
|
||||
MasterServerQuery.ClientVersion = version.Text;
|
||||
|
||||
MasterServerQuery.GetMOTD(Game.Settings.Server.MasterServer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace OpenRA.Widgets.Delegates
|
||||
preview.IsVisible = () => CurrentMap() != null;
|
||||
|
||||
bg.GetWidget<LabelWidget>("SERVER_IP").GetText = () => currentServer.Address;
|
||||
bg.GetWidget<LabelWidget>("SERVER_MODS").GetText = () => string.Join(",", currentServer.Mods);
|
||||
bg.GetWidget<LabelWidget>("SERVER_MODS").GetText = () => GenerateModsLabel();
|
||||
bg.GetWidget<LabelWidget>("MAP_TITLE").GetText = () => (CurrentMap() != null) ? CurrentMap().Title : "Unknown";
|
||||
bg.GetWidget<LabelWidget>("MAP_PLAYERS").GetText = () =>
|
||||
{
|
||||
@@ -120,11 +120,22 @@ namespace OpenRA.Widgets.Delegates
|
||||
return (currentServer == null || !Game.modData.AvailableMaps.ContainsKey(currentServer.Map))
|
||||
? null : Game.modData.AvailableMaps[currentServer.Map];
|
||||
}
|
||||
|
||||
string GenerateModsLabel()
|
||||
{
|
||||
return string.Join("\n", currentServer.Mods.Select(m =>
|
||||
ModData.AllMods.ContainsKey(m) ? string.Format("{0} ({1})", ModData.AllMods[m].Title, ModData.AllMods[m].Version)
|
||||
: string.Format("Unknown Mod: {0}",m)).ToArray());
|
||||
}
|
||||
|
||||
void RefreshServerList(IEnumerable<GameServer> games)
|
||||
{
|
||||
var r = Widget.RootWidget;
|
||||
var bg = r.GetWidget("JOINSERVER_BG");
|
||||
|
||||
if (bg == null) // We got a MasterServer reply AFTER the browser is gone, just return to prevent crash - Gecko
|
||||
return;
|
||||
|
||||
var sl = bg.GetWidget<ListBoxWidget>("SERVER_LIST");
|
||||
|
||||
sl.Children.Clear();
|
||||
|
||||
@@ -53,6 +53,14 @@ namespace OpenRA.Widgets.Delegates
|
||||
Game.Settings.Game.ViewportEdgeScroll ^= true;
|
||||
return true;
|
||||
};
|
||||
|
||||
// Added scroll sensitivity - Gecko
|
||||
var edgeScrollSlider = general.GetWidget<SliderWidget>("EDGE_SCROLL_AMOUNT");
|
||||
if (edgeScrollSlider != null) // Backwards compatible - Gecko
|
||||
{
|
||||
edgeScrollSlider.OnChange += x => { x += 0.1f; Game.Settings.Game.ViewportEdgeScrollStep = x; };
|
||||
edgeScrollSlider.GetOffset = () => { return Game.Settings.Game.ViewportEdgeScrollStep - 0.1f; };
|
||||
}
|
||||
|
||||
var inverseScroll = general.GetWidget<CheckboxWidget>("INVERSE_SCROLL");
|
||||
inverseScroll.Checked = () => Game.Settings.Game.InverseDragScroll;
|
||||
|
||||
@@ -16,10 +16,12 @@ namespace OpenRA.Widgets
|
||||
public class LabelWidget : Widget
|
||||
{
|
||||
public enum TextAlign { Left, Center, Right }
|
||||
public enum TextVAlign { Top, Middle, Bottom }
|
||||
|
||||
public string Text = null;
|
||||
public string Background = null;
|
||||
public TextAlign Align = TextAlign.Left;
|
||||
public TextVAlign VAlign = TextVAlign.Middle;
|
||||
public bool Bold = false;
|
||||
public Func<string> GetText;
|
||||
public Func<string> GetBackground;
|
||||
@@ -54,8 +56,14 @@ namespace OpenRA.Widgets
|
||||
return;
|
||||
|
||||
int2 textSize = font.Measure(text);
|
||||
int2 position = RenderOrigin + new int2(0, (Bounds.Height - textSize.Y)/2);
|
||||
|
||||
int2 position = RenderOrigin;
|
||||
|
||||
if (VAlign == TextVAlign.Middle)
|
||||
position += new int2(0, (Bounds.Height - textSize.Y)/2);
|
||||
|
||||
if (VAlign == TextVAlign.Bottom)
|
||||
position += new int2(0, Bounds.Height - textSize.Y);
|
||||
|
||||
if (Align == TextAlign.Center)
|
||||
position += new int2((Bounds.Width - textSize.X)/2, 0);
|
||||
|
||||
|
||||
105
OpenRA.Game/Widgets/ScrollingTextWidget.cs
Executable file
105
OpenRA.Game/Widgets/ScrollingTextWidget.cs
Executable file
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Drawing;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
{
|
||||
class ScrollingTextWidget : Widget
|
||||
{
|
||||
public string Text = "";
|
||||
public string Background = null;
|
||||
|
||||
public bool Bold = false;
|
||||
|
||||
public int ScrollLength = 200;
|
||||
|
||||
// ticks per single letter scroll
|
||||
public int ScrollRate = 4;
|
||||
|
||||
private string ScrollBuffer = "";
|
||||
|
||||
private int ScrollLocation = 0;
|
||||
private int ScrollTick = 0;
|
||||
|
||||
public Func<string> GetText;
|
||||
public Func<string> GetBackground;
|
||||
|
||||
public ScrollingTextWidget()
|
||||
: base()
|
||||
{
|
||||
GetText = () => Text;
|
||||
GetBackground = () => Background;
|
||||
}
|
||||
|
||||
protected ScrollingTextWidget(ScrollingTextWidget other)
|
||||
: base(other)
|
||||
{
|
||||
Text = other.Text;
|
||||
GetText = other.GetText;
|
||||
Bold = other.Bold;
|
||||
GetBackground = other.GetBackground;
|
||||
}
|
||||
|
||||
public override void Tick(World world)
|
||||
{
|
||||
UpdateScrollBuffer();
|
||||
}
|
||||
|
||||
public void ResetScroll()
|
||||
{
|
||||
ScrollLocation = 0;
|
||||
ScrollTick = 0;
|
||||
}
|
||||
|
||||
private void UpdateScrollBuffer()
|
||||
{
|
||||
ScrollTick++;
|
||||
|
||||
if (ScrollTick < ScrollRate)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ScrollTick = 0;
|
||||
ScrollBuffer = "";
|
||||
|
||||
if (Text.Substring(Text.Length - 4, 3) != " ")
|
||||
{
|
||||
Text += " ";
|
||||
}
|
||||
|
||||
int tempScrollLocation = ScrollLocation;
|
||||
for (int i = 0; i < ScrollLength; ++i)
|
||||
{
|
||||
ScrollBuffer += Text.Substring(tempScrollLocation, 1);
|
||||
tempScrollLocation = (tempScrollLocation + 1) % Text.Length;
|
||||
}
|
||||
|
||||
ScrollLocation = (ScrollLocation + 1) % Text.Length;
|
||||
}
|
||||
|
||||
public override void DrawInner(World world)
|
||||
{
|
||||
var bg = GetBackground();
|
||||
|
||||
if (bg != null)
|
||||
WidgetUtils.DrawPanel(bg, RenderBounds);
|
||||
|
||||
var font = (Bold) ? Game.Renderer.BoldFont : Game.Renderer.RegularFont;
|
||||
var text = GetText();
|
||||
if (text == null)
|
||||
return;
|
||||
|
||||
int2 textSize = font.Measure(text);
|
||||
int2 position = RenderOrigin + new int2(0, (Bounds.Height - textSize.Y) / 2);
|
||||
|
||||
Game.Renderer.EnableScissor(position.X, position.Y, Bounds.Width, Bounds.Height);
|
||||
font.DrawText(ScrollBuffer, position, Color.White);
|
||||
Game.Renderer.DisableScissor();
|
||||
}
|
||||
|
||||
public override Widget Clone() { return new ScrollingTextWidget(this); }
|
||||
}
|
||||
}
|
||||
@@ -1,172 +1,174 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using OpenRA.Graphics;
|
||||
|
||||
namespace OpenRA.Widgets
|
||||
{
|
||||
[Flags]
|
||||
public enum ScrollDirection
|
||||
{
|
||||
None = 0,
|
||||
Up = 1,
|
||||
Left = 2,
|
||||
Down = 4,
|
||||
Right = 8
|
||||
}
|
||||
|
||||
class ViewportScrollControllerWidget : Widget
|
||||
{
|
||||
public int EdgeScrollThreshold = 15;
|
||||
|
||||
ScrollDirection Keyboard;
|
||||
namespace OpenRA.Widgets
|
||||
{
|
||||
[Flags]
|
||||
public enum ScrollDirection
|
||||
{
|
||||
None = 0,
|
||||
Up = 1,
|
||||
Left = 2,
|
||||
Down = 4,
|
||||
Right = 8
|
||||
}
|
||||
|
||||
class ViewportScrollControllerWidget : Widget
|
||||
{
|
||||
public int EdgeScrollThreshold = 15;
|
||||
|
||||
ScrollDirection Keyboard;
|
||||
ScrollDirection Edge;
|
||||
|
||||
public ViewportScrollControllerWidget() : base() { }
|
||||
protected ViewportScrollControllerWidget(ViewportScrollControllerWidget widget) : base(widget) {}
|
||||
public override void DrawInner( World world ) {}
|
||||
|
||||
public override bool HandleInputInner(MouseInput mi)
|
||||
{
|
||||
if (mi.Event == MouseInputEvent.Move &&
|
||||
(mi.Button == MouseButton.Middle || mi.Button == (MouseButton.Left | MouseButton.Right)))
|
||||
public ViewportScrollControllerWidget() : base() { }
|
||||
protected ViewportScrollControllerWidget(ViewportScrollControllerWidget widget) : base(widget) {}
|
||||
public override void DrawInner( World world ) {}
|
||||
|
||||
public override bool HandleInputInner(MouseInput mi)
|
||||
{
|
||||
if (mi.Event == MouseInputEvent.Move &&
|
||||
(mi.Button == MouseButton.Middle || mi.Button == (MouseButton.Left | MouseButton.Right)))
|
||||
{
|
||||
int InverseScroll = Game.Settings.Game.InverseDragScroll ? -1 : 1;
|
||||
Game.viewport.Scroll((Viewport.LastMousePos - mi.Location) * InverseScroll);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override string GetCursor(int2 pos)
|
||||
{
|
||||
if (!Game.Settings.Game.ViewportEdgeScroll)
|
||||
return null;
|
||||
|
||||
if (Edge.Includes(ScrollDirection.Up) && Edge.Includes(ScrollDirection.Left)){
|
||||
ScrollDirection BlockedDirections = Game.viewport.GetBlockedDirections();
|
||||
if(BlockedDirections.Includes(ScrollDirection.Up) && BlockedDirections.Includes(ScrollDirection.Left))
|
||||
return "scroll-tl-blocked";
|
||||
else
|
||||
return "scroll-tl";
|
||||
}
|
||||
if (Edge.Includes(ScrollDirection.Up) && Edge.Includes(ScrollDirection.Right)){
|
||||
ScrollDirection BlockedDirections = Game.viewport.GetBlockedDirections();
|
||||
if (BlockedDirections.Includes(ScrollDirection.Up) && BlockedDirections.Includes(ScrollDirection.Right))
|
||||
return "scroll-tr-blocked";
|
||||
else
|
||||
return "scroll-tr";
|
||||
}
|
||||
if (Edge.Includes(ScrollDirection.Down) && Edge.Includes(ScrollDirection.Left)){
|
||||
ScrollDirection BlockedDirections = Game.viewport.GetBlockedDirections();
|
||||
if (BlockedDirections.Includes(ScrollDirection.Down) && BlockedDirections.Includes(ScrollDirection.Left))
|
||||
return "scroll-bl-blocked";
|
||||
else
|
||||
return "scroll-bl";
|
||||
}
|
||||
if (Edge.Includes(ScrollDirection.Down) && Edge.Includes(ScrollDirection.Right)){
|
||||
ScrollDirection BlockedDirections = Game.viewport.GetBlockedDirections();
|
||||
if (BlockedDirections.Includes(ScrollDirection.Down) && BlockedDirections.Includes(ScrollDirection.Right))
|
||||
return "scroll-br-blocked";
|
||||
else
|
||||
return "scroll-br";
|
||||
}
|
||||
|
||||
if (Edge.Includes(ScrollDirection.Up))
|
||||
if (Game.viewport.GetBlockedDirections().Includes(ScrollDirection.Up))
|
||||
return "scroll-t-blocked";
|
||||
else
|
||||
return "scroll-t";
|
||||
if (Edge.Includes(ScrollDirection.Down))
|
||||
if (Game.viewport.GetBlockedDirections().Includes(ScrollDirection.Down))
|
||||
return "scroll-b-blocked";
|
||||
else
|
||||
return "scroll-b";
|
||||
if (Edge.Includes(ScrollDirection.Left))
|
||||
if (Game.viewport.GetBlockedDirections().Includes(ScrollDirection.Left))
|
||||
return "scroll-l-blocked";
|
||||
else
|
||||
return "scroll-l";
|
||||
if (Edge.Includes(ScrollDirection.Right))
|
||||
if (Game.viewport.GetBlockedDirections().Includes(ScrollDirection.Right))
|
||||
return "scroll-r-blocked";
|
||||
else
|
||||
return "scroll-r";
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public override bool LoseFocus (MouseInput mi)
|
||||
{
|
||||
Keyboard = ScrollDirection.None;
|
||||
return base.LoseFocus(mi);
|
||||
}
|
||||
|
||||
public override bool HandleKeyPressInner(KeyInput e)
|
||||
{
|
||||
switch (e.KeyName)
|
||||
{
|
||||
case "up": Keyboard = Keyboard.Set(ScrollDirection.Up, (e.Event == KeyInputEvent.Down)); return true;
|
||||
case "down": Keyboard = Keyboard.Set(ScrollDirection.Down, (e.Event == KeyInputEvent.Down)); return true;
|
||||
case "left": Keyboard = Keyboard.Set(ScrollDirection.Left, (e.Event == KeyInputEvent.Down)); return true;
|
||||
case "right": Keyboard = Keyboard.Set(ScrollDirection.Right, (e.Event == KeyInputEvent.Down)); return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Tick(World world)
|
||||
{
|
||||
Edge = ScrollDirection.None;
|
||||
if (Game.Settings.Game.ViewportEdgeScroll && Game.HasInputFocus)
|
||||
{
|
||||
// Check for edge-scroll
|
||||
if (Viewport.LastMousePos.X < EdgeScrollThreshold)
|
||||
Edge = Edge.Set(ScrollDirection.Left, true);
|
||||
if (Viewport.LastMousePos.Y < EdgeScrollThreshold)
|
||||
Edge = Edge.Set(ScrollDirection.Up, true);
|
||||
if (Viewport.LastMousePos.X >= Game.viewport.Width - EdgeScrollThreshold)
|
||||
Edge = Edge.Set(ScrollDirection.Right, true);
|
||||
if (Viewport.LastMousePos.Y >= Game.viewport.Height - EdgeScrollThreshold)
|
||||
Edge = Edge.Set(ScrollDirection.Down, true);
|
||||
}
|
||||
|
||||
if(Keyboard != ScrollDirection.None || Edge != ScrollDirection.None)
|
||||
{
|
||||
var scroll = new float2(0,0);
|
||||
if (Keyboard.Includes(ScrollDirection.Up) || Edge.Includes(ScrollDirection.Up))
|
||||
scroll += new float2(0, -10);
|
||||
if (Keyboard.Includes(ScrollDirection.Right) || Edge.Includes(ScrollDirection.Right))
|
||||
scroll += new float2(10, 0);
|
||||
if (Keyboard.Includes(ScrollDirection.Down) || Edge.Includes(ScrollDirection.Down))
|
||||
scroll += new float2(0, 10);
|
||||
if (Keyboard.Includes(ScrollDirection.Left) || Edge.Includes(ScrollDirection.Left))
|
||||
scroll += new float2(-10, 0);
|
||||
|
||||
Game.viewport.Scroll(scroll);
|
||||
}
|
||||
}
|
||||
|
||||
public override Widget Clone() { return new ViewportScrollControllerWidget(this); }
|
||||
}
|
||||
|
||||
public static class ViewportExts
|
||||
{
|
||||
public static bool Includes(this ScrollDirection d, ScrollDirection s)
|
||||
{
|
||||
return (d & s) == s;
|
||||
}
|
||||
|
||||
public static ScrollDirection Set(this ScrollDirection d, ScrollDirection s, bool val)
|
||||
{
|
||||
return (d.Includes(s) != val) ? d ^ s : d;
|
||||
}
|
||||
}
|
||||
}
|
||||
Game.viewport.Scroll((Viewport.LastMousePos - mi.Location) * InverseScroll);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override string GetCursor(int2 pos)
|
||||
{
|
||||
if (!Game.Settings.Game.ViewportEdgeScroll)
|
||||
return null;
|
||||
|
||||
if (Edge.Includes(ScrollDirection.Up) && Edge.Includes(ScrollDirection.Left)){
|
||||
ScrollDirection BlockedDirections = Game.viewport.GetBlockedDirections();
|
||||
if(BlockedDirections.Includes(ScrollDirection.Up) && BlockedDirections.Includes(ScrollDirection.Left))
|
||||
return "scroll-tl-blocked";
|
||||
else
|
||||
return "scroll-tl";
|
||||
}
|
||||
if (Edge.Includes(ScrollDirection.Up) && Edge.Includes(ScrollDirection.Right)){
|
||||
ScrollDirection BlockedDirections = Game.viewport.GetBlockedDirections();
|
||||
if (BlockedDirections.Includes(ScrollDirection.Up) && BlockedDirections.Includes(ScrollDirection.Right))
|
||||
return "scroll-tr-blocked";
|
||||
else
|
||||
return "scroll-tr";
|
||||
}
|
||||
if (Edge.Includes(ScrollDirection.Down) && Edge.Includes(ScrollDirection.Left)){
|
||||
ScrollDirection BlockedDirections = Game.viewport.GetBlockedDirections();
|
||||
if (BlockedDirections.Includes(ScrollDirection.Down) && BlockedDirections.Includes(ScrollDirection.Left))
|
||||
return "scroll-bl-blocked";
|
||||
else
|
||||
return "scroll-bl";
|
||||
}
|
||||
if (Edge.Includes(ScrollDirection.Down) && Edge.Includes(ScrollDirection.Right)){
|
||||
ScrollDirection BlockedDirections = Game.viewport.GetBlockedDirections();
|
||||
if (BlockedDirections.Includes(ScrollDirection.Down) && BlockedDirections.Includes(ScrollDirection.Right))
|
||||
return "scroll-br-blocked";
|
||||
else
|
||||
return "scroll-br";
|
||||
}
|
||||
|
||||
if (Edge.Includes(ScrollDirection.Up))
|
||||
if (Game.viewport.GetBlockedDirections().Includes(ScrollDirection.Up))
|
||||
return "scroll-t-blocked";
|
||||
else
|
||||
return "scroll-t";
|
||||
if (Edge.Includes(ScrollDirection.Down))
|
||||
if (Game.viewport.GetBlockedDirections().Includes(ScrollDirection.Down))
|
||||
return "scroll-b-blocked";
|
||||
else
|
||||
return "scroll-b";
|
||||
if (Edge.Includes(ScrollDirection.Left))
|
||||
if (Game.viewport.GetBlockedDirections().Includes(ScrollDirection.Left))
|
||||
return "scroll-l-blocked";
|
||||
else
|
||||
return "scroll-l";
|
||||
if (Edge.Includes(ScrollDirection.Right))
|
||||
if (Game.viewport.GetBlockedDirections().Includes(ScrollDirection.Right))
|
||||
return "scroll-r-blocked";
|
||||
else
|
||||
return "scroll-r";
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public override bool LoseFocus (MouseInput mi)
|
||||
{
|
||||
Keyboard = ScrollDirection.None;
|
||||
return base.LoseFocus(mi);
|
||||
}
|
||||
|
||||
public override bool HandleKeyPressInner(KeyInput e)
|
||||
{
|
||||
switch (e.KeyName)
|
||||
{
|
||||
case "up": Keyboard = Keyboard.Set(ScrollDirection.Up, (e.Event == KeyInputEvent.Down)); return true;
|
||||
case "down": Keyboard = Keyboard.Set(ScrollDirection.Down, (e.Event == KeyInputEvent.Down)); return true;
|
||||
case "left": Keyboard = Keyboard.Set(ScrollDirection.Left, (e.Event == KeyInputEvent.Down)); return true;
|
||||
case "right": Keyboard = Keyboard.Set(ScrollDirection.Right, (e.Event == KeyInputEvent.Down)); return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Tick(World world)
|
||||
{
|
||||
Edge = ScrollDirection.None;
|
||||
if (Game.Settings.Game.ViewportEdgeScroll && Game.HasInputFocus)
|
||||
{
|
||||
// Check for edge-scroll
|
||||
if (Viewport.LastMousePos.X < EdgeScrollThreshold)
|
||||
Edge = Edge.Set(ScrollDirection.Left, true);
|
||||
if (Viewport.LastMousePos.Y < EdgeScrollThreshold)
|
||||
Edge = Edge.Set(ScrollDirection.Up, true);
|
||||
if (Viewport.LastMousePos.X >= Game.viewport.Width - EdgeScrollThreshold)
|
||||
Edge = Edge.Set(ScrollDirection.Right, true);
|
||||
if (Viewport.LastMousePos.Y >= Game.viewport.Height - EdgeScrollThreshold)
|
||||
Edge = Edge.Set(ScrollDirection.Down, true);
|
||||
}
|
||||
|
||||
if(Keyboard != ScrollDirection.None || Edge != ScrollDirection.None)
|
||||
{
|
||||
var scroll = new float2(0, 0);
|
||||
|
||||
// Modified to use the ViewportEdgeScrollStep setting - Gecko
|
||||
if (Keyboard.Includes(ScrollDirection.Up) || Edge.Includes(ScrollDirection.Up))
|
||||
scroll += new float2(0, -(Game.Settings.Game.ViewportEdgeScrollStep * 100));
|
||||
if (Keyboard.Includes(ScrollDirection.Right) || Edge.Includes(ScrollDirection.Right))
|
||||
scroll += new float2((Game.Settings.Game.ViewportEdgeScrollStep * 100), 0);
|
||||
if (Keyboard.Includes(ScrollDirection.Down) || Edge.Includes(ScrollDirection.Down))
|
||||
scroll += new float2(0, (Game.Settings.Game.ViewportEdgeScrollStep * 100));
|
||||
if (Keyboard.Includes(ScrollDirection.Left) || Edge.Includes(ScrollDirection.Left))
|
||||
scroll += new float2(-(Game.Settings.Game.ViewportEdgeScrollStep * 100), 0);
|
||||
|
||||
Game.viewport.Scroll(scroll);
|
||||
}
|
||||
}
|
||||
|
||||
public override Widget Clone() { return new ViewportScrollControllerWidget(this); }
|
||||
}
|
||||
|
||||
public static class ViewportExts
|
||||
{
|
||||
public static bool Includes(this ScrollDirection d, ScrollDirection s)
|
||||
{
|
||||
return (d & s) == s;
|
||||
}
|
||||
|
||||
public static ScrollDirection Set(this ScrollDirection d, ScrollDirection s, bool val)
|
||||
{
|
||||
return (d.Includes(s) != val) ? d ^ s : d;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,6 @@ namespace OpenRA
|
||||
readonly World world;
|
||||
|
||||
public readonly Cache<Player, OwnedByCachedView> OwnedBy;
|
||||
readonly TypeDictionary hasTrait = new TypeDictionary();
|
||||
|
||||
public AllQueries( World world )
|
||||
{
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
#endregion
|
||||
|
||||
using System.Linq;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Traits.Activities;
|
||||
using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
using System.Linq;
|
||||
using OpenRA.Traits;
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using System.Linq;
|
||||
using OpenRA.Traits;
|
||||
using XRandom = OpenRA.Thirdparty.Random;
|
||||
|
||||
|
||||
@@ -86,11 +95,18 @@ namespace OpenRA.Mods.RA
|
||||
return buildableThings.ElementAtOrDefault(random.Next(buildableThings.Count()));
|
||||
}
|
||||
|
||||
bool HasAdequatePower()
|
||||
{
|
||||
/* note: CNC `fact` provides a small amount of power. don't get jammed because of that. */
|
||||
return playerPower.PowerProvided > 50 &&
|
||||
playerPower.PowerProvided > playerPower.PowerDrained * 1.2;
|
||||
}
|
||||
|
||||
ActorInfo ChooseBuildingToBuild(ProductionQueue queue)
|
||||
{
|
||||
var buildableThings = queue.BuildableItems();
|
||||
|
||||
if (playerPower.PowerProvided <= playerPower.PowerDrained * 1.2) /* try to maintain 20% excess power */
|
||||
if (!HasAdequatePower()) /* try to maintain 20% excess power */
|
||||
{
|
||||
/* find the best thing we can build which produces power */
|
||||
var best = buildableThings.Where(a => GetPowerProvidedBy(a) > 0)
|
||||
|
||||
@@ -110,8 +110,8 @@ namespace OpenRA.Mods.RA
|
||||
}
|
||||
|
||||
var underCursor = world.FindUnitsAtMouse(mi.Location)
|
||||
//.Where(a => a.Info.Traits.Contains<SelectableInfo>())
|
||||
.OrderByDescending(a => a.Info.Traits.Contains<SelectableInfo>() ? a.Info.Traits.Get<SelectableInfo>().Priority : int.MinValue)
|
||||
.OrderByDescending(a => a.Info.Traits.Contains<SelectableInfo>()
|
||||
? a.Info.Traits.Get<SelectableInfo>().Priority : int.MinValue)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (mi.Button == MouseButton.Right && underCursor == null)
|
||||
@@ -120,13 +120,16 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public void Tick(World world)
|
||||
{
|
||||
if (minelayer.IsDead() || !minelayer.IsInWorld)
|
||||
if (!minelayer.IsInWorld || minelayer.IsDead())
|
||||
world.CancelInputMode();
|
||||
}
|
||||
|
||||
int2 lastMousePos;
|
||||
public void RenderAfterWorld(World world)
|
||||
{
|
||||
if (!minelayer.IsInWorld)
|
||||
return;
|
||||
|
||||
var ml = minelayer.Trait<Minelayer>();
|
||||
var movement = minelayer.Trait<IMove>();
|
||||
var minefield = GetMinefieldCells(ml.minefieldStart, lastMousePos, minelayer.Info.Traits.Get<MinelayerInfo>().MinefieldDepth)
|
||||
|
||||
@@ -77,7 +77,6 @@ namespace OpenRA.Mods.RA.Render
|
||||
|
||||
public void PlayCustomAnimBackwards(Actor self, string name, Action a)
|
||||
{
|
||||
var hasSequence = anim.HasSequence(NormalizeSequence(self, name));
|
||||
anim.PlayBackwardsThen(NormalizeSequence(self, name),
|
||||
() => { anim.PlayRepeating(NormalizeSequence(self, "idle")); a(); });
|
||||
}
|
||||
|
||||
@@ -6,11 +6,8 @@
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Drawing;
|
||||
using OpenRA.Graphics;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
|
||||
@@ -6,6 +6,39 @@ Background@MAINMENU_BG:
|
||||
Height:290
|
||||
Delegate:MainMenuButtonsDelegate
|
||||
Children:
|
||||
Background@MOTD_BG:
|
||||
Id:MOTD_BG
|
||||
X:0 - PARENT_LEFT + WINDOW_RIGHT/3
|
||||
Y:0 - PARENT_TOP + 44
|
||||
Width:WINDOW_RIGHT/3
|
||||
Height:30
|
||||
Background:dialog4
|
||||
Children:
|
||||
ScrollingText@MOTD_SCROLLER:
|
||||
Id:MOTD_SCROLLER
|
||||
X:15
|
||||
Y:2
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:25
|
||||
ScrollRate:8
|
||||
Text:This is a super duper huge long Scrolling Test
|
||||
Background@MOTD_LABEL_BG
|
||||
Id:MOTD_LABEL_BG
|
||||
X:0 - PARENT_LEFT + (WINDOW_RIGHT/16)*7
|
||||
Y:0 - PARENT_TOP + 15
|
||||
Width:(WINDOW_RIGHT/16)*2
|
||||
Height:30
|
||||
Background:dialog4
|
||||
Children:
|
||||
Label@MOTD_LABEL
|
||||
Id:MOTD_LABEL
|
||||
X:0
|
||||
Y:2
|
||||
Width:(WINDOW_RIGHT/16)*2
|
||||
Height:25
|
||||
Text:Message of the Day
|
||||
Align:Center
|
||||
Bold:True
|
||||
Label@MAINMENU_LABEL_TITLE:
|
||||
Id:MAINMENU_LABEL_TITLE
|
||||
X:0
|
||||
@@ -67,9 +100,9 @@ Background@MAINMENU_BG:
|
||||
Label@VERSION_STRING:
|
||||
Id:VERSION_STRING
|
||||
X:WINDOW_RIGHT - PARENT_LEFT - WIDTH - 15
|
||||
Y:WINDOW_BOTTOM - PARENT_TOP - 25
|
||||
Y:WINDOW_BOTTOM - PARENT_TOP - 65
|
||||
Width:400
|
||||
Height:35
|
||||
Height:70
|
||||
Text:
|
||||
Align:Right
|
||||
Bold:True
|
||||
|
||||
@@ -141,10 +141,16 @@ Background@JOINSERVER_BG:
|
||||
Height:PARENT_BOTTOM
|
||||
Visible:false
|
||||
Children:
|
||||
MapPreview@MAP_PREVIEW:
|
||||
Id:MAP_PREVIEW
|
||||
X:PARENT_RIGHT-241
|
||||
Y:30
|
||||
Width:192
|
||||
Height:192
|
||||
Label@SERVER_IP_LABEL:
|
||||
Id:SERVER_IP_LABEL
|
||||
X:PARENT_RIGHT - 200 - WIDTH
|
||||
Y:50
|
||||
Y:230
|
||||
Align:Right
|
||||
Width:70
|
||||
Height:20
|
||||
@@ -153,46 +159,14 @@ Background@JOINSERVER_BG:
|
||||
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
|
||||
Y:230
|
||||
Align:Left
|
||||
Width:70
|
||||
Height:20
|
||||
Label@MAP_PLAYERS_LABEL:
|
||||
Id:MAP_PLAYERS_LABEL
|
||||
X:PARENT_RIGHT - 200 - WIDTH
|
||||
Y:110
|
||||
Y:250
|
||||
Align:Right
|
||||
Width:70
|
||||
Height:20
|
||||
@@ -201,16 +175,43 @@ Background@JOINSERVER_BG:
|
||||
Label@MAP_PLAYERS:
|
||||
Id:MAP_PLAYERS
|
||||
X:PARENT_RIGHT - 195
|
||||
Y:110
|
||||
Y:250
|
||||
Align:Left
|
||||
Width:70
|
||||
Height:20
|
||||
MapPreview@MAP_PREVIEW:
|
||||
Id:MAP_PREVIEW
|
||||
X:PARENT_RIGHT-241
|
||||
Y:140
|
||||
Width:192
|
||||
Height:192
|
||||
Label@MAP_TITLE_LABEL:
|
||||
Id:MAP_TITLE_LABEL
|
||||
X:PARENT_RIGHT - 200 - WIDTH
|
||||
Y:270
|
||||
Align:Right
|
||||
Width:70
|
||||
Height:20
|
||||
Text:Map:
|
||||
Bold:True
|
||||
Label@MAP_TITLE:
|
||||
Id:MAP_TITLE
|
||||
X:PARENT_RIGHT - 195
|
||||
Y:270
|
||||
Align:Left
|
||||
Width:70
|
||||
Height:20
|
||||
Label@SERVER_MODS_LABEL:
|
||||
Id:SERVER_MODS_LABEL
|
||||
X:PARENT_RIGHT - 200 - WIDTH
|
||||
Y:290
|
||||
Align:Right
|
||||
Width:70
|
||||
Height:20
|
||||
Text:Mods:
|
||||
Bold:True
|
||||
Label@SERVER_MODS:
|
||||
Id:SERVER_MODS
|
||||
X:PARENT_RIGHT - 195
|
||||
Y:293
|
||||
Align:Left
|
||||
VAlign:Top
|
||||
Width:70
|
||||
Height:20
|
||||
Button@DIRECTCONNECT_BUTTON:
|
||||
Id:DIRECTCONNECT_BUTTON
|
||||
X:20
|
||||
@@ -245,7 +246,7 @@ Background@JOINSERVER_BG:
|
||||
Bold:True
|
||||
Background@DIRECTCONNECT_BG:
|
||||
Id:DIRECTCONNECT_BG
|
||||
Delegate:ServerBrowserDelegate
|
||||
Delegate:DirectConnectDelegate
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:400
|
||||
|
||||
@@ -90,10 +90,22 @@ Background@SETTINGS_MENU:
|
||||
Width:200
|
||||
Height:20
|
||||
Text: Enable Edge Scrolling
|
||||
Label@EDGE_SCROLL_AMOUNT_LABEL:
|
||||
Id:EDGE_SCROLL_AMOUNT_LABEL
|
||||
X:0
|
||||
Y:70
|
||||
Text: Scroll Speed
|
||||
Slider@EDGE_SCROLL_AMOUNT:
|
||||
Id:EDGE_SCROLL_AMOUNT
|
||||
X:130
|
||||
Y:60
|
||||
Width:250
|
||||
Height:20
|
||||
Ticks:5
|
||||
Checkbox@INVERSE_SCROLL:
|
||||
Id:INVERSE_SCROLL
|
||||
X:0
|
||||
Y:60
|
||||
Y:120
|
||||
Width:200
|
||||
Height:20
|
||||
Text: Invert Mouse Drag Scrolling
|
||||
|
||||
BIN
mods/cnc/maps/llamas/map.bin
Normal file
BIN
mods/cnc/maps/llamas/map.bin
Normal file
Binary file not shown.
1
mods/cnc/maps/llamas/map.uid
Normal file
1
mods/cnc/maps/llamas/map.uid
Normal file
@@ -0,0 +1 @@
|
||||
af0c7a28823e0d4fe319c730dbbeaae471afedb5
|
||||
75
mods/cnc/maps/llamas/map.yaml
Normal file
75
mods/cnc/maps/llamas/map.yaml
Normal file
@@ -0,0 +1,75 @@
|
||||
Selectable: True
|
||||
|
||||
MapFormat: 3
|
||||
|
||||
Title: Llamas
|
||||
|
||||
Author: Chris Forbes
|
||||
|
||||
PlayerCount: 4
|
||||
|
||||
Tileset: WINTER
|
||||
|
||||
MapSize: 72,72
|
||||
|
||||
TopLeft: 6,4
|
||||
|
||||
BottomRight: 68,64
|
||||
|
||||
Players:
|
||||
PlayerReference@Neutral:
|
||||
Name: Neutral
|
||||
Palette:
|
||||
Race: gdi
|
||||
OwnsWorld: True
|
||||
NonCombatant: True
|
||||
Playable: False
|
||||
DefaultStartingUnits: False
|
||||
Color: 255,238,238,238
|
||||
Color2: 255,44,28,24
|
||||
InitialCash: 0
|
||||
Allies:
|
||||
Enemies:
|
||||
|
||||
Actors:
|
||||
Actor0: split2
|
||||
Location: 17,33
|
||||
Owner: Neutral
|
||||
Actor1: split2
|
||||
Location: 55,34
|
||||
Owner: Neutral
|
||||
Actor2: split2
|
||||
Location: 12,55
|
||||
Owner: Neutral
|
||||
Actor3: split2
|
||||
Location: 61,55
|
||||
Owner: Neutral
|
||||
Actor4: split2
|
||||
Location: 12,10
|
||||
Owner: Neutral
|
||||
Actor5: split2
|
||||
Location: 61,10
|
||||
Owner: Neutral
|
||||
Actor6: split2
|
||||
Location: 37,22
|
||||
Owner: Neutral
|
||||
Actor7: split2
|
||||
Location: 36,23
|
||||
Owner: Neutral
|
||||
Actor8: split2
|
||||
Location: 36,44
|
||||
Owner: Neutral
|
||||
Actor9: split2
|
||||
Location: 37,43
|
||||
Owner: Neutral
|
||||
|
||||
Waypoints:
|
||||
wp0: 30,57
|
||||
wp1: 42,57
|
||||
wp2: 30,11
|
||||
wp3: 42,11
|
||||
|
||||
Smudges:
|
||||
|
||||
Rules:
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Classic Command and Conquer -- Package Manifest
|
||||
Metadata:
|
||||
Title: C&C
|
||||
Description: OpenRA Reimagining of the classic game
|
||||
Version: a0001
|
||||
|
||||
Folders:
|
||||
.
|
||||
|
||||
@@ -135,7 +135,7 @@ FTNK:
|
||||
ROT: 5
|
||||
Speed: 9
|
||||
Health:
|
||||
HP: 300
|
||||
HP: 350
|
||||
Armor:
|
||||
Type: Heavy
|
||||
RevealsShroud:
|
||||
@@ -182,7 +182,7 @@ BGGY:
|
||||
BIKE:
|
||||
Inherits: ^Vehicle
|
||||
Valued:
|
||||
Cost: 450
|
||||
Cost: 400
|
||||
Tooltip:
|
||||
Name: Recon Bike
|
||||
Icon: bikeicnh
|
||||
@@ -195,16 +195,14 @@ BIKE:
|
||||
ROT: 10
|
||||
Speed: 20
|
||||
Health:
|
||||
HP: 160
|
||||
HP: 120
|
||||
Armor: none
|
||||
RevealsShroud:
|
||||
Range: 7
|
||||
AttackBase:
|
||||
PrimaryWeapon: Rockets
|
||||
PrimaryWeapon: Rockets.Bike
|
||||
PrimaryOffset: 0,0,0,-2
|
||||
PrimaryLocalOffset: -4,0,25
|
||||
SecondaryWeapon: Rockets
|
||||
SecondaryLocalOffset: 4,0,-25
|
||||
PrimaryLocalOffset: -4,0,25,4,0,-25
|
||||
RenderUnit:
|
||||
AutoTarget:
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ Rockets:
|
||||
ROT: 5
|
||||
Trail: smokey
|
||||
Speed: 25
|
||||
RangeLimit: 20
|
||||
RangeLimit: 40
|
||||
Warhead:
|
||||
Spread: 3
|
||||
Versus:
|
||||
@@ -171,6 +171,37 @@ Rockets:
|
||||
ImpactSound: xplos
|
||||
SmudgeType: Crater
|
||||
Damage: 30
|
||||
|
||||
Rockets.Bike:
|
||||
ROF: 60
|
||||
Range: 7
|
||||
Report: BAZOOK1
|
||||
ValidTargets: Ground, Air
|
||||
Burst: 2
|
||||
BurstDelay: 0
|
||||
Projectile: Missile
|
||||
Arm: 5
|
||||
High: yes
|
||||
Shadow: no
|
||||
Proximity: yes
|
||||
Inaccuracy: 3
|
||||
Image: DRAGON
|
||||
ROT: 5
|
||||
Trail: smokey
|
||||
Speed: 25
|
||||
RangeLimit: 40
|
||||
Warhead:
|
||||
Spread: 3
|
||||
Versus:
|
||||
None: 30%
|
||||
Wood: 30%
|
||||
Light: 75%
|
||||
Concrete: 30%
|
||||
InfDeath: 3
|
||||
Explosion: 4
|
||||
ImpactSound: xplos
|
||||
SmudgeType: Crater
|
||||
Damage: 15
|
||||
|
||||
Rockets.Orca:
|
||||
ROF: 150
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Default Game Mod
|
||||
Metadata:
|
||||
Title: Default Mod Template
|
||||
Description: Minimal template for creating a base mod
|
||||
Version: a0001
|
||||
|
||||
Folders:
|
||||
.
|
||||
|
||||
@@ -6,6 +6,39 @@ Background@MAINMENU_BG:
|
||||
Height:290
|
||||
Delegate:MainMenuButtonsDelegate
|
||||
Children:
|
||||
Background@MOTD_BG:
|
||||
Id:MOTD_BG
|
||||
X:0 - PARENT_LEFT + WINDOW_RIGHT/3
|
||||
Y:0 - PARENT_TOP + 44
|
||||
Width:WINDOW_RIGHT/3
|
||||
Height:30
|
||||
Background:dialog4
|
||||
Children:
|
||||
ScrollingText@MOTD_SCROLLER:
|
||||
Id:MOTD_SCROLLER
|
||||
X:15
|
||||
Y:2
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:25
|
||||
ScrollRate:8
|
||||
Text:Welcome to OpenRA. Enjoy your stay.
|
||||
Background@MOTD_LABEL_BG
|
||||
Id:MOTD_LABEL_BG
|
||||
X:0 - PARENT_LEFT + (WINDOW_RIGHT/16)*7
|
||||
Y:0 - PARENT_TOP + 15
|
||||
Width:(WINDOW_RIGHT/16)*2
|
||||
Height:30
|
||||
Background:dialog4
|
||||
Children:
|
||||
Label@MOTD_LABEL
|
||||
Id:MOTD_LABEL
|
||||
X:0
|
||||
Y:2
|
||||
Width:(WINDOW_RIGHT/16)*2
|
||||
Height:25
|
||||
Text:Message of the Day
|
||||
Align:Center
|
||||
Bold:True
|
||||
Label@MAINMENU_LABEL_TITLE:
|
||||
Id:MAINMENU_LABEL_TITLE
|
||||
X:0
|
||||
@@ -67,9 +100,9 @@ Background@MAINMENU_BG:
|
||||
Label@VERSION_STRING:
|
||||
Id:VERSION_STRING
|
||||
X:WINDOW_RIGHT - PARENT_LEFT - WIDTH - 15
|
||||
Y:WINDOW_BOTTOM - PARENT_TOP - 25
|
||||
Y:WINDOW_BOTTOM - PARENT_TOP - 65
|
||||
Width:400
|
||||
Height:35
|
||||
Height:70
|
||||
Text:
|
||||
Align:Right
|
||||
Bold:True
|
||||
|
||||
@@ -5,7 +5,6 @@ Background@CREATESERVER_BG:
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:400
|
||||
Height:240
|
||||
Visible:true
|
||||
Children:
|
||||
Label@LABEL_TITLE:
|
||||
Id:LABEL_TITLE
|
||||
@@ -100,7 +99,6 @@ Background@JOINSERVER_BG:
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:700
|
||||
Height:410
|
||||
Visible:true
|
||||
Children:
|
||||
Label@JOINSERVER_LABEL_TITLE:
|
||||
Id:JOINSERVER_LABEL_TITLE
|
||||
@@ -143,10 +141,16 @@ Background@JOINSERVER_BG:
|
||||
Height:PARENT_BOTTOM
|
||||
Visible:false
|
||||
Children:
|
||||
MapPreview@MAP_PREVIEW:
|
||||
Id:MAP_PREVIEW
|
||||
X:PARENT_RIGHT-241
|
||||
Y:30
|
||||
Width:192
|
||||
Height:192
|
||||
Label@SERVER_IP_LABEL:
|
||||
Id:SERVER_IP_LABEL
|
||||
X:PARENT_RIGHT - 200 - WIDTH
|
||||
Y:50
|
||||
Y:230
|
||||
Align:Right
|
||||
Width:70
|
||||
Height:20
|
||||
@@ -155,46 +159,14 @@ Background@JOINSERVER_BG:
|
||||
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
|
||||
Y:230
|
||||
Align:Left
|
||||
Width:70
|
||||
Height:20
|
||||
Label@MAP_PLAYERS_LABEL:
|
||||
Id:MAP_PLAYERS_LABEL
|
||||
X:PARENT_RIGHT - 200 - WIDTH
|
||||
Y:110
|
||||
Y:250
|
||||
Align:Right
|
||||
Width:70
|
||||
Height:20
|
||||
@@ -203,16 +175,43 @@ Background@JOINSERVER_BG:
|
||||
Label@MAP_PLAYERS:
|
||||
Id:MAP_PLAYERS
|
||||
X:PARENT_RIGHT - 195
|
||||
Y:110
|
||||
Y:250
|
||||
Align:Left
|
||||
Width:70
|
||||
Height:20
|
||||
MapPreview@MAP_PREVIEW:
|
||||
Id:MAP_PREVIEW
|
||||
X:PARENT_RIGHT-241
|
||||
Y:140
|
||||
Width:192
|
||||
Height:192
|
||||
Label@MAP_TITLE_LABEL:
|
||||
Id:MAP_TITLE_LABEL
|
||||
X:PARENT_RIGHT - 200 - WIDTH
|
||||
Y:270
|
||||
Align:Right
|
||||
Width:70
|
||||
Height:20
|
||||
Text:Map:
|
||||
Bold:True
|
||||
Label@MAP_TITLE:
|
||||
Id:MAP_TITLE
|
||||
X:PARENT_RIGHT - 195
|
||||
Y:270
|
||||
Align:Left
|
||||
Width:70
|
||||
Height:20
|
||||
Label@SERVER_MODS_LABEL:
|
||||
Id:SERVER_MODS_LABEL
|
||||
X:PARENT_RIGHT - 200 - WIDTH
|
||||
Y:290
|
||||
Align:Right
|
||||
Width:70
|
||||
Height:20
|
||||
Text:Mods:
|
||||
Bold:True
|
||||
Label@SERVER_MODS:
|
||||
Id:SERVER_MODS
|
||||
X:PARENT_RIGHT - 195
|
||||
Y:293
|
||||
Align:Left
|
||||
VAlign:Top
|
||||
Width:70
|
||||
Height:20
|
||||
Button@DIRECTCONNECT_BUTTON:
|
||||
Id:DIRECTCONNECT_BUTTON
|
||||
X:20
|
||||
@@ -252,7 +251,6 @@ Background@DIRECTCONNECT_BG:
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:400
|
||||
Height:155
|
||||
Visible:true
|
||||
Children:
|
||||
Label@DIRECTCONNECT_LABEL_TITLE:
|
||||
Id:DIRECTCONNECT_LABEL_TITLE
|
||||
@@ -301,7 +299,6 @@ Background@CONNECTION_FAILED_BG:
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:450
|
||||
Height:150
|
||||
Visible:true
|
||||
Children:
|
||||
Label@CONNECTION_FAILED_TITLE:
|
||||
Id:CONNECTION_FAILED_TITLE
|
||||
@@ -343,7 +340,6 @@ Background@CONNECTING_BG:
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:450
|
||||
Height:150
|
||||
Visible:true
|
||||
Children:
|
||||
Label@CONNECTING_TITLE:
|
||||
Id:CONNECTING_TITLE
|
||||
@@ -369,4 +365,4 @@ Background@CONNECTING_BG:
|
||||
Width:160
|
||||
Height:25
|
||||
Text:Abort
|
||||
Bold:True
|
||||
Bold:True
|
||||
@@ -91,10 +91,22 @@ Background@SETTINGS_MENU:
|
||||
Width:200
|
||||
Height:20
|
||||
Text: Enable Edge Scrolling
|
||||
Label@EDGE_SCROLL_AMOUNT_LABEL:
|
||||
Id:EDGE_SCROLL_AMOUNT_LABEL
|
||||
X:0
|
||||
Y:70
|
||||
Text: Scroll Speed
|
||||
Slider@EDGE_SCROLL_AMOUNT:
|
||||
Id:EDGE_SCROLL_AMOUNT
|
||||
X:130
|
||||
Y:60
|
||||
Width:250
|
||||
Height:20
|
||||
Ticks:5
|
||||
Checkbox@INVERSE_SCROLL:
|
||||
Id:INVERSE_SCROLL
|
||||
X:0
|
||||
Y:60
|
||||
Y:120
|
||||
Width:200
|
||||
Height:20
|
||||
Text: Invert Mouse Drag Scrolling
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Classic Red Alert Mod -- Package Manifest
|
||||
Metadata:
|
||||
Title: Red Alert
|
||||
Description: OpenRA Reimagining of the classic game
|
||||
Version: a0001
|
||||
|
||||
Folders:
|
||||
.
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# RA Performance Tests -- Package Manifest
|
||||
Metadata:
|
||||
Title: RA Perf
|
||||
Description: Performance Test map pack
|
||||
Version: a0001
|
||||
|
||||
Folders:
|
||||
./mods/ra_perf
|
||||
|
||||
@@ -4,7 +4,7 @@ Architecture: i386
|
||||
Maintainer: Matthew Bowra-Dean <matthew@ijw.co.nz>
|
||||
Uploaders: Maikel van den Hout <ma1kelvdh@gmail.com>
|
||||
Installed-Size: 8306
|
||||
Depends: nvidia-cg-toolkit (>= 2.2), libopenal1, mono-runtime, libmono-winforms2.0-cil, libfreetype6, libsdl1.2debian, libgl1-mesa-glx, libgl1-mesa-dri, zenity, wget, unzip
|
||||
Depends: nvidia-cg-toolkit (>= 2.1), libopenal1, mono-runtime, libmono-winforms2.0-cil, libfreetype6, libsdl1.2debian, libgl1-mesa-glx, libgl1-mesa-dri, zenity, wget, unzip
|
||||
Section: games
|
||||
Priority: extra
|
||||
Homepage: http://www.open-ra.org/
|
||||
|
||||
@@ -23,7 +23,7 @@ fi
|
||||
cp -rv template.app OpenRA.app
|
||||
|
||||
for i in $FILES; do
|
||||
cp -Rv "$1$i" "OpenRA.app/Contents/Resources/$i" || exit 3
|
||||
cp -Rv "$1/$i" "OpenRA.app/Contents/Resources/$i" || exit 3
|
||||
done
|
||||
|
||||
# Delete excluded files
|
||||
|
||||
@@ -10,13 +10,14 @@ TAG=$1
|
||||
TYPE=`echo $TAG | grep -o "^[a-z]\\+"`
|
||||
VERSION=`echo $TAG | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
||||
|
||||
FTPSERVER=openra.res0l.net
|
||||
|
||||
case "$TYPE" in
|
||||
"release")
|
||||
FTPPATH="httpdocs/releases"
|
||||
FTPPATH="openra.res0l.net/releases"
|
||||
;;
|
||||
"playtest")
|
||||
FTPPATH="httpdocs/playtests"
|
||||
FTPPATH="openra.res0l.net/playtests"
|
||||
;;
|
||||
*)
|
||||
msg "\E[31m" "Unrecognized tag prefix $TYPE"
|
||||
@@ -33,7 +34,7 @@ esac
|
||||
mv OpenRA.exe OpenRA-$VERSION.exe
|
||||
../uploader.sh windows "$VERSION" OpenRA-$VERSION.exe "$FTPPATH" "$2" "$3"
|
||||
else
|
||||
msg "\E[31m" "Windows package build failed, refer to log."
|
||||
msg "\E[31m" "Windows package build failed, refer to $PWD/package.log."
|
||||
fi
|
||||
popd &> /dev/null
|
||||
) &
|
||||
@@ -46,7 +47,7 @@ esac
|
||||
if [ $? -eq 0 ]; then
|
||||
../uploader.sh mac "$VERSION" OpenRA-$VERSION.zip "$FTPPATH" "$2" "$3"
|
||||
else
|
||||
msg "\E[31m" "OSX package build failed, refer to log."
|
||||
msg "\E[31m" "OSX package build failed, refer to $PWD/package.log."
|
||||
fi
|
||||
popd &> /dev/null
|
||||
) &
|
||||
@@ -82,9 +83,9 @@ esac
|
||||
#Arch-Linux
|
||||
msg "\E[34m" "Building Arch-Linux package."
|
||||
pushd linux/pkgbuild/ &> /dev/null
|
||||
sh buildpackage.sh "ftp.open-ra.org" "$FTPPATH/linux" "$2" "$3" "$VERSION" &> package.log
|
||||
sh buildpackage.sh "$FTPSERVER" "$FTPPATH/linux" "$2" "$3" "$VERSION" &> package.log
|
||||
if [ $? -ne 0 ]; then
|
||||
msg "\E[31m" "Arch-Linux package build failed, refer to log."
|
||||
msg "\E[31m" "Arch-Linux package build failed, refer to $PWD/package.log."
|
||||
fi
|
||||
popd &> /dev/null
|
||||
) &
|
||||
@@ -93,9 +94,9 @@ esac
|
||||
#RPM
|
||||
msg "\E[34m" "Building RPM package."
|
||||
pushd linux/rpm/ &> /dev/null
|
||||
sh buildpackage.sh "ftp.open-ra.org" "$FTPPATH/linux" "$2" "$3" "$VERSION" ~/rpmbuild &> package.log
|
||||
sh buildpackage.sh "$FTPSERVER" "$FTPPATH/linux" "$2" "$3" "$VERSION" ~/rpmbuild &> package.log
|
||||
if [ $? -ne 0 ]; then
|
||||
msg "\E[31m" "RPM package build failed, refer to log."
|
||||
msg "\E[31m" "RPM package build failed, refer to $PWD/package.log."
|
||||
fi
|
||||
popd &> /dev/null
|
||||
) &
|
||||
@@ -104,9 +105,9 @@ esac
|
||||
#deb
|
||||
msg "\E[34m" "Building deb package."
|
||||
pushd linux/deb/ &> /dev/null
|
||||
./buildpackage.sh "ftp.open-ra.org" "$FTPPATH/linux" "$2" "$3" "$VERSION" ~/openra-package/built ~/debpackage &> package.log
|
||||
./buildpackage.sh "$FTPSERVER" "$FTPPATH/linux" "$2" "$3" "$VERSION" ~/openra-package/built ~/debpackage &> package.log
|
||||
if [ $? -ne 0 ]; then
|
||||
msg "\E[31m" "deb package build failed, refer to log."
|
||||
msg "\E[31m" "deb package build failed, refer to $PWD/package.log."
|
||||
fi
|
||||
popd &> /dev/null
|
||||
) &
|
||||
@@ -116,3 +117,6 @@ esac
|
||||
|
||||
wait
|
||||
|
||||
if [ "$TYPE" = "release" ]; then
|
||||
wput --basename=../ -u ../VERSION ftp://$FTPSERVER/$FTPPATH/master/
|
||||
fi
|
||||
|
||||
@@ -8,7 +8,7 @@ VERSION=$2
|
||||
FILENAME=$3
|
||||
FTPPATH=$4
|
||||
|
||||
FTP="ftp://$5:$6@ftp.open-ra.org/${FTPPATH}/${PLATFORM}/"
|
||||
FTP="ftp://$5:$6@openra.res0l.net/${FTPPATH}/${PLATFORM}/"
|
||||
|
||||
if [ ! -e "${FILENAME}" ]; then
|
||||
echo "File not found: ${FILENAME}"
|
||||
@@ -16,13 +16,14 @@ if [ ! -e "${FILENAME}" ]; then
|
||||
fi
|
||||
|
||||
SIZE=`du -bh ${FILENAME} | cut -f1`B
|
||||
echo -e "{\n\t\"version\":\"${VERSION}\",\n\t\"size\":\"${SIZE}\"\n}" > /tmp/version.json
|
||||
echo `basename ${FILENAME}` > /tmp/latest.txt
|
||||
mkdir -p /tmp/${PLATFORM}/
|
||||
echo -e "{\n\t\"version\":\"${VERSION}\",\n\t\"size\":\"${SIZE}\"\n}" > /tmp/${PLATFORM}/version.json
|
||||
echo `basename ${FILENAME}` > /tmp/${PLATFORM}/latest.txt
|
||||
|
||||
pushd `dirname ${FILENAME}`
|
||||
wput -u "${FTP}" "`basename ${FILENAME}`"
|
||||
popd
|
||||
pushd /tmp/
|
||||
pushd /tmp/${PLATFORM}
|
||||
wput -u "${FTP}" version.json
|
||||
wput -u "${FTP}" latest.txt
|
||||
popd
|
||||
|
||||
@@ -48,3 +48,16 @@ technique high_quality {
|
||||
BlendFunc = int2( SrcAlpha, OneMinusSrcAlpha );
|
||||
}
|
||||
}
|
||||
|
||||
technique high_quality_cg21 {
|
||||
pass p0 {
|
||||
BlendEnable = true;
|
||||
DepthTestEnable = false;
|
||||
CullFaceEnable = false;
|
||||
VertexProgram = compile arbvp1 Simple_vp();
|
||||
FragmentProgram = compile arbfp1 Simple_fp();
|
||||
|
||||
BlendEquation = FuncAdd;
|
||||
BlendFunc = int2( SrcAlpha, OneMinusSrcAlpha );
|
||||
}
|
||||
}
|
||||
@@ -66,3 +66,15 @@ technique low_quality {
|
||||
}
|
||||
}
|
||||
|
||||
technique low_quality_cg21 {
|
||||
pass p0 {
|
||||
BlendEnable = true;
|
||||
DepthTestEnable = false;
|
||||
CullFaceEnable = false;
|
||||
VertexProgram = compile arbvp1 Simple_vp();
|
||||
FragmentProgram = compile arbfp1 Palette_fp();
|
||||
|
||||
BlendEquation = FuncAdd;
|
||||
BlendFunc = int2( SrcAlpha, OneMinusSrcAlpha );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,3 +41,17 @@ technique high_quality {
|
||||
BlendFunc = int2( SrcAlpha, OneMinusSrcAlpha );
|
||||
}
|
||||
}
|
||||
|
||||
technique high_quality_cg21 {
|
||||
pass p0 {
|
||||
BlendEnable = true;
|
||||
DepthTestEnable = false;
|
||||
//CullMode = None;
|
||||
//FillMode = Wireframe;
|
||||
VertexProgram = compile arbvp1 Simple_vp();
|
||||
FragmentProgram = compile arbfp1 Simple_fp();
|
||||
|
||||
BlendEquation = FuncAdd;
|
||||
BlendFunc = int2( SrcAlpha, OneMinusSrcAlpha );
|
||||
}
|
||||
}
|
||||
@@ -65,3 +65,16 @@ technique low_quality {
|
||||
BlendFunc = int2( SrcAlpha, OneMinusSrcAlpha );
|
||||
}
|
||||
}
|
||||
|
||||
technique low_quality_cg21 {
|
||||
pass p0 {
|
||||
BlendEnable = true;
|
||||
DepthTestEnable = false;
|
||||
CullFaceEnable = false;
|
||||
VertexProgram = compile arbvp1 Simple_vp();
|
||||
FragmentProgram = compile arbfp1 Palette_fp();
|
||||
|
||||
BlendEquation = FuncAdd;
|
||||
BlendFunc = int2( SrcAlpha, OneMinusSrcAlpha );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user