From d0060798dc730c2b8086f8b396bd6b4131856a80 Mon Sep 17 00:00:00 2001
From: Kalobi <46748261+Kalobi@users.noreply.github.com>
Date: Wed, 13 Mar 2024 20:01:00 +0100
Subject: [PATCH] Use file-scoped namespaces
---
CelesteMod/Source/CelesteModExports.cs | 22 ++++++++---------
CelesteMod/Source/CelesteModModule.cs | 24 +++++++++----------
CelesteMod/Source/CelesteModModuleSaveData.cs | 8 +++----
CelesteMod/Source/CelesteModModuleSession.cs | 8 +++----
CelesteMod/Source/CelesteModModuleSettings.cs | 8 +++----
CelesteMod/Source/Entities/SampleActor.cs | 16 ++++++-------
CelesteMod/Source/Entities/SampleEntity.cs | 20 ++++++++--------
CelesteMod/Source/Entities/SampleSolid.cs | 16 ++++++-------
CelesteMod/Source/Triggers/SampleTrigger.cs | 14 +++++------
9 files changed, 68 insertions(+), 68 deletions(-)
diff --git a/CelesteMod/Source/CelesteModExports.cs b/CelesteMod/Source/CelesteModExports.cs
index d627a20..d4d0e97 100644
--- a/CelesteMod/Source/CelesteModExports.cs
+++ b/CelesteMod/Source/CelesteModExports.cs
@@ -1,13 +1,13 @@
using MonoMod.ModInterop;
-namespace Celeste.Mod.CelesteMod {
- ///
- /// Provides export functions for other mods to import.
- /// If you do not need to export any functions, delete this class and the corresponding call
- /// to ModInterop() in
- ///
- [ModExportName("CelesteMod")]
- public static class CelesteModExports {
- // TODO: add your mod's exports, if required
- }
-}
+namespace Celeste.Mod.CelesteMod;
+
+///
+/// Provides export functions for other mods to import.
+/// If you do not need to export any functions, delete this class and the corresponding call
+/// to ModInterop() in
+///
+[ModExportName("CelesteMod")]
+public static class CelesteModExports {
+ // TODO: add your mod's exports, if required
+}
\ No newline at end of file
diff --git a/CelesteMod/Source/CelesteModModule.cs b/CelesteMod/Source/CelesteModModule.cs
index 51be226..aa8ece9 100644
--- a/CelesteMod/Source/CelesteModModule.cs
+++ b/CelesteMod/Source/CelesteModModule.cs
@@ -4,9 +4,10 @@
using MonoMod.ModInterop;
#endif
-namespace Celeste.Mod.CelesteMod {
- public class CelesteModModule : EverestModule {
- public static CelesteModModule Instance { get; private set; }
+namespace Celeste.Mod.CelesteMod;
+
+public class CelesteModModule : EverestModule {
+ public static CelesteModModule Instance { get; private set; }
#if Settings
public override Type SettingsType => typeof(CelesteModModuleSettings);
@@ -23,8 +24,8 @@ public class CelesteModModule : EverestModule {
public static CelesteModModuleSaveData SaveData => (CelesteModModuleSaveData) Instance._SaveData;
#endif
- public CelesteModModule() {
- Instance = this;
+ public CelesteModModule() {
+ Instance = this;
#if Logging
//-:cnd:noEmit
#if DEBUG
@@ -36,18 +37,17 @@ public CelesteModModule() {
#endif
//+:cnd:noEmit
#endif
- }
+ }
- public override void Load() {
+ public override void Load() {
#if Exports
typeof(CelesteModExports).ModInterop(); // TODO: delete this line if you do not need to export any functions
#endif
- // TODO: apply any hooks that should always be active
- }
+ // TODO: apply any hooks that should always be active
+ }
- public override void Unload() {
+ public override void Unload() {
// TODO: unapply any hooks applied in Load()
}
- }
-}
+}
\ No newline at end of file
diff --git a/CelesteMod/Source/CelesteModModuleSaveData.cs b/CelesteMod/Source/CelesteModModuleSaveData.cs
index 68d5d4f..bbc56a5 100644
--- a/CelesteMod/Source/CelesteModModuleSaveData.cs
+++ b/CelesteMod/Source/CelesteModModuleSaveData.cs
@@ -1,5 +1,5 @@
-namespace Celeste.Mod.CelesteMod {
- public class CelesteModModuleSaveData : EverestModuleSaveData {
+namespace Celeste.Mod.CelesteMod;
- }
-}
+public class CelesteModModuleSaveData : EverestModuleSaveData {
+
+}
\ No newline at end of file
diff --git a/CelesteMod/Source/CelesteModModuleSession.cs b/CelesteMod/Source/CelesteModModuleSession.cs
index 22e4205..463eafc 100644
--- a/CelesteMod/Source/CelesteModModuleSession.cs
+++ b/CelesteMod/Source/CelesteModModuleSession.cs
@@ -1,5 +1,5 @@
-namespace Celeste.Mod.CelesteMod {
- public class CelesteModModuleSession : EverestModuleSession {
+namespace Celeste.Mod.CelesteMod;
- }
-}
+public class CelesteModModuleSession : EverestModuleSession {
+
+}
\ No newline at end of file
diff --git a/CelesteMod/Source/CelesteModModuleSettings.cs b/CelesteMod/Source/CelesteModModuleSettings.cs
index c21e75b..d01a964 100644
--- a/CelesteMod/Source/CelesteModModuleSettings.cs
+++ b/CelesteMod/Source/CelesteModModuleSettings.cs
@@ -1,5 +1,5 @@
-namespace Celeste.Mod.CelesteMod {
- public class CelesteModModuleSettings : EverestModuleSettings {
+namespace Celeste.Mod.CelesteMod;
- }
-}
+public class CelesteModModuleSettings : EverestModuleSettings {
+
+}
\ No newline at end of file
diff --git a/CelesteMod/Source/Entities/SampleActor.cs b/CelesteMod/Source/Entities/SampleActor.cs
index 0bfe89a..fd05d5b 100644
--- a/CelesteMod/Source/Entities/SampleActor.cs
+++ b/CelesteMod/Source/Entities/SampleActor.cs
@@ -1,12 +1,12 @@
using Celeste.Mod.Entities;
using Microsoft.Xna.Framework;
-namespace Celeste.Mod.CelesteMod.Entities {
- [CustomEntity("CelesteMod/SampleActor")]
- public class SampleActor : Actor {
- public SampleActor(EntityData data, Vector2 offset)
- : base(data.Position + offset) {
- // TODO: read properties from data
- }
+namespace Celeste.Mod.CelesteMod.Entities;
+
+[CustomEntity("CelesteMod/SampleActor")]
+public class SampleActor : Actor {
+ public SampleActor(EntityData data, Vector2 offset)
+ : base(data.Position + offset) {
+ // TODO: read properties from data
}
-}
+}
\ No newline at end of file
diff --git a/CelesteMod/Source/Entities/SampleEntity.cs b/CelesteMod/Source/Entities/SampleEntity.cs
index ac5d284..f1253e3 100644
--- a/CelesteMod/Source/Entities/SampleEntity.cs
+++ b/CelesteMod/Source/Entities/SampleEntity.cs
@@ -2,14 +2,14 @@
using Microsoft.Xna.Framework;
using Monocle;
-namespace Celeste.Mod.CelesteMod.Entities {
- [CustomEntity("CelesteMod/SampleEntity")]
- public class SampleEntity : Entity {
- public SampleEntity(EntityData data, Vector2 offset)
- : base(data.Position + offset) {
- // TODO: read properties from data
- Add(GFX.SpriteBank.Create("sampleEntity"));
- Collider = new Hitbox(16, 16, -8, -8);
- }
+namespace Celeste.Mod.CelesteMod.Entities;
+
+[CustomEntity("CelesteMod/SampleEntity")]
+public class SampleEntity : Entity {
+ public SampleEntity(EntityData data, Vector2 offset)
+ : base(data.Position + offset) {
+ // TODO: read properties from data
+ Add(GFX.SpriteBank.Create("sampleEntity"));
+ Collider = new Hitbox(16, 16, -8, -8);
}
-}
+}
\ No newline at end of file
diff --git a/CelesteMod/Source/Entities/SampleSolid.cs b/CelesteMod/Source/Entities/SampleSolid.cs
index 561d071..86d6349 100644
--- a/CelesteMod/Source/Entities/SampleSolid.cs
+++ b/CelesteMod/Source/Entities/SampleSolid.cs
@@ -1,12 +1,12 @@
using Celeste.Mod.Entities;
using Microsoft.Xna.Framework;
-namespace Celeste.Mod.CelesteMod.Entities {
- [CustomEntity("CelesteMod/SampleSolid")]
- public class SampleSolid : Solid {
- public SampleSolid(EntityData data, Vector2 offset)
- : base(data.Position + offset, data.Width, data.Height, true) {
- // TODO: read properties from data
- }
+namespace Celeste.Mod.CelesteMod.Entities;
+
+[CustomEntity("CelesteMod/SampleSolid")]
+public class SampleSolid : Solid {
+ public SampleSolid(EntityData data, Vector2 offset)
+ : base(data.Position + offset, data.Width, data.Height, true) {
+ // TODO: read properties from data
}
-}
+}
\ No newline at end of file
diff --git a/CelesteMod/Source/Triggers/SampleTrigger.cs b/CelesteMod/Source/Triggers/SampleTrigger.cs
index 970b7d3..25e690d 100644
--- a/CelesteMod/Source/Triggers/SampleTrigger.cs
+++ b/CelesteMod/Source/Triggers/SampleTrigger.cs
@@ -1,11 +1,11 @@
using Celeste.Mod.Entities;
using Microsoft.Xna.Framework;
-namespace Celeste.Mod.CelesteMod.Triggers {
- [CustomEntity("CelesteMod/SampleTrigger")]
- public class SampleTrigger : Trigger {
- public SampleTrigger(EntityData data, Vector2 offset) : base(data, offset) {
- // TODO: read properties from data
- }
+namespace Celeste.Mod.CelesteMod.Triggers;
+
+[CustomEntity("CelesteMod/SampleTrigger")]
+public class SampleTrigger : Trigger {
+ public SampleTrigger(EntityData data, Vector2 offset) : base(data, offset) {
+ // TODO: read properties from data
}
-}
+}
\ No newline at end of file