diff --git a/STEEM.CRAFT/core/functions/getOpsInBlock.sk b/STEEM.CRAFT/core/functions/getOpsInBlock.sk index 9ee0f1f..94f98fc 100644 --- a/STEEM.CRAFT/core/functions/getOpsInBlock.sk +++ b/STEEM.CRAFT/core/functions/getOpsInBlock.sk @@ -23,7 +23,7 @@ function getOpsInBlock(blocknumber:number,onlyvirtual:boolean=false) :: object: # # > If the block caching is not disabled. else: - set {_tmp} to getGeneralStorageData("steemblocks","%{_blocknumber}%-%{_onlyvirtual}%") + set {_tmp} to getGeneralStorageData("steemblocks","%{_blocknumber}%-%{_onlyvirtual}%","b") # # > If the block is cached, decompress the base64 string and deserialize it # > to make it a SteemJ object again. @@ -35,5 +35,5 @@ function getOpsInBlock(blocknumber:number,onlyvirtual:boolean=false) :: object: else: set {_steemj} to new SteemJ() set {_block} to {_steemj}.getOpsInBlock({_blocknumber},{_onlyvirtual}) - saveGeneralStorageData("steemblocks","%{_blocknumber}%-%{_onlyvirtual}%",compressBase64(serialize({_block}))) + saveGeneralStorageData("steemblocks","%{_blocknumber}%-%{_onlyvirtual}%","b",compressBase64(serialize({_block}))) return {_block} diff --git a/STEEM.CRAFT/core/functions/storage/storage.sk b/STEEM.CRAFT/core/functions/storage/storage.sk index 6f0343d..2b78d2e 100644 --- a/STEEM.CRAFT/core/functions/storage/storage.sk +++ b/STEEM.CRAFT/core/functions/storage/storage.sk @@ -44,15 +44,16 @@ function getStorageData(usage:text,player:offline player,key:text) :: object: # > Saves data for a specific usage type to the desired format. # > Parameters: # > usage identifier +# > category # > data key # > data value -function saveGeneralStorageData(usage:text,key:text,data:object): +function saveGeneralStorageData(usage:text,category:text,key:text,data:object): # # > Get the storage type out of the configuration to allow the server # > operator multiple storage formats. set {_storageformat} to getStorageType() if {_storageformat} is "yaml": - saveyamldata({_usage},{_key},{_data}) + saveyamldata({_usage},{_category},{_key},{_data}) # # > Function - getGeneralStorageData @@ -60,13 +61,14 @@ function saveGeneralStorageData(usage:text,key:text,data:object): # > Try to cache results, since this may not very fast. # > Parameters: # > usage identifier +# > category # > data key # > Returns: # > data value -function getGeneralStorageData(usage:text,key:text) :: object: +function getGeneralStorageData(usage:text,category:text,key:text) :: object: # # > Get the storage type out of the configuration to allow the server # > operator multiple storage formats. set {_storageformat} to getStorageType() if {_storageformat} is "yaml": - return getyamldata({_usage},{_key}) + return getyamldata({_usage},{_category},{_key}) diff --git a/STEEM.CRAFT/core/functions/storage/yaml.sk b/STEEM.CRAFT/core/functions/storage/yaml.sk index 8bb6d0e..5d44367 100644 --- a/STEEM.CRAFT/core/functions/storage/yaml.sk +++ b/STEEM.CRAFT/core/functions/storage/yaml.sk @@ -36,10 +36,11 @@ function getyamluserdata(usage:text,player:offline player,key:text) :: object: # > Saves data for a specific usage type in a yaml file. # > Parameters: # > usage identifier +# > category # > data key # > data value -function saveyamldata(usage:text,key:text,data:object): - set yaml value "%{_key}%" from "plugins/Skript/storage/%{_usage}%/%{_key}%.yml" to {_data} +function saveyamldata(usage:text,category:text,key:text,data:object): + set yaml value "%{_key}%" from "plugins/Skript/storage/%{_usage}%/%{_category}%.yml" to {_data} # # > Function - getyamldata @@ -47,8 +48,9 @@ function saveyamldata(usage:text,key:text,data:object): # > Try to cache results, since this is not very fast. # > Parameters: # > usage identifier +# > category # > data key # > Returns: # > data value -function getyamldata(usage:text,key:text) :: object: - return yaml value "%{_key}%" from "plugins/Skript/storage/%{_usage}%/%{_key}%.yml" +function getyamldata(usage:text,category:text,key:text) :: object: + return yaml value "%{_key}%" from "plugins/Skript/storage/%{_usage}%/%{_category}%.yml"