mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 21:00:56 +00:00
Draws vector arrow between Doom format line-to-line specials (#602)
This commit is contained in:
parent
edfd1fcae8
commit
e75dc2c746
6 changed files with 58 additions and 0 deletions
|
@ -464,72 +464,84 @@ teleport
|
|||
{
|
||||
title = "Teleport (also monsters, silent, same angle)";
|
||||
prefix = "W1";
|
||||
linetolinetag = true;
|
||||
}
|
||||
|
||||
208
|
||||
{
|
||||
title = "Teleport (also monsters, silent, same angle)";
|
||||
prefix = "WR";
|
||||
linetolinetag = true;
|
||||
}
|
||||
|
||||
209
|
||||
{
|
||||
title = "Teleport (also monsters, silent, same angle)";
|
||||
prefix = "S1";
|
||||
linetolinetag = true;
|
||||
}
|
||||
|
||||
210
|
||||
{
|
||||
title = "Teleport (also monsters, silent, same angle)";
|
||||
prefix = "SR";
|
||||
linetolinetag = true;
|
||||
}
|
||||
|
||||
243
|
||||
{
|
||||
title = "Teleport to Line With Same Tag (silent, same angle)";
|
||||
prefix = "W1";
|
||||
linetolinetag = true;
|
||||
}
|
||||
|
||||
244
|
||||
{
|
||||
title = "Teleport to Line With Same Tag (silent, same angle)";
|
||||
prefix = "WR";
|
||||
linetolinetag = true;
|
||||
}
|
||||
|
||||
262
|
||||
{
|
||||
title = "Teleport to Line With Same Tag (silent, reversed angle)";
|
||||
prefix = "W1";
|
||||
linetolinetag = true;
|
||||
}
|
||||
|
||||
263
|
||||
{
|
||||
title = "Teleport to Line With Same Tag (silent, reversed angle)";
|
||||
prefix = "WR";
|
||||
linetolinetag = true;
|
||||
}
|
||||
|
||||
264
|
||||
{
|
||||
title = "Teleport to Line With Same Tag (monsters only, silent, reversed angle)";
|
||||
prefix = "W1";
|
||||
linetolinetag = true;
|
||||
}
|
||||
|
||||
265
|
||||
{
|
||||
title = "Teleport to Line With Same Tag (monsters only, silent, reversed angle)";
|
||||
prefix = "WR";
|
||||
linetolinetag = true;
|
||||
}
|
||||
|
||||
266
|
||||
{
|
||||
title = "Teleport to Line With Same Tag (monsters only, silent)";
|
||||
prefix = "W1";
|
||||
linetolinetag = true;
|
||||
}
|
||||
|
||||
267
|
||||
{
|
||||
title = "Teleport to Line With Same Tag (monsters only, silent)";
|
||||
prefix = "WR";
|
||||
linetolinetag = true;
|
||||
}
|
||||
|
||||
268
|
||||
|
@ -886,6 +898,7 @@ translucent
|
|||
{
|
||||
title = "Translucent (Middle Texture)";
|
||||
prefix = "";
|
||||
linetolinetag = true;
|
||||
|
||||
errorchecker
|
||||
{
|
||||
|
|
|
@ -3487,6 +3487,8 @@ udmf
|
|||
title = "Non-interactive";
|
||||
type = 3;
|
||||
}
|
||||
linetolinetag = true;
|
||||
linetolinesameaction = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,17 +5,20 @@ scroll
|
|||
{
|
||||
title = "Scroll Wall with Same Tag using Sidedef Offsets";
|
||||
prefix = "";
|
||||
linetolinetag = true;
|
||||
}
|
||||
|
||||
1025
|
||||
{
|
||||
title = "Scroll Wall with Same Tag using Sidedef Offsets when Sector Changes Height";
|
||||
prefix = "";
|
||||
linetolinetag = true;
|
||||
}
|
||||
|
||||
1026
|
||||
{
|
||||
title = "Scroll Wall with Same Tag using Sidedef Offsets Accelerates when Sector Changes Height";
|
||||
prefix = "";
|
||||
linetolinetag = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,6 +58,8 @@ namespace CodeImp.DoomBuilder.Config
|
|||
private readonly bool isgeneralized;
|
||||
private readonly bool isknown;
|
||||
private readonly bool requiresactivation; //mxd
|
||||
private readonly bool linetolinetag;
|
||||
private readonly bool linetolinesameaction;
|
||||
private readonly ErrorCheckerExemptions errorcheckerexemptions;
|
||||
|
||||
#endregion
|
||||
|
@ -75,6 +77,8 @@ namespace CodeImp.DoomBuilder.Config
|
|||
public bool IsNull { get { return (index == 0); } }
|
||||
public bool RequiresActivation { get { return requiresactivation; } } //mxd
|
||||
public ArgumentInfo[] Args { get { return args; } }
|
||||
public bool LineToLineTag { get { return linetolinetag; } }
|
||||
public bool LineToLineSameAction { get { return linetolinesameaction; } }
|
||||
public ErrorCheckerExemptions ErrorCheckerExemptions { get { return errorcheckerexemptions; } }
|
||||
|
||||
#endregion
|
||||
|
@ -102,6 +106,10 @@ namespace CodeImp.DoomBuilder.Config
|
|||
this.title = this.prefix + " " + this.name;
|
||||
this.title = this.title.Trim();
|
||||
|
||||
// Read line-to-line associations
|
||||
this.linetolinetag = cfg.ReadSetting(actionsetting + ".linetolinetag", false);
|
||||
this.linetolinesameaction = cfg.ReadSetting(actionsetting + ".linetolinesameaction", false);
|
||||
|
||||
// Error checker exemptions
|
||||
this.errorcheckerexemptions.IgnoreUpperTexture = cfg.ReadSetting(actionsetting + ".errorchecker.ignoreuppertexture", false);
|
||||
this.errorcheckerexemptions.IgnoreMiddleTexture = cfg.ReadSetting(actionsetting + ".errorchecker.ignoremiddletexture", false);
|
||||
|
|
|
@ -766,6 +766,19 @@ namespace CodeImp.DoomBuilder.Map
|
|||
|
||||
#region ================== Methods
|
||||
|
||||
// Determine if this line and another line are associated by action and tag.
|
||||
public bool IsAssociatedWith(Linedef ld)
|
||||
{
|
||||
LinedefActionInfo actioninfo;
|
||||
|
||||
return this != ld &&
|
||||
Action > 0 &&
|
||||
ld.Tag > 0 &&
|
||||
tags.Contains(ld.Tag) &&
|
||||
(actioninfo = General.Map.Config.GetLinedefActionInfo(Action)).LineToLineTag &&
|
||||
(!actioninfo.LineToLineSameAction || Action == ld.Action);
|
||||
}
|
||||
|
||||
// This checks and returns a flag without creating it
|
||||
public bool IsFlagSet(string flagname)
|
||||
{
|
||||
|
|
|
@ -237,6 +237,25 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
bool showforwardlabel = BuilderPlug.Me.EventLineLabelVisibility == 1 || BuilderPlug.Me.EventLineLabelVisibility == 3;
|
||||
bool showreverselabel = BuilderPlug.Me.EventLineLabelVisibility == 2 || BuilderPlug.Me.EventLineLabelVisibility == 3;
|
||||
|
||||
// Association from line to line according to the action and tag.
|
||||
if (tags.Count > 0 && element is Linedef)
|
||||
{
|
||||
Linedef ld = element as Linedef;
|
||||
|
||||
if (ld.Action > 0)
|
||||
{
|
||||
foreach (Linedef otherlinedef in General.Map.Map.Linedefs)
|
||||
{
|
||||
if (ld.IsAssociatedWith(otherlinedef))
|
||||
{
|
||||
linedefs.Add(otherlinedef);
|
||||
|
||||
AddLineToAction(showreverselabel ? GetActionDescription(ld) : string.Empty, center, otherlinedef.GetCenterPoint());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Special handling for Doom format maps where there the linedef's tag references sectors
|
||||
if (General.Map.Config.LineTagIndicatesSectors)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue