rip out ActorStance garbage
This commit is contained in:
@@ -379,38 +379,12 @@ namespace OpenRA.Editor
|
||||
if (!Players.Contains(parts[0]))
|
||||
Players.Add(parts[0]);
|
||||
|
||||
var stance = ActorStance.Stance.None;
|
||||
switch (parts[5])
|
||||
{
|
||||
case "Area Guard":
|
||||
case "Guard":
|
||||
stance = ActorStance.Stance.Guard;
|
||||
break;
|
||||
case "Defend Base":
|
||||
stance = ActorStance.Stance.Defend;
|
||||
break;
|
||||
case "Hunt":
|
||||
case "Rampage":
|
||||
case "Attack Base":
|
||||
case "Attack Units":
|
||||
case "Attack Civil.":
|
||||
case "Attack Tarcom":
|
||||
stance = ActorStance.Stance.Hunt;
|
||||
break;
|
||||
case "Retreat":
|
||||
case "Return":
|
||||
stance = ActorStance.Stance.Retreat;
|
||||
break;
|
||||
// do we care about `Harvest' and `Sticky'?
|
||||
}
|
||||
|
||||
var actor = new ActorReference(parts[1].ToLowerInvariant())
|
||||
{
|
||||
new LocationInit(new int2(loc % MapSize, loc / MapSize)),
|
||||
new OwnerInit(parts[0]),
|
||||
new HealthInit(float.Parse(parts[2], NumberFormatInfo.InvariantInfo)/256),
|
||||
new FacingInit((section == "INFANTRY") ? int.Parse(parts[6]) : int.Parse(parts[4])),
|
||||
new ActorStanceInit(stance),
|
||||
};
|
||||
|
||||
if (section == "INFANTRY")
|
||||
@@ -441,17 +415,17 @@ namespace OpenRA.Editor
|
||||
|
||||
void LoadPlayer(IniFile file, string section, bool isRA)
|
||||
{
|
||||
var c = (section == "BadGuy") ? "red" :
|
||||
(isRA) ? "blue" : "gold";
|
||||
var c = section == "BadGuy" ? "red" :
|
||||
isRA ? "blue" : "gold";
|
||||
|
||||
var color = namedColorMapping[c];
|
||||
|
||||
var pr = new PlayerReference
|
||||
{
|
||||
Name = section,
|
||||
OwnsWorld = (section == "Neutral"),
|
||||
NonCombatant = (section == "Neutral"),
|
||||
Race = (isRA) ? ((section == "BadGuy") ? "soviet" : "allies") : ((section == "BadGuy") ? "nod" : "gdi"),
|
||||
OwnsWorld = section == "Neutral",
|
||||
NonCombatant = section == "Neutral",
|
||||
Race = isRA ? (section == "BadGuy" ? "soviet" : "allies") : (section == "BadGuy" ? "nod" : "gdi"),
|
||||
ColorRamp = new ColorRamp(
|
||||
(byte)((color.First.GetHue() / 360.0f) * 255),
|
||||
(byte)(color.First.GetSaturation() * 255),
|
||||
@@ -459,7 +433,7 @@ namespace OpenRA.Editor
|
||||
(byte)(color.Second.GetBrightness() * 255))
|
||||
};
|
||||
|
||||
var Neutral = new List<string>(){"Neutral"};
|
||||
var Neutral = new [] {"Neutral"};
|
||||
foreach (var s in file.GetSection(section, true))
|
||||
{
|
||||
Console.WriteLine(s.Key);
|
||||
|
||||
@@ -168,7 +168,6 @@
|
||||
<Compile Include="Widgets\VqaPlayerWidget.cs" />
|
||||
<Compile Include="GameRules\Settings.cs" />
|
||||
<Compile Include="Support\Arguments.cs" />
|
||||
<Compile Include="Traits\ActorStance.cs" />
|
||||
<Compile Include="Traits\Armor.cs" />
|
||||
<Compile Include="Graphics\CursorProvider.cs" />
|
||||
<Compile Include="Server\TraitInterfaces.cs" />
|
||||
|
||||
@@ -1,42 +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
|
||||
|
||||
using OpenRA.FileFormats;
|
||||
namespace OpenRA.Traits
|
||||
{
|
||||
class ActorStanceInfo : ITraitInfo
|
||||
{
|
||||
public object Create(ActorInitializer init) { return new ActorStance(init); }
|
||||
}
|
||||
|
||||
public class ActorStance
|
||||
{
|
||||
// Stances modify default actor behavior
|
||||
public enum Stance
|
||||
{
|
||||
None,
|
||||
Guard, // Stay near an actor/area; attack anything that comes near
|
||||
Defend, // Come running if a bad guy comes in range of the defendee
|
||||
Hunt, // Go searching for things to kill; will stray from move orders etc to follow target
|
||||
Retreat // Actively avoid things which might kill me
|
||||
}
|
||||
|
||||
// Doesn't do anything... yet
|
||||
public ActorStance(ActorInitializer init) {}
|
||||
}
|
||||
|
||||
public class ActorStanceInit : IActorInit<ActorStance.Stance>
|
||||
{
|
||||
[FieldFromYamlKey] public readonly ActorStance.Stance value = ActorStance.Stance.None;
|
||||
public ActorStanceInit() { }
|
||||
public ActorStanceInit( ActorStance.Stance init ) { value = init; }
|
||||
public ActorStance.Stance Value( World world ) { return value; }
|
||||
}
|
||||
}
|
||||
@@ -308,128 +308,109 @@ Actors:
|
||||
Owner: BadGuy
|
||||
Health: 0.5
|
||||
Facing: 160
|
||||
ActorStance: None
|
||||
Actor84: gun
|
||||
Location: 41,55
|
||||
Owner: BadGuy
|
||||
Health: 0.5
|
||||
Facing: 160
|
||||
ActorStance: None
|
||||
Actor85: gun
|
||||
Location: 49,55
|
||||
Owner: BadGuy
|
||||
Health: 0.1875
|
||||
Facing: 160
|
||||
ActorStance: None
|
||||
mcv: mcv
|
||||
Location: 56,53
|
||||
Owner: GoodGuy
|
||||
Health: 1
|
||||
Facing: 0
|
||||
ActorStance: Guard
|
||||
Gunboat: boat
|
||||
Location: 53,59
|
||||
Owner: GoodGuy
|
||||
Health: 1
|
||||
Facing: 64
|
||||
ActorStance: Hunt
|
||||
Actor88: e1
|
||||
Location: 56,55
|
||||
Owner: GoodGuy
|
||||
Health: 1
|
||||
Facing: 0
|
||||
ActorStance: Guard
|
||||
SubCell: 2
|
||||
Actor89: e1
|
||||
Location: 56,55
|
||||
Owner: GoodGuy
|
||||
Health: 1
|
||||
Facing: 0
|
||||
ActorStance: Guard
|
||||
SubCell: 4
|
||||
Actor90: e1
|
||||
Location: 56,55
|
||||
Owner: GoodGuy
|
||||
Health: 1
|
||||
Facing: 0
|
||||
ActorStance: Guard
|
||||
SubCell: 3
|
||||
Actor91: e1
|
||||
Location: 56,55
|
||||
Owner: GoodGuy
|
||||
Health: 1
|
||||
Facing: 0
|
||||
ActorStance: Guard
|
||||
SubCell: 1
|
||||
Actor92: e1
|
||||
Location: 57,45
|
||||
Owner: BadGuy
|
||||
Health: 1
|
||||
Facing: 160
|
||||
ActorStance: Guard
|
||||
SubCell: 2
|
||||
Actor93: e1
|
||||
Location: 56,41
|
||||
Owner: BadGuy
|
||||
Health: 1
|
||||
Facing: 192
|
||||
ActorStance: Guard
|
||||
SubCell: 2
|
||||
Actor94: e1
|
||||
Location: 48,41
|
||||
Owner: BadGuy
|
||||
Health: 1
|
||||
Facing: 96
|
||||
ActorStance: Guard
|
||||
SubCell: 3
|
||||
Actor95: e1
|
||||
Location: 59,45
|
||||
Owner: BadGuy
|
||||
Health: 1
|
||||
Facing: 160
|
||||
ActorStance: Guard
|
||||
SubCell: 1
|
||||
Actor96: e1
|
||||
Location: 46,50
|
||||
Owner: BadGuy
|
||||
Health: 1
|
||||
Facing: 96
|
||||
ActorStance: Guard
|
||||
SubCell: 3
|
||||
Actor97: e1
|
||||
Location: 48,47
|
||||
Owner: BadGuy
|
||||
Health: 1
|
||||
Facing: 96
|
||||
ActorStance: Guard
|
||||
SubCell: 1
|
||||
Actor98: e1
|
||||
Location: 38,43
|
||||
Owner: BadGuy
|
||||
Health: 1
|
||||
Facing: 128
|
||||
ActorStance: Guard
|
||||
SubCell: 4
|
||||
Actor99: e1
|
||||
Location: 38,43
|
||||
Owner: BadGuy
|
||||
Health: 1
|
||||
Facing: 128
|
||||
ActorStance: Guard
|
||||
SubCell: 1
|
||||
Actor100: e1
|
||||
Location: 48,41
|
||||
Owner: BadGuy
|
||||
Health: 1
|
||||
Facing: 96
|
||||
ActorStance: Guard
|
||||
SubCell: 2
|
||||
Actor101: e1
|
||||
Location: 41,39
|
||||
Owner: BadGuy
|
||||
Health: 1
|
||||
Facing: 96
|
||||
ActorStance: Hunt
|
||||
SubCell: 4
|
||||
spawn27: waypoint
|
||||
Location: 51,47
|
||||
|
||||
Reference in New Issue
Block a user