Пример #1
0
        public static void OnPlayerRecipeSettingChanged(RecipeStorage.PlayerRecipeStorage storage, Recipe recipe, Box <RecipeStorage.RecipeSetting> recipeSetting)
        {
            BaseRecipe bRecipe;

            if (recipes.TryGetValue(recipe.Name, out bRecipe))
            {
                bRecipe.OnPlayerRecipeSettingChanged(storage, recipeSetting);
            }
        }
Пример #2
0
        public static void OnPlayerRecipeSettingChanged(RecipeStorage.PlayerRecipeStorage storage, Recipe recipe, Box <RecipeStorage.RecipeSetting> recipeSetting)
        {
            //If the setting changed is from a fake player
            if (storage.Player.ID.type == NetworkID.IDType.Steam && storage.Player.ID.steamID.GetEAccountType() == Steamworks.EAccountType.k_EAccountTypeAnonUser)
            {
                Team team = TeamManager.GetTeamManager().GetTeamOfFakePlayer(storage.Player);
                if (null == team)
                {
                    return;
                }

                foreach (Players.Player plr in team.GetConnectedPlayersPlayers())
                {
                    RecipePlayer.SendRecipes(plr);  //Recipes in job (how many create) Synchronization (Depends on the stockpile)
                }
            }
        }
Пример #3
0
 public override void OnPlayerRecipeSettingChanged(RecipeStorage.PlayerRecipeStorage storage, Box <RecipeStorage.RecipeSetting> recipeSetting)
 {
     Pipliz.Chatting.Chat.SendToAll("Testing OnPlayerRecipeSettingChanged");
 }
 public override int ShouldBeMade(Stockpile stockpile, RecipeStorage.PlayerRecipeStorage playerStorage = null)
 {
     return(RecipeStorage.GetPlayerStorage(stockpile.Owner).GetRecipeSetting(this.Name).Limit);
 }
Пример #5
0
 /// <summary>
 /// Don't store the Box<>, it's re-used.
 /// See storage.Player for the owner of the recipe
 /// This callback is also called upon loading the settings from json - but only for non-default values (defaults aren't stored)
 /// No registered uses
 /// </summary>
 /// <param name="storage">the players' recipe settings storage</param>
 /// <param name="recipeSetting">the new setting for the recipe</param>
 public virtual void OnPlayerRecipeSettingChanged(RecipeStorage.PlayerRecipeStorage storage, Pipliz.Box <RecipeStorage.RecipeSetting> recipeSetting)
 {
 }