This commit is contained in:
ScottNZ
2012-07-02 13:46:28 +12:00
101 changed files with 1629 additions and 624 deletions

View File

@@ -82,6 +82,9 @@ namespace OpenRA.Editor
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabelFiller = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripStatusLabelMousePosition = new System.Windows.Forms.ToolStripStatusLabel();
this.copySelectionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
@@ -417,8 +420,11 @@ namespace OpenRA.Editor
this.resizeToolStripMenuItem,
this.showActorNamesToolStripMenuItem,
this.showGridToolStripMenuItem,
this.toolStripSeparator5,
this.fixOpenAreasToolStripMenuItem,
this.setupDefaultPlayersMenuItem});
this.setupDefaultPlayersMenuItem,
this.toolStripSeparator4,
this.copySelectionToolStripMenuItem});
this.mapToolStripMenuItem.Name = "mapToolStripMenuItem";
this.mapToolStripMenuItem.Size = new System.Drawing.Size(43, 23);
this.mapToolStripMenuItem.Text = "&Map";
@@ -507,6 +513,23 @@ namespace OpenRA.Editor
this.toolStripStatusLabelMousePosition.Size = new System.Drawing.Size(22, 17);
this.toolStripStatusLabelMousePosition.Text = "0,0";
//
// copySelectionToolStripMenuItem
//
this.copySelectionToolStripMenuItem.Name = "copySelectionToolStripMenuItem";
this.copySelectionToolStripMenuItem.Size = new System.Drawing.Size(185, 22);
this.copySelectionToolStripMenuItem.Text = "Copy Selection";
this.copySelectionToolStripMenuItem.Click += new System.EventHandler(this.copySelectionToolStripMenuItem_Click);
//
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(182, 6);
//
// toolStripSeparator5
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(182, 6);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -520,9 +543,9 @@ namespace OpenRA.Editor
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "OpenRA Editor";
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyUp);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.OnFormClosing);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyDown);
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyUp);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
@@ -592,6 +615,9 @@ namespace OpenRA.Editor
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.FlowLayoutPanel actorPalette;
private System.Windows.Forms.ComboBox actorOwnerChooser;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
private System.Windows.Forms.ToolStripMenuItem copySelectionToolStripMenuItem;
}
}

View File

@@ -138,7 +138,8 @@ namespace OpenRA.Editor
Rules.LoadRules(manifest, map);
tileset = Rules.TileSets[map.Tileset];
tileset.LoadTiles();
var palette = new Palette(FileSystem.Open(tileset.Palette), true);
int[] ShadowIndex = { 3, 4 };
var palette = new Palette(FileSystem.Open(tileset.Palette), ShadowIndex);
surface1.Bind(map, tileset, palette);
// construct the palette of tiles
@@ -545,5 +546,10 @@ namespace OpenRA.Editor
var player = actorOwnerChooser.SelectedItem as PlayerReference;
surface1.NewActorOwner = player.Name;
}
private void copySelectionToolStripMenuItem_Click(object sender, EventArgs e)
{
surface1.CopySelection();
}
}
}

View File

@@ -120,13 +120,45 @@
<metadata name="tt.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>76, 17</value>
</metadata>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>198, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="propertiesToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAACCklE
QVQ4T6WT30tTUQDHz39QD0UQSpAPIkgPyR60AiUiyoGBL4qZjOyt0tZP9tBDk1AsXIhj93ILdd27DPPH
3VwrUrdK2ioJHAgVOdoPaQsarBg43L6ec+akuRsEPnw5D4fP5/vlXg4BQHaSf8LjjwdqaTA2cg+y1Ith
qxmi5Tas/SYWk+QRoPgmtNsLcPq7GYX8+XoTqaUL+KR2cAmDxeBgqeBv2NhWzwUFOBk4g5/zRxB3V8Es
38AtbzuIw/0RLMrMeyhTs2CzGdRtaOTn1dajvLkAR9VKLNvLcHmoExddzSDKzAfkcjkkEtEiOLxoQpdB
z+Er7ScQUg/DL5TD2bsfl5oPoKWnCZ3jehDZGeAC1hwL3uXNs55Jep7Gis/AJWxyTeVe1FXvhq5qH6oP
7nlw/NoxGByNIKPT77CezSEeD6Pn+jlEIiGk6X8N+F9zyfLYIZzUVUCwT0J36jy9yX83KjDq7zSADE8t
cGB7kpksFt76YDzbgMWVFLzBX0WCTcku8mjiTSm8lkUslcHnH2kK/+aw6k+UCJiESE+9XCApz2Gzu5Gk
sEVy4r6got82vRV5blVbIDyZ21rAZrPmL7w5P5s1KxQWXRFtgU15lV8ge2AbdXPY8pAuEIsXWJ6FtAVW
+SWSmXWssuZ4vnl+s5nNFl1hMLjP8U1bMGR/wS/+N9tf7o6eMpNtADko6xybtEXLAAAAAElFTkSuQmCC
</value>
</data>
<data name="resizeToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAADLklE
QVQ4T3WS60/ScRjFf39CL3rR1ovurduWbbU2t7ZqdlkXt7Lrym6O1VoXcdYqQ54wKlGxABE1CzWF0nIm
lZcoTbyUNJFIzDJSJK+E0qy8wInvz+i2erazfd+cz3m+zw4nTS+FLOeZNim3Vp6UU5sqvf5MSZqnyjhV
pfKUvEx54kqp8rCkWHVQVKSJPHtbs+tUgSYiOicVAMfEqfR1dVFCGSqrX94cHQeN/aXhbyD3Zz91uf3U
9tFHTQ4fzVtH9BOQVdKcW2F6/eKkWA1zcxu6vUAQMmCzk/3AErLtDyFrrY035z16T3PXin8B5LfqZE6P
HyZzKw5FX+Yh4XtjwZKZGV3lNPIkhhojplON3Uc3S9/Q7LDfADKtKYklMsgTkwV7joixKHQr2Nq2fSET
5uQwqtsyjcot45R510ozV8f/2iAhsyolCNh9WIyFoRGYHbIGfYN+SVd7Nznzk8ll0FLzKxdZO3xkaOjG
GYUxcIIfRxSlPU4N/rn1fS8JJVlU1WCT3npggVLfAIWuHjJtNRIyjIhTPEKM7D6OSop4RcXpwZ2Wl11l
gHanmze/c36ioc8jyRlFjSzljxl2daI9Pwuv1Cnw9PRjZeQ1cCcSS68Fza6+IXL2fCG7w0ssmc3o2IR8
gbc1PQU9NUp48sNRcUyAkPBL4AIlUbLk3gEvS6YXrW6p0dx9UZ5n4gHjzBmYAAPPYwRwazeiMXYWqjcs
wLSVInAHRYWq0TEf9Q+NUEsg+fr9t2nF1U71leyqn+u3vPuIl2298HZ2wnxkO5q2LYOtxoKpK86D23tW
r+7zfCVzywAVGT/QVV2LvNDo0Eo0j3mAtbUTiRnFOJ94Axp9LfIKK5Ctq0RDmw9TQuPAsW7bHYNUYLCQ
JL2GRAqjtMDYwV+8wzUAWeY9eIfHYW0fxNodxyGWZeOSPBvzl27C5OXnwG0T5irmr79wgdWTNYyVJFL8
kAeo8wyBA/rx2jGErBIH0nXPsWmPEHcM9YgURGPS0jMTZfiXGKDfM4Y0fVOgA/UgRQWECTpExaqxUyDF
wuUbJjb4H0AQfxtrDqiweLMUc8LEmLEqnv9zUMzM9B1/cM83lepxTAAAAABJRU5ErkJggg==
</value>
</data>
<data name="newToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@@ -260,41 +292,6 @@
z2ki+Wo1CWklROkMCiT8wEm0kXEsCTmrAiTbDtcEpTVdZOS1oDfWk5xZ6RPeQZeUR8zxK0Qe1BO65xjr
t0YotXhjAEAeQ7It8ZSESUjkznIq2bYsTGYW29JZxIs2nFEdLOSdfwFwpvLxRKIY2AAAAABJRU5ErkJg
gg==
</value>
</data>
<data name="propertiesToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAACCklE
QVQ4T6WT30tTUQDHz39QD0UQSpAPIkgPyR60AiUiyoGBL4qZjOyt0tZP9tBDk1AsXIhj93ILdd27DPPH
3VwrUrdK2ioJHAgVOdoPaQsarBg43L6ec+akuRsEPnw5D4fP5/vlXg4BQHaSf8LjjwdqaTA2cg+y1Ith
qxmi5Tas/SYWk+QRoPgmtNsLcPq7GYX8+XoTqaUL+KR2cAmDxeBgqeBv2NhWzwUFOBk4g5/zRxB3V8Es
38AtbzuIw/0RLMrMeyhTs2CzGdRtaOTn1dajvLkAR9VKLNvLcHmoExddzSDKzAfkcjkkEtEiOLxoQpdB
z+Er7ScQUg/DL5TD2bsfl5oPoKWnCZ3jehDZGeAC1hwL3uXNs55Jep7Gis/AJWxyTeVe1FXvhq5qH6oP
7nlw/NoxGByNIKPT77CezSEeD6Pn+jlEIiGk6X8N+F9zyfLYIZzUVUCwT0J36jy9yX83KjDq7zSADE8t
cGB7kpksFt76YDzbgMWVFLzBX0WCTcku8mjiTSm8lkUslcHnH2kK/+aw6k+UCJiESE+9XCApz2Gzu5Gk
sEVy4r6got82vRV5blVbIDyZ21rAZrPmL7w5P5s1KxQWXRFtgU15lV8ge2AbdXPY8pAuEIsXWJ6FtAVW
+SWSmXWssuZ4vnl+s5nNFl1hMLjP8U1bMGR/wS/+N9tf7o6eMpNtADko6xybtEXLAAAAAElFTkSuQmCC
</value>
</data>
<data name="resizeToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAADLklE
QVQ4T3WS60/ScRjFf39CL3rR1ovurduWbbU2t7ZqdlkXt7Lrym6O1VoXcdYqQ54wKlGxABE1CzWF0nIm
lZcoTbyUNJFIzDJSJK+E0qy8wInvz+i2erazfd+cz3m+zw4nTS+FLOeZNim3Vp6UU5sqvf5MSZqnyjhV
pfKUvEx54kqp8rCkWHVQVKSJPHtbs+tUgSYiOicVAMfEqfR1dVFCGSqrX94cHQeN/aXhbyD3Zz91uf3U
9tFHTQ4fzVtH9BOQVdKcW2F6/eKkWA1zcxu6vUAQMmCzk/3AErLtDyFrrY035z16T3PXin8B5LfqZE6P
HyZzKw5FX+Yh4XtjwZKZGV3lNPIkhhojplON3Uc3S9/Q7LDfADKtKYklMsgTkwV7joixKHQr2Nq2fSET
5uQwqtsyjcot45R510ozV8f/2iAhsyolCNh9WIyFoRGYHbIGfYN+SVd7Nznzk8ll0FLzKxdZO3xkaOjG
GYUxcIIfRxSlPU4N/rn1fS8JJVlU1WCT3npggVLfAIWuHjJtNRIyjIhTPEKM7D6OSop4RcXpwZ2Wl11l
gHanmze/c36ioc8jyRlFjSzljxl2daI9Pwuv1Cnw9PRjZeQ1cCcSS68Fza6+IXL2fCG7w0ssmc3o2IR8
gbc1PQU9NUp48sNRcUyAkPBL4AIlUbLk3gEvS6YXrW6p0dx9UZ5n4gHjzBmYAAPPYwRwazeiMXYWqjcs
wLSVInAHRYWq0TEf9Q+NUEsg+fr9t2nF1U71leyqn+u3vPuIl2298HZ2wnxkO5q2LYOtxoKpK86D23tW
r+7zfCVzywAVGT/QVV2LvNDo0Eo0j3mAtbUTiRnFOJ94Axp9LfIKK5Ctq0RDmw9TQuPAsW7bHYNUYLCQ
JL2GRAqjtMDYwV+8wzUAWeY9eIfHYW0fxNodxyGWZeOSPBvzl27C5OXnwG0T5irmr79wgdWTNYyVJFL8
kAeo8wyBA/rx2jGErBIH0nXPsWmPEHcM9YgURGPS0jMTZfiXGKDfM4Y0fVOgA/UgRQWECTpExaqxUyDF
wuUbJjb4H0AQfxtrDqiweLMUc8LEmLEqnv9zUMzM9B1/cM83lepxTAAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

View File

@@ -38,6 +38,12 @@ namespace OpenRA.Editor
public bool ShowActorNames;
public bool ShowGrid;
public bool IsPaste { get { return TileSelection != null && ResourceSelection != null; } }
public TileReference<ushort, byte>[,] TileSelection;
public TileReference<byte, byte>[,] ResourceSelection;
public CPos SelectionStart;
public CPos SelectionEnd;
public string NewActorOwner;
public event Action AfterChange = () => { };
@@ -59,7 +65,7 @@ namespace OpenRA.Editor
Tool = null;
}
public void SetTool(ITool tool) { Tool = tool; }
public void SetTool(ITool tool) { Tool = tool; ClearSelection(); }
public void BindActorTemplates(IEnumerable<ActorTemplate> templates)
{
@@ -83,6 +89,8 @@ namespace OpenRA.Editor
UpdateStyles();
}
static readonly Pen SelectionPen = new Pen(Color.Blue);
static readonly Pen PastePen = new Pen(Color.Green);
static readonly Pen CordonPen = new Pen(Color.Red);
int2 MousePos;
@@ -182,12 +190,20 @@ namespace OpenRA.Editor
}
AfterChange();
ClearSelection();
}
void Draw()
{
if (Tool != null) Tool.Apply(this);
AfterChange();
if (Tool != null)
{
Tool.Apply(this);
AfterChange();
}
else if (IsPaste)
PasteSelection();
else
SelectionEnd = GetBrushLocationBR();
}
protected override void OnMouseDown(MouseEventArgs e)
@@ -199,7 +215,12 @@ namespace OpenRA.Editor
if (!IsPanning)
{
if (e.Button == MouseButtons.Right) Erase();
if (e.Button == MouseButtons.Left) Draw();
if (e.Button == MouseButtons.Left)
{
Draw();
if (!IsPaste)
SelectionStart = SelectionEnd = GetBrushLocation();
}
}
Invalidate();
@@ -274,6 +295,14 @@ namespace OpenRA.Editor
return new CPos(vX / TileSet.TileSize, vY / TileSet.TileSize);
}
public CPos GetBrushLocationBR()
{
var vX = (int)Math.Floor((MousePos.X - Offset.X) / Zoom);
var vY = (int)Math.Floor((MousePos.Y - Offset.Y) / Zoom);
return new CPos((vX + TileSet.TileSize - 1) / TileSet.TileSize,
(vY + TileSet.TileSize - 1) / TileSet.TileSize);
}
public void DrawActor(SGraphics g, CPos p, ActorTemplate t, ColorPalette cp)
{
var centered = t.Appearance == null || !t.Appearance.RelativeToTopLeft;
@@ -367,6 +396,25 @@ namespace OpenRA.Editor
Map.Bounds.Width * TileSet.TileSize * Zoom,
Map.Bounds.Height * TileSet.TileSize * Zoom);
e.Graphics.DrawRectangle(SelectionPen,
(SelectionStart.X * TileSet.TileSize * Zoom) + Offset.X,
(SelectionStart.Y * TileSet.TileSize * Zoom) + Offset.Y,
(SelectionEnd - SelectionStart).X * TileSet.TileSize * Zoom,
(SelectionEnd - SelectionStart).Y * TileSet.TileSize * Zoom);
if (IsPaste)
{
var loc = GetBrushLocation();
var width = Math.Abs((SelectionStart - SelectionEnd).X);
var height = Math.Abs((SelectionStart - SelectionEnd).Y);
e.Graphics.DrawRectangle(PastePen,
(loc.X * TileSet.TileSize * Zoom) + Offset.X,
(loc.Y * TileSet.TileSize * Zoom) + Offset.Y,
width * (TileSet.TileSize * Zoom),
height * (TileSet.TileSize * Zoom));
}
foreach (var ar in Map.Actors.Value)
{
if (ActorTemplates.ContainsKey(ar.Value.Type))
@@ -395,6 +443,67 @@ namespace OpenRA.Editor
DrawActorBorder(e.Graphics, x.Value.Location(), ActorTemplates[x.Value.Type]);
}
}
public void CopySelection()
{
// Grab tiles and resources within selection (doesn't do actors)
var start = SelectionStart;
var end = SelectionEnd;
if (start == end) return;
int width = Math.Abs((start - end).X);
int height = Math.Abs((start - end).Y);
TileSelection = new TileReference<ushort, byte>[width, height];
ResourceSelection = new TileReference<byte, byte>[width, height];
for (int x = 0; x < width; x++)
{
for (int y = 0; y < height; y++)
{
//todo: crash prevention
TileSelection[x, y] = Map.MapTiles.Value[start.X + x, start.Y + y];
ResourceSelection[x, y] = Map.MapResources.Value[start.X + x, start.Y + y];
}
}
}
void PasteSelection()
{
var loc = GetBrushLocation();
var width = Math.Abs((SelectionStart - SelectionEnd).X);
var height = Math.Abs((SelectionStart - SelectionEnd).Y);
for (int x = 0; x < width; x++)
{
for (int y = 0; y < height; y++)
{
var mapX = loc.X + x;
var mapY = loc.Y + y;
//todo: crash prevention for outside of bounds
Map.MapTiles.Value[mapX, mapY] = TileSelection[x, y];
Map.MapResources.Value[mapX, mapY] = ResourceSelection[x, y];
var ch = new int2(mapX / ChunkSize, mapY / ChunkSize);
if (Chunks.ContainsKey(ch))
{
Chunks[ch].Dispose();
Chunks.Remove(ch);
}
}
}
AfterChange();
}
void ClearSelection()
{
SelectionStart = CPos.Zero;
SelectionEnd = CPos.Zero;
TileSelection = null;
ResourceSelection = null;
}
}
static class ActorReferenceExts

