Beispiel #1
0
        public static int AddPickupItemScripts(GameScriptBase script, string itemName)
        {
            var pos = script.AddMessage(string.Format(messageFormat, itemName));

            script.SetDatabaseValue(string.Format(keyFormat, itemName), 1);
            return(pos);
        }
Beispiel #2
0
 public static int AddHasItemCheckScripts(GameScriptBase script, string itemName, Action hasItem, Action dontHasItem)
 {
     return(script.If(() =>
     {
         var key = string.Format(keyFormat, itemName);
         return SaveManager.database.TryGetValue(key, out var value) && value > 0;
     }, hasItem, dontHasItem));
 }