diff --git a/TShockAPI/Configuration/TShockConfig.cs b/TShockAPI/Configuration/TShockConfig.cs index d6f9743e..efeeae86 100644 --- a/TShockAPI/Configuration/TShockConfig.cs +++ b/TShockAPI/Configuration/TShockConfig.cs @@ -55,6 +55,10 @@ namespace TShockAPI.Configuration [Description("Allows stacks in chests to go beyond the stack limit during world loading.")] public bool IgnoreChestStacksOnLoad = false; + /// Allows changing of the default world tile provider. + [Description("Allows changing of the default world tile provider.")] + public string WorldTileProvider = "default"; + #endregion diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 8dd8c560..8e89a334 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -383,6 +383,19 @@ namespace TShockAPI if (Config.Settings.EnableGeoIP && File.Exists(geoippath)) Geo = new GeoIPCountry(geoippath); + // check if a custom tile provider is to be used + switch(Config.Settings.WorldTileProvider) + { + case "heaptile": + Log.ConsoleInfo(GetString($"Using {nameof(HeapTile)} for tile implementation"), TraceLevel.Info); + Main.tile = new TileProvider(); + break; + case "constileation": + Log.ConsoleInfo(GetString($"Using {nameof(ConstileationProvider)} for tile implementation"), TraceLevel.Info); + Main.tile = new ConstileationProvider(); + break; + } + Log.ConsoleInfo(GetString("TShock {0} ({1}) now running.", Version, VersionCodename)); ServerApi.Hooks.GamePostInitialize.Register(this, OnPostInit); diff --git a/docs/changelog.md b/docs/changelog.md index ac38bf0b..6a65eecf 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -79,6 +79,7 @@ Use past tense when adding new entries; sign your name off when you add or chang ## Upcoming changes * Your changes could be here! +* Added `WorldTileProvider` to the tshock config with values `default`, `constileation` or `heaptile`. This allows tile providers to be changed in environments where CLI args cannot be altered. See the documentation website for more info about these providers. (@SignatureBeef) ## TShock 5.1.2 * Added support for Terraria 1.4.4.8.1 via OTAPI 3.1.19. (@SignatureBeef)