View File

@@ -184,6 +184,58 @@ namespace OpenRA
return ts.Concat(moreTs);
}
public static Dictionary<TKey, TSource> ToDictionaryWithConflictLog<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, string debugName, Func<TKey, string> logKey, Func<TSource, string> logValue)
{
return ToDictionaryWithConflictLog(source, keySelector, x => x, debugName, logKey, logValue);
}
public static Dictionary<TKey, TElement> ToDictionaryWithConflictLog<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, string debugName, Func<TKey, string> logKey, Func<TElement, string> logValue)
{
// Fall back on ToString() if null functions are provided:
logKey = logKey ?? (s => s.ToString());
logValue = logValue ?? (s => s.ToString());
// Try to build a dictionary and log all duplicates found (if any):
var dupKeys = new Dictionary<TKey, List<string>>();
var d = new Dictionary<TKey, TElement>();
foreach (var item in source)
{
TKey key = keySelector(item);
TElement element = elementSelector(item);
// Check for a key conflict:
if (d.ContainsKey(key))
{
List<string> dupKeyMessages;
if (!dupKeys.TryGetValue(key, out dupKeyMessages))
{
// Log the initial conflicting value already inserted:
dupKeyMessages = new List<string>();
dupKeyMessages.Add(logValue(d[key]));
dupKeys.Add(key, dupKeyMessages);
}
// Log this conflicting value:
dupKeyMessages.Add(logValue(element));
continue;
}
d.Add(key, element);
}
// If any duplicates were found, log it and throw a descriptive error
if (dupKeys.Count > 0)
{
string badKeysFormatted = String.Join(", ", dupKeys.Select(p => "{0}: [{1}]".F(logKey(p.Key), String.Join(",", p.Value.ToArray()))).ToArray());
string msg = "{0}, duplicate values found for the following keys: {1}".F(debugName, badKeysFormatted);
Log.Write("debug", msg);
throw new ArgumentException(msg);
}
// Return the dictionary we built:
return d;
}
public static Color ColorLerp(float t, Color c1, Color c2)
{
return Color.FromArgb(

View File

@@ -58,7 +58,9 @@ namespace OpenRA.FileFormats
isEncrypted = 0 != (signature & (uint)MixFileFlags.Encrypted);
if( isEncrypted )
{
index = ParseRaHeader( s, out dataStart ).ToDictionary(x => x.Hash);
index = ParseRaHeader(s, out dataStart).ToDictionaryWithConflictLog(x => x.Hash,
"MixFile.RaHeader", null, x => "(offs={0}, len={1})".F(x.Offset, x.Length)
);
return;
}
}
@@ -66,7 +68,9 @@ namespace OpenRA.FileFormats
s.Seek( 0, SeekOrigin.Begin );
isEncrypted = false;
index = ParseTdHeader(s, out dataStart).ToDictionary(x => x.Hash);
index = ParseTdHeader(s, out dataStart).ToDictionaryWithConflictLog(x => x.Hash,
"MixFile.TdHeader", null, x => "(offs={0}, len={1})".F(x.Offset, x.Length)
);
}
const long headerStart = 84;

View File

@@ -20,7 +20,7 @@ namespace OpenRA.FileFormats
public readonly string[]
Mods, Folders, Packages, Rules, ServerTraits,
Sequences, Cursors, Chrome, Assemblies, ChromeLayout,
Weapons, Voices, Music, Movies, TileSets, ChromeMetrics;
Weapons, Voices, Notifications, Music, Movies, TileSets, ChromeMetrics;
public readonly MiniYaml LoadScreen;
public readonly Dictionary<string, Pair<string,int>> Fonts;
public readonly int TileSize = 24;
@@ -44,6 +44,7 @@ namespace OpenRA.FileFormats
ChromeLayout = YamlList(yaml, "ChromeLayout");
Weapons = YamlList(yaml, "Weapons");
Voices = YamlList(yaml, "Voices");
Notifications = YamlList(yaml, "Notifications");
Music = YamlList(yaml, "Music");
Movies = YamlList(yaml, "Movies");
TileSets = YamlList(yaml, "TileSets");

View File

@@ -23,6 +23,7 @@ namespace OpenRA.FileFormats
public string[] AcceptsSmudgeType = { };
public bool IsWater = false;
public Color Color;
public string CustomCursor;
public TerrainTypeInfo() {}
public TerrainTypeInfo(MiniYaml my) { FieldLoader.Load(this, my); }

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2012 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,
@@ -39,7 +39,7 @@ namespace OpenRA.FileFormats
get { return colors; }
}
public Palette(Stream s, bool remapTransparent)
public Palette(Stream s, int[] remapShadow)
{
colors = new uint[256];
@@ -54,13 +54,9 @@ namespace OpenRA.FileFormats
}
}
colors[0] = 0;
if (remapTransparent)
{
colors[1] = 178u << 24; // Hack for d2k; may have side effects
colors[3] = 178u << 24;
colors[4] = 140u << 24;
}
colors[0] = 0; //convert black background to transparency
foreach (int i in remapShadow)
colors[i] = 140u << 24;
}
public Palette(Palette p, IPaletteRemap r)
@@ -92,12 +88,12 @@ namespace OpenRA.FileFormats
return pal;
}
public static Palette Load( string filename, bool remap )
public static Palette Load(string filename, int[] remap)
{
using(var s = File.OpenRead(filename))
return new Palette(s, remap);
}
}
public interface IPaletteRemap { Color GetRemappedColor(Color original, int index); }
public interface IPaletteRemap { Color GetRemappedColor(Color original, int index); }
}

View File

@@ -20,7 +20,8 @@ namespace OpenRA
{
public static Dictionary<string, ActorInfo> Info;
public static Dictionary<string, WeaponInfo> Weapons;
public static Dictionary<string, VoiceInfo> Voices;
public static Dictionary<string, SoundInfo> Voices;
public static Dictionary<string, SoundInfo> Notifications;
public static Dictionary<string, MusicInfo> Music;
public static Dictionary<string, string> Movies;
public static Dictionary<string, TileSet> TileSets;
@@ -30,7 +31,8 @@ namespace OpenRA
// Added support to extend the list of rules (add it to m.LocalRules)
Info = LoadYamlRules(m.Rules, map.Rules, (k, y) => new ActorInfo(k.Key.ToLowerInvariant(), k.Value, y));
Weapons = LoadYamlRules(m.Weapons, map.Weapons, (k, _) => new WeaponInfo(k.Key.ToLowerInvariant(), k.Value));
Voices = LoadYamlRules(m.Voices, map.Voices, (k, _) => new VoiceInfo(k.Value));
Voices = LoadYamlRules(m.Voices, map.Voices, (k, _) => new SoundInfo(k.Value));
Notifications = LoadYamlRules(m.Notifications, map.Notifications, (k, _) => new SoundInfo(k.Value));
Music = LoadYamlRules(m.Music, new List<MiniYamlNode>(), (k, _) => new MusicInfo(k.Key, k.Value));
Movies = LoadYamlRules(m.Movies, new List<MiniYamlNode>(), (k, v) => k.Value.Value);

View File

@@ -1,4 +1,4 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
@@ -15,11 +15,12 @@ using OpenRA.FileFormats;
namespace OpenRA.GameRules
{
public class VoiceInfo
public class SoundInfo
{
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Variants;
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Prefixes;
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Voices;
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Notifications;
public readonly string DefaultVariant = ".aud" ;
public readonly string DefaultPrefix = "" ;
public readonly string[] DisableVariants = { };
@@ -34,31 +35,28 @@ namespace OpenRA.GameRules
: new Dictionary<string, string[]>();
}
public readonly OpenRA.FileFormats.Lazy<Dictionary<string, VoicePool>> Pools;
public readonly OpenRA.FileFormats.Lazy<Dictionary<string, SoundPool>> VoicePools;
public readonly OpenRA.FileFormats.Lazy<Dictionary<string, SoundPool>> NotificationsPools;
public VoiceInfo( MiniYaml y )
public SoundInfo( MiniYaml y )
{
FieldLoader.Load( this, y );
Variants = Load(y, "Variants");
Prefixes = Load(y, "Prefixes");
Voices = Load(y, "Voices");
Notifications = Load(y, "Notifications");
if (!Voices.ContainsKey("Attack"))
Voices.Add("Attack", Voices["Move"]);
if (!Voices.ContainsKey("AttackMove"))
Voices.Add("AttackMove", Voices["Move"]);
Pools = Lazy.New(() => Voices.ToDictionary( a => a.Key, a => new VoicePool(a.Value) ));
VoicePools = Lazy.New(() => Voices.ToDictionary( a => a.Key, a => new SoundPool(a.Value) ));
NotificationsPools = Lazy.New(() => Notifications.ToDictionary( a => a.Key, a => new SoundPool(a.Value) ));
}
}
public class VoicePool
public class SoundPool
{
readonly string[] clips;
readonly List<string> liveclips = new List<string>();
public VoicePool(params string[] clips)
public SoundPool(params string[] clips)
{
this.clips = clips;
}

View File

@@ -26,7 +26,7 @@ namespace OpenRA.GameRules
public readonly string WaterExplosion = null; // explosion effect on hitting water (usually a splash)
public readonly string[] SmudgeType = { }; // type of smudge to apply
public readonly int[] Size = { 0, 0 }; // size of the explosion. provide 2 values for a ring effect (outer/inner)
public readonly int InfDeath = 0; // infantry death animation to use
public readonly int InfDeath = 1; // infantry death animation to use
public readonly string ImpactSound = null; // sound to play on impact
public readonly string WaterImpactSound = null; // sound to play on impact with water
public readonly int Damage = 0; // how much (raw) damage to deal

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2012 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,
@@ -25,13 +25,16 @@ namespace OpenRA.Graphics
{
cursors = new Dictionary<string, CursorSequence>();
var sequences = new MiniYaml(null, sequenceFiles.Select(s => MiniYaml.FromFile(s)).Aggregate(MiniYaml.MergeLiberal));
var transparent = false;
int[] ShadowIndex = { };
if (sequences.NodesDict.ContainsKey("Transparent"))
transparent = true;
if (sequences.NodesDict.ContainsKey("ShadowIndex"))
{
Array.Resize(ref ShadowIndex, ShadowIndex.Length + 1);
ShadowIndex[ShadowIndex.Length - 1] = Convert.ToInt32(sequences.NodesDict["ShadowIndex"].Value);
}
foreach (var s in sequences.NodesDict["Palettes"].Nodes)
Game.modData.Palette.AddPalette(s.Key, new Palette(FileSystem.Open(s.Value.Value), transparent));
Game.modData.Palette.AddPalette(s.Key, new Palette(FileSystem.Open(s.Value.Value), ShadowIndex));
foreach (var s in sequences.NodesDict["Cursors"].Nodes)
LoadSequencesForCursor(s.Key, s.Value);

View File

@@ -60,6 +60,7 @@ namespace OpenRA
[FieldLoader.Ignore] public List<MiniYamlNode> Sequences = new List<MiniYamlNode>();
[FieldLoader.Ignore] public List<MiniYamlNode> Weapons = new List<MiniYamlNode>();
[FieldLoader.Ignore] public List<MiniYamlNode> Voices = new List<MiniYamlNode>();
[FieldLoader.Ignore] public List<MiniYamlNode> Notifications = new List<MiniYamlNode>();
// Binary map data
[FieldLoader.Ignore] public byte TileFormat = 1;
@@ -150,6 +151,7 @@ namespace OpenRA
Sequences = NodesOrEmpty(yaml, "Sequences");
Weapons = NodesOrEmpty(yaml, "Weapons");
Voices = NodesOrEmpty(yaml, "Voices");
Notifications = NodesOrEmpty(yaml, "Notifications");
CustomTerrain = new string[MapSize.X, MapSize.Y];
@@ -204,6 +206,7 @@ namespace OpenRA
root.Add(new MiniYamlNode("Sequences", null, Sequences));
root.Add(new MiniYamlNode("Weapons", null, Weapons));
root.Add(new MiniYamlNode("Voices", null, Voices));
root.Add(new MiniYamlNode("Notifications", null, Notifications));
var entries = new Dictionary<string, byte[]>();
entries.Add("map.bin", SaveBinaryData());

View File

@@ -94,7 +94,7 @@
<Compile Include="GameRules\MusicInfo.cs" />
<Compile Include="GameRules\Rules.cs" />
<Compile Include="GameRules\Settings.cs" />
<Compile Include="GameRules\VoiceInfo.cs" />
<Compile Include="GameRules\SoundInfo.cs" />
<Compile Include="GameRules\WeaponInfo.cs" />
<Compile Include="Graphics\Animation.cs" />
<Compile Include="Graphics\AnimationWithOffset.cs" />
@@ -167,7 +167,6 @@
<Compile Include="Traits\Health.cs" />
<Compile Include="Traits\LintAttributes.cs" />
<Compile Include="Traits\Player\DeveloperMode.cs" />
<Compile Include="Traits\Player\EvaAlerts.cs" />
<Compile Include="Traits\Player\PlayerResources.cs" />
<Compile Include="Traits\Render\RenderSimple.cs" />
<Compile Include="Traits\RevealsShroud.cs" />
@@ -261,4 +260,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

View File

@@ -90,11 +90,6 @@ namespace OpenRA
}
}
public void GiveAdvice(string advice)
{
Sound.PlayToPlayer(this, advice);
}
public Dictionary<Player, Stance> Stances = new Dictionary<Player, Stance>();
}
}

View File

@@ -37,25 +37,33 @@ namespace UPnP
DateTime start = DateTime.Now;
do
try
{
s.SendTo(data, ipe);
int length = 0;
do
{
length = s.Receive(buffer);
string resp = Encoding.ASCII.GetString(buffer, 0, length).ToLower();
if (resp.Contains("upnp:rootdevice"))
s.SendTo(data, ipe);
int length = 0;
do
{
resp = resp.Substring(resp.ToLower().IndexOf("location:") + 9);
resp = resp.Substring(0, resp.IndexOf("\r")).Trim();
if (!string.IsNullOrEmpty(_serviceUrl = GetServiceUrl(resp)))
return true;
}
} while (length > 0);
} while ((start - DateTime.Now) < _timeout);
length = s.Receive(buffer);
string resp = Encoding.ASCII.GetString(buffer, 0, length).ToLower();
if (resp.Contains("upnp:rootdevice"))
{
resp = resp.Substring(resp.ToLower().IndexOf("location:") + 9);
resp = resp.Substring(0, resp.IndexOf("\r")).Trim();
if (!string.IsNullOrEmpty(_serviceUrl = GetServiceUrl(resp)))
return true;
}
} while (length > 0);
} while ((start - DateTime.Now) < _timeout);
}
catch (Exception e)
{
OpenRA.Log.Write("server", "UPNP discover failed: {0}", e);
}
return false;
}

View File

