Normalized line endings of AutomapMode/BuilderPlug.cs to CRLF

This commit is contained in:
biwa 2022-02-12 20:02:49 +01:00
parent 47a12d9424
commit b9ef63238c

View file

@ -1,15 +1,15 @@
 
#region ================== Copyright (c) 2016 Boris Iwanski #region ================== Copyright (c) 2016 Boris Iwanski
/* /*
* Copyright (c) 2016 Boris Iwanski https://github.com/biwa/automapmode * Copyright (c) 2016 Boris Iwanski https://github.com/biwa/automapmode
* This program is released under GNU General Public License * This program is released under GNU General Public License
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
*/ */
#endregion #endregion
@ -17,70 +17,70 @@
#region ================== Namespaces #region ================== Namespaces
using CodeImp.DoomBuilder.Plugins; using CodeImp.DoomBuilder.Plugins;
#endregion #endregion
namespace CodeImp.DoomBuilder.AutomapMode namespace CodeImp.DoomBuilder.AutomapMode
{ {
// //
// MANDATORY: The plug! // MANDATORY: The plug!
// This is an important class to the Doom Builder core. Every plugin must // This is an important class to the Doom Builder core. Every plugin must
// have exactly 1 class that inherits from Plug. When the plugin is loaded, // have exactly 1 class that inherits from Plug. When the plugin is loaded,
// this class is instantiated and used to receive events from the core. // this class is instantiated and used to receive events from the core.
// Make sure the class is public, because only public classes can be seen // Make sure the class is public, because only public classes can be seen
// by the core. // by the core.
// //
public class BuilderPlug : Plug public class BuilderPlug : Plug
{ {
#region ================== Variables #region ================== Variables
private float highlightrange; private float highlightrange;
// Static instance. We can't use a real static class, because BuilderPlug must // Static instance. We can't use a real static class, because BuilderPlug must
// be instantiated by the core, so we keep a static reference. (this technique // be instantiated by the core, so we keep a static reference. (this technique
// should be familiar to object-oriented programmers) // should be familiar to object-oriented programmers)
private static BuilderPlug me; private static BuilderPlug me;
#endregion #endregion
#region ================== Properties #region ================== Properties
public float HighlightRange { get { return highlightrange; } } public float HighlightRange { get { return highlightrange; } }
public string SecretFlag { get { return General.Map.UDMF ? "secret" : "32"; } } public string SecretFlag { get { return General.Map.UDMF ? "secret" : "32"; } }
public string HiddenFlag { get { return General.Map.UDMF ? "dontdraw" : "128"; } } public string HiddenFlag { get { return General.Map.UDMF ? "dontdraw" : "128"; } }
// This plugin relies on some functionality that wasn't there in older versions // This plugin relies on some functionality that wasn't there in older versions
public override int MinimumRevision { get { return 2651; } } public override int MinimumRevision { get { return 2651; } }
// Static property to access the BuilderPlug // Static property to access the BuilderPlug
public static BuilderPlug Me { get { return me; } } public static BuilderPlug Me { get { return me; } }
#endregion #endregion
#region ================== Methods #region ================== Methods
// This event is called when the plugin is initialized // This event is called when the plugin is initialized
public override void OnInitialize() public override void OnInitialize()
{ {
base.OnInitialize(); base.OnInitialize();
// This binds the methods in this class that have the BeginAction // This binds the methods in this class that have the BeginAction
// and EndAction attributes with their actions. Without this, the // and EndAction attributes with their actions. Without this, the
// attributes are useless. Note that in classes derived from EditMode // attributes are useless. Note that in classes derived from EditMode
// this is not needed, because they are bound automatically when the // this is not needed, because they are bound automatically when the
// editing mode is engaged. // editing mode is engaged.
General.Actions.BindMethods(this); General.Actions.BindMethods(this);
// TODO: Add DB2 version check so that old DB2 versions won't crash // TODO: Add DB2 version check so that old DB2 versions won't crash
// General.ErrorLogger.Add(ErrorType.Error, "zomg!"); // General.ErrorLogger.Add(ErrorType.Error, "zomg!");
// Keep a static reference // Keep a static reference
me = this; me = this;
LoadSettings(); LoadSettings();
} }
//mxd //mxd
public override void OnMapOpenEnd() public override void OnMapOpenEnd()
{ {
@ -92,8 +92,8 @@ namespace CodeImp.DoomBuilder.AutomapMode
} }
base.OnMapOpenEnd(); base.OnMapOpenEnd();
} }
//mxd //mxd
public override void OnMapNewEnd() public override void OnMapNewEnd()
{ {
@ -105,22 +105,22 @@ namespace CodeImp.DoomBuilder.AutomapMode
} }
base.OnMapNewEnd(); base.OnMapNewEnd();
} }
// This is called when the plugin is terminated // This is called when the plugin is terminated
public override void Dispose() public override void Dispose()
{ {
base.Dispose(); base.Dispose();
// This must be called to remove bound methods for actions. // This must be called to remove bound methods for actions.
General.Actions.UnbindMethods(this); General.Actions.UnbindMethods(this);
} }
private void LoadSettings() private void LoadSettings()
{ {
highlightrange = General.Settings.ReadPluginSetting("buildermodes", "highlightrange", 20); highlightrange = General.Settings.ReadPluginSetting("buildermodes", "highlightrange", 20);
} }
#endregion #endregion
} }
} }