file-scoped namespaces, or The Diff to End All Diffs

This commit is contained in:
Ell 2021-12-23 23:23:56 +01:00
parent e7f00e5c81
commit 1943ccd7a3
3 changed files with 158 additions and 158 deletions

View file

@ -4,7 +4,8 @@ using Microsoft.Xna.Framework;
using TinyLife.Objects;
using TinyLife.World;
namespace ExampleMod {
namespace ExampleMod;
// note that having a custom class for a furniture item like this is entirely optional
// but it allows for additional functionalities as displayed in this example
public class CustomTable : Furniture {
@ -35,4 +36,3 @@ namespace ExampleMod {
}
}
}

View file

@ -13,7 +13,8 @@ using TinyLife.Mods;
using TinyLife.Objects;
using TinyLife.Utilities;
namespace ExampleMod {
namespace ExampleMod;
public class ExampleMod : Mod {
// the logger that we can use to log info about this mod
@ -112,4 +113,3 @@ namespace ExampleMod {
}
}
}

View file

@ -7,7 +7,8 @@ using TinyLife.Emotions;
using TinyLife.Objects;
using Action = TinyLife.Actions.Action;
namespace ExampleMod {
namespace ExampleMod;
// we use a multi action because we want to walk to the location, and then execute the main sitting part
// see CustomTable for information on how to store custom action-specific information to disk as well
public class SitDownOnGrassAction : MultiAction {
@ -52,4 +53,3 @@ namespace ExampleMod {
}
}
}