Added in alloys, alloy recipes in furnace, and vocalization enabling options.

This commit is contained in:
JoshuaNavarro 2019-08-29 21:11:34 -07:00
parent b42dfffde4
commit e849e05161
6 changed files with 89 additions and 4 deletions

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Revitalize.Framework.Configs
{
public class Shops_BlacksmithConfig
{
public Shops_BlacksmithConfig()
{
}
}
}

View File

@ -125,6 +125,41 @@ namespace Revitalize.Framework.Crafting
this.recipesByObjectName["Furnace"].Add("Diamond", furnace_gemsToPrismaticShard);
}
VanillaRecipe furnace_steelIngot = new VanillaRecipe(new Dictionary<Item, int>()
{
{new StardewValley.Object((int)Enums.SDVObject.IronBar,1),1 },
{new StardewValley.Object((int)Enums.SDVObject.Coal,5),5}
}, new KeyValuePair<Item, int>(ModCore.ObjectManager.GetItem("SteelIngot"), 1), TimeUtilities.GetMinutesFromTime(0, 12, 0), new StatCost(), false);
this.recipesByObjectName["Furnace"].Add("Iron Bar", furnace_steelIngot);
VanillaRecipe furnace_brassIngot = new VanillaRecipe(new Dictionary<Item, int>()
{
{new StardewValley.Object((int)Enums.SDVObject.CopperBar,1),1 },
{ModCore.ObjectManager.GetItem("AluminumIngot"),1},
{new StardewValley.Object((int)Enums.SDVObject.Coal,5),1}
}, new KeyValuePair<Item, int>(ModCore.ObjectManager.GetItem("BrassIngot"), 1), TimeUtilities.GetMinutesFromTime(0, 6, 0), new StatCost(), false);
this.recipesByObjectName["Furnace"].Add("Aluminum Ingot", furnace_brassIngot);
VanillaRecipe furnace_bronzeIngot = new VanillaRecipe(new Dictionary<Item, int>()
{
{new StardewValley.Object((int)Enums.SDVObject.CopperBar,1),1 },
{ModCore.ObjectManager.GetItem("TinIngot"),1},
{new StardewValley.Object((int)Enums.SDVObject.Coal,5),1}
}, new KeyValuePair<Item, int>(ModCore.ObjectManager.GetItem("BronzeIngot"), 1), TimeUtilities.GetMinutesFromTime(0, 8, 0), new StatCost(), false);
this.recipesByObjectName["Furnace"].Add("Tin Ingot", furnace_bronzeIngot);
VanillaRecipe furnace_electrumIngot = new VanillaRecipe(new Dictionary<Item, int>()
{
{new StardewValley.Object((int)Enums.SDVObject.GoldBar,1),1 },
{ModCore.ObjectManager.GetItem("SilverIngot"),1},
{new StardewValley.Object((int)Enums.SDVObject.Coal,5),1}
}, new KeyValuePair<Item, int>(ModCore.ObjectManager.GetItem("ElectrumIngot"), 1), TimeUtilities.GetMinutesFromTime(0, 12, 0), new StatCost(), false);
this.recipesByObjectName["Furnace"].Add("Silver Ingot", furnace_electrumIngot);
}
/// <summary>

View File

@ -288,8 +288,20 @@ namespace Revitalize.Framework.Objects
CustomObject silverIngot = new CustomObject(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Items.Resources.Ore.SilverIngot", TextureManager.GetTexture(ModCore.Manifest, "Items.Resources.Ore", "SilverIngot"), typeof(CustomObject), Color.White, true), new BasicItemInformation("Silver Ingot", "Omegasis.Revitalize.Items.Resources.Ore.SilverIngot", "A silver ingot that can be used for crafting purposes.", "Ore", Color.Silver, -300, 0, false, 220, false, false, TextureManager.GetTexture(ModCore.Manifest, "Items.Resources.Ore", "SilverIngot"), new AnimationManager(), Color.White, true, null, null), 1);
ModCore.ObjectManager.AddItem("SilverIngot", silverIngot);
CustomObject titaniumIngot = new CustomObject(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Items.Resources.Ore.TitaniumIngot", TextureManager.GetTexture(ModCore.Manifest, "Items.Resources.Ore", "TitaniumIngot"), typeof(CustomObject), Color.White, true), new BasicItemInformation("Titanium Ingot", "Omegasis.Revitalize.Items.Resources.Ore.TitaniumIngot", "A titanium ingot that can be used for crafting purposes.", "Ore", Color.Silver, -300, 325, false, 35, false, false, TextureManager.GetTexture(ModCore.Manifest, "Items.Resources.Ore", "TitaniumIngot"), new AnimationManager(), Color.White, true, null, null), 1);
CustomObject titaniumIngot = new CustomObject(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Items.Resources.Ore.TitaniumIngot", TextureManager.GetTexture(ModCore.Manifest, "Items.Resources.Ore", "TitaniumIngot"), typeof(CustomObject), Color.White, true), new BasicItemInformation("Titanium Ingot", "Omegasis.Revitalize.Items.Resources.Ore.TitaniumIngot", "A titanium ingot that can be used for crafting purposes.", "Ore", Color.Silver, -300, 0, false, 325, false, false, TextureManager.GetTexture(ModCore.Manifest, "Items.Resources.Ore", "TitaniumIngot"), new AnimationManager(), Color.White, true, null, null), 1);
ModCore.ObjectManager.AddItem("TitaniumIngot", titaniumIngot);
CustomObject brassIngot = new CustomObject(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Items.Resources.Ore.BrassIngot", TextureManager.GetTexture(ModCore.Manifest, "Items.Resources.Ore", "BrassIngot"), typeof(CustomObject), Color.White, true), new BasicItemInformation("Brass Ingot", "Omegasis.Revitalize.Items.Resources.Ore.BrassIngot", "A brass alloy ingot made from copper and aluminum. It can be used for crafting purposes.", "Ore", Color.Silver, -300, 0, false, 195, false, false, TextureManager.GetTexture(ModCore.Manifest, "Items.Resources.Ore", "BrassIngot"), new AnimationManager(), Color.White, true, null, null), 1);
ModCore.ObjectManager.AddItem("BrassIngot", brassIngot);
CustomObject bronzeIngot = new CustomObject(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Items.Resources.Ore.BronzeIngot", TextureManager.GetTexture(ModCore.Manifest, "Items.Resources.Ore", "BronzeIngot"), typeof(CustomObject), Color.White, true), new BasicItemInformation("Bronze Ingot", "Omegasis.Revitalize.Items.Resources.Ore.BronzeIngot", "A bronze alloy ingot made from copper and tin. It can be used for crafting purposes.", "Ore", Color.Silver, -300, 0, false, 150, false, false, TextureManager.GetTexture(ModCore.Manifest, "Items.Resources.Ore", "BronzeIngot"), new AnimationManager(), Color.White, true, null, null), 1);
ModCore.ObjectManager.AddItem("BronzeIngot", bronzeIngot);
CustomObject electrumIngot = new CustomObject(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Items.Resources.Ore.ElectrumIngot", TextureManager.GetTexture(ModCore.Manifest, "Items.Resources.Ore", "ElectrumIngot"), typeof(CustomObject), Color.White, true), new BasicItemInformation("Electrum Ingot", "Omegasis.Revitalize.Items.Resources.Ore.ElectrumIngot", "A electrum alloy ingot made from gold and silver. It can be used for crafting purposes for things that use electricity.", "Ore", Color.Silver, -300, 0, false, 500, false, false, TextureManager.GetTexture(ModCore.Manifest, "Items.Resources.Ore", "ElectrumIngot"), new AnimationManager(), Color.White, true, null, null), 1);
ModCore.ObjectManager.AddItem("ElectrumIngot", electrumIngot);
CustomObject steelIngot = new CustomObject(PyTKHelper.CreateOBJData("Omegasis.Revitalize.Items.Resources.Ore.SteelIngot", TextureManager.GetTexture(ModCore.Manifest, "Items.Resources.Ore", "SteelIngot"), typeof(CustomObject), Color.White, true), new BasicItemInformation("Steel Ingot", "Omegasis.Revitalize.Items.Resources.Ore.SteelIngot", "A steel ingot that was made by processing iron again with more coal. It can be used for crafting purposes especially for making new machines.", "Ore", Color.Silver, -300, 0, false, 180, false, false, TextureManager.GetTexture(ModCore.Manifest, "Items.Resources.Ore", "SteelIngot"), new AnimationManager(), Color.White, true, null, null), 1);
ModCore.ObjectManager.AddItem("SteelIngot", steelIngot);
}
/// <summary>

View File

@ -481,6 +481,7 @@ namespace Revitalize
new StardewValley.Object((int)Enums.SDVObject.Topaz,1),
new StardewValley.Object((int)Enums.SDVObject.Jade,1),
new StardewValley.Object((int)Enums.SDVObject.Diamond,1),
new StardewValley.Object((int)Enums.SDVObject.IronBar,1),
});
//ModCore.log("Tin sells for: " + tin.sellToStorePrice());

View File

@ -26,6 +26,9 @@ namespace Vocalization
/// <summary>The current mode for the mod.</summary>
public string currentMode = "Full";
public bool ShopDialogueEnabled=true;
public bool TVDialogueEnabled = true;
public bool LetterDialogueEnabled = true;
/// <summary>Validates</summary>
public void verifyValidMode()

View File

@ -20,6 +20,18 @@ using Vocalization.Framework.Menus;
namespace Vocalization
{
/*
*Mode:
* Simple: Hello, Goodbye, etc
* Full: All dialogue
* None: Dialogue disabled
* Cinematic: Simple unless in a cutscene
* CutscenesOnly: (if game event is up play dialogue)
*
* (Code in) Have option to enable/disable shop dialogue
* (Code in) have option to enable/disable tv dialogue
* (Code in) have option to enable/disable letter dialogue
*
*
* Things to sanitize/load in
*
* NPC Dialogue(sanitized, not loaded);
@ -250,7 +262,7 @@ namespace Vocalization
private void Input_ButtonPressed(object sender, ButtonPressedEventArgs e)
{
if(e.Button.ToString()== config.menuHotkey)
if (e.Button.ToString() == config.menuHotkey)
{
Game1.activeClickableMenu = new VocalizationMenu(100, 64, 600, 300, true);
}
@ -317,7 +329,7 @@ namespace Vocalization
new KeyValuePair<ClickableTextureComponent, ExtraTextureDrawOrder>(speech, ExtraTextureDrawOrder.after)
};
Button menuTab = new Button("", new Rectangle(0, 0, 32, 32), new Texture2DExtended(ModHelper,this.ModManifest ,Path.Combine("Content", "Graphics", "MenuTab.png")), "", new Rectangle(0, 0, 32, 32), 2f, new StardustCore.Animations.Animation(new Rectangle(0, 0, 32, 32)), Color.White, Color.White, new StardustCore.UIUtilities.MenuComponents.Delegates.Functionality.ButtonFunctionality(new StardustCore.UIUtilities.MenuComponents.Delegates.DelegatePairing(null, null), new StardustCore.UIUtilities.MenuComponents.Delegates.DelegatePairing(null, null), new StardustCore.UIUtilities.MenuComponents.Delegates.DelegatePairing(null, null)), false, components);
Button menuTab = new Button("", new Rectangle(0, 0, 32, 32), new Texture2DExtended(ModHelper, this.ModManifest, Path.Combine("Content", "Graphics", "MenuTab.png")), "", new Rectangle(0, 0, 32, 32), 2f, new StardustCore.Animations.Animation(new Rectangle(0, 0, 32, 32)), Color.White, Color.White, new StardustCore.UIUtilities.MenuComponents.Delegates.Functionality.ButtonFunctionality(new StardustCore.UIUtilities.MenuComponents.Delegates.DelegatePairing(null, null), new StardustCore.UIUtilities.MenuComponents.Delegates.DelegatePairing(null, null), new StardustCore.UIUtilities.MenuComponents.Delegates.DelegatePairing(null, null)), false, components);
//Change this to take the vocalization menu instead
var modTabs = new List<KeyValuePair<Button, IClickableMenuExtended>>
@ -515,6 +527,7 @@ namespace Vocalization
};
foreach (string v in tries)
{
if (v.Equals("TV") && config.TVDialogueEnabled == false) continue;
//Add in support for TV Shows
bool f = DialogueCues.TryGetValue(v, out CharacterVoiceCue voice);
currentDialogue = sanitizeDialogueInGame(currentDialogue); //If contains the stuff in the else statement, change things up.
@ -538,6 +551,7 @@ namespace Vocalization
//Support for Letters
if (Game1.activeClickableMenu is LetterViewerMenu letterMenu)
{
if (config.LetterDialogueEnabled == false) return;
//Use reflection to get original text back.
//mail dialogue text will probably need to be sanitized as well....
List<string> mailText = (List<string>)ModHelper.Reflection.GetField<List<string>>(letterMenu, "mailMessage");
@ -553,6 +567,7 @@ namespace Vocalization
currentDialogue = sanitizeDialogueInGame(currentDialogue); //If contains the stuff in the else statement, change things up.
if (voice.dialogueCues.ContainsKey(currentDialogue))
{
//Not variable messages. Aka messages that don't contain words the user can change such as farm name, farmer name etc.
voice.speak(currentDialogue);
}
@ -566,6 +581,7 @@ namespace Vocalization
//Support for shops
if (Game1.activeClickableMenu is ShopMenu shopMenu)
{
if (config.ShopDialogueEnabled == false) return;
string shopDialogue = shopMenu.potraitPersonDialogue; //Check this string to the dict of voice cues
shopDialogue = shopDialogue.Replace(Environment.NewLine, "");
@ -2417,7 +2433,7 @@ namespace Vocalization
cleanDialogues = sanitizeDialogueFromDictionaries(dia, cue);
foreach (string str in cleanDialogues)
{
ModMonitor.Log("POST SANITIZARION: "+str);
ModMonitor.Log("POST SANITIZARION: " + str);
if (AudioCues.getWavFileReferences(language).ContainsKey(AudioCues.generateKey(language, cue.name, fileName, key)))
{
AudioCues.getWavFileReferences(language).TryGetValue(AudioCues.generateKey(language, cue.name, fileName, key), out VoiceAudioOptions value);