Added portal options to the sector edit form for the Eternity Engine UDMF configuration

This commit is contained in:
biwa 2021-03-06 21:28:00 +01:00
parent 677473fce8
commit f0c985385a
2 changed files with 37 additions and 6 deletions

View file

@ -278,6 +278,34 @@ mapformat_udmf
include("Eternity_misc.cfg", "sectorflags_udmf");
}
// Sector portal flags (ceiling)
ceilingportalflags
{
portal_ceil_disabled = "Disabled";
portal_ceil_blocksound = "Block sound";
portal_ceil_nopass = "Impassable";
portal_ceil_norender = "Not rendered";
portal_ceil_attached = "Attach to linked portal";
}
// Sector portal flags (floor)
floorportalflags
{
portal_floor_disabled = "Disabled";
portal_floor_blocksound = "Block sound";
portal_floor_nopass = "Impassable";
portal_floor_norender = "Not rendered";
portal_floor_attached = "Attach to linked portal";
}
// Sector portal renderstyles
sectorportalrenderstyles
{
none = "None";
translucent = "Translucent";
additive = "Additive";
}
// DEFAULT SECTOR BRIGHTNESS LEVELS
sectorbrightness
{

View file

@ -395,8 +395,11 @@ namespace CodeImp.DoomBuilder.Windows
floorRenderStyle.SelectedIndex = renderstyles.IndexOf(sc.Fields.GetValue("renderstylefloor", "translucent"));
// Portal render style
ceilportalrenderstyle.SelectedIndex = portalrenderstyles.IndexOf(sc.Fields.GetValue("portal_ceil_overlaytype", "translucent"));
floorportalrenderstyle.SelectedIndex = portalrenderstyles.IndexOf(sc.Fields.GetValue("portal_floor_overlaytype", "translucent"));
if (portalrenderstyles.Count > 0)
{
ceilportalrenderstyle.SelectedIndex = portalrenderstyles.IndexOf(sc.Fields.GetValue("portal_ceil_overlaytype", portalrenderstyles[0]));
floorportalrenderstyle.SelectedIndex = portalrenderstyles.IndexOf(sc.Fields.GetValue("portal_floor_overlaytype", portalrenderstyles[0]));
}
// Damage
damagetype.Text = sc.Fields.GetValue("damagetype", NO_DAMAGETYPE);
@ -530,9 +533,9 @@ namespace CodeImp.DoomBuilder.Windows
floorRenderStyle.SelectedIndex = -1;
// Portal render style
if(ceilportalrenderstyle.SelectedIndex > -1 && ceilportalrenderstyle.SelectedIndex != portalrenderstyles.IndexOf(s.Fields.GetValue("portal_ceil_overlaytype", "translucent")))
if(ceilportalrenderstyle.SelectedIndex > -1 && ceilportalrenderstyle.SelectedIndex != portalrenderstyles.IndexOf(s.Fields.GetValue("portal_ceil_overlaytype", portalrenderstyles[0])))
ceilportalrenderstyle.SelectedIndex = -1;
if(floorportalrenderstyle.SelectedIndex > -1 && floorportalrenderstyle.SelectedIndex != portalrenderstyles.IndexOf(s.Fields.GetValue("portal_floor_overlaytype", "translucent")))
if(floorportalrenderstyle.SelectedIndex > -1 && floorportalrenderstyle.SelectedIndex != portalrenderstyles.IndexOf(s.Fields.GetValue("portal_floor_overlaytype", portalrenderstyles[0])))
floorportalrenderstyle.SelectedIndex = -1;
// Damage
@ -873,9 +876,9 @@ namespace CodeImp.DoomBuilder.Windows
if(portalrenderstyles.Count > 0)
{
if(ceilportalrenderstyle.SelectedIndex > -1)
UniFields.SetString(s.Fields, "portal_ceil_overlaytype", portalrenderstyles[ceilportalrenderstyle.SelectedIndex], "translucent");
UniFields.SetString(s.Fields, "portal_ceil_overlaytype", portalrenderstyles[ceilportalrenderstyle.SelectedIndex], portalrenderstyles[0]);
if(floorportalrenderstyle.SelectedIndex > -1)
UniFields.SetString(s.Fields, "portal_floor_overlaytype", portalrenderstyles[floorportalrenderstyle.SelectedIndex], "translucent");
UniFields.SetString(s.Fields, "portal_floor_overlaytype", portalrenderstyles[floorportalrenderstyle.SelectedIndex], portalrenderstyles[0]);
}
//Damage