mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 12:50:52 +00:00
Add rudimentary support for SRB2's FOFs to Visual Mode
This commit is contained in:
parent
f6f4cea346
commit
cc2fbe1c4b
3 changed files with 90 additions and 0 deletions
|
@ -2442,6 +2442,7 @@ udmf
|
|||
{
|
||||
title = "Solid";
|
||||
prefix = "(100)";
|
||||
id = "srb2_fofsolid";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
|
@ -2484,6 +2485,7 @@ udmf
|
|||
{
|
||||
title = "Water";
|
||||
prefix = "(120)";
|
||||
id = "srb2_fofwater";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
|
@ -2520,6 +2522,7 @@ udmf
|
|||
{
|
||||
title = "Air Bobbing";
|
||||
prefix = "(150)";
|
||||
id = "srb2_fofsolidopaque";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
|
@ -2546,6 +2549,7 @@ udmf
|
|||
{
|
||||
title = "Water Bobbing";
|
||||
prefix = "(160)";
|
||||
id = "srb2_fofsolidopaque";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
|
@ -2557,6 +2561,7 @@ udmf
|
|||
{
|
||||
title = "Crumbling";
|
||||
prefix = "(170)";
|
||||
id = "srb2_fofcrumbling";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
|
@ -2598,6 +2603,7 @@ udmf
|
|||
{
|
||||
title = "Rising";
|
||||
prefix = "(190)";
|
||||
id = "srb2_fofsolid";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
|
@ -2654,6 +2660,7 @@ udmf
|
|||
{
|
||||
title = "Light Block";
|
||||
prefix = "(200)";
|
||||
id = "srb2_foflight";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
|
@ -2671,6 +2678,7 @@ udmf
|
|||
{
|
||||
title = "Fog Block";
|
||||
prefix = "(202)";
|
||||
id = "srb2_foffog";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
|
@ -2682,6 +2690,7 @@ udmf
|
|||
{
|
||||
title = "Intangible";
|
||||
prefix = "(220)";
|
||||
id = "srb2_fofintangible";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
|
@ -2718,6 +2727,7 @@ udmf
|
|||
{
|
||||
title = "Intangible, Invisible";
|
||||
prefix = "(223)";
|
||||
id = "srb2_fofintangibleinvisible";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
|
@ -2729,6 +2739,7 @@ udmf
|
|||
{
|
||||
title = "Mario Block";
|
||||
prefix = "(250)";
|
||||
id = "srb2_fofsolidopaque";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
|
@ -2750,6 +2761,7 @@ udmf
|
|||
{
|
||||
title = "Thwomp Block";
|
||||
prefix = "(251)";
|
||||
id = "srb2_fofsolidopaque";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
|
@ -2774,6 +2786,7 @@ udmf
|
|||
{
|
||||
title = "Bustable Block";
|
||||
prefix = "(254)";
|
||||
id = "srb2_fofbustable";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
|
@ -2825,6 +2838,7 @@ udmf
|
|||
{
|
||||
title = "Quicksand";
|
||||
prefix = "(257)";
|
||||
id = "srb2_fofsolidopaque";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
|
@ -2850,6 +2864,7 @@ udmf
|
|||
{
|
||||
title = "Laser";
|
||||
prefix = "(258)";
|
||||
id = "srb2_foflaser";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
|
@ -2882,6 +2897,7 @@ udmf
|
|||
{
|
||||
title = "Custom";
|
||||
prefix = "(259)";
|
||||
id = "srb2_fofcustom";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
|
|
|
@ -1061,6 +1061,31 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
break;
|
||||
|
||||
case "srb2_fofsolid":
|
||||
case "srb2_fofwater":
|
||||
case "srb2_fofsolidopaque":
|
||||
case "srb2_fofcrumbling":
|
||||
case "srb2_foflight":
|
||||
case "srb2_foffog":
|
||||
case "srb2_fofintangible":
|
||||
case "srb2_fofintangibleinvisible":
|
||||
case "srb2_fofbustable":
|
||||
case "srb2_foflaser":
|
||||
case "srb2_fofcustom":
|
||||
if (l.Front != null)
|
||||
{
|
||||
if (sectortags.ContainsKey(l.Args[0]))
|
||||
{
|
||||
List<Sector> sectors = sectortags[l.Args[0]];
|
||||
foreach (Sector s in sectors)
|
||||
{
|
||||
SectorData sd = GetSectorData(s);
|
||||
sd.AddEffect3DFloor(l);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// ========== Transfer Brightness (50) (see http://zdoom.org/wiki/ExtraFloor_LightOnly) =========
|
||||
case "extrafloor_lightonly":
|
||||
if(l.Front != null && sectortags.ContainsKey(l.Args[0]))
|
||||
|
|
|
@ -124,6 +124,30 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
switch (General.Map.Config.LinedefActions[linedef.Action].Id.ToLowerInvariant())
|
||||
{
|
||||
case "srb2_fofsolid":
|
||||
alpha = General.Clamp(linedef.Args[1], 0, 255);
|
||||
renderinside = (linedef.Args[3] & 4) == 4;
|
||||
break;
|
||||
case "srb2_fofwater":
|
||||
alpha = General.Clamp(linedef.Args[1], 0, 255);
|
||||
renderinside = true;
|
||||
break;
|
||||
case "srb2_fofcrumbling":
|
||||
alpha = General.Clamp(linedef.Args[1], 0, 255);
|
||||
renderinside = (linedef.Args[3] & 7) != 0;
|
||||
break;
|
||||
case "srb2_fofintangible":
|
||||
alpha = General.Clamp(linedef.Args[1], 0, 255);
|
||||
renderinside = (linedef.Args[3] & 4) != 4;
|
||||
break;
|
||||
case "srb2_fofbustable":
|
||||
case "srb2_foflaser":
|
||||
alpha = General.Clamp(linedef.Args[1], 0, 255);
|
||||
break;
|
||||
case "srb2_fofcustom":
|
||||
alpha = General.Clamp(linedef.Args[1], 0, 255);
|
||||
renderinside = (linedef.Args[3] & 1024) == 1024;
|
||||
break;
|
||||
case "sector_set3dfloor":
|
||||
vavoomtype = linedef.Args[1] == (int)FloorTypes.VavoomStyle;
|
||||
// For non-vavoom types, we must switch the level types
|
||||
|
@ -182,9 +206,34 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
bool disablelighting = false;
|
||||
bool restrictlighting = false;
|
||||
floor.resetlighting = false;
|
||||
|
||||
switch (General.Map.Config.LinedefActions[linedef.Action].Id.ToLowerInvariant())
|
||||
{
|
||||
case "srb2_fofsolid":
|
||||
disablelighting = (linedef.Args[3] & 16) == 16;
|
||||
break;
|
||||
case "srb2_fofwater":
|
||||
restrictlighting = (linedef.Args[3] & 2) == 2;
|
||||
break;
|
||||
case "srb2_fofcrumbling":
|
||||
disablelighting = (linedef.Args[4] & 1) == 1;
|
||||
break;
|
||||
case "srb2_foflight":
|
||||
restrictlighting = linedef.Args[1] != 0;
|
||||
break;
|
||||
case "srb2_foffog":
|
||||
case "srb2_fofintangibleinvisible":
|
||||
case "srb2_foflaser":
|
||||
disablelighting = true;
|
||||
break;
|
||||
case "srb2_fofintangible":
|
||||
disablelighting = (linedef.Args[3] & 16) == 16;
|
||||
break;
|
||||
case "srb2_fofcustom":
|
||||
disablelighting = (linedef.Args[3] & 64) == 64;
|
||||
restrictlighting = (linedef.Args[3] & 131072) == 131072;
|
||||
break;
|
||||
case "sector_set3dfloor":
|
||||
// Do not adjust light? (works only for non-vavoom types)
|
||||
if (!vavoomtype)
|
||||
|
|
Loading…
Reference in a new issue