@@ -29,6 +29,12 @@ namespace OpenRA
static ISoundSource LoadSound(string filename)
{
if (!FileSystem.Exists(filename))
{
Log.Write("debug", "LoadSound, file does not exist: {0}", filename);
return null;
}
return LoadSoundRaw(AudLoader.LoadSound(FileSystem.Open(filename)));
}
@@ -140,10 +146,12 @@ namespace OpenRA
}
StopMusic();
var sound = sounds[m.Filename];
if (sound == null) return;
music = soundEngine.Play2D(sound, false, true, float2.Zero, MusicVolume);
currentMusic = m;
MusicPlaying = true;
var sound = sounds[m.Filename];
music = soundEngine.Play2D(sound, false, true, float2.Zero, MusicVolume);
}
public static void PlayMusic()
@@ -238,7 +246,45 @@ namespace OpenRA
get { return (video != null) ? video.SeekPosition : 0; }
}
// Returns true if it played a phrase
// Returns true if played successfully
public static bool PlayPredefined(Player p, Actor voicedUnit, string type, string definition, string variant)
{
if (definition == null) return false;
var rules = (voicedUnit != null) ? Rules.Voices[type] : Rules.Notifications[type];
var ID = (voicedUnit != null) ? voicedUnit.ActorID : 0;
var clip = (voicedUnit != null) ? rules.VoicePools.Value[definition].GetNext() : rules.NotificationsPools.Value[definition].GetNext();
if (clip == null) return false;
var suffix = rules.DefaultVariant;
var prefix = rules.DefaultPrefix;
if (voicedUnit != null)
{
if (!rules.VoicePools.Value.ContainsKey("Attack"))
rules.VoicePools.Value.Add("Attack", rules.VoicePools.Value["Move"]);
if (!rules.VoicePools.Value.ContainsKey("AttackMove"))
rules.VoicePools.Value.Add("AttackMove", rules.VoicePools.Value["Move"]);
}
if (variant != null)
{
if (rules.Variants.ContainsKey(variant) && !rules.DisableVariants.Contains(definition))
suffix = rules.Variants[variant][ID % rules.Variants[variant].Length];
if (rules.Prefixes.ContainsKey(variant) && !rules.DisablePrefixes.Contains(definition))
prefix = rules.Prefixes[variant][ID % rules.Prefixes[variant].Length];
}
if (p == null)
Play(prefix + clip + suffix);
else
PlayToPlayer(p, prefix + clip + suffix);
return true;
}
public static bool PlayVoice(string phrase, Actor voicedUnit, string variant)
{
if (voicedUnit == null) return false;
@@ -248,21 +294,17 @@ namespace OpenRA
if (mi == null) return false;
if (mi.Voice == null) return false;
var vi = Rules.Voices[mi.Voice.ToLowerInvariant()];
var type = mi.Voice.ToLowerInvariant();
if (!vi.Pools.Value.ContainsKey(phrase))
return false;
return PlayPredefined(null, voicedUnit, type, phrase, variant);
}
var clip = vi.Pools.Value[phrase].GetNext();
if (clip == null)
return false;
public static bool PlayNotification(Player player, string type, string notification, string variant)
{
if (type == null) return false;
if (notification == null) return false;
var variantExt = (vi.Variants.ContainsKey(variant) && !vi.DisableVariants.Contains(phrase)) ?
vi.Variants[variant][voicedUnit.ActorID % vi.Variants[variant].Length] : vi.DefaultVariant;
var prefix = (vi.Prefixes.ContainsKey(variant) && !vi.DisablePrefixes.Contains(phrase)) ?
vi.Prefixes[variant][voicedUnit.ActorID % vi.Prefixes[variant].Length] : vi.DefaultPrefix;
Play(prefix + clip + variantExt);
return true;
return PlayPredefined(player, null, type.ToLowerInvariant(), notification, variant);
}
}
@@ -357,6 +399,11 @@ namespace OpenRA
public ISound Play2D(ISoundSource sound, bool loop, bool relative, float2 pos, float volume)
{
if (sound == null)
{
Log.Write("debug", "Attempt to Play2D a null `ISoundSource`");
return null;
}
int source = GetSourceFromPool();
return new OpenAlSound(source, (sound as OpenAlSoundSource).buffer, loop, relative, pos, volume);
}
@@ -369,6 +416,8 @@ namespace OpenRA
public void PauseSound(ISound sound, bool paused)
{
if (sound == null) return;
int key = ((OpenAlSound)sound).source;
int state;
Al.alGetSourcei(key, Al.AL_SOURCE_STATE, out state);
@@ -410,6 +459,8 @@ namespace OpenRA
public void StopSound(ISound sound)
{
if (sound == null) return;
int key = ((OpenAlSound)sound).source;
int state;
Al.alGetSourcei(key, Al.AL_SOURCE_STATE, out state);

View File

@@ -1,43 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 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 COPYING.
*/
#endregion
namespace OpenRA.Traits
{
public class EvaAlertsInfo : TraitInfo<EvaAlerts>
{
// Sound effects
public readonly string RadarUp = "radaron2.aud";
public readonly string RadarDown = "radardn1.aud";
public readonly string CashTickUp = "cashup1.aud";
public readonly string CashTickDown = "cashdn1.aud";
// Build Palette
public readonly string BuildingCannotPlaceAudio = "nodeply1.aud";
public readonly string NewOptions = "newopt1.aud";
// For manual powerup/down in ra-ng
public readonly string DisablePower = "bleep11.aud";
public readonly string EnablePower = "bleep12.aud";
// Eva speech
public readonly string Repairing = "repair1.aud";
public readonly string LowPower = "lopower1.aud";
public readonly string SilosNeeded = "silond1.aud";
public readonly string PrimaryBuildingSelected = "pribldg1.aud";
// Special powers
public readonly string AbilityInsufficientPower = "nopowr1.aud";
public readonly string LevelUp = "hydrod1.aud";
}
public class EvaAlerts {}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2012 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,
@@ -136,8 +136,6 @@ namespace OpenRA.Traits
public void Tick(Actor self)
{
var eva = self.World.WorldActor.Info.Traits.Get<EvaAlertsInfo>();
if(cashtickallowed > 0) {
cashtickallowed = cashtickallowed - 1;
}
@@ -152,7 +150,7 @@ namespace OpenRA.Traits
if (--nextSiloAdviceTime <= 0)
{
if (Ore > 0.8*OreCapacity)
Owner.GiveAdvice(eva.SilosNeeded);
Sound.PlayNotification(Owner, "Speech", "SilosNeeded", Owner.Country.Race);
nextSiloAdviceTime = AdviceInterval;
}
@@ -192,21 +190,19 @@ namespace OpenRA.Traits
public void playCashTickUp(Actor self)
{
var eva = self.World.WorldActor.Info.Traits.Get<EvaAlertsInfo>();
if (Game.Settings.Sound.SoundCashTickType != SoundCashTicks.Disabled)
{
Sound.PlayToPlayer(self.Owner, eva.CashTickUp);
Sound.PlayNotification(self.Owner, "Sounds", "CashTickUp", self.Owner.Country.Race);
}
}
public void playCashTickDown(Actor self)
{
var eva = self.World.WorldActor.Info.Traits.Get<EvaAlertsInfo>();
if (
Game.Settings.Sound.SoundCashTickType == SoundCashTicks.Extreme ||
(Game.Settings.Sound.SoundCashTickType == SoundCashTicks.Normal && cashtickallowed == 0)
) {
Sound.PlayToPlayer(self.Owner, eva.CashTickDown);
Sound.PlayNotification(self.Owner, "Sounds", "CashTickDown", self.Owner.Country.Race);
cashtickallowed = 3;
}

View File

@@ -54,6 +54,7 @@ namespace OpenRA.Traits
public interface IResolveOrder { void ResolveOrder(Actor self, Order order); }
public interface IValidateOrder { bool OrderValidation(OrderManager orderManager, World world, int clientId, Order order); }
public interface IOrderVoice { string VoicePhraseForOrder(Actor self, Order order); }
public interface INotify { void Play(Player p, string notification); }
public interface INotifySold { void Selling(Actor self); void Sold(Actor self); }
public interface INotifyDamage { void Damaged(Actor self, AttackInfo e); }
public interface INotifyDamageStateChanged { void DamageStateChanged(Actor self, AttackInfo e); }

View File

@@ -22,8 +22,6 @@ namespace OpenRA.Widgets
public bool Depressed = false;
public int VisualHeight = ChromeMetrics.Get<int>("ButtonDepth");
public string Font = ChromeMetrics.Get<string>("ButtonFont");
public string ClickSound = null;
public string ClickDisabledSound = null;
public bool Disabled = false;
public Func<string> GetText;
public Func<bool> IsDisabled;
@@ -73,10 +71,10 @@ namespace OpenRA.Widgets
if (!IsDisabled())
{
OnKeyPress(e);
Sound.Play(ClickSound);
Sound.PlayNotification(null, "Sounds", "ClickSound", null);
}
else
Sound.Play(ClickDisabledSound);
Sound.PlayNotification(null, "Sounds", "ClickDisabledSound", null);
return true;
}
@@ -105,12 +103,12 @@ namespace OpenRA.Widgets
{
OnMouseDown(mi);
Depressed = true;
Sound.Play(ClickSound);
Sound.PlayNotification(null, "Sounds", "ClickSound", null);
}
else
{
LoseFocus(mi);
Sound.Play(ClickDisabledSound);
Sound.PlayNotification(null, "Sounds", "ClickDisabledSound", null);
}
}
else if (mi.Event == MouseInputEvent.Move && Focused)

View File

@@ -121,7 +121,7 @@ namespace OpenRA
return selectable != null && selectable.Voice != null;
}
public static VoiceInfo GetVoice(this Actor a)
public static SoundInfo GetVoice(this Actor a)
{
var selectable = a.Info.Traits.GetOrDefault<SelectableInfo>();
if (selectable == null) return null;

View File

@@ -82,7 +82,7 @@ namespace OpenRA.Mods.RA
{
var mobile = self.Trait<Mobile>();
self.QueueActivity(mobile.ScriptedMove(left));
self.QueueActivity(new Teleport(right));
self.QueueActivity(new SimpleTeleport(right));
self.QueueActivity(new CallFunc(() => LoopTrack(self,left,right)));
}
}

View File

@@ -19,6 +19,7 @@ namespace OpenRA.Mods.Cnc
{
/* altitude of the cargo, relative to us. -ve is underneath us */
public readonly int RelativeAltitude = 0;
public readonly string[] PassengerTypes;
public object Create(ActorInitializer init) { return new RenderCargo(init.self, this); }
}
@@ -49,7 +50,12 @@ namespace OpenRA.Mods.Cnc
cargoFacing.Facing = facing.Facing;
}
return r.Concat(cargo.Passengers.SelectMany(a => a.Render())
var visiblePassengers = (Info.PassengerTypes != null && Info.PassengerTypes.Length > 0)
? cargo.Passengers.Where(p =>
Info.PassengerTypes.Contains(p.Trait<Passenger>().info.CargoType))
: cargo.Passengers;
return r.Concat(visiblePassengers.SelectMany(a => a.Render())
.Select(a => a.WithPos(a.Pos - new float2(0, Info.RelativeAltitude))
.WithZOffset(a.ZOffset + Info.RelativeAltitude)));
}

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Cnc
[ActorReference] public readonly string ViceroidActor = "vice";
public readonly int Probability = 10;
public readonly string Owner = "Creeps";
public readonly int InfDeath = 5;
public readonly int InfDeath = 6;
public object Create(ActorInitializer init) { return new SpawnViceroid(this); }
}

View File

@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
// TODO: Create a mechanism to do things like this cleaner. Also needed for scripted missions
Action onQuit = () =>
{
Sound.Play("batlcon1.aud");
Sound.PlayNotification(null, "Speech", "Leave", null);
resumeDisabled = true;
Game.RunAfterDelay(1200, () => mpe.Fade(CncMenuPaletteEffect.EffectType.Black));
Game.RunAfterDelay(1200 + 40 * mpe.Info.FadeLength, () =>

View File

@@ -61,8 +61,6 @@ namespace OpenRA.Mods.Cnc.Widgets
class ProductionTabsWidget : Widget
{
public readonly string PaletteWidget = null;
public readonly string ClickSound = null;
public readonly string DisabledClickSound = null;
public readonly float ScrollVelocity = 4f;
public readonly int TabWidth = 30;
public readonly int ArrowWidth = 20;
@@ -248,9 +246,9 @@ namespace OpenRA.Mods.Cnc.Widgets
if (leftPressed || rightPressed)
{
if ((leftPressed && !leftDisabled) || (rightPressed && !rightDisabled))
Sound.Play(ClickSound);
Sound.PlayNotification(null, "Sounds", "ClickSound", null);
else
Sound.Play(DisabledClickSound);
Sound.PlayNotification(null, "Sounds", "DisabledClickSound", null);
}
// Check production tabs
@@ -258,7 +256,7 @@ namespace OpenRA.Mods.Cnc.Widgets
if (offsetloc.X > 0 && offsetloc.X < ContentWidth)
{
CurrentQueue = Groups[queueGroup].Tabs[offsetloc.X/(TabWidth - 1)].Queue;
Sound.Play(ClickSound);
Sound.PlayNotification(null, "Sounds", "ClickSound", null);
return true;
}
@@ -270,7 +268,7 @@ namespace OpenRA.Mods.Cnc.Widgets
if (e.Event != KeyInputEvent.Down) return false;
if (e.KeyName == "tab")
{
Sound.Play(ClickSound);
Sound.PlayNotification(null, "Sounds", "ClickSound", null);
SelectNextTab(e.Modifiers.HasModifier(Modifiers.Shift));
return true;
}

View File

@@ -267,7 +267,7 @@ namespace OpenRA.Mods.D2k.Widgets.Logic
new string[] {"--r8", PathToDataR8, PathToPalette, "4463", "4477", Path.Combine(PathToSHPs, "craneo"), "--building"},
new string[] {"--r8", PathToDataR8, PathToPalette, "4760", "4819", Path.Combine(PathToSHPs, "windtrap_anim"), "--building"}, //?
new string[] {"--r8", PathToDataR8, PathToPalette, "4820", "4840", Path.Combine(PathToSHPs, "missile_launch"), "--building"},
new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/MOUSE.R8"), PathToPalette, "0", "264", Path.Combine(PathToSHPs, "mouse"), "--transparent"},
new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/MOUSE.R8"), PathToPalette, "0", "264", Path.Combine(PathToSHPs, "mouse")},
new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXBASE.R8"), PathToPalette, "0", "799", Path.Combine(PathToTilesets, "BASE"), "--tileset"},
new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXBASE.R8"), PathToPalette, "748", "749", Path.Combine(PathToSHPs, "spice0")},
new string[] {"--r8", Path.Combine(Platform.SupportDir, "Content/d2k/BLOXBAT.R8"), PathToPalette, "0", "799", Path.Combine(PathToTilesets, "BAT"), "--tileset"},

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2012 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,
@@ -10,6 +10,7 @@
using System.Linq;
using OpenRA.Traits;
using OpenRA.Mods.RA.Move;
namespace OpenRA.Mods.RA.Activities
{
@@ -25,9 +26,6 @@ namespace OpenRA.Mods.RA.Activities
if (target == null || !target.IsInWorld || target.IsDead()) return NextActivity;
if (target.Owner == self.Owner) return NextActivity;
if( !target.OccupiesSpace.OccupiedCells().Any( x => x.First == self.Location ) )
return NextActivity;
var capturable = target.TraitOrDefault<Capturable>();
if (capturable != null && capturable.CaptureInProgress && capturable.Captor.Owner.Stances[self.Owner] == Stance.Ally)
return NextActivity;
@@ -36,8 +34,14 @@ namespace OpenRA.Mods.RA.Activities
if (sellable != null && sellable.Selling)
return NextActivity;
target.Trait<Capturable>().BeginCapture(target, self);
self.World.AddFrameEndTask(w => self.Destroy());
var captures = self.TraitOrDefault<Captures>();
var capturesInfo = self.Info.Traits.Get<CapturesInfo>();
if (captures != null && Combat.IsInRange(self.CenterLocation, capturesInfo.Range, target))
target.Trait<Capturable>().BeginCapture(target, self);
else
return Util.SequenceActivities(self.Trait<Mobile>().MoveWithinRange(Target.FromActor(target), capturesInfo.Range), this);
if (capturesInfo != null && capturesInfo.wastedAfterwards)
self.World.AddFrameEndTask(w => self.Destroy());
return this;
}

View File

@@ -10,18 +10,59 @@
using System.Linq;
using OpenRA.Traits;
using OpenRA.Mods.RA.Render;
namespace OpenRA.Mods.RA.Activities
{
public class Teleport : Activity
{
CPos destination;
bool killCargo;
Actor chronosphere;
public Teleport(CPos destination)
public Teleport(Actor chronosphere, CPos destination, bool killCargo)
{
this.chronosphere = chronosphere;
this.destination = destination;
this.killCargo = killCargo;
}
public override Activity Tick(Actor self)
{
Sound.Play("chrono2.aud", self.Location.ToPPos());
Sound.Play("chrono2.aud", destination.ToPPos());
self.Trait<ITeleportable>().SetPosition(self, destination);
if (killCargo && self.HasTrait<Cargo>())
{
var cargo = self.Trait<Cargo>();
while (!cargo.IsEmpty(self))
{
if (chronosphere != null)
chronosphere.Owner.Kills++;
var a = cargo.Unload(self);
a.Owner.Deaths++;
}
}
// Trigger screen desaturate effect
foreach (var a in self.World.ActorsWithTrait<ChronoshiftPaletteEffect>())
a.Trait.Enable();
if (chronosphere != null && !chronosphere.Destroyed && chronosphere.HasTrait<RenderBuilding>())
chronosphere.Trait<RenderBuilding>().PlayCustomAnim(chronosphere, "active");
return NextActivity;
}
}
public class SimpleTeleport : Activity
{
CPos destination;
public SimpleTeleport(CPos destination) { this.destination = destination; }
public override Activity Tick(Actor self)
{
self.Trait<ITeleportable>().SetPosition(self, destination);

View File

@@ -52,11 +52,11 @@ namespace OpenRA.Mods.RA.Activities
var health = self.TraitOrDefault<Health>();
if (health != null)
{
// TODO: Fix bogus health init
if (ForceHealthPercentage > 0)
init.Add( new HealthInit( ForceHealthPercentage * 1f / 100 ));
else
init.Add( new HealthInit( (float)health.HP / health.MaxHP ));
var newHP = (ForceHealthPercentage > 0)
? ForceHealthPercentage / 100f
: (float)health.HP / health.MaxHP;
init.Add( new HealthInit(newHP) );
}
var cargo = self.TraitOrDefault<Cargo>();

View File

@@ -18,6 +18,10 @@ namespace OpenRA.Mods.RA.Activities
{
public class UnloadCargo : Activity
{
bool unloadAll;
public UnloadCargo(bool unloadAll) { this.unloadAll = unloadAll; }
CPos? ChooseExitTile(Actor self, Actor cargo)
{
// is anyone still hogging this tile?
@@ -35,6 +39,19 @@ namespace OpenRA.Mods.RA.Activities
return null;
}
CPos? ChooseRallyPoint(Actor self)
{
var mobile = self.Trait<Mobile>();
for (var i = -1; i < 2; i++)
for (var j = -1; j < 2; j++)
if ((i != 0 || j != 0) &&
mobile.CanEnterCell(self.Location + new CVec(i, j)))
return self.Location + new CVec(i, j);
return self.Location;
}
public override Activity Tick(Actor self)
{
if (IsCanceled) return NextActivity;
@@ -80,10 +97,13 @@ namespace OpenRA.Mods.RA.Activities
actor.CancelActivity();
actor.QueueActivity(new Drag(currentPx, exitPx, length));
actor.QueueActivity(mobile.MoveTo(exitTile.Value, 0));
actor.SetTargetLine(Target.FromCell(exitTile.Value), Color.Green, false);
var rallyPoint = ChooseRallyPoint(actor).Value;
actor.QueueActivity(mobile.MoveTo(rallyPoint, 0));
actor.SetTargetLine(Target.FromCell(rallyPoint), Color.Green, false);
});
return this;
return unloadAll ? this : NextActivity;
}
}
}

View File

@@ -0,0 +1,43 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 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 COPYING.
*/
#endregion
using System;
using OpenRA.Traits;
using OpenRA.Mods.RA.Activities;
namespace OpenRA.Mods.RA
{
public class AttackLoyaltyInfo : AttackFrontalInfo
{
public override object Create(ActorInitializer init) { return new AttackLoyalty(init.self, this); }
}
public class AttackLoyalty : AttackFrontal
{
public AttackLoyalty(Actor self, AttackLoyaltyInfo info)
: base( self, info ) {}
public override void DoAttack(Actor self, Target target)
{
if (!CanAttack (self, target)) return;
var weapon = Weapons[0].Info;
if (!Combat.IsInRange(self.CenterLocation, weapon.Range, target)) return;
var move = self.TraitOrDefault<IMove>();
var facing = self.TraitOrDefault<IFacing>();
foreach (var w in Weapons)
w.CheckFire(self, this, move, facing, target);
if (target.Actor != null)
target.Actor.ChangeOwner(self.Owner);
}
}
}

View File

@@ -37,9 +37,7 @@ namespace OpenRA.Mods.RA.Buildings
if (order.OrderString == "PowerDown")
{
disabled = !disabled;
var eva = self.World.WorldActor.Info.Traits.Get<EvaAlertsInfo>();
Sound.PlayToPlayer(self.Owner, disabled ? eva.EnablePower : eva.DisablePower);
Sound.PlayNotification(self.Owner, "Sounds", (disabled ? "EnablePower" : "DisablePower"), self.Owner.Country.Race);
PowerManager.UpdateActor(self, disabled ? 0 : normalPower);
if (disabled)

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2012 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,
@@ -108,8 +108,7 @@ namespace OpenRA.Mods.RA.Buildings
if (--nextPowerAdviceTime <= 0)
{
if (lowPower)
Player.GiveAdvice(Rules.Info["world"].Traits.Get<EvaAlertsInfo>().LowPower);
Sound.PlayNotification(self.Owner, "Speech", "LowPower", self.Owner.Country.Race);
nextPowerAdviceTime = Info.AdviceInterval;
}
}

View File

@@ -48,7 +48,7 @@ namespace OpenRA.Mods.RA.Buildings
else
{
Repairer = p;
Sound.PlayToPlayer(Repairer, p.World.WorldActor.Info.Traits.Get<EvaAlertsInfo>().Repairing);
Sound.PlayNotification(Repairer, "Speech", "Repairing", self.Owner.Country.Race);
self.World.AddFrameEndTask(
w => w.Add(new RepairIndicator(self, p)));

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2012 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,
@@ -22,6 +22,8 @@ namespace OpenRA.Mods.RA
class CapturesInfo : ITraitInfo
{
public string[] CaptureTypes = {"building"};
public int Range = 3;
public bool wastedAfterwards = true;
public object Create(ActorInitializer init) { return new Captures(init.self, this); }
}
@@ -40,7 +42,7 @@ namespace OpenRA.Mods.RA
{
get
{
yield return new CaptureOrderTargeter(Info.CaptureTypes, target => CanEnter(target));
yield return new CaptureOrderTargeter(Info.CaptureTypes, target => CanCapture(target));
}
}
@@ -55,24 +57,23 @@ namespace OpenRA.Mods.RA
public string VoicePhraseForOrder(Actor self, Order order)
{
return (order.OrderString == "CaptureActor"
&& CanEnter(order.TargetActor)) ? "Attack" : null;
&& CanCapture(order.TargetActor)) ? "Attack" : null;
}
public void ResolveOrder(Actor self, Order order)
{
if (order.OrderString == "CaptureActor")
{
if (!CanEnter(order.TargetActor)) return;
if (!CanCapture(order.TargetActor)) return;
self.SetTargetLine(Target.FromOrder(order), Color.Red);
self.CancelActivity();
self.QueueActivity(new Enter(order.TargetActor));
self.QueueActivity(new CaptureActor(order.TargetActor));
}
}
bool CanEnter(Actor target)
bool CanCapture(Actor target)
{
var c = target.TraitOrDefault<Capturable>();
return c != null && ( !c.CaptureInProgress || c.Captor.Owner.Stances[self.Owner] != Stance.Ally );
@@ -104,9 +105,11 @@ namespace OpenRA.Mods.RA
IsQueued = forceQueued;
var Info = self.Info.Traits.Get<CapturesInfo>();
if (captureTypes.Contains(ci.Type))
{
cursor = useEnterCursor(target) ? "enter" : "enter-blocked";
cursor = (Info.wastedAfterwards) ? (useEnterCursor(target) ? "enter" : "enter-blocked") : "attack";
return true;
}

View File

@@ -81,7 +81,7 @@ namespace OpenRA.Mods.RA
return;
self.CancelActivity();
self.QueueActivity(new UnloadCargo());
self.QueueActivity(new UnloadCargo(true));
}
}

View File

@@ -52,18 +52,11 @@ namespace OpenRA.Mods.RA
if (order.OrderString == "ChronoshiftSelf" && movement.CanEnterCell(order.TargetLocation))
{
if (self.Owner == self.World.LocalPlayer)
{
self.World.CancelInputMode();
}
self.CancelActivity();
self.QueueActivity(new Teleport(order.TargetLocation));
Sound.Play("chrotnk1.aud", self.CenterLocation);
Sound.Play("chrotnk1.aud", order.TargetLocation.ToPPos());
self.QueueActivity(new Teleport(null, order.TargetLocation, true));
chargeTick = 25 * self.Info.Traits.Get<ChronoshiftDeployInfo>().ChargeTime;
foreach (var a in self.World.ActorsWithTrait<ChronoshiftPaletteEffect>())
a.Trait.Enable();
}
}

View File

@@ -20,6 +20,8 @@ namespace OpenRA.Mods.RA
// Return-to-sender logic
[Sync] CPos chronoshiftOrigin;
[Sync] int chronoshiftReturnTicks = 0;
Actor chronosphere;
bool killCargo;
public void Tick(Actor self)
{
@@ -34,7 +36,7 @@ namespace OpenRA.Mods.RA
{
self.CancelActivity();
// Todo: need a new Teleport method that will move to the closest available cell
self.QueueActivity(new Teleport(chronoshiftOrigin));
self.QueueActivity(new Teleport(chronosphere, chronoshiftOrigin, killCargo));
}
}
@@ -52,22 +54,12 @@ namespace OpenRA.Mods.RA
/// Set up return-to-sender info
chronoshiftOrigin = self.Location;
chronoshiftReturnTicks = duration;
// Kill cargo
if (killCargo && self.HasTrait<Cargo>())
{
var cargo = self.Trait<Cargo>();
while (!cargo.IsEmpty(self))
{
chronosphere.Owner.Kills++;
var a = cargo.Unload(self);
a.Owner.Deaths++;
}
}
this.chronosphere = chronosphere;
this.killCargo = killCargo;
// Set up the teleport
self.CancelActivity();
self.QueueActivity(new Teleport(targetLocation));
self.QueueActivity(new Teleport(chronosphere, targetLocation, killCargo));
return true;
}

View File

@@ -15,10 +15,7 @@ namespace OpenRA.Mods.RA
{
public class ConquestVictoryConditionsInfo : ITraitInfo
{
public string WinNotification = null;
public string LoseNotification = null;
public int NotificationDelay = 1500; // Milliseconds
public readonly string Race = null;
public object Create(ActorInitializer init) { return new ConquestVictoryConditions(this); }
}
@@ -55,7 +52,6 @@ namespace OpenRA.Mods.RA
public void Lose(Actor self)
{
if (Info.Race != null && Info.Race != self.Owner.Country.Race) return;
if (self.Owner.WinState == WinState.Lost) return;
self.Owner.WinState = WinState.Lost;
@@ -70,14 +66,13 @@ namespace OpenRA.Mods.RA
Game.RunAfterDelay(Info.NotificationDelay, () =>
{
if (Game.IsCurrentWorld(self.World))
Sound.Play(Info.LoseNotification);
Sound.PlayNotification(self.Owner, "Speech", "Lose", self.Owner.Country.Race);
});
}
}
public void Win(Actor self)
{
if (Info.Race != null && Info.Race != self.Owner.Country.Race) return;
if (self.Owner.WinState == WinState.Won) return;
self.Owner.WinState = WinState.Won;
@@ -85,7 +80,7 @@ namespace OpenRA.Mods.RA
if (self.Owner == self.World.LocalPlayer)
{
self.World.LocalShroud.Disabled = true;
Game.RunAfterDelay(Info.NotificationDelay, () => Sound.Play(Info.WinNotification));
Game.RunAfterDelay(Info.NotificationDelay, () => Sound.PlayNotification(self.Owner, "Speech", "Win", self.Owner.Country.Race));
}
}
}

