Map ctor no longer assumes anything about mods (fixes cnc custom-map crash)
This commit is contained in:
2
Makefile
2
Makefile
@@ -68,7 +68,7 @@ editor_EXTRA = -resource:OpenRA.Editor.Form1.resources
|
||||
mapcvtr_SRCS = $(shell find MapConverter/ -iname '*.cs')
|
||||
mapcvtr_TARGET = MapConverter.exe
|
||||
mapcvtr_KIND = winexe
|
||||
mapcvtr_DEPS = $(fileformats_TARGET)
|
||||
mapcvtr_DEPS = $(fileformats_TARGET) $(game_TARGET)
|
||||
mapcvtr_LIBS = $(COMMON_LIBS) $(mapcvtr_DEPS)
|
||||
|
||||
ralint_SRCS = $(shell find RALint/ -iname '*.cs')
|
||||
|
||||
@@ -378,8 +378,7 @@ namespace OpenRA.Editor
|
||||
map.TopLeft = new int2((int)nmd.cordonLeft.Value, (int)nmd.cordonTop.Value);
|
||||
map.BottomRight = new int2((int)nmd.cordonRight.Value, (int)nmd.cordonBottom.Value);
|
||||
map.Tileset = nmd.theater.SelectedItem as string;
|
||||
|
||||
|
||||
map.Players.Add("Neutral", new PlayerReference("Neutral", Rules.Info["world"].Traits.WithInterface<CountryInfo>().First().Race, true, true));
|
||||
NewMap(map);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,9 +92,6 @@ namespace OpenRA.FileFormats
|
||||
TopLeft = new int2(0, 0);
|
||||
BottomRight = new int2(0, 0);
|
||||
|
||||
Tileset = "TEMPERAT";
|
||||
Players.Add("Neutral", new PlayerReference("Neutral", "neutral", "allies", true, true));
|
||||
|
||||
Title = "Name your map here";
|
||||
Description = "Describe your map here";
|
||||
Author = "Your name here";
|
||||
@@ -118,7 +115,7 @@ namespace OpenRA.FileFormats
|
||||
// Players
|
||||
if (MapFormat == 1)
|
||||
{
|
||||
Players.Add("Neutral", new PlayerReference("Neutral", "neutral", "allies", true, true));
|
||||
Players.Add("Neutral", new PlayerReference("Neutral", "allies", true, true));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -36,10 +36,9 @@ namespace OpenRA.FileFormats
|
||||
FieldLoader.Load(this, my);
|
||||
}
|
||||
|
||||
public PlayerReference(string name, string palette, string race, bool ownsworld, bool noncombatant)
|
||||
public PlayerReference(string name, string race, bool ownsworld, bool noncombatant)
|
||||
{
|
||||
Name = name;
|
||||
Palette = palette;
|
||||
Race = race;
|
||||
OwnsWorld = ownsworld;
|
||||
NonCombatant = noncombatant;
|
||||
|
||||
Reference in New Issue
Block a user