„DavaStorage-Helper.cs“ ändern

master
Chris 2020-06-07 20:58:00 +00:00
parent 2368ed74fc
commit d13437a8c3
1 changed files with 10 additions and 4 deletions

View File

@ -1,14 +1,20 @@
//DATA STORE LOGIC //DATA STORE LOGIC
list getDataListFromDataStorage(key _storage)
integer getItemCountFromSlot(list _dataStorage, integer _slot)
{ {
return llCSV2List(osGetDataValue("game.inventar.objekt." + _storage + ".inventar")); return (integer)getDataEntryFromDataList(_dataStorage, "inventar.slot." + _slot + ".count");
} }
saveDataListToDataStorage(key _storage, list _dataList) list getDataListFromDataStorage(string _storage)
{
return llCSV2List(osGetDataValue(_storage));
}
saveDataListToDataStorage(list _dataList, string _storage)
{ {
string _csv = llList2CSV(_dataList); string _csv = llList2CSV(_dataList);
osSetDataValue("game.inventar.objekt." + _storage + ".inventar", _csv); osSetDataValue(_storage, _csv);
} }
integer checkDataEntryInDataList(list _dataList, string _key) integer checkDataEntryInDataList(list _dataList, string _key)