View File

@@ -14,17 +14,6 @@ using OpenRA.FileFormats;
using OpenRA.Traits;
using OpenRA.Mods.RA.Buildings;
/*
* Crates left to implement:
HealBase=1,INVUN ; all buildings to full strength
ICBM=1,MISSILE2 ; nuke missile one time shot
Sonar=3,SONARBOX ; one time sonar pulse
Squad=20,NONE ; squad of random infantry
Unit=20,NONE ; vehicle
Invulnerability=3,INVULBOX,1.0 ; invulnerability (duration in minutes)
TimeQuake=3,TQUAKE ; time quake
*/
namespace OpenRA.Mods.RA
{
class CrateInfo : ITraitInfo, Requires<RenderSimpleInfo>
@@ -35,7 +24,7 @@ namespace OpenRA.Mods.RA
}
// ITeleportable is required for paradrop
class Crate : ITick, IOccupySpace, ITeleportable, ICrushable, ISync
class Crate : ITick, IOccupySpace, ITeleportable, ICrushable, ISync, INotifyParachuteLanded
{
readonly Actor self;
[Sync] int ticks;
@@ -73,6 +62,15 @@ namespace OpenRA.Mods.RA
n -= s.Second;
}
public void OnLanded()
{
var landedOn = self.World.ActorMap.GetUnitsAt(self.Location)
.FirstOrDefault(a => a != self);
if (landedOn != null)
OnCrush(landedOn);
}
public void Tick(Actor self)
{
if( ++ticks >= Info.Lifetime * 25 )

View File

@@ -67,6 +67,9 @@ namespace OpenRA.Mods.RA.Effects
cargo.CancelActivity();
cargo.Trait<ITeleportable>().SetPosition(cargo, loc);
w.Add(cargo);
foreach( var npl in cargo.TraitsImplementing<INotifyParachuteLanded>() )
npl.OnLanded();
});
}

View File

@@ -77,8 +77,7 @@ namespace OpenRA.Mods.RA
while (Level < MaxLevel && Experience >= Levels[Level])
{
Level++;
var eva = self.World.WorldActor.Info.Traits.Get<EvaAlertsInfo>();
Sound.PlayToPlayer(self.Owner, eva.LevelUp, self.CenterLocation);
Sound.PlayNotification(self.Owner, "Sounds", "LevelUp", self.Owner.Country.Race);
self.World.AddFrameEndTask(w => w.Add(new CrateEffect(self, "levelup", new int2(0,-24))));
}
}

View File

@@ -51,6 +51,7 @@ namespace OpenRA.Mods.RA
public CPos? LastOrderLocation = null;
[Sync] public int ContentValue { get { return contents.Sum(c => c.Key.ValuePerUnit * c.Value); } }
readonly HarvesterInfo Info;
bool idleSmart = true;
public Harvester(Actor self, HarvesterInfo info)
{
@@ -61,6 +62,7 @@ namespace OpenRA.Mods.RA
public void SetProcLines(Actor proc)
{
if (proc == null) return;
if (proc.Destroyed) return;
var linkedHarvs = proc.World.ActorsWithTrait<Harvester>()
.Where(a => a.Trait.LinkedProc == proc)
@@ -147,7 +149,7 @@ namespace OpenRA.Mods.RA
{
// Check that we're not in a critical location and being useless (refinery drop-off):
var lastproc = LastLinkedProc ?? LinkedProc;
if (lastproc != null)
if (lastproc != null && !lastproc.Destroyed)
{
var deliveryLoc = lastproc.Location + lastproc.Trait<IAcceptOre>().DeliverOffset;
if (self.Location == deliveryLoc)
@@ -191,6 +193,9 @@ namespace OpenRA.Mods.RA
public void TickIdle(Actor self)
{
// Should we be intelligent while idle?
if (!idleSmart) return;
// Are we not empty? Deliver resources:
if (!IsEmpty)
{
@@ -262,9 +267,11 @@ namespace OpenRA.Mods.RA
{
// NOTE: An explicit harvest order allows the harvester to decide which refinery to deliver to.
LinkProc(self, OwnerLinkedProc = null);
idleSmart = true;
var mobile = self.Trait<Mobile>();
self.CancelActivity();
var mobile = self.Trait<Mobile>();
if (order.TargetLocation != CPos.Zero)
{
var loc = order.TargetLocation;
@@ -290,7 +297,7 @@ namespace OpenRA.Mods.RA
else
{
// A bot order gives us a CPos.Zero TargetLocation, so find some good resources for him:
CPos? loc = FindNextResourceForBot(self);
var loc = FindNextResourceForBot(self);
// No more resources? Oh well.
if (!loc.HasValue)
return;
@@ -301,6 +308,8 @@ namespace OpenRA.Mods.RA
LastOrderLocation = loc;
}
// This prevents harvesters returning to an empty patch when the player orders them to a new patch:
LastHarvestedCell = LastOrderLocation;
self.QueueActivity(new FindResources());
}
else if (order.OrderString == "Deliver")
@@ -316,11 +325,18 @@ namespace OpenRA.Mods.RA
if (IsEmpty)
return;
idleSmart = true;
self.SetTargetLine(Target.FromOrder(order), Color.Green);
self.CancelActivity();
self.QueueActivity(new DeliverResources());
}
else if (order.OrderString == "Stop" || order.OrderString == "Move")
{
// Turn off idle smarts to obey the stop/move:
idleSmart = false;
}
}
CPos? FindNextResourceForBot(Actor self)

View File

@@ -258,6 +258,7 @@ namespace OpenRA.Mods.RA.Missions
chinook.QueueActivity(new Turn(0));
chinook.QueueActivity(new HeliLand(true));
chinook.QueueActivity(new UnloadCargo());
chinook.QueueActivity(new UnloadCargo(true));
chinook.QueueActivity(new CallFunc(() => Sound.Play("laugh1.aud")));
chinook.QueueActivity(new Wait(150));
chinook.QueueActivity(new HeliFly(chinookExitPoint.CenterLocation));

View File

@@ -456,6 +456,10 @@ namespace OpenRA.Mods.RA.Move
{
IsQueued = forceQueued;
cursor = "move";
if (self.World.LocalPlayer.Shroud.IsExplored(location))
cursor = self.World.GetTerrainInfo(location).CustomCursor ?? cursor;
if (!self.World.Map.IsInMap(location) || (self.World.LocalPlayer.Shroud.IsExplored(location) &&
unitType.MovementCostForCell(self.World, location) == int.MaxValue))
cursor = "move-blocked";

View File

@@ -127,6 +127,7 @@
<Compile Include="Attack\AttackBase.cs" />
<Compile Include="Attack\AttackFrontal.cs" />
<Compile Include="Attack\AttackLeap.cs" />
<Compile Include="Attack\AttackLoyalty.cs" />
<Compile Include="Attack\AttackMedic.cs" />
<Compile Include="Attack\AttackOmni.cs" />
<Compile Include="Attack\AttackPopupTurreted.cs" />
@@ -384,6 +385,7 @@
<Compile Include="World\PlayMusicOnMapLoad.cs" />
<Compile Include="World\SmudgeLayer.cs" />
<Compile Include="Player\BaseAttackNotifier.cs" />
<Compile Include="Player\HarvesterAttackNotifier.cs" />
<Compile Include="InfiltrateForExploration.cs" />
<Compile Include="InfiltrateForCash.cs" />
<Compile Include="RenderShroudCircle.cs" />

View File

@@ -58,8 +58,7 @@ namespace OpenRA.Mods.RA.Orders
if (!world.CanPlaceBuilding( Building, BuildingInfo, topLeft, null)
|| !BuildingInfo.IsCloseEnoughToBase(world, Producer.Owner, Building, topLeft))
{
var eva = world.WorldActor.Info.Traits.Get<EvaAlertsInfo>();
Sound.Play(eva.BuildingCannotPlaceAudio);
Sound.PlayNotification(Producer.Owner, "Speech", "BuildingCannotPlaceAudio", Producer.Owner.Country.Race);
yield break;
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2012 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,
@@ -16,7 +16,7 @@ namespace OpenRA.Mods.RA
class PaletteFromCurrentTilesetInfo : ITraitInfo
{
public readonly string Name = null;
public readonly bool Transparent = true;
public readonly int[] ShadowIndex = { };
public object Create(ActorInitializer init) { return new PaletteFromCurrentTileset(init.world, this); }
}
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.RA
public void InitPalette( OpenRA.Graphics.WorldRenderer wr )
{
wr.AddPalette( info.Name, new Palette( FileSystem.Open( world.TileSet.Palette ), info.Transparent ) );
wr.AddPalette( info.Name, new Palette( FileSystem.Open( world.TileSet.Palette ), info.ShadowIndex ) );
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2012 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,
@@ -19,7 +19,7 @@ namespace OpenRA.Mods.RA
public readonly string Name = null;
public readonly string Tileset = null;
public readonly string Filename = null;
public readonly bool Transparent = true;
public readonly int[] ShadowIndex = { };
public object Create(ActorInitializer init) { return new PaletteFromFile(init.world, this); }
}
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.RA
public void InitPalette( WorldRenderer wr )
{
if( info.Tileset == null || info.Tileset.ToLowerInvariant() == world.Map.Tileset.ToLowerInvariant() )
wr.AddPalette( info.Name, new Palette( FileSystem.Open( info.Filename ), info.Transparent ) );
wr.AddPalette( info.Name, new Palette( FileSystem.Open( info.Filename ), info.ShadowIndex ) );
}
}
}

View File

@@ -28,7 +28,7 @@ namespace OpenRA.Mods.RA
public class Passenger : IIssueOrder, IResolveOrder, IOrderVoice
{
readonly PassengerInfo info;
public readonly PassengerInfo info;
public Passenger( PassengerInfo info ) { this.info = info; }
public IEnumerable<IOrderTargeter> Orders

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2012 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,
@@ -17,9 +17,7 @@ namespace OpenRA.Mods.RA
{
public class BaseAttackNotifierInfo : ITraitInfo
{
public readonly int NotifyInterval = 30; /* seconds */
public readonly string Audio = "baseatk1.aud";
public readonly string Race = null;
public readonly int NotifyInterval = 30; // seconds
public object Create(ActorInitializer init) { return new BaseAttackNotifier(this); }
}
@@ -35,17 +33,16 @@ namespace OpenRA.Mods.RA
public void Damaged(Actor self, AttackInfo e)
{
if (info.Race != null && info.Race != self.Owner.Country.Race) return;
/* only track last hit against our base */
// only track last hit against our base
if (!self.HasTrait<Building>())
return;
/* don't track self-damage */
// don't track self-damage
if (e.Attacker != null && e.Attacker.Owner == self.Owner)
return;
if (self.World.FrameNumber - lastAttackTime > info.NotifyInterval * 25)
Sound.PlayToPlayer(self.Owner, info.Audio);
Sound.PlayNotification(self.Owner, "Speech", "BaseAttack", self.Owner.Country.Race);
lastAttackLocation = self.CenterLocation.ToCPos();
lastAttackTime = self.World.FrameNumber;

View File

@@ -0,0 +1,52 @@
#region Copyright & License Information
/*
* Copyright 2007-2012 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 COPYING.
*/
#endregion
using System;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Effects;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
{
public class HarvesterAttackNotifierInfo : ITraitInfo
{
public readonly int NotifyInterval = 30; // seconds
public object Create(ActorInitializer init) { return new HarvesterAttackNotifier(this); }
}
public class HarvesterAttackNotifier : INotifyDamage
{
HarvesterAttackNotifierInfo info;
public int lastAttackTime = -1;
public CPos lastAttackLocation;
public HarvesterAttackNotifier(HarvesterAttackNotifierInfo info) { this.info = info; }
public void Damaged(Actor self, AttackInfo e)
{
// only track last hit against our base
if (!self.HasTrait<Harvester>())
return;
// don't track self-damage
if (e.Attacker != null && e.Attacker.Owner == self.Owner)
return;
if (self.World.FrameNumber - lastAttackTime > info.NotifyInterval * 25)
Sound.PlayNotification(self.Owner, "Speech", "HarvesterAttack", self.Owner.Country.Race);
lastAttackLocation = self.CenterLocation.ToCPos();
lastAttackTime = self.World.FrameNumber;
}
}
}

View File

@@ -82,8 +82,7 @@ namespace OpenRA.Mods.RA
if (GetNumBuildables(self.Owner) > prevItems)
w.Add(new DelayedAction(10,
() => Sound.PlayToPlayer(order.Player,
w.WorldActor.Info.Traits.Get<EvaAlertsInfo>().NewOptions)));
() => Sound.PlayNotification(order.Player, "Speech", "NewOptions", order.Player.Country.Race)));
});
}
}

View File

@@ -66,8 +66,7 @@ namespace OpenRA.Mods.RA
isPrimary = true;
var eva = self.World.WorldActor.Info.Traits.Get<EvaAlertsInfo>();
Sound.PlayToPlayer(self.Owner, eva.PrimaryBuildingSelected);
Sound.PlayNotification(self.Owner, "Speech", "PrimaryBuildingSelected", self.Owner.Country.Race);
}
}

View File

@@ -127,7 +127,7 @@ namespace OpenRA.Mods.RA.Render
self.World.AddFrameEndTask(w =>
{
if (!self.Destroyed)
w.Add(new Corpse(self, "die{0}".F(e.Warhead.InfDeath + 1)));
w.Add(new Corpse(self, "die{0}".F(e.Warhead.InfDeath)));
});
}
}

View File

@@ -20,15 +20,6 @@ namespace OpenRA.Scripting
{
public static void Chronoshift(World world, List<Pair<Actor, CPos>> units, Actor chronosphere, int duration, bool killCargo)
{
if (chronosphere != null)
chronosphere.Trait<RenderBuilding>().PlayCustomAnim(chronosphere, "active");
// Trigger screen desaturate effect
foreach (var a in world.ActorsWithTrait<ChronoshiftPaletteEffect>())
a.Trait.Enable();
Sound.Play("chrono2.aud", units.First().First.CenterLocation);
foreach (var kv in units)
{
var target = kv.First;
@@ -37,8 +28,6 @@ namespace OpenRA.Scripting
if (cs.CanChronoshiftTo(target, targetCell, true))
cs.Teleport(target, targetCell, duration, killCargo,chronosphere);
}
}
}
}

View File

@@ -39,14 +39,6 @@ namespace OpenRA.Mods.RA
public override void Activate(Actor self, Order order)
{
self.Trait<RenderBuilding>().PlayCustomAnim(self, "active");
// Trigger screen desaturate effect
foreach (var a in self.World.ActorsWithTrait<ChronoshiftPaletteEffect>())
a.Trait.Enable();
Sound.Play("chrono2.aud", order.TargetLocation.ToPPos());
Sound.Play("chrono2.aud", order.ExtraLocation.ToPPos());
foreach (var target in UnitsInRange(order.ExtraLocation))
{
var cs = target.Trait<Chronoshiftable>();

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Mods.RA
{
public float GetDamageModifier(Actor attacker, WarheadInfo warhead )
{
if( warhead != null && warhead.InfDeath == 5 )
if( warhead != null && warhead.InfDeath == 6 )
return 1000f;
return 1f;
}

View File

@@ -42,4 +42,6 @@ namespace OpenRA.Mods.RA
{
void OnNotifyResourceClaimLost(Actor self, ResourceClaim claim, Actor claimer);
}
public interface INotifyParachuteLanded { void OnLanded(); }
}

View File

@@ -44,9 +44,6 @@ namespace OpenRA.Mods.RA.Widgets
List<Pair<Rectangle, Action<MouseInput>>> tabs = new List<Pair<Rectangle, Action<MouseInput>>>();
Animation cantBuild;
Animation clock;
public readonly string BuildPaletteOpen = "bleep13.aud";
public readonly string BuildPaletteClose = "bleep13.aud";
public readonly string TabClick = "ramenu1.aud";
readonly WorldRenderer worldRenderer;
readonly World world;
@@ -118,11 +115,11 @@ namespace OpenRA.Mods.RA.Widgets
// Play palette-open sound at the start of the activate anim (open)
if (paletteAnimationFrame == 1 && paletteOpen)
Sound.Play(BuildPaletteOpen);
Sound.PlayNotification(null, "Sounds", "BuildPaletteOpen", null);
// Play palette-close sound at the start of the activate anim (close)
if (paletteAnimationFrame == paletteAnimationLength + -1 && !paletteOpen)
Sound.Play(BuildPaletteClose);
Sound.PlayNotification(null, "Sounds", "BuildPaletteClose", null);
// Animation is complete
if ((paletteAnimationFrame == 0 && !paletteOpen)
@@ -291,7 +288,7 @@ namespace OpenRA.Mods.RA.Widgets
Action<MouseInput> HandleClick(string name, World world)
{
return mi => {
Sound.Play(TabClick);
Sound.PlayNotification(null, "Sounds", "TabClick", null);
if (name != null)
HandleBuildPalette(world, name, (mi.Button == MouseButton.Left));
@@ -304,7 +301,7 @@ namespace OpenRA.Mods.RA.Widgets
if (mi.Button != MouseButton.Left)
return;
Sound.Play(TabClick);
Sound.PlayNotification(null, "Sounds", "TabClick", null);
var wasOpen = paletteOpen;
paletteOpen = (CurrentQueue == queue && wasOpen) ? false : true;
CurrentQueue = queue;
@@ -496,7 +493,7 @@ namespace OpenRA.Mods.RA.Widgets
if ( toBuild != null )
{
Sound.Play(TabClick);
Sound.PlayNotification(null, "Sounds", "TabClick", null);
HandleBuildPalette(world, toBuild.Name, true);
return true;
}
@@ -507,7 +504,7 @@ namespace OpenRA.Mods.RA.Widgets
void TabChange(bool shift)
{
var queues = VisibleQueues.Concat(VisibleQueues);
if (shift) queues.Reverse();
if (shift) queues = queues.Reverse();
var nextQueue = queues.SkipWhile( q => q != CurrentQueue )
.ElementAtOrDefault(1);
if (nextQueue != null)

View File

@@ -38,7 +38,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
};
cheatsButton.IsVisible = () => world.LocalPlayer != null && world.LobbyInfo.GlobalSettings.AllowCheats;
optionsBG.Get<ButtonWidget>("DISCONNECT").OnClick = () => LeaveGame(optionsBG);
optionsBG.Get<ButtonWidget>("DISCONNECT").OnClick = () => LeaveGame(optionsBG, world);
optionsBG.Get<ButtonWidget>("SETTINGS").OnClick = () => Ui.OpenWindow("SETTINGS_MENU");
optionsBG.Get<ButtonWidget>("MUSIC").OnClick = () => Ui.OpenWindow("MUSIC_MENU");
@@ -57,7 +57,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
var postGameObserve = postgameBG.Get<ButtonWidget>("POSTGAME_OBSERVE");
var postgameQuit = postgameBG.Get<ButtonWidget>("POSTGAME_QUIT");
postgameQuit.OnClick = () => LeaveGame(postgameQuit);
postgameQuit.OnClick = () => LeaveGame(postgameQuit, world);
postGameObserve.OnClick = () => postgameQuit.Visible = false;
postGameObserve.IsVisible = () => world.LocalPlayer.WinState != WinState.Won;
@@ -76,8 +76,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
};
}
void LeaveGame(Widget pane)
void LeaveGame(Widget pane, World world)
{
Sound.PlayNotification(null, "Speech", "Leave", world.LocalPlayer.Country.Race);
pane.Visible = false;
Game.Disconnect();
Game.LoadShellMap();

View File

@@ -237,7 +237,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
chatPanel.AddChild(template);
chatPanel.ScrollToBottom();
Sound.Play("scold1.aud");
Sound.PlayNotification(null, "Sounds", "ChatLine", null);
}
void UpdateCurrentMap()

View File

@@ -175,8 +175,7 @@ namespace OpenRA.Mods.RA.Widgets
if (hasRadarNew != hasRadar)
{
radarAnimating = true;
var eva = Rules.Info["world"].Traits.Get<EvaAlertsInfo>();
Sound.Play(hasRadarNew ? eva.RadarUp : eva.RadarDown);
Sound.PlayNotification(null, "Sounds", (hasRadarNew ? "RadarUp" : "RadarDown"), null);
}
hasRadar = hasRadarNew;

View File

@@ -56,9 +56,11 @@ namespace OpenRA.TilesetBuilder
Bitmap rbitmap = fbitmap.Clone(new Rectangle(0, 0, fbitmap.Width, fbitmap.Height),
fbitmap.PixelFormat);
int[] ShadowIndex = { };
if (!PaletteFromImage)
{
tpal = Palette.Load(PaletteFile, false);
tpal = Palette.Load(PaletteFile, ShadowIndex);
rbitmap.Palette = tpal.AsSystemPalette();
}

View File

@@ -81,8 +81,15 @@ namespace OpenRA.Utility
var dest = Path.ChangeExtension(src, ".png");
var srcImage = ShpReader.Load(src);
var shouldRemap = args.Contains( "--transparent" );
var palette = Palette.Load(args[2], shouldRemap);
int[] ShadowIndex = { };
if (args.Contains("--noshadow"))
{
Array.Resize(ref ShadowIndex, ShadowIndex.Length + 3);
ShadowIndex[ShadowIndex.Length - 1] = 1;
ShadowIndex[ShadowIndex.Length - 2] = 3;
ShadowIndex[ShadowIndex.Length - 1] = 4;
}
var palette = Palette.Load(args[2], ShadowIndex);
using (var bitmap = new Bitmap(srcImage.ImageCount * srcImage.Width, srcImage.Height, PixelFormat.Format8bppIndexed))
{
@@ -110,8 +117,13 @@ namespace OpenRA.Utility
public static void ConvertR8ToPng(string[] args)
{
var srcImage = new R8Reader(File.OpenRead(args[1]));
var shouldRemap = args.Contains("--transparent");
var palette = Palette.Load(args[2], shouldRemap);
int[] ShadowIndex = { };
if (args.Contains("--noshadow"))
{
Array.Resize(ref ShadowIndex, ShadowIndex.Length + 1);
ShadowIndex[ShadowIndex.Length - 1] = 3;
}
var palette = Palette.Load(args[2], ShadowIndex);
var startFrame = int.Parse(args[3]);
var endFrame = int.Parse(args[4]) + 1;
var filename = args[5];
@@ -319,6 +331,7 @@ namespace OpenRA.Utility
var mods = args[1].Split(',');
var theater = args[2];
var templateNames = args.Skip(3);
int[] ShadowIndex = { 3, 4 };
var manifest = new Manifest(mods);
FileSystem.LoadFromManifest(manifest);
@@ -330,7 +343,7 @@ namespace OpenRA.Utility
throw new InvalidOperationException("No theater named '{0}'".F(theater));
tileset.LoadTiles();
var palette = new Palette(FileSystem.Open(tileset.Palette), true);
var palette = new Palette(FileSystem.Open(tileset.Palette), ShadowIndex);
foreach( var templateName in templateNames )
{
@@ -413,14 +426,15 @@ namespace OpenRA.Utility
var destPaletteInfo = Rules.Info["player"].Traits.Get<PlayerColorPaletteInfo>();
int[] destRemapIndex = destPaletteInfo.RemapIndex;
int[] ShadowIndex = { };
// the remap range is always 16 entries, but their location and order changes
for (var i = 0; i < 16; i++)
remap[PlayerColorRemap.GetRemapIndex(srcRemapIndex, i)]
= PlayerColorRemap.GetRemapIndex(destRemapIndex, i);
// map everything else to the best match based on channel-wise distance
var srcPalette = Palette.Load(args[1].Split(':')[1], false);
var destPalette = Palette.Load(args[2].Split(':')[1], false);
var srcPalette = Palette.Load(args[1].Split(':')[1], ShadowIndex);
var destPalette = Palette.Load(args[2].Split(':')[1], ShadowIndex);
var fullIndexRange = Exts.MakeArray<int>(256, x => x);

View File

@@ -57,11 +57,11 @@ namespace OpenRA.Utility
Console.WriteLine();
Console.WriteLine(" --settings-value KEY Get value of KEY from settings.yaml");
Console.WriteLine(" --shp PNGFILE FRAMEWIDTH Convert a single PNG with multiple frames appended after another to a SHP");
Console.WriteLine(" --png SHPFILE PALETTE [--transparent] Convert a SHP to a PNG containing all of its frames, optionally setting up transparency");
Console.WriteLine(" --png SHPFILE PALETTE [--noshadow] Convert a SHP to a PNG containing all of its frames, optionally removing the shadow");
Console.WriteLine(" --extract MOD[,MOD]* FILES Extract files from mod packages");
Console.WriteLine(" --tmp-png MOD[,MOD]* THEATER FILES Extract terrain tiles to PNG");
Console.WriteLine(" --remap SRCMOD:PAL DESTMOD:PAL SRCSHP DESTSHP Remap SHPs to another palette");
Console.WriteLine(" --r8 R8FILE PALETTE START END FILENAME [--transparent] [--infrantry] [--vehicle] [--projectile] [--building] [--wall] [--tileset] Convert Dune 2000 DATA.R8 to PNGs choosing start- and endframe as well as type for correct offset to append multiple frames to one PNG named by filename optionally setting up transparency.");
Console.WriteLine(" --r8 R8FILE PALETTE START END FILENAME [--noshadow] [--infrantry] [--vehicle] [--projectile] [--building] [--wall] [--tileset] Convert Dune 2000 DATA.R8 to PNGs choosing start- and endframe as well as type for correct offset to append multiple frames to one PNG named by filename optionally removing the shadow.");
Console.WriteLine(" --transpose SRCSHP DESTSHP START N M [START N M ...] Transpose the N*M block of frames starting at START.");
}

View File

@@ -1 +0,0 @@
http://nyerguds.arsaneus-design.com/cnc95upd/inirules/

View File

@@ -103,8 +103,6 @@ Container@PLAYER_WIDGETS:
Font:Bold
TooltipText: Menu
TooltipContainer:TOOLTIP_CONTAINER
ClickSound:button.aud
ClickDisabledSound:scold2.aud
Children:
Image@ICON:
X:7
@@ -120,8 +118,6 @@ Container@PLAYER_WIDGETS:
Font:Bold
TooltipText: Sell
TooltipContainer:TOOLTIP_CONTAINER
ClickSound:button.aud
ClickDisabledSound:scold2.aud
Children:
Image@ICON:
X:7
@@ -136,8 +132,6 @@ Container@PLAYER_WIDGETS:
Font:Bold
TooltipText: Repair
TooltipContainer:TOOLTIP_CONTAINER
ClickSound:button.aud
ClickDisabledSound:scold2.aud
Children:
Image@ICON:
X:7
@@ -200,8 +194,6 @@ Container@PLAYER_WIDGETS:
Key: q
TooltipText: Buildings
TooltipContainer:TOOLTIP_CONTAINER
ClickSound:button.aud
ClickDisabledSound:scold2.aud
Children:
Image@ICON:
X:7
@@ -214,8 +206,6 @@ Container@PLAYER_WIDGETS:
Key: w
TooltipText: Defense
TooltipContainer:TOOLTIP_CONTAINER
ClickSound:button.aud
ClickDisabledSound:scold2.aud
Children:
Image@ICON:
X:7
@@ -228,8 +218,6 @@ Container@PLAYER_WIDGETS:
Key: e
TooltipText: Infantry
TooltipContainer:TOOLTIP_CONTAINER
ClickSound:button.aud
ClickDisabledSound:scold2.aud
Children:
Image@ICON:
X:7
@@ -242,8 +230,6 @@ Container@PLAYER_WIDGETS:
Key: r
TooltipText: Vehicles
TooltipContainer:TOOLTIP_CONTAINER
ClickSound:button.aud
ClickDisabledSound:scold2.aud
Children:
Image@ICON:
X:7
@@ -256,8 +242,6 @@ Container@PLAYER_WIDGETS:
Key: t
TooltipText: Aircraft
TooltipContainer:TOOLTIP_CONTAINER
ClickSound:button.aud
ClickDisabledSound:scold2.aud
Children:
Image@ICON:
X:7
@@ -265,8 +249,6 @@ Container@PLAYER_WIDGETS:
ImageCollection:production-icons
ProductionTabs@PRODUCTION_TABS:
PaletteWidget:PRODUCTION_PALETTE
ClickSound:button.aud
DisabledClickSound:scold2.aud
X:WINDOW_RIGHT - 204
Y:268
Width:194
@@ -274,8 +256,6 @@ Container@PLAYER_WIDGETS:
ProductionPalette@PRODUCTION_PALETTE:
X:WINDOW_RIGHT - 204
Y:287
TabClick: button.aud
DisabledTabClick:scold2.aud
TooltipContainer:TOOLTIP_CONTAINER
Background@FMVPLAYER:
Width:WINDOW_RIGHT

View File

@@ -197,6 +197,11 @@ Cursors:
length:4
x:12
y:12
move-rough:
start:0
length: 8
x: 12
y: 12
attackmove:cursor
attackmove:

View File

@@ -90,6 +90,9 @@ Movies:
Voices:
mods/cnc/voices.yaml
Notifications:
mods/cnc/notifications.yaml
Music:
mods/cnc/music.yaml

View File

@@ -0,0 +1,26 @@
Speech:
Notifications:
Repairing: repair1
LowPower: lopower1
SilosNeeded: silos1
PrimaryBuildingSelected: pribldg1
BuildingCannotPlaceAudio: deploy1
NewOptions: newopt1
AbilityInsufficientPower: nopower1
Win: accom1
Lose: fail1
BaseAttack: baseatk1
HarvesterAttack:
Leave: batlcon1
Sounds:
Notifications:
RadarUp: comcntr1
RadarDown: powrdn1
CashTickUp:
CashTickDown:
LevelUp: text2
ChatLine: scold1
TabClick: button
ClickSound: button
ClickDisabledSound: scold2

View File

@@ -133,8 +133,9 @@
SpawnViceroid:
Probability: 2
CrushableInfantry:
Repairable:
RepairBuildings: hosp
RepairableNear:
Buildings: hosp
CloseEnough: 1
^CivInfantry:
Inherits: ^Infantry

View File

@@ -3,8 +3,6 @@ Player:
TechTree:
SupportPowerManager:
ConquestVictoryConditions:
WinNotification:accom1.aud
LoseNotification:fail1.aud
PowerManager:
AllyRepair:
PlayerResources:
@@ -70,14 +68,18 @@ World:
Bridges: bridge1, bridge2, bridge3, bridge4
PaletteFromCurrentTileset@terrain:
Name: terrain
ShadowIndex: 4
PaletteFromCurrentTileset@static:
Name: staticterrain
ShadowIndex: 4
PaletteFromFile@chrome:
Name: chrome
Filename: temperat.pal
ShadowIndex: 3
PaletteFromFile@effect:
Name: effect
Filename: temperat.pal
ShadowIndex: 4
PaletteFromRGBA@shadow:
Name: shadow
R: 0
@@ -151,17 +153,6 @@ World:
CreateMPPlayers:
SpawnMPUnits:
MPStartLocations:
EvaAlerts:
RadarUp: comcntr1.aud
RadarDown: powrdn1.aud
BuildingCannotPlaceAudio: deploy1.aud
CashTickUp:
CashTickDown:
LowPower: lopower1.aud
SilosNeeded: silos1.aud
PrimaryBuildingSelected: pribldg1.aud
AbilityInsufficientPower: nopower1.aud
LevelUp: text2.aud
SpatialBins:
BinSize: 4
Shroud:

View File

@@ -21,7 +21,7 @@ V19.Husk:
# Hospital
HOSP:
Inherits: ^TechBuilding
Inherits: ^CivBuilding
Building:
Footprint: xx xx
Dimensions: 2,2
@@ -29,9 +29,7 @@ HOSP:
Name: Hospital
LeavesHusk:
HuskActor: HOSP.Husk
Reservable:
RepairsUnits:
RallyPoint:
HOSP.Husk:
Inherits: ^CivBuildingHusk

View File

@@ -8,7 +8,7 @@ UnitExplode:
Light: 60%
Heavy: 25%
Explosion: 8
InfDeath: 3
InfDeath: 4
ImpactSound: xplobig6
UnitExplodeSmall:
@@ -21,7 +21,7 @@ UnitExplodeSmall:
Light: 60%
Heavy: 25%
Explosion: 8
InfDeath: 3
InfDeath: 4
ImpactSound: xplos
GrenadierExplode:
@@ -34,7 +34,7 @@ GrenadierExplode:
Light: 60%
Heavy: 25%
Explosion: 8
InfDeath: 2
InfDeath: 3
ImpactSound: xplos
Atomic:
@@ -48,7 +48,7 @@ Atomic:
Light: 60%
Heavy: 25%
Explosion: 6
InfDeath: 4
InfDeath: 5
ImpactSound: nukexplo
Warhead@areanuke:
DamageModel: PerCell
@@ -62,7 +62,7 @@ Atomic:
Light: 60%
Heavy: 25%
Delay: 3
InfDeath: 4
InfDeath: 5
ImpactSound: xplobig4
IonCannon:
@@ -75,7 +75,7 @@ IonCannon:
Wood: 60%
Light: 60%
Heavy: 25%
InfDeath: 4
InfDeath: 5
Warhead@area:
DamageModel: PerCell
Damage: 200
@@ -88,7 +88,7 @@ IonCannon:
Light: 60%
Heavy: 25%
Delay: 3
InfDeath: 4
InfDeath: 5
Sniper:
Report: RAMGUN2
@@ -104,7 +104,7 @@ Sniper:
Wood: 5%
Light: 5%
Heavy: 5%
InfDeath: 1
InfDeath: 2
HighV:
ROF: 40
@@ -120,7 +120,7 @@ HighV:
Wood: 50%
Light: 50%
Heavy: 25%
InfDeath: 1
InfDeath: 2
Explosion: 1
HeliAGGun:
@@ -140,7 +140,7 @@ HeliAGGun:
Wood: 50%
Light: 50%
Heavy: 25%
InfDeath: 1
InfDeath: 2
Explosion: 1
HeliAAGun:
@@ -160,7 +160,7 @@ HeliAAGun:
Wood: 50%
Light: 50%
Heavy: 25%
InfDeath: 1
InfDeath: 2
Explosion: 1
Pistol:
@@ -176,7 +176,7 @@ Pistol:
Wood: 50%
Light: 50%
Heavy: 25%
InfDeath: 1
InfDeath: 2
Explosion: 1
Damage: 1
@@ -194,7 +194,7 @@ M16:
Light: 30%
Heavy: 10%
Explosion: 1
InfDeath: 1
InfDeath: 2
Damage: 15
Rockets:
@@ -220,7 +220,7 @@ Rockets:
Wood: 75%
Light: 75%
Heavy: 50%
InfDeath: 3
InfDeath: 4
Explosion: 4
ImpactSound: xplos
SmudgeType: Crater
@@ -251,7 +251,7 @@ BikeRockets:
Wood: 30%
Light: 75%
Heavy: 30%
InfDeath: 3
InfDeath: 4
Explosion: 4
ImpactSound: xplos
SmudgeType: Crater
@@ -282,7 +282,7 @@ OrcaAGMissiles:
Wood: 75%
Light: 75%
Heavy: 50%
InfDeath: 3
InfDeath: 4
Explosion: 4
ImpactSound: xplos
SmudgeType: Crater
@@ -313,7 +313,7 @@ OrcaAAMissiles:
Wood: 75%
Light: 75%
Heavy: 50%
InfDeath: 3
InfDeath: 4
Explosion: 4
ImpactSound: xplos
SmudgeType: Crater
@@ -332,7 +332,7 @@ Flamethrower:
Wood: 200%
Light: 75%
Heavy: 25%
InfDeath: 4
InfDeath: 5
ImpactSound: flamer2
SmudgeType: Scorch
Damage: 35
@@ -352,7 +352,7 @@ BigFlamer:
Wood: 200%
Light: 75%
Heavy: 25%
InfDeath: 4
InfDeath: 5
Explosion: 3
ImpactSound: flamer2
SmudgeType: Scorch
@@ -372,7 +372,7 @@ Chemspray:
Wood: 75%
Light: 75%
Heavy: 50%
InfDeath: 5
InfDeath: 6
SmudgeType: Scorch
ImpactSound: xplos
@@ -392,7 +392,7 @@ Grenade:
Wood: 75%
Light: 75%
Heavy: 50%
InfDeath: 2
InfDeath: 3
Explosion: 5
ImpactSound: xplos
SmudgeType: Crater
@@ -412,7 +412,7 @@ Grenade:
Wood: 75%
Light: 75%
Heavy: 50%
InfDeath: 3
InfDeath: 4
Explosion: 4
ImpactSound: xplos
SmudgeType: Crater
@@ -432,7 +432,7 @@ Grenade:
Wood: 75%
Light: 75%
Heavy: 50%
InfDeath: 3
InfDeath: 4
Explosion: 4
ImpactSound: xplos
SmudgeType: Crater
@@ -452,7 +452,7 @@ Grenade:
Wood: 75%
Light: 75%
Heavy: 50%
InfDeath: 3
InfDeath: 4
Explosion: 4
ImpactSound: xplos
SmudgeType: Crater
@@ -473,7 +473,7 @@ Grenade:
Wood: 75%
Light: 75%
Heavy: 50%
InfDeath: 3
InfDeath: 4
Explosion: 4
ImpactSound: xplos
SmudgeType: Crater
@@ -493,7 +493,7 @@ TurretGun:
Wood: 75%
Light: 75%
Heavy: 50%
InfDeath: 3
InfDeath: 4
Explosion: 4
ImpactSound: xplos
SmudgeType: Crater
@@ -523,7 +523,7 @@ MammothMissiles:
Wood: 75%
Light: 75%
Heavy: 50%
InfDeath: 3
InfDeath: 4
Explosion: 4
ImpactSound: xplos
SmudgeType: Crater
@@ -554,7 +554,7 @@ MammothMissiles:
Wood: 50%
Light: 100%
Heavy: 50%
InfDeath: 3
InfDeath: 4
Explosion: 4
ImpactSound: xplos
SmudgeType: Crater
@@ -585,7 +585,7 @@ MammothMissiles:
Wood: 75%
Light: 75%
Heavy: 50%
InfDeath: 3
InfDeath: 4
Explosion: 4
ImpactSound: xplos
SmudgeType: Crater
@@ -611,7 +611,7 @@ ArtilleryShell:
Wood: 75%
Light: 60%
Heavy: 25%
InfDeath: 2
InfDeath: 3
Explosion: 8
SmudgeType: Crater
ImpactSound: XPLOSML2
@@ -629,7 +629,7 @@ MachineGun:
Wood: 50%
Light: 50%
Heavy: 25%
InfDeath: 1
InfDeath: 2
Explosion: 1
Damage: 15
@@ -657,7 +657,7 @@ BoatMissile:
Wood: 75%
Light: 60%
Heavy: 25%
InfDeath: 2
InfDeath: 3
Explosion: 5
ImpactSound: xplos
SmudgeType: Crater
@@ -688,7 +688,7 @@ TowerMissle:
Wood: 75%
Light: 60%
Heavy: 25%
InfDeath: 2
InfDeath: 3
Explosion: 5
ImpactSound: xplos
SmudgeType: Crater
@@ -705,7 +705,7 @@ Napalm:
Wood: 100%
Light: 60%
Heavy: 25%
InfDeath: 4
InfDeath: 5
Explosion: 3
ImpactSound: flamer2
SmudgeType: Scorch
@@ -719,7 +719,7 @@ Napalm.Crate:
Wood: 100%
Light: 60%
Heavy: 25%
InfDeath: 4
InfDeath: 5
Explosion: 3
ImpactSound: flamer2
SmudgeType: Scorch
@@ -734,7 +734,7 @@ Laser:
BeamRadius: 1
Warhead:
Spread: 1
InfDeath: 4
InfDeath: 5
SmudgeType: Scorch
Damage: 200
@@ -760,7 +760,7 @@ SAMMissile:
Wood: 75%
Light: 75%
Heavy: 50%
InfDeath: 3
InfDeath: 4
Explosion: 4
ImpactSound: xplos
SmudgeType: Crater
@@ -788,7 +788,7 @@ HonestJohn:
Wood: 75%
Light: 60%
Heavy: 25%
InfDeath: 2
InfDeath: 3
Explosion: 5
ImpactSound: xplos
SmudgeType: Crater
@@ -798,7 +798,7 @@ Tiberium:
ROF: 4
Warhead:
Spread: 1
InfDeath: 5
InfDeath: 6
Damage: 1
PreventProne: yes

View File

@@ -13,23 +13,21 @@
# add more spice tiles and make them fit
# add game logic for concrete plates (use terrain overlay from bridges/ressources)
# allow placing turrets on walls
# R8 converter needs infantry/ornithocopter frame resorter
# add grenade thrower
# make sandworm behave like a moving anti-vehicle mine
# add neutral buildings: emperor palace, fremen siech, smugglers factory
# add deathhand missile (nuke)
# maybe add ornithocopter strikes (they are currently directly contrallable units with non-reloading machine guns as in Dune II)
# allow upgrades
# allow different EVA voices for each faction (currently Atreides only)
# add muzzles and explosions (currently falls back to RA)
# create a shellmap (currently just a blank placeholder)
# rework chrome UI, dialoges, tabs
# add sonic tank weapon (currently uses tesla)
# make deviator change the allegiance of ememy units (currently shoots rockets)
# starport prices should vary
# black spots on buildings should be fading team colors
# gamefile extraction (setup/setup.z) from CD fails
# support patch 1.06 gamefiles: DATA.R8 has more frames and currently fails to extract, also featuring new terrain with white houses and new unit: grenade thrower
# infantry-only areas (Rough) do not show the dark-green mouse cursor
# put TilesetBuilder.Export into OpenRA.Utility to call the functions directly when extracting game-files (instead of opening a GUI)
# group number metrics are off
# group number metrics are off
# add bibs
# building offsets wrong (worst for towers)

View File

@@ -1,4 +1,4 @@
Transparent:
ShadowIndex: 1
Palettes:
cursor: cursor.pal
@@ -180,12 +180,12 @@ Cursors:
x: 12
y: 12
ability:
start:96
start:72
length: 8
x: 12
y: 12
ability-minimap:
start:96
start:72
length: 8
x: 12
y: 12
@@ -237,6 +237,11 @@ Cursors:
length: 1
x: 12
y: 12
move-rough:
start:256
length: 8
x: 12
y: 12
nopower: cursor
powerdown-blocked:

View File

@@ -71,6 +71,9 @@ Weapons:
Voices:
mods/d2k/voices.yaml
Notifications:
mods/d2k/notifications.yaml
TileSets:
mods/d2k/tilesets/arrakis.yaml

View File

@@ -0,0 +1,37 @@
# requires Dune 2000/DATA/GAMESFX copied to ~/.openra/Content/d2k
Speech:
DefaultVariant: .AUD
Prefixes:
atreides: AI_
ordos: OI_
harkonnen: HI_
Notifications:
Repairing: MEND
BuildingCannotPlaceAudio: PLACE
LowPower: POWER
SilosNeeded: SILOS
PrimaryBuildingSelected: PRMRY
AbilityInsufficientPower:
NewOptions: NEWOP
Win: MWIN
Lose: MFAIL
BaseAttack: ATACK
HarvesterAttack: HATTK
Leave: ABORT
Sounds:
Notifications:
RadarUp: MULTI1
RadarDown:
DisablePower: POWRDN1
EnablePower: POWRUP1
CashTickUp: CASHTIK1
CashTickDown:CASHTIK1
LevelUp: SCORTIK1
ChatLine: CHAT1
BuildPaletteOpen: BUTTON1
BuildPaletteClose: BUTTON1
TabClick: SIDEBAR1
ClickSound: BUTTON1
ClickDisabledSound: ENDLIST1

View File

@@ -1,16 +1,14 @@
CARRYALL:
^CARRYALL:
Inherits: ^Helicopter
Buildable:
Queue: Plane
BuildPaletteOrder: 110
Prerequisites: anyhightech
BuiltAt: hightecha
Owner: atreides,harkonnen,ordos
Valued:
Cost: 1200
Tooltip:
Name: Carryall
Description: Fast drop ship.\n Unarmed
Icon: carryallicon
Health:
HP: 500
Armor:

View File

@@ -50,6 +50,60 @@ REFA:
Owner: atreides
RenderBuildingWarFactory:
Image: REFA
FreeActor:
Actor: HARVESTERA
InitialActivity: FindResources
SpawnOffset: 1,2
Facing: 64
HARVESTERA:
Inherits: ^HARVESTER
Buildable:
Prerequisites: heavya,refa
Owner: atreides
RenderUnit:
Image: HARVESTER
TRIKEA:
Inherits: ^TRIKE
Buildable:
Prerequisites: lighta
Owner: atreides
RenderUnit:
Image: TRIKE
QUADA:
Inherits: ^QUAD
Buildable:
Prerequisites: lighta
Owner: atreides
RenderUnit:
Image: QUAD
SIEGETANKA:
Inherits: ^SIEGETANK
Buildable:
Prerequisites: heavya, radara
Owner: atreides
RenderUnit:
Image: SIEGETANK
MISSILETANKA:
Inherits: ^MISSILETANK
Buildable:
Prerequisites: heavya
Owner: atreides
RenderUnit:
Image: MISSILETANK
CARRYALLA:
Inherits: ^CARRYALL
Buildable:
Prerequisites: hightecha
BuiltAt: hightecha
Owner: atreides
RenderUnit:
Image: CARRYALL
BARRA:
Inherits: ^BARRACKS

View File

@@ -32,6 +32,60 @@ REFH:
Owner: harkonnen
RenderBuildingWarFactory:
Image: REFH
FreeActor:
Actor: HARVESTERH
InitialActivity: FindResources
SpawnOffset: 1,2
Facing: 64
HARVESTERH:
Inherits: ^HARVESTER
Buildable:
Prerequisites: heavyh,refh
Owner: harkonnen
RenderUnit:
Image: HARVESTER
TRIKEH:
Inherits: ^TRIKE
Buildable:
Prerequisites: lighth
Owner: harkonnen
RenderUnit:
Image: TRIKE
QUADH:
Inherits: ^QUAD
Buildable:
Prerequisites: lighth
Owner: harkonnen
RenderUnit:
Image: QUAD
SIEGETANKH:
Inherits: ^SIEGETANK
Buildable:
Prerequisites: heavyh, radarh
Owner: harkonnen
RenderUnit:
Image: SIEGETANK
MISSILETANKH:
Inherits: ^MISSILETANK
Buildable:
Prerequisites: heavyh
Owner: harkonnen
RenderUnit:
Image: MISSILETANK
CARRYALLH:
Inherits: ^CARRYALL
Buildable:
Prerequisites: hightechh
BuiltAt: hightechh
Owner: harkonnen
RenderUnit:
Image: CARRYALL
BARRH:
Inherits: ^BARRACKS

View File

@@ -32,6 +32,11 @@ REFO:
Owner: ordos
RenderBuildingWarFactory:
Image: REFO
FreeActor:
Actor: HARVESTERO
InitialActivity: FindResources
SpawnOffset: 1,2
Facing: 64
BARRO:
Inherits: ^BARRACKS
@@ -160,6 +165,14 @@ MCVO:
RenderUnit:
Image: DMCV
HARVESTERO:
Inherits: ^HARVESTER
Buildable:
Prerequisites: heavyo,refo
Owner: ordos
RenderUnit:
Image: HARVESTER
COMBATO:
Inherits: ^COMBAT
Buildable:
@@ -171,7 +184,7 @@ RAIDER:
Buildable:
Queue: Vehicle
BuildPaletteOrder: 15
Prerequisites: anylight
Prerequisites: lighto
Owner: ordos
Valued:
Cost: 200
@@ -197,17 +210,50 @@ RAIDER:
SecondaryOffset: 0,0,0,-4
AutoTarget:
QUADO:
Inherits: ^QUAD
Buildable:
Prerequisites: lighto
Owner: ordos
RenderUnit:
Image: QUAD
SIEGETANKO:
Inherits: ^SIEGETANK
Buildable:
Prerequisites: heavyo, radaro
Owner: ordos
RenderUnit:
Image: SIEGETANK
MISSILETANKO:
Inherits: ^MISSILETANK
Buildable:
Prerequisites: heavyo
Owner: ordos
RenderUnit:
Image: MISSILETANK
CARRYALLO:
Inherits: ^CARRYALL
Buildable:
Prerequisites: hightecho
BuiltAt: hightecho
Owner: ordos
RenderUnit:
Image: CARRYALL
DEVIATORTANK:
Inherits: ^Tank
Valued:
Cost: 800
Tooltip:
Name: Deviator
Description: Long range artillery.\n Strong vs Infantry, Tanks, Air\n Weak vs Buildings
Description: Will cause no actual damage.\nFires a warhead which changes allegiances\n but does not effect buildings or tanks.
Buildable:
Queue: Vehicle
BuildPaletteOrder: 50
Prerequisites: anyheavy
Prerequisites: heavyo
Owner: ordos
Mobile:
Speed: 6
@@ -218,8 +264,12 @@ DEVIATORTANK:
RevealsShroud:
Range: 6
RenderUnit:
AttackFrontal:
PrimaryWeapon: MammothTusk
# Captures:
# CaptureTypes:
# Range: 5
# wastedAfterwards: false
AttackLoyalty:
PrimaryWeapon: FakeMissile
PrimaryLocalOffset: -7,2,0,0,25, 7,2,0,0,-25
PrimaryRecoil: 1
AutoTarget:

View File

@@ -41,8 +41,6 @@
Tooltip:
Name: Windtrap
Description: Provides power for other structures
ProvidesCustomPrerequisite:
Prerequisite: anypower
Building:
Power: 100
Footprint: xx xx xx
@@ -60,7 +58,6 @@
Buildable:
Queue: Building
BuildPaletteOrder: 30
Prerequisites: anypower
Hotkey: b
Valued:
Cost: 400
@@ -104,8 +101,6 @@
Tooltip:
Name: High Tech Factory
Description: Produces Carryalls
ProvidesCustomPrerequisite:
Prerequisite: anyhightech
Building:
Power: -30
Footprint: _x_ xxx xxx
@@ -180,9 +175,6 @@
Buildable:
Queue: Building
BuildPaletteOrder: 10
Prerequisites: anypower
ProvidesCustomPrerequisite:
Prerequisite: anyref
Valued:
Cost: 1400
Tooltip:
@@ -207,11 +199,6 @@
Capacity: 2000
CustomSellValue:
Value: 600
FreeActor:
Actor: HARVESTER
InitialActivity: FindResources
SpawnOffset: 1,2
Facing: 64
^SILO:
Inherits: ^Building
@@ -245,8 +232,6 @@
Buildable:
Queue: Building
BuildPaletteOrder: 50
ProvidesCustomPrerequisite:
Prerequisite: anylight
Valued:
Cost: 1000
Tooltip:
@@ -266,8 +251,8 @@
-RenderBuilding:
RallyPoint:
Exit@1:
SpawnOffset: 10,0
ExitCell: 1,3
SpawnOffset: 5,0
ExitCell: 1,1
Production:
Produces: Vehicle
PrimaryBuilding:
@@ -282,8 +267,6 @@
Buildable:
Queue: Building
BuildPaletteOrder: 50
ProvidesCustomPrerequisite:
Prerequisite: anyheavy
Valued:
Cost: 2000
Tooltip:
@@ -302,9 +285,10 @@
Bib:
-RenderBuilding:
RallyPoint:
RallyPoint: 0,3
Exit@1:
SpawnOffset: 10,0
ExitCell: 1,3
SpawnOffset: -2,-2
ExitCell: 0,2
Production:
Produces: Vehicle
PrimaryBuilding:
@@ -321,8 +305,6 @@
Buildable:
Queue: Building
BuildPaletteOrder: 60
ProvidesCustomPrerequisite:
Prerequisite: anyradar
Valued:
Cost: 1400
Tooltip:
@@ -348,8 +330,6 @@
Tooltip:
Name: Starport
Description: Provides a dropzone for vehicle reinforcements
ProvidesCustomPrerequisite:
Prerequisite: anystarport
Buildable:
Queue: Building
BuildPaletteOrder: 60

View File

@@ -2,18 +2,7 @@ Player:
TechTree:
PlaceBuilding:
SupportPowerManager:
ConquestVictoryConditions@Atreides:
Race: atreides
WinNotification: AI_MWIN.AUD
LoseNotification: AI_MFAIL.AUD
ConquestVictoryConditions@Harkonnen:
Race: harkonnen
WinNotification: HI_MWIN.AUD
LoseNotification: HI_MFAIL.AUD
ConquestVictoryConditions@Ordos:
Race: ordos
WinNotification: OI_MWIN.AUD
LoseNotification: OI_MFAIL.AUD
ConquestVictoryConditions:
PowerManager:
AllyRepair:
PlayerResources:
@@ -65,15 +54,8 @@ Player:
PlayerColorPalette:
BasePalette: d2k
RemapIndex: 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
BaseAttackNotifier@Atreides:
Race: atreides
Audio: AI_ATACK.AUD
BaseAttackNotifier@Harkonnen:
Race: harkonnen
Audio: HI_ATACK.AUD
BaseAttackNotifier@Ordos:
Race: ordos
Audio: OI_ATACK.AUD
BaseAttackNotifier:
HarvesterAttackNotifier:
World:
OpenWidgetAtGameStart:
@@ -91,15 +73,19 @@ World:
ValidGround: Sand, Dune, Rock
PaletteFromCurrentTileset:
Name: terrain
ShadowIndex: 1
PaletteFromFile@d2k:
Name: d2k
Filename: d2k.pal
ShadowIndex: 1
PaletteFromFile@chrome:
Name: chrome
Filename: d2k.pal
ShadowIndex: 3
PaletteFromFile@effect:
Name: effect
Filename: temperat.pal
ShadowIndex: 4
PaletteFromRGBA@shadow:
Name: shadow
R: 0
@@ -179,25 +165,12 @@ World:
SpawnMPUnits@ordos:
InitialUnit: mcvo
Faction: ordos
#TODO: These are just the Atreides sounds.
EvaAlerts:
RadarUp: POWRUP1.aud
RadarDown: POWRDN1.aud
BuildingCannotPlaceAudio: AI_PLACE.AUD
CashTickUp: CASHTIK1.aud
CashTickDown:CASHTIK1.aud
NewOptions: AI_NEWOP.AUD
LowPower: AI_POWER.AUD
SilosNeeded: AI_SILOS.AUD
PrimaryBuildingSelected: AI_PRMRY.AUD
AbilityInsufficientPower:
LevelUp: SCORTIK1.aud
Repairing:
SpatialBins:
BinSize: 4
Shroud:
PathFinder:
ValidateOrder:
CRATE:
Tooltip:
Name: Crate
@@ -234,21 +207,42 @@ CRATE:
SelectionShares: 2
NoBaseSelectionShares: 9001
Unit: mcvo
GiveUnitCrateAction@Trike:
GiveUnitCrateAction@TrikeA:
SelectionShares: 7
Unit: trike
GiveUnitCrateAction@Quad:
Unit: trikea
GiveUnitCrateAction@TrikeH:
SelectionShares: 7
Unit: trikeh
GiveUnitCrateAction@QuadA:
SelectionShares: 6
Unit: quad
Unit: quada
GiveUnitCrateAction@QuadH:
SelectionShares: 6
Unit: quadh
GiveUnitCrateAction@QuadO:
SelectionShares: 6
Unit: quado
GiveUnitCrateAction@Raider:
SelectionShares: 6
Unit: raider
GiveUnitCrateAction@SiegeTank:
GiveUnitCrateAction@SiegeTankA:
SelectionShares: 6
Unit: siegetank
GiveUnitCrateAction@MissileTank:
Unit: siegetanka
GiveUnitCrateAction@SiegeTankH:
SelectionShares: 6
Unit: missiletank
Unit: siegetankh
GiveUnitCrateAction@SiegeTankO:
SelectionShares: 6
Unit: siegetanko
GiveUnitCrateAction@MissileTankA:
SelectionShares: 6
Unit: missiletanka
GiveUnitCrateAction@MissileTankH:
SelectionShares: 6
Unit: missiletankh
GiveUnitCrateAction@MissileTankO:
SelectionShares: 6
Unit: missiletanko
GiveUnitCrateAction@CombatA:
SelectionShares: 5
Unit: combata

View File

@@ -27,18 +27,17 @@
Transforms:
TransformSounds: BUILD1.aud
HARVESTER:
^HARVESTER:
Inherits: ^Vehicle
Buildable:
Queue: Vehicle
BuildPaletteOrder: 10
Prerequisites: anyref,anyheavy
Owner: atreides,harkonnen,ordos
Valued:
Cost: 1100
Tooltip:
Name: Spice Harvester
Description: Collects Spice for processing.\n Unarmed
Icon: harvestericon
Selectable:
Priority: 7
Bounds: 42,42
@@ -46,7 +45,7 @@ HARVESTER:
Capacity: 20
Resources: Spice
UnloadTicksPerBale: 1
# How far away from our linked proc (refinery) to find resources (in cells):
# How far away from our linked refinery to find resources (in cells):
SearchFromProcRadius: 24
# How far away from last harvest order location to find more resources (in cells):
SearchFromOrderRadius: 12
@@ -62,18 +61,17 @@ HARVESTER:
Range: 4
-AttackMove:
TRIKE:
^TRIKE:
Inherits: ^Vehicle
Buildable:
Queue: Vehicle
BuildPaletteOrder: 15
Prerequisites: anylight
Owner: atreides,harkonnen
Valued:
Cost: 200
Tooltip:
Name: Scout Trike
Description: Weak Scout.\n Decent vs. Infantry
Icon: trikeicon
Selectable:
Bounds: 24,24
Health:
@@ -91,18 +89,17 @@ TRIKE:
PrimaryOffset: 0,0,0,-4
AutoTarget:
QUAD:
^QUAD:
Inherits: ^Vehicle
Buildable:
Queue: Vehicle
BuildPaletteOrder: 30
Prerequisites: anylight
Owner: atreides,harkonnen,ordos
Valued:
Cost: 400
Tooltip:
Name: Quad
Description: Fast scout vehicle, armed with \nrockets.\n Strong vs Vehicles\n Weak vs Infantry
Icon: quadicon
Health:
HP: 120
Armor:
@@ -154,18 +151,17 @@ QUAD:
Selectable:
Bounds: 30,30
SIEGETANK:
^SIEGETANK:
Inherits: ^Tank
Buildable:
Queue: Vehicle
BuildPaletteOrder: 80
Prerequisites: anyradar
Owner: atreides,harkonnen,ordos
Valued:
Cost: 600
Tooltip:
Name: Siege Tank
Description: Long-range artillery.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Aircraft
Icon: siegetankicon
Health:
HP: 75
Armor:
@@ -189,18 +185,17 @@ SIEGETANK:
Selectable:
Bounds: 30,30
MISSILETANK:
^MISSILETANK:
Inherits: ^Tank
Valued:
Cost: 800
Tooltip:
Name: Missile Tank
Description: Long range artillery.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Aircraft
Icon: missiletankicon
Buildable:
Queue: Vehicle
BuildPaletteOrder: 50
Prerequisites: anyheavy
Owner: atreides,harkonnen,ordos
Mobile:
Speed: 6
Health:

File diff suppressed because it is too large Load Diff

View File

@@ -12,7 +12,7 @@ M1Carbine:
Heavy: 10%
Concrete: 10%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 15
Dragon:
@@ -41,7 +41,7 @@ Dragon:
Concrete: 20%
Explosion: med_explosion
WaterExplosion: med_splash
InfDeath: 3
InfDeath: 4
SmudgeType: SandCrater, RockCrater
Damage: 50
ImpactSound: kaboom12
@@ -71,7 +71,7 @@ QuadRockets:
Wood: 30%
Light: 75%
Heavy: 30%
InfDeath: 3
InfDeath: 4
Explosion: med_explosion
WaterExplosion: med_splash
ImpactSound: kaboom12
@@ -93,7 +93,7 @@ TurretGun:
Light: 75%
Concrete: 50%
Explosion: small_explosion
InfDeath: 3
InfDeath: 4
SmudgeType: SandCrater, RockCrater
Damage: 60
@@ -122,7 +122,7 @@ TowerMissle:
Wood: 75%
Light: 60%
Heavy: 25%
InfDeath: 2
InfDeath: 3
Explosion: small_explosion
ImpactSound: kaboom12
SmudgeType: SandCrater, RockCrater
@@ -143,7 +143,7 @@ TowerMissle:
Heavy: 40%
Concrete: 30%
Explosion: small_explosion
InfDeath: 3
InfDeath: 4
SmudgeType: SandCrater, RockCrater
Damage: 16
@@ -162,7 +162,7 @@ TowerMissle:
Light: 75%
Concrete: 50%
Explosion: small_explosion
InfDeath: 3
InfDeath: 4
SmudgeType: SandCrater, RockCrater
Damage: 30
@@ -183,7 +183,7 @@ TowerMissle:
Light: 75%
Concrete: 50%
Explosion: small_explosion
InfDeath: 3
InfDeath: 4
SmudgeType: SandCrater, RockCrater
Damage: 40
@@ -203,7 +203,7 @@ TowerMissle:
Light: 75%
Concrete: 50%
Explosion: small_explosion
InfDeath: 3
InfDeath: 4
SmudgeType: SandCrater, RockCrater
Damage: 50
@@ -232,43 +232,37 @@ TowerMissle:
Wood: 75%
Light: 75%
Heavy: 50%
InfDeath: 3
InfDeath: 4
Explosion: med_explosion
WaterExplosion: med_splash
ImpactSound: kaboom12
SmudgeType: SandCrater, RockCrater
Damage: 25
MammothTusk:
ROF: 60
FakeMissile:
ROF: 90
Range: 8
Burst: 1
Report: MISSLE1
Burst: 2
ValidTargets: Ground, Air
Projectile: Missile
Speed: 30
Arm: 2
Projectile: Bullet
Speed: 35
High: true
Shadow: false
Proximity: true
# Trail: smokey
ContrailLength: 10
Inaccuracy: 3
Image: DRAGON
ROT: 5
RangeLimit: 40
Angle: .2
Inaccuracy: 70
Image: MISSILE
Trail: smokey
ContrailLength: 30
Warhead:
Spread: 6
Spread: 10
Versus:
None: 90%
Wood: 75%
Light: 60%
Heavy: 25%
Explosion: med_explosion
WaterExplosion: med_splash
InfDeath: 2
Wood: 0%
Heavy: 0%
Concrete: 0%
Explosion: large_explosion
WaterExplosion: large_splash
SmudgeType: SandCrater, RockCrater
Damage: 45
Damage: 0
ImpactSound: kaboom12
155mm:
ROF: 85
@@ -292,7 +286,7 @@ MammothTusk:
Concrete: 50%
Explosion: large_explosion
WaterExplosion: med_splash
InfDeath: 2
InfDeath: 3
SmudgeType: SandCrater, RockCrater
Damage: 220
@@ -304,7 +298,7 @@ TTankZap:
Projectile: TeslaZap
Warhead:
Spread: 1
InfDeath: 5
InfDeath: 6
Damage: 100
ChainGun:
@@ -323,7 +317,7 @@ ChainGun:
Heavy: 25%
Concrete: 25%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 20
M60mg:
@@ -341,7 +335,7 @@ M60mg:
Heavy: 10%
Concrete: 10%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 15
Demolish:
@@ -365,7 +359,7 @@ Atomic:
Heavy: 25%
Concrete: 50%
Explosion: nuke
InfDeath: 4
InfDeath: 5
ImpactSound: EXPLSML2
Warhead@areanuke:
DamageModel: PerCell
@@ -379,7 +373,7 @@ Atomic:
Heavy: 25%
Concrete: 50%
Delay: 4
InfDeath: 4
InfDeath: 5
ImpactSound: EXPLLG2
CrateNuke:
@@ -393,7 +387,7 @@ CrateNuke:
Heavy: 25%
Concrete: 50%
Explosion: nuke
InfDeath: 4
InfDeath: 5
ImpactSound: EXPLSML2
Warhead@areanuke:
DamageModel: PerCell
@@ -407,7 +401,7 @@ CrateNuke:
Heavy: 25%
Concrete: 50%
Delay: 4
InfDeath: 4
InfDeath: 5
ImpactSound: EXPLLG2
CrateExplosion:
@@ -421,7 +415,7 @@ CrateExplosion:
Heavy: 25%
Explosion: self_destruct
WaterExplosion: self_destruct
InfDeath: 3
InfDeath: 4
ImpactSound: EXPLSML4
UnitExplode:
@@ -435,7 +429,7 @@ UnitExplode:
Heavy: 25%
Explosion: self_destruct
WaterExplosion: large_splash
InfDeath: 3
InfDeath: 4
ImpactSound: EXPLMD1
UnitExplodeSmall:
@@ -448,7 +442,7 @@ UnitExplodeSmall:
Light: 60%
Heavy: 25%
Explosion: large_explosion
InfDeath: 3
InfDeath: 4
ImpactSound: EXPLSML2
WormJaw:
@@ -486,7 +480,7 @@ RedEye:
Light: 60%
Heavy: 25%
Explosion: med_explosion
InfDeath: 2
InfDeath: 3
SmudgeType: SandCrater, RockCrater
Damage: 40
@@ -504,7 +498,7 @@ Sniper:
Wood: 5%
Light: 5%
Heavy: 5%
InfDeath: 1
InfDeath: 2
Vulcan:
ROF: 30
@@ -521,7 +515,7 @@ Vulcan:
Heavy: 25%
Concrete: 25%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 10
Warhead@2:
Spread: 3
@@ -531,7 +525,7 @@ Vulcan:
Heavy: 25%
Concrete: 25%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 10
Delay: 2
Warhead@3:
@@ -542,7 +536,7 @@ Vulcan:
Heavy: 25%
Concrete: 25%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 10
Delay: 4
Warhead@4:
@@ -553,7 +547,7 @@ Vulcan:
Heavy: 25%
Concrete: 25%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 10
Delay: 6
Warhead@5:
@@ -564,7 +558,7 @@ Vulcan:
Heavy: 25%
Concrete: 25%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 10
Delay: 8
Warhead@6:
@@ -575,6 +569,6 @@ Vulcan:
Heavy: 25%
Concrete: 25%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 10
Delay: 10

View File

@@ -333,11 +333,13 @@ Container@OBSERVER_ROOT:
Height: 200
DrawBackground: False
RemoveTime:250
UseContrast: yes
ChatEntry@CHAT_ENTRY:
X:250
Y:WINDOW_BOTTOM - HEIGHT
Width: 760
Height: 30
UseContrast: yes
Background@PERF_BG:
ClickThrough:true
Background:dialog4

View File

@@ -91,6 +91,11 @@ Cursors:
length: 4
x: 12
y: 12
move-rough:
start:10
length: 4
x: 12
y: 12
move-blocked:
start:14
x: 12

View File

@@ -70,6 +70,9 @@ Weapons:
Voices:
mods/ra/voices.yaml
Notifications:
mods/ra/notifications.yaml
TileSets:
mods/ra/tilesets/snow.yaml

View File

@@ -0,0 +1,30 @@
Speech:
Notifications:
Repairing: repair1
LowPower: lopower1
SilosNeeded: silond1
PrimaryBuildingSelected: pribldg1
BuildingCannotPlaceAudio: nodeply1
NewOptions: newopt1
AbilityInsufficientPower: nopowr1
Win: misnwon1
Lose: misnlst1
BaseAttack: baseatk1
HarvesterAttack:
Leave: bct1
Sounds:
Notifications:
RadarUp: radaron2
RadarDown: radardn1
CashTickUp: cashup1
CashTickDown:cashdn1
LevelUp: hydrod1
DisablePower: bleep11
EnablePower: bleep12
ChatLine: scold1
BuildPaletteOpen: bleep13
BuildPaletteClose: bleep13
TabClick: ramenu1
ClickSound:
ClickDisabledSound:

View File

@@ -948,6 +948,7 @@ HPAD:
Reservable:
IronCurtainable:
ProductionBar:
PrimaryBuilding:
AFLD:
Inherits: ^Building
@@ -998,6 +999,7 @@ AFLD:
SelectTargetSound: slcttgt1.aud
ProductionBar:
SupportPowerChargeBar:
PrimaryBuilding:
POWR:
Inherits: ^Building

View File

@@ -31,8 +31,6 @@ Player:
PlaceBuilding:
SupportPowerManager:
ConquestVictoryConditions:
WinNotification:misnwon1.aud
LoseNotification:misnlst1.aud
PowerManager:
AllyRepair:
PlayerResources:
@@ -212,12 +210,15 @@ World:
WaterChance: .2
PaletteFromCurrentTileset:
Name: terrain
ShadowIndex: 4
PaletteFromFile@chrome:
Name: chrome
Filename: temperat.pal
ShadowIndex: 3
PaletteFromFile@effect:
Name: effect
Filename: temperat.pal
ShadowIndex: 4
PaletteFromRGBA@shadow:
Name: shadow
R: 0
@@ -293,7 +294,6 @@ World:
CreateMPPlayers:
MPStartLocations:
SpawnMPUnits:
EvaAlerts:
SpatialBins:
BinSize: 4
Shroud:

View File

@@ -12,7 +12,7 @@ Colt45:
Heavy: 5%
Concrete: 5%
Explosion: piff
InfDeath: 1
InfDeath: 2
Damage: 50
ZSU-23:
@@ -48,7 +48,7 @@ Vulcan:
Heavy: 25%
Concrete: 25%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 10
Warhead@2:
Spread: 3
@@ -58,7 +58,7 @@ Vulcan:
Heavy: 25%
Concrete: 25%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 10
Delay: 2
Warhead@3:
@@ -69,7 +69,7 @@ Vulcan:
Heavy: 25%
Concrete: 25%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 10
Delay: 4
Warhead@4:
@@ -80,7 +80,7 @@ Vulcan:
Heavy: 25%
Concrete: 25%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 10
Delay: 6
Warhead@5:
@@ -91,7 +91,7 @@ Vulcan:
Heavy: 25%
Concrete: 25%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 10
Delay: 8
Warhead@6:
@@ -102,7 +102,7 @@ Vulcan:
Heavy: 25%
Concrete: 25%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 10
Delay: 10
@@ -135,7 +135,7 @@ Maverick:
Concrete: 50%
Explosion: med_explosion
WaterExplosion: med_splash
InfDeath: 3
InfDeath: 4
SmudgeType: Crater
Damage: 70
@@ -157,7 +157,7 @@ FireballLauncher:
Concrete: 50%
Explosion: napalm
WaterExplosion: napalm
InfDeath: 4
InfDeath: 5
SmudgeType: Scorch
ImpactSound: firebl3
Damage: 150
@@ -183,7 +183,7 @@ Flamer:
Concrete: 50%
Explosion: small_napalm
WaterExplosion: small_napalm
InfDeath: 4
InfDeath: 5
SmudgeType: Scorch
ImpactSound: firebl3
Damage: 8
@@ -205,7 +205,7 @@ ChainGun:
Concrete: 25%
Explosion: piffs
WaterExplosion: small_splash
InfDeath: 1
InfDeath: 2
Damage: 20
ChainGun.Yak:
@@ -225,7 +225,7 @@ ChainGun.Yak:
Concrete: 25%
Explosion: piffs
WaterExplosion: small_splash
InfDeath: 1
InfDeath: 2
Damage: 40
Pistol:
@@ -242,7 +242,7 @@ Pistol:
Heavy: 25%
Concrete: 25%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 1
M1Carbine:
@@ -259,7 +259,7 @@ M1Carbine:
Heavy: 10%
Concrete: 10%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 15
Dragon:
@@ -288,7 +288,7 @@ Dragon:
Concrete: 20%
Explosion: med_explosion
WaterExplosion: med_splash
InfDeath: 3
InfDeath: 4
SmudgeType: Crater
Damage: 50
ImpactSound: kaboom12
@@ -321,7 +321,7 @@ HellfireAG:
Concrete: 50%
Explosion: med_explosion
WaterExplosion: med_splash
InfDeath: 3
InfDeath: 4
SmudgeType: Crater
Damage: 40
@@ -353,7 +353,7 @@ HellfireAA:
Concrete: 50%
Explosion: med_explosion
WaterExplosion: med_splash
InfDeath: 3
InfDeath: 4
SmudgeType: Crater
Damage: 40
@@ -376,7 +376,7 @@ Grenade:
Heavy: 5%
Explosion: med_explosion
WaterExplosion: small_splash
InfDeath: 2
InfDeath: 3
SmudgeType: Crater
Damage: 60
ImpactSound: kaboom12
@@ -397,7 +397,7 @@ Grenade:
Concrete: 30%
Explosion: small_explosion
WaterExplosion: small_splash
InfDeath: 3
InfDeath: 4
SmudgeType: Crater
Damage: 16
@@ -417,7 +417,7 @@ Grenade:
Concrete: 50%
Explosion: small_explosion
WaterExplosion: small_splash
InfDeath: 3
InfDeath: 4
SmudgeType: Crater
Damage: 30
@@ -439,7 +439,7 @@ Grenade:
Concrete: 50%
Explosion: small_explosion
WaterExplosion: small_splash
InfDeath: 3
InfDeath: 4
SmudgeType: Crater
Damage: 40
@@ -460,7 +460,7 @@ Grenade:
Concrete: 50%
Explosion: small_explosion
WaterExplosion: small_splash
InfDeath: 3
InfDeath: 4
SmudgeType: Crater
Damage: 50
@@ -480,7 +480,7 @@ TurretGun:
Concrete: 50%
Explosion: small_explosion
WaterExplosion: small_splash
InfDeath: 3
InfDeath: 4
SmudgeType: Crater
Damage: 60
@@ -511,7 +511,7 @@ MammothTusk:
Heavy: 25%
Explosion: med_explosion
WaterExplosion: med_splash
InfDeath: 2
InfDeath: 3
SmudgeType: Crater
Damage: 45
@@ -537,7 +537,7 @@ MammothTusk:
Concrete: 50%
Explosion: large_explosion
WaterExplosion: med_splash
InfDeath: 2
InfDeath: 3
SmudgeType: Crater
Damage: 220
@@ -557,7 +557,7 @@ M60mg:
Concrete: 10%
Explosion: piffs
WaterExplosion: small_splash
InfDeath: 1
InfDeath: 2
Damage: 15
Napalm:
@@ -578,7 +578,7 @@ Napalm:
Concrete: 50%
Explosion: napalm
WaterExplosion: med_splash
InfDeath: 4
InfDeath: 5
SmudgeType: Scorch
ImpactSound: firebl3
Damage: 100
@@ -593,7 +593,7 @@ CrateNapalm:
Concrete: 50%
Explosion: napalm
WaterExplosion: napalm
InfDeath: 4
InfDeath: 5
SmudgeType: Scorch
ImpactSound: firebl3
Damage: 600
@@ -609,7 +609,7 @@ CrateExplosion:
Heavy: 25%
Explosion: self_destruct
WaterExplosion: self_destruct
InfDeath: 3
InfDeath: 4
ImpactSound: kaboom15
CrateNuke:
@@ -624,7 +624,7 @@ CrateNuke:
Concrete: 50%
Explosion: nuke
WaterExplosion: nuke
InfDeath: 4
InfDeath: 5
ImpactSound: kaboom1
Warhead@areanuke:
DamageModel: PerCell
@@ -638,7 +638,7 @@ CrateNuke:
Heavy: 25%
Concrete: 50%
Delay: 4
InfDeath: 4
InfDeath: 5
ImpactSound: kaboom22
@@ -650,7 +650,7 @@ TeslaZap:
Projectile: TeslaZap
Warhead:
Spread: 1
InfDeath: 5
InfDeath: 6
Damage: 100
Nike:
@@ -678,7 +678,7 @@ Nike:
Heavy: 50%
Concrete: 0%
Explosion: med_explosion
InfDeath: 2
InfDeath: 3
SmudgeType: Crater
Damage: 100
@@ -706,7 +706,7 @@ RedEye:
Light: 60%
Heavy: 25%
Explosion: med_explosion
InfDeath: 2
InfDeath: 3
SmudgeType: Crater
Damage: 40
@@ -732,7 +732,7 @@ RedEye:
Heavy: 25%
Explosion: large_explosion
WaterExplosion: large_splash
InfDeath: 2
InfDeath: 3
SmudgeType: Crater
Damage: 250
ImpactSound: kaboom12
@@ -760,7 +760,7 @@ SubMissile:
Heavy: 30%
Explosion: large_explosion
WaterExplosion: large_splash
InfDeath: 2
InfDeath: 3
SmudgeType: Crater
Damage: 300
ImpactSound: kaboom12
@@ -794,7 +794,7 @@ Stinger:
Concrete: 50%
Explosion: med_explosion
WaterExplosion: med_splash
InfDeath: 3
InfDeath: 4
SmudgeType: Crater
Damage: 30
@@ -821,7 +821,7 @@ TorpTube:
Light: 75%
Concrete: 50%
WaterExplosion: large_splash
InfDeath: 3
InfDeath: 4
SmudgeType: Crater
Damage: 180
@@ -841,7 +841,7 @@ TorpTube:
Concrete: 50%
Explosion: small_explosion
WaterExplosion: med_splash
InfDeath: 3
InfDeath: 4
SmudgeType: Crater
Damage: 25
@@ -863,7 +863,7 @@ DepthCharge:
Light: 75%
Concrete: 50%
WaterExplosion: large_splash
InfDeath: 3
InfDeath: 4
SmudgeType: Crater
Damage: 80
@@ -882,7 +882,7 @@ ParaBomb:
Concrete: 50%
Explosion: self_destruct
WaterExplosion: small_splash
InfDeath: 3
InfDeath: 4
SmudgeType: Crater
Damage: 500
ImpactSound: kaboom15
@@ -898,7 +898,7 @@ DogJaw:
Light: 0%
Heavy: 0%
Concrete: 0%
InfDeath: 0
InfDeath: 1
Damage: 100
Heal:
@@ -914,7 +914,7 @@ Heal:
Light: 0%
Heavy: 0%
Concrete: 0%
InfDeath: 0
InfDeath: 1
Damage: -50
SilencedPPK:
@@ -931,7 +931,7 @@ SilencedPPK:
Heavy: 0%
Concrete: 0%
Explosion: piffs
InfDeath: 1
InfDeath: 2
Damage: 150
SCUD:
@@ -958,7 +958,7 @@ SCUD:
Heavy: 25%
Explosion: napalm
WaterExplosion: large_splash
InfDeath: 2
InfDeath: 3
SmudgeType: Crater
Damage: 600
ImpactSound: firebl3
@@ -976,7 +976,7 @@ Atomic:
Concrete: 50%
Explosion: nuke
WaterExplosion: nuke
InfDeath: 4
InfDeath: 5
ImpactSound: kaboom1
Warhead@areanuke:
DamageModel: PerCell
@@ -990,7 +990,7 @@ Atomic:
Heavy: 25%
Concrete: 50%
Delay: 4
InfDeath: 4
InfDeath: 5
ImpactSound: kaboom22
UnitExplode:
@@ -1004,7 +1004,7 @@ UnitExplode:
Heavy: 25%
Explosion: self_destruct
WaterExplosion: large_splash
InfDeath: 3
InfDeath: 4
ImpactSound: kaboom22
UnitExplodeSmall:
@@ -1017,7 +1017,7 @@ UnitExplodeSmall:
Light: 60%
Heavy: 25%
Explosion: large_explosion
InfDeath: 3
InfDeath: 4
ImpactSound: kaboom15
Crush:
@@ -1044,7 +1044,7 @@ APMine:
Heavy: 0%
Concrete: 0%
ImpactSound: mine1
InfDeath: 2
InfDeath: 3
Explosion: napalm
Demolish:
@@ -1061,7 +1061,7 @@ PortaTesla:
Projectile: TeslaZap
Warhead:
Spread: 1
InfDeath: 5
InfDeath: 6
Damage: 45
TTankZap:
@@ -1072,7 +1072,7 @@ TTankZap:
Projectile: TeslaZap
Warhead:
Spread: 1
InfDeath: 5
InfDeath: 6
Damage: 100
FLAK-23:

View File

@@ -1,7 +1,7 @@
Package: openra
Version: {VERSION}
Architecture: all
Maintainer: Paul Chote <sleipnir@sleipnirstuff.com>
Maintainer: Chris Forbes <chrisf@ijw.co.nz>
Installed-Size: {SIZE}
Depends: libopenal1, mono-runtime (>= 2.6.7), libmono-winforms2.0-cil, libfreetype6, libsdl1.2debian, libgl1-mesa-glx, libgl1-mesa-dri, libmono-i18n2.0-cil
Section: games

View File

@@ -26,7 +26,7 @@ find . -path "*.mdb" -delete
# they are now installed to the game directory instead of placed in the gac
FILES="OpenRA.Game.exe OpenRA.Editor.exe OpenRA.Utility.exe OpenRA.Renderer.SdlCommon.dll OpenRA.Renderer.Cg.dll \
OpenRA.Renderer.Gl.dll OpenRA.Renderer.Null.dll OpenRA.FileFormats.dll FreeSans.ttf FreeSansBold.ttf titles.ttf \
cg glsl mods/ra mods/cnc COPYING HACKING INSTALL CHANGELOG"
cg glsl mods/ra mods/cnc mods/d2k COPYING HACKING INSTALL CHANGELOG"
echo "Copying files..."
for i in $FILES; do
@@ -45,6 +45,7 @@ cp OpenRA.Game/OpenRA.ico packaging/built
# Update mod versions
sed "s/{DEV_VERSION}/$TAG/" ./mods/ra/mod.yaml > ./packaging/built/mods/ra/mod.yaml
sed "s/{DEV_VERSION}/$TAG/" ./mods/cnc/mod.yaml > ./packaging/built/mods/cnc/mod.yaml
sed "s/{DEV_VERSION}/$TAG/" ./mods/d2k/mod.yaml > ./packaging/built/mods/d2k/mod.yaml
# Remove demo.mix from cnc
rm ./packaging/built/mods/cnc/bits/demo.mix
@@ -82,5 +83,6 @@ echo "Creating packages..."
fi
) &
wait
echo "Package build done."
rm -rf $BUILTDIR

Some files were not shown because too many files have changed in this diff Show More