Merge remote-tracking branch 'origin/config/WorldTileProvider' into general-devel
This commit is contained in:
commit
d0262656df
3 changed files with 19 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
/// <summary>Allows changing of the default world tile provider.</summary>
|
||||
[Description("Allows changing of the default world tile provider.")]
|
||||
public string WorldTileProvider = "default";
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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?.ToLower())
|
||||
{
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue