public override void OnResearchComplete(ScienceManagerPlayer manager, EResearchCompletionReason reason) { RecipeStorage.GetPlayerStorage(manager.Player).SetRecipeAvailability("pipliz.crafter.splittingstumptemperate", true, "pipliz.crafter"); RecipeStorage.GetPlayerStorage(manager.Player).SetRecipeAvailability("pipliz.crafter.splittingstumptaiga", true, "pipliz.crafter"); RecipePlayer.UnlockOptionalRecipe(manager.Player, "pipliz.player.splittingstumptaiga"); RecipePlayer.UnlockOptionalRecipe(manager.Player, "pipliz.player.splittingstumptemperate"); }
private static void Apocth_ResearchComplete(object sender, ResearchCompleteEventArgs e) { RecipeStorage.GetPlayerStorage(e.Manager.Player) .SetRecipeAvailability(ApothecaryRegister.JOB_RECIPE, true, ItemFactory.JOB_CRAFTER); RecipePlayer.UnlockOptionalRecipe(e.Manager.Player, ApothecaryRegister.JOB_RECIPE); }
private static void Machiness_ResearchComplete(object sender, ResearchCompleteEventArgs e) { RecipeStorage.GetPlayerStorage(e.Manager.Player) .SetRecipeAvailability(Miner.Item.name, true, AdvancedCrafterRegister.JOB_NAME); RecipeStorage.GetPlayerStorage(e.Manager.Player) .SetRecipeAvailability(GateLever.Item.name, true, AdvancedCrafterRegister.JOB_NAME); RecipeStorage.GetPlayerStorage(e.Manager.Player) .SetRecipeAvailability(GateLever.GateItem.name, true, AdvancedCrafterRegister.JOB_NAME); RecipeStorage.GetPlayerStorage(e.Manager.Player) .SetRecipeAvailability(Turret.BRONZEARROW_NAMESPACE, true, AdvancedCrafterRegister.JOB_NAME); RecipeStorage.GetPlayerStorage(e.Manager.Player) .SetRecipeAvailability(Turret.STONE_NAMESPACE, true, AdvancedCrafterRegister.JOB_NAME); RecipeStorage.GetPlayerStorage(e.Manager.Player) .SetRecipeAvailability(Turret.CROSSBOW_NAMESPACE, true, AdvancedCrafterRegister.JOB_NAME); RecipeStorage.GetPlayerStorage(e.Manager.Player) .SetRecipeAvailability(Turret.MATCHLOCK_NAMESPACE, true, AdvancedCrafterRegister.JOB_NAME); RecipeStorage.GetPlayerStorage(e.Manager.Player) .SetRecipeAvailability(AdvancedCrafterRegister.JOB_RECIPE, true, ItemFactory.JOB_CRAFTER); RecipeStorage.GetPlayerStorage(e.Manager.Player) .SetRecipeAvailability(MachinistRegister.JOB_RECIPE, true, ItemFactory.JOB_CRAFTER); RecipePlayer.UnlockOptionalRecipe(e.Manager.Player, MachinistRegister.JOB_RECIPE); RecipePlayer.UnlockOptionalRecipe(e.Manager.Player, AdvancedCrafterRegister.JOB_RECIPE); }
public override void OnResearchComplete(ScienceManagerPlayer manager, EResearchCompletionReason reason) { RecipeStorage.GetPlayerStorage(manager.Player).SetRecipeAvailability("pipliz.crafter.bronzeanvil", true, "pipliz.crafter"); RecipeStorage.GetPlayerStorage(manager.Player).SetRecipeAvailability("pipliz.crafter.bow", true, "pipliz.crafter"); RecipeStorage.GetPlayerStorage(manager.Player).SetRecipeAvailability("pipliz.crafter.bowstring", true, "pipliz.crafter"); RecipePlayer.UnlockOptionalRecipe(manager.Player, "pipliz.player.bronzeanvil"); }
/// <summary> /// Called when this researchable is completed by a player. /// </summary> /// <param name="manager">Player's individual science manager.</param> /// <param name="reason">Will equal EResearchCompletionReason.ProgressCompleted when this research is completed by a player.</param> public void OnResearchComplete(ScienceManagerPlayer manager, EResearchCompletionReason reason) { if (reason == EResearchCompletionReason.ProgressCompleted) { foreach (OptionalRecReference U in Unlocks) { if (U.limitType != null) { RecipeStorage.GetPlayerStorage(manager.Player).SetRecipeAvailability(U.NPCCrafted, true, U.limitType); } if (U.PlayerCrafted != null) { RecipePlayer.UnlockOptionalRecipe(manager.Player, U.PlayerCrafted); } } foreach (OptionalRecReference L in Locks) { if (L.limitType != null) { RecipeStorage.GetPlayerStorage(manager.Player).SetRecipeAvailability(L.NPCCrafted, false, L.limitType); } if (L.PlayerCrafted != null) { // need to figure out how to do this. } } } }
private static void Machiness_ResearchComplete(object sender, ResearchCompleteEventArgs e) { RecipeStorage.GetPlayerStorage(e.Manager.Player).SetRecipeAvailability(Items.Machines.Miner.Item.name, true, Jobs.AdvancedCrafterRegister.JOB_NAME); RecipeStorage.GetPlayerStorage(e.Manager.Player).SetRecipeAvailability(Items.Machines.GateLever.Item.name, true, Jobs.AdvancedCrafterRegister.JOB_NAME); RecipeStorage.GetPlayerStorage(e.Manager.Player).SetRecipeAvailability(Items.Machines.GateLever.GateItem.name, true, Jobs.AdvancedCrafterRegister.JOB_NAME); RecipeStorage.GetPlayerStorage(e.Manager.Player).SetRecipeAvailability(Jobs.AdvancedCrafterRegister.JOB_RECIPE, true, Items.ItemFactory.JOB_CRAFTER); RecipeStorage.GetPlayerStorage(e.Manager.Player).SetRecipeAvailability(Jobs.MachinistRegister.JOB_RECIPE, true, Items.ItemFactory.JOB_CRAFTER); RecipePlayer.UnlockOptionalRecipe(e.Manager.Player, Jobs.MachinistRegister.JOB_RECIPE); RecipePlayer.UnlockOptionalRecipe(e.Manager.Player, Jobs.AdvancedCrafterRegister.JOB_RECIPE); foreach (var item in Items.Machines.Turret.TurretSettings) { RecipeStorage.GetPlayerStorage(e.Manager.Player).SetRecipeAvailability(item.Value.TurretItem.name, true, Jobs.AdvancedCrafterRegister.JOB_NAME); } }
public override void OnResearchComplete(ScienceManagerPlayer manager, EResearchCompletionReason reason) { RecipeStorage.GetPlayerStorage(manager.Player).SetRecipeAvailability("pipliz.crafter.oven", true, "pipliz.crafter"); RecipeStorage.GetPlayerStorage(manager.Player).SetRecipeAvailability("pipliz.crafter.grindstone", true, "pipliz.crafter"); RecipePlayer.UnlockOptionalRecipe(manager.Player, "pipliz.player.oven"); RecipePlayer.UnlockOptionalRecipe(manager.Player, "pipliz.player.grindstone"); if (reason == EResearchCompletionReason.ProgressCompleted) { Stockpile.GetStockPile(manager.Player).Add(BlockTypes.Builtin.BuiltinBlocks.WheatStage1, 400); if (manager.Player.IsConnected) { Chatting.Chat.Send(manager.Player, "You received 400 wheat seeds!"); } } }
/// <summary> /// Called when this researchable is completed by a player. /// </summary> /// <param name="manager">Player's individual science manager.</param> /// <param name="reason">Will equal EResearchCompletionReason.ProgressCompleted when this research is completed by a player.</param> public void OnResearchComplete(ScienceManagerPlayer manager, EResearchCompletionReason reason) { if (reason == EResearchCompletionReason.ProgressCompleted) { foreach (Unlock U in Unlocks) { if (U.limitType != null) { RecipeStorage.GetPlayerStorage(manager.Player).SetRecipeAvailability(U.NPCCrafted, true, U.limitType); } if (U.PlayerCrafted != null) { RecipePlayer.UnlockOptionalRecipe(manager.Player, U.PlayerCrafted); } } } }
private static void Herbs_ResearchComplete(object sender, ResearchCompleteEventArgs e) { RecipeStorage.GetPlayerStorage(e.Manager.Player).SetRecipeAvailability(Jobs.HerbalistRegister.JOB_RECIPE, true, Items.ItemFactory.JOB_CRAFTER); RecipePlayer.UnlockOptionalRecipe(e.Manager.Player, Jobs.HerbalistRegister.JOB_RECIPE); }
public override void OnResearchComplete(ScienceManagerPlayer manager, EResearchCompletionReason reason) { RecipeStorage.GetPlayerStorage(manager.Player).SetRecipeAvailability("pipliz.crafter.stonemasonworkbench", true, "pipliz.crafter"); RecipePlayer.UnlockOptionalRecipe(manager.Player, "pipliz.player.stonemasonworkbench"); }