- More changes to properly use the format limitations

- Added default multiplayer flag to Skulltag (Hexen format) game configuration
This commit is contained in:
codeimp 2009-04-08 20:49:35 +00:00
parent c1b6728f74
commit 666154edfc
19 changed files with 21 additions and 24 deletions

View file

@ -80,6 +80,7 @@ defaultthingflags
128;
256;
512;
1024;
}

View file

@ -74,8 +74,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This is called to test if the item should be displayed
public override bool DetermineVisiblity()
{
return (General.Map.FormatInterface.GetType().Name == "HexenMapSetIO") ||
(General.Map.FormatInterface.GetType().Name == "UniversalMapSetIO");
return General.Map.FormatInterface.HasActionArgs;
}

View file

@ -73,8 +73,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This is called to test if the item should be displayed
public override bool DetermineVisiblity()
{
return (General.Map.FormatInterface.GetType().Name == "DoomMapSetIO") ||
(General.Map.FormatInterface.GetType().Name == "UniversalMapSetIO");
return General.Map.FormatInterface.HasLinedefTag;
}

View file

@ -74,8 +74,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This is called to test if the item should be displayed
public override bool DetermineVisiblity()
{
return (General.Map.FormatInterface.GetType().Name == "HexenMapSetIO") ||
(General.Map.FormatInterface.GetType().Name == "UniversalMapSetIO");
return General.Map.FormatInterface.HasActionArgs;
}

View file

@ -73,8 +73,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This is called to test if the item should be displayed
public override bool DetermineVisiblity()
{
return (General.Map.FormatInterface.GetType().Name == "HexenMapSetIO") ||
(General.Map.FormatInterface.GetType().Name == "UniversalMapSetIO");
return General.Map.FormatInterface.HasThingAction;
}

View file

@ -74,8 +74,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This is called to test if the item should be displayed
public override bool DetermineVisiblity()
{
return (General.Map.FormatInterface.GetType().Name == "HexenMapSetIO") ||
(General.Map.FormatInterface.GetType().Name == "UniversalMapSetIO");
return General.Map.FormatInterface.HasThingAction && General.Map.FormatInterface.HasActionArgs;
}

View file

@ -73,8 +73,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This is called to test if the item should be displayed
public override bool DetermineVisiblity()
{
return (General.Map.FormatInterface.GetType().Name == "HexenMapSetIO") ||
(General.Map.FormatInterface.GetType().Name == "UniversalMapSetIO");
return General.Map.FormatInterface.HasThingTag;
}

View file

@ -74,8 +74,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This is called to test if the item should be displayed
public override bool DetermineVisiblity()
{
return (General.Map.FormatInterface.GetType().Name == "HexenMapSetIO") ||
(General.Map.FormatInterface.GetType().Name == "UniversalMapSetIO");
return General.Map.FormatInterface.HasThingAction && General.Map.FormatInterface.HasThingTag;
}

View file

@ -410,7 +410,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Raise/lower thing
public virtual void OnChangeTargetHeight(int amount)
{
if(General.Map.FormatInterface.GetType().Name != "DoomMapSetIO")
if(General.Map.FormatInterface.HasThingHeight)
{
if((General.Map.UndoRedo.NextUndo == null) || (General.Map.UndoRedo.NextUndo.TicketID != undoticket))
undoticket = General.Map.UndoRedo.CreateUndo("Change thing height");

View file

@ -58,7 +58,7 @@ namespace CodeImp.DoomBuilder.Controls
string peggedness;
// Show/hide stuff depending on format
if(General.Map.FormatInterface.GetType() == typeof(DoomMapSetIO))
if(General.Map.FormatInterface.HasActionArgs)
{
arglbl1.Visible = false;
arglbl2.Visible = false;

View file

@ -62,7 +62,7 @@ namespace CodeImp.DoomBuilder.Controls
float zvalue;
// Show/hide stuff depending on format
if(General.Map.FormatInterface.GetType() == typeof(DoomMapSetIO))
if(General.Map.FormatInterface.HasActionArgs)
{
arglbl1.Visible = false;
arglbl2.Visible = false;

View file

@ -63,6 +63,7 @@ namespace CodeImp.DoomBuilder.IO
public override bool HasActionArgs { get { return false; } }
public override bool HasMixedActivations { get { return false; } }
public override bool HasPresetActivations { get { return false; } }
public override bool HasBuiltInActivations { get { return true; } }
public override int HighestTag { get { return ushort.MaxValue; } }
public override int HighestEffect { get { return ushort.MaxValue; } }
public override int HighestBrightness { get { return short.MaxValue; } }

View file

@ -63,6 +63,7 @@ namespace CodeImp.DoomBuilder.IO
public override bool HasActionArgs { get { return true; } }
public override bool HasMixedActivations { get { return false; } }
public override bool HasPresetActivations { get { return true; } }
public override bool HasBuiltInActivations { get { return false; } }
public override int HighestTag { get { return ushort.MaxValue; } }
public override int HighestAction { get { return byte.MaxValue; } }
public override int HighestEffect { get { return ushort.MaxValue; } }

View file

@ -49,6 +49,7 @@ namespace CodeImp.DoomBuilder.IO
bool HasActionArgs { get; }
bool HasMixedActivations { get; }
bool HasPresetActivations { get; }
bool HasBuiltInActivations { get; }
int HighestTag { get; }
int HighestAction { get; }
int HighestEffect { get; }

View file

@ -65,6 +65,7 @@ namespace CodeImp.DoomBuilder.IO
public abstract bool HasActionArgs { get; }
public abstract bool HasMixedActivations { get; }
public abstract bool HasPresetActivations { get; }
public abstract bool HasBuiltInActivations { get; }
public abstract int HighestTag { get; }
public abstract int HighestAction { get; }
public abstract int HighestEffect { get; }

View file

@ -114,6 +114,7 @@ namespace CodeImp.DoomBuilder.IO
public override bool HasActionArgs { get { return true; } }
public override bool HasMixedActivations { get { return true; } }
public override bool HasPresetActivations { get { return false; } }
public override bool HasBuiltInActivations { get { return false; } }
public override int HighestTag { get { return int.MaxValue; } }
public override int HighestAction { get { return int.MaxValue; } }
public override int HighestEffect { get { return int.MaxValue; } }

View file

@ -64,7 +64,7 @@ namespace CodeImp.DoomBuilder.Windows
option5label, option6label, option7label };
// Show prefixes panel only for doom type maps
if(!General.Map.IsType(typeof(DoomMapSetIO)))
if(General.Map.FormatInterface.HasBuiltInActivations)
{
prefixespanel.Visible = false;
actions.Height += actions.Top - prefixespanel.Top;

View file

@ -265,7 +265,7 @@ namespace CodeImp.DoomBuilder.Windows
if(frontsector.Text != l.Map.GetIndexForSector(l.Front.Sector).ToString()) frontsector.Text = "";
if(frontoffsetx.Text != l.Front.OffsetX.ToString()) frontoffsetx.Text = "";
if(frontoffsety.Text != l.Front.OffsetY.ToString()) frontoffsety.Text = "";
if(General.Map.IsType(typeof(UniversalMapSetIO))) customfrontbutton.Visible = true;
if(General.Map.FormatInterface.HasCustomFields) customfrontbutton.Visible = true;
}
// Back settings
@ -280,7 +280,7 @@ namespace CodeImp.DoomBuilder.Windows
if(backsector.Text != l.Map.GetIndexForSector(l.Back.Sector).ToString()) backsector.Text = "";
if(backoffsetx.Text != l.Back.OffsetX.ToString()) backoffsetx.Text = "";
if(backoffsety.Text != l.Back.OffsetY.ToString()) backoffsety.Text = "";
if(General.Map.IsType(typeof(UniversalMapSetIO))) custombackbutton.Visible = true;
if(General.Map.FormatInterface.HasCustomFields) custombackbutton.Visible = true;
}
// Custom fields

View file

@ -61,11 +61,9 @@ namespace CodeImp.DoomBuilder.Windows
// Fill universal fields list
fieldslist.ListFixedFields(General.Map.Config.VertexFields);
// Not a UDMF map?
if(!General.Map.IsType(typeof(UniversalMapSetIO)))
{
// Custom fields?
if(!General.Map.FormatInterface.HasCustomFields)
tabs.TabPages.Remove(tabcustom);
}
// Decimals allowed?
if(General.Map.FormatInterface.VertexDecimals > 0)