From b12f4ef7d58cfe4d815feb2db1f88f223c7f2a61 Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Thu, 7 Sep 2017 07:41:16 -0500 Subject: Made world data paths adjustable, and added API to temporarily disable saving chunks to disk. (#3912) --- Server/Plugins/APIDump/Classes/World.lua | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'Server/Plugins/APIDump/Classes/World.lua') diff --git a/Server/Plugins/APIDump/Classes/World.lua b/Server/Plugins/APIDump/Classes/World.lua index ac837dea3..82f31febe 100644 --- a/Server/Plugins/APIDump/Classes/World.lua +++ b/Server/Plugins/APIDump/Classes/World.lua @@ -1450,6 +1450,16 @@ function OnAllChunksAvailable() All return values from the callbacks are i }, Notes = "Returns the block type and metadata for the block at the specified coords. The first value specifies if the block is in a valid loaded chunk, the other values are valid only if BlockValid is true.", }, + GetDataPath = + { + Returns = + { + { + Type = "boolean", + }, + }, + Notes = "Returns the path to the root of the world data.", + }, GetDefaultWeatherInterval = { Params = @@ -2117,6 +2127,16 @@ function OnAllChunksAvailable() All return values from the callbacks are i }, Notes = "Returns whether PVP is enabled in the world settings.", }, + IsSavingEnabled = + { + Returns = + { + { + Type = "boolean", + }, + }, + Notes = "Returns whether or not saving chunk data is enabled. If disabled, the world will keep dirty chunks in memory forever, and will simply regenerate non-dirty chunks that are unloaded.", + }, IsTrapdoorOpen = { Params = @@ -2726,6 +2746,17 @@ function OnAllChunksAvailable() All return values from the callbacks are i }, Notes = "Sets the blockticking to start at the specified block in the next tick.", }, + SetSavingEnabled = + { + Params = + { + { + Name = "SavingEnabled", + Type = "boolean", + }, + }, + Notes = "Sets whether saving chunk data is enabled. If disabled, dirty chunks will stay in memory forever, which may cause performance and stability issues.", + }, SetShouldUseChatPrefixes = { Params = -- cgit v1.2.3