Make Door action: added missing activation properties for maps in Hexen and UDMF map formats.

Make Door action: made Make Door form a bit smaller.
Make Door action: sector highlight was not updated after performing the action when a single sector was selected.
This commit is contained in:
MaxED 2014-03-05 12:26:09 +00:00
parent 7faf6bc13e
commit f7f8c1e894
6 changed files with 170 additions and 179 deletions

View file

@ -206,7 +206,7 @@ mapformat_hexen
}
// Door making
include("ZDoom_misc.cfg", "doormaking_hexenudmf");
include("ZDoom_misc.cfg", "doormaking_hexen");
// Generalized actions
generalizedlinedefs = false;
@ -326,7 +326,7 @@ mapformat_udmf
}
// Door making
include("ZDoom_misc.cfg", "doormaking_hexenudmf");
include("ZDoom_misc.cfg", "doormaking_udmf");
// Generalized actions
generalizedlinedefs = false;

View file

@ -1630,9 +1630,22 @@ doormaking_doom
makedooraction = 1; // See linedeftypes
}
doormaking_hexenudmf
doormaking_hexen
{
makedooraction = 202; // See linedeftypes
makedooractivate = 1024;
makedoorflags { 512; }
makedoorarg0 = 0;
makedoorarg1 = 16;
makedoorarg2 = 0;
makedoorarg3 = 3;
makedoorarg4 = 0;
}
doormaking_udmf
{
makedooraction = 202; // See linedeftypes
makedoorflags { playeruse; repeatspecial; }
makedoorarg0 = 0;
makedoorarg1 = 16;
makedoorarg2 = 0;

View file

@ -244,8 +244,6 @@ namespace CodeImp.DoomBuilder.Config
// Constructor
internal GameConfiguration(Configuration cfg)
{
object obj;
// Initialize
this.cfg = cfg;
this.thingflags = new Dictionary<string, string>(StringComparer.Ordinal);
@ -314,7 +312,7 @@ namespace CodeImp.DoomBuilder.Config
// Flags have special (invariant culture) conversion
// because they are allowed to be written as integers in the configs
obj = cfg.ReadSettingObject("singlesidedflag", 0);
object obj = cfg.ReadSettingObject("singlesidedflag", 0);
if(obj is int) singlesidedflag = ((int)obj).ToString(CultureInfo.InvariantCulture); else singlesidedflag = obj.ToString();
obj = cfg.ReadSettingObject("doublesidedflag", 0);
if(obj is int) doublesidedflag = ((int)obj).ToString(CultureInfo.InvariantCulture); else doublesidedflag = obj.ToString();
@ -393,12 +391,9 @@ namespace CodeImp.DoomBuilder.Config
#region ================== Loading
// This loads the map lumps
private void LoadMapLumps()
{
IDictionary dic;
private void LoadMapLumps() {
// Get map lumps list
dic = cfg.ReadSetting("maplumpnames", new Hashtable());
IDictionary dic = cfg.ReadSetting("maplumpnames", new Hashtable());
foreach(DictionaryEntry de in dic)
{
// Make map lumps
@ -452,11 +447,10 @@ namespace CodeImp.DoomBuilder.Config
// Things and thing categories
private void LoadThingCategories()
{
IDictionary dic;
ThingCategory thingcat;
// Get thing categories
dic = cfg.ReadSetting("thingtypes", new Hashtable());
IDictionary dic = cfg.ReadSetting("thingtypes", new Hashtable());
foreach(DictionaryEntry de in dic)
{
if(de.Value is IDictionary)
@ -486,10 +480,8 @@ namespace CodeImp.DoomBuilder.Config
// Linedef flags
private void LoadLinedefFlags()
{
IDictionary dic;
// Get linedef flags
dic = cfg.ReadSetting("linedefflags", new Hashtable());
IDictionary dic = cfg.ReadSetting("linedefflags", new Hashtable());
foreach(DictionaryEntry de in dic)
linedefflags.Add(de.Key.ToString(), de.Value.ToString());
@ -593,10 +585,8 @@ namespace CodeImp.DoomBuilder.Config
// Linedef activates
private void LoadLinedefActivations()
{
IDictionary dic;
// Get linedef activations
dic = cfg.ReadSetting("linedefactivations", new Hashtable());
IDictionary dic = cfg.ReadSetting("linedefactivations", new Hashtable());
foreach(DictionaryEntry de in dic)
{
// Add to the list
@ -610,10 +600,8 @@ namespace CodeImp.DoomBuilder.Config
// Linedef generalized actions
private void LoadLinedefGeneralizedActions()
{
IDictionary dic;
// Get linedef activations
dic = cfg.ReadSetting("gen_linedeftypes", new Hashtable());
IDictionary dic = cfg.ReadSetting("gen_linedeftypes", new Hashtable());
foreach(DictionaryEntry de in dic)
{
// Check for valid structure
@ -648,12 +636,11 @@ namespace CodeImp.DoomBuilder.Config
// Sector effects
private void LoadSectorEffects()
{
IDictionary dic;
SectorEffectInfo si;
int actionnumber;
// Get sector effects
dic = cfg.ReadSetting("sectortypes", new Hashtable());
IDictionary dic = cfg.ReadSetting("sectortypes", new Hashtable());
foreach(DictionaryEntry de in dic)
{
// Try paring the action number
@ -681,11 +668,10 @@ namespace CodeImp.DoomBuilder.Config
// Brightness levels
private void LoadBrightnessLevels()
{
IDictionary dic;
int level;
// Get brightness levels structure
dic = cfg.ReadSetting("sectorbrightness", new Hashtable());
IDictionary dic = cfg.ReadSetting("sectorbrightness", new Hashtable());
foreach(DictionaryEntry de in dic)
{
// Try paring the level
@ -708,10 +694,8 @@ namespace CodeImp.DoomBuilder.Config
// Sector generalized effects
private void LoadSectorGeneralizedEffects()
{
IDictionary dic;
// Get sector effects
dic = cfg.ReadSetting("gen_sectortypes", new Hashtable());
IDictionary dic = cfg.ReadSetting("gen_sectortypes", new Hashtable());
foreach(DictionaryEntry de in dic)
{
// Check for valid structure
@ -730,10 +714,8 @@ namespace CodeImp.DoomBuilder.Config
// Thing flags
private void LoadThingFlags()
{
IDictionary dic;
// Get linedef flags
dic = cfg.ReadSetting("thingflags", new Hashtable());
IDictionary dic = cfg.ReadSetting("thingflags", new Hashtable());
foreach(DictionaryEntry de in dic)
thingflags.Add(de.Key.ToString(), de.Value.ToString());
@ -759,10 +741,8 @@ namespace CodeImp.DoomBuilder.Config
// Default thing flags
private void LoadDefaultThingFlags()
{
IDictionary dic;
// Get linedef flags
dic = cfg.ReadSetting("defaultthingflags", new Hashtable());
IDictionary dic = cfg.ReadSetting("defaultthingflags", new Hashtable());
foreach(DictionaryEntry de in dic)
{
// Check if flag exists
@ -780,10 +760,8 @@ namespace CodeImp.DoomBuilder.Config
// Skills
private void LoadSkills()
{
IDictionary dic;
// Get skills
dic = cfg.ReadSetting("skills", new Hashtable());
IDictionary dic = cfg.ReadSetting("skills", new Hashtable());
foreach(DictionaryEntry de in dic)
{
int num;
@ -799,12 +777,9 @@ namespace CodeImp.DoomBuilder.Config
}
// Texture Sets
private void LoadTextureSets()
{
IDictionary dic;
private void LoadTextureSets() {
// Get sets
dic = cfg.ReadSetting("texturesets", new Hashtable());
IDictionary dic = cfg.ReadSetting("texturesets", new Hashtable());
foreach(DictionaryEntry de in dic)
{
DefinedTextureSet s = new DefinedTextureSet(cfg, "texturesets." + de.Key);
@ -815,10 +790,8 @@ namespace CodeImp.DoomBuilder.Config
// Thing Filters
private void LoadThingFilters()
{
IDictionary dic;
// Get sets
dic = cfg.ReadSetting("thingsfilters", new Hashtable());
IDictionary dic = cfg.ReadSetting("thingsfilters", new Hashtable());
foreach(DictionaryEntry de in dic)
{
ThingsFilter f = new ThingsFilter(cfg, "thingsfilters." + de.Key);
@ -829,9 +802,7 @@ namespace CodeImp.DoomBuilder.Config
// Make door flags
private void LoadMakeDoorFlags()
{
IDictionary dic;
dic = cfg.ReadSetting("makedoorflags", new Hashtable());
IDictionary dic = cfg.ReadSetting("makedoorflags", new Hashtable());
foreach (DictionaryEntry de in dic)
{
// Using minus will unset the flag

View file

@ -1421,6 +1421,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
orderedselection.Clear();
General.Map.Map.ClearSelectedSectors();
General.Map.Map.ClearSelectedLinedefs();
updateOverlaySurfaces();//mxd
}
}

View file

@ -43,63 +43,68 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface
//
// doortexture
//
this.doortexture.Location = new System.Drawing.Point(21, 34);
this.doortexture.Location = new System.Drawing.Point(12, 29);
this.doortexture.MultipleTextures = false;
this.doortexture.Name = "doortexture";
this.doortexture.Required = false;
this.doortexture.Size = new System.Drawing.Size(96, 115);
this.doortexture.Size = new System.Drawing.Size(83, 105);
this.doortexture.TabIndex = 0;
this.doortexture.TextureName = "";
//
// label1
//
this.label1.Location = new System.Drawing.Point(21, 15);
this.label1.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(12, 10);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(96, 21);
this.label1.Size = new System.Drawing.Size(83, 21);
this.label1.TabIndex = 1;
this.label1.Text = "Door";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// label2
//
this.label2.Location = new System.Drawing.Point(247, 15);
this.label2.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(190, 10);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(99, 21);
this.label2.Size = new System.Drawing.Size(83, 21);
this.label2.TabIndex = 2;
this.label2.Text = "Ceiling";
this.label2.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// ceilingtexture
//
this.ceilingtexture.Location = new System.Drawing.Point(247, 34);
this.ceilingtexture.Location = new System.Drawing.Point(190, 29);
this.ceilingtexture.MultipleTextures = false;
this.ceilingtexture.Name = "ceilingtexture";
this.ceilingtexture.Size = new System.Drawing.Size(96, 115);
this.ceilingtexture.Size = new System.Drawing.Size(83, 105);
this.ceilingtexture.TabIndex = 1;
this.ceilingtexture.TextureName = "";
//
// floortexture
//
this.floortexture.Location = new System.Drawing.Point(360, 34);
this.floortexture.Location = new System.Drawing.Point(279, 29);
this.floortexture.MultipleTextures = false;
this.floortexture.Name = "floortexture";
this.floortexture.Size = new System.Drawing.Size(96, 115);
this.floortexture.Size = new System.Drawing.Size(83, 105);
this.floortexture.TabIndex = 2;
this.floortexture.TextureName = "";
//
// label3
//
this.label3.Location = new System.Drawing.Point(360, 15);
this.label3.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(279, 10);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(99, 21);
this.label3.Size = new System.Drawing.Size(83, 21);
this.label3.TabIndex = 4;
this.label3.Text = "Floor";
this.label3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// cancel
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(243, 180);
this.cancel.Location = new System.Drawing.Point(279, 140);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(112, 25);
this.cancel.Size = new System.Drawing.Size(83, 25);
this.cancel.TabIndex = 4;
this.cancel.Text = "Cancel";
this.cancel.UseVisualStyleBackColor = true;
@ -107,10 +112,9 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface
//
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.apply.Location = new System.Drawing.Point(125, 180);
this.apply.Location = new System.Drawing.Point(190, 140);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(112, 25);
this.apply.Size = new System.Drawing.Size(83, 25);
this.apply.TabIndex = 3;
this.apply.Text = "OK";
this.apply.UseVisualStyleBackColor = true;
@ -121,7 +125,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface
this.resetoffsets.AutoSize = true;
this.resetoffsets.Checked = true;
this.resetoffsets.CheckState = System.Windows.Forms.CheckState.Checked;
this.resetoffsets.Location = new System.Drawing.Point(21, 156);
this.resetoffsets.Location = new System.Drawing.Point(12, 140);
this.resetoffsets.Name = "resetoffsets";
this.resetoffsets.Size = new System.Drawing.Size(129, 18);
this.resetoffsets.TabIndex = 5;
@ -130,18 +134,20 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface
//
// tracktexture
//
this.tracktexture.Location = new System.Drawing.Point(134, 34);
this.tracktexture.Location = new System.Drawing.Point(101, 29);
this.tracktexture.MultipleTextures = false;
this.tracktexture.Name = "tracktexture";
this.tracktexture.Required = false;
this.tracktexture.Size = new System.Drawing.Size(96, 115);
this.tracktexture.Size = new System.Drawing.Size(83, 105);
this.tracktexture.TabIndex = 6;
this.tracktexture.TextureName = "";
//
// label4
//
this.label4.Location = new System.Drawing.Point(134, 15);
this.label4.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.Location = new System.Drawing.Point(101, 10);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(96, 21);
this.label4.Size = new System.Drawing.Size(83, 21);
this.label4.TabIndex = 7;
this.label4.Text = "Track";
this.label4.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@ -152,7 +158,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(481, 219);
this.ClientSize = new System.Drawing.Size(372, 170);
this.Controls.Add(this.tracktexture);
this.Controls.Add(this.label4);
this.Controls.Add(this.resetoffsets);
@ -165,7 +171,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface
this.Controls.Add(this.doortexture);
this.Controls.Add(this.label1);
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "MakeDoorForm";