diff --git a/AnimalSitter/AnimalSitter.cs b/AnimalSitter/AnimalSitter.cs index 95868a2..c0e4d8c 100644 --- a/AnimalSitter/AnimalSitter.cs +++ b/AnimalSitter/AnimalSitter.cs @@ -10,7 +10,6 @@ using StardewValley.Objects; using AnimalSitter.Common; using Object = StardewValley.Object; -using Microsoft.Xna.Framework.Graphics; using AnimalSitter.Integrations.GenericModConfigMenu; using Microsoft.Xna.Framework.Input; @@ -79,6 +78,7 @@ public override void Entry(IModHelper helper) this.Config = this.Helper.ReadConfig(); this.DialogueManager = new DialogueManager(this.Config, helper.ModContent, this.Monitor); this.ChestManager = new ChestManager(this.Monitor); + I18n.Init(helper.Translation); helper.Events.GameLoop.SaveLoaded += this.OnSaveLoaded; helper.Events.Input.ButtonPressed += this.OnButtonPressed; @@ -103,79 +103,79 @@ private void OnGameLaunched(object sender, GameLaunchedEventArgs e) ); configMenu.AddKeybind(mod: this.ModManifest, - name: () => "KeyBind", - tooltip: () => "The key that you press to tell your animal helper to get to work. This defaults to the 'O' key.", + name: () => I18n.Config_KeyBind(), + tooltip: () => I18n.Config_KeyBind_Description(), getValue: () => SButtonExtensions.ToSButton((Keys)Enum.Parse(typeof(Keys), this.Config.KeyBind)), setValue: value => this.Config.KeyBind = value.ToString()); configMenu.AddBoolOption( mod: this.ModManifest, - name: () => "GrowUpEnabled", - tooltip: () => "This open tells your animal helper that you'd like them to use dark magic to instantly bring young animals up to the age where they can become contributing members of your farm. Default is false.", + name: () => I18n.Config_GrowUpEnabled(), + tooltip: () => I18n.Config_GrowUpEnabled_Description(), getValue: () => this.Config.GrowUpEnabled, setValue: value => this.Config.GrowUpEnabled = value ); configMenu.AddBoolOption( mod: this.ModManifest, - name: () => "MaxHappinessEnabled", - tooltip: () => "This option tells your animal helper that you don't care how long (or where) they have to pet your animals, but their job is not done until each animal's happiness is maxed. Default is false.", + name: () => I18n.Config_MaxHappinessEnabled(), + tooltip: () => I18n.Config_MaxHappinessEnabled_Description(), getValue: () => this.Config.MaxHappinessEnabled, setValue: value => this.Config.MaxHappinessEnabled = value ); configMenu.AddBoolOption( mod: this.ModManifest, - name: () => "MaxFullnessEnabled", - tooltip: () => "This option tells your animal helper to feed your animals. A full animal is a producing animal. Default is false.", + name: () => I18n.Config_MaxFullnessEnabled(), + tooltip: () => I18n.Config_MaxFullnessEnabled_Description(), getValue: () => this.Config.MaxFullnessEnabled, setValue: value => this.Config.MaxFullnessEnabled = value ); configMenu.AddBoolOption( mod: this.ModManifest, - name: () => "HarvestEnabled", - tooltip: () => "This tells your animal worker to harvest the animal drops. If you like doing this yourself, then set this to false.", + name: () => I18n.Config_HarvestEnabled(), + tooltip: () => I18n.Config_HarvestEnabled_Description(), getValue: () => this.Config.HarvestEnabled, setValue: value => this.Config.HarvestEnabled = value ); configMenu.AddBoolOption( mod: this.ModManifest, - name: () => "PettingEnabled", - tooltip: () => "This tells your animal worker that you want your animals petted. This is the whole reason I made this mod, so it defaults to true. So if you set this to \"false\", please keep it to yourself. If you enjoy petting each of your animals (because you don't have a hundred of them) then set it to false.", + name: () => I18n.Config_PettingEnabled(), + tooltip: () => I18n.Config_PettingEnabled_Description(), getValue: () => this.Config.PettingEnabled, setValue: value => this.Config.PettingEnabled = value ); configMenu.AddBoolOption( mod: this.ModManifest, - name: () => "MaxFriendshipEnabled", - tooltip: () => "This tells your animal worker whether they have to wear your 'you' mask, so that the affection of the animals is directed toward you, and not the help. Defaults to false.", + name: () => I18n.Config_MaxFriendshipEnabled(), + tooltip: () => I18n.Config_MaxFriendshipEnabled_Description(), getValue: () => this.Config.MaxFriendshipEnabled, setValue: value => this.Config.MaxFriendshipEnabled = value ); configMenu.AddNumberOption( mod: this.ModManifest, - name: () => "CostPerAction", - tooltip: () => "This is how much to charge per action per animal. There have been some suggestions around this option, and I do have plans to introduce a more complex pricing structure in the future, but for now just make sure this includes all services that you want the animal checker to perform, and average it out over the number of actions. Defaults to 25.", + name: () => I18n.Config_CostPerAction(), + tooltip: () => I18n.Config_CostPerAction_Description(), getValue: () => this.Config.CostPerAction, setValue: value => this.Config.CostPerAction = value ); configMenu.AddBoolOption( mod: this.ModManifest, - name: () => "EnableMessages", - tooltip: () => "This is whether to enable in-game messages and dialogues revolving around your animal checker. It defaults to true.", + name: () => I18n.Config_EnableMessages(), + tooltip: () => I18n.Config_EnableMessages_Description(), getValue: () => this.Config.EnableMessages, setValue: value => this.Config.EnableMessages = value ); configMenu.AddBoolOption( mod: this.ModManifest, - name: () => "TakeTrufflesFromPigs", - tooltip: () => "Whoever trainedm these pigs did an awful job, as they have a tendency to hide truffles. Where? I'm not exactly sure, but they've got 'em, trust me. With this option enabled, your farm helper will perform a TSA-approved body cavity search and find them. If you love the person who is doing your checking, or if you want your pigs to remain unviolated, or if you consider this cheating, then set it to false.", + name: () => I18n.Config_TakeTrufflesFromPigs(), + tooltip: () => I18n.Config_TakeTrufflesFromPigs_Description(), getValue: () => this.Config.TakeTrufflesFromPigs, setValue: value => this.Config.TakeTrufflesFromPigs = value ); @@ -196,7 +196,7 @@ private void OnSaveLoaded(object sender, SaveLoadedEventArgs e) // Read in dialogue this.DialogueManager.ReadInMessages(); - this.Monitor.Log($"chestCoords:{this.ChestCoords.X},{this.ChestCoords.Y}", LogLevel.Trace); + this.Monitor.Log(I18n.Log_ChestCoords(x: this.ChestCoords.X, y: this.ChestCoords.Y), LogLevel.Trace); } private void ImportConfiguration() @@ -204,7 +204,7 @@ private void ImportConfiguration() if (!Enum.TryParse(this.Config.KeyBind, true, out this.PetKey)) { this.PetKey = SButton.O; - this.Monitor.Log($"Error parsing key binding; defaulted to {this.PetKey}."); + this.Monitor.Log(I18n.Log_ErrorParsingKeyBingding(default_value: this.PetKey)); } this.PettingEnabled = this.Config.PettingEnabled; @@ -223,8 +223,8 @@ private void ImportConfiguration() if (this.Config.CostPerAction < 0) { - this.Monitor.Log("I'll do it for free, but I'm not paying YOU to take care of YOUR stinking animals!", LogLevel.Trace); - this.Monitor.Log("Setting costPerAction to 0.", LogLevel.Trace); + this.Monitor.Log(I18n.Log_DoingFree(), LogLevel.Trace); + this.Monitor.Log(I18n.Log_SetCostTo0(), LogLevel.Trace); this.CostPerAnimal = 0; } else @@ -249,7 +249,7 @@ private void OnButtonPressed(object sender, ButtonPressedEventArgs e) } catch (Exception ex) { - this.Monitor.Log($"Exception onKeyReleased: {ex}", LogLevel.Error); + this.Monitor.Log(I18n.Log_ExceptionOnkeyreleased(ex: ex), LogLevel.Error); } } } @@ -268,13 +268,13 @@ private void IterateOverAnimals() animal.pet(Game1.player); stats.AnimalsPet++; - this.Monitor.Log($"Petting animal: {animal.Name}", LogLevel.Trace); + this.Monitor.Log(I18n.Log_PettingAnimal(animal_name: animal.Name), LogLevel.Trace); } if (this.GrowUpEnabled && animal.isBaby()) { - this.Monitor.Log($"Aging animal to mature+1 days: {animal.Name}", LogLevel.Trace); + this.Monitor.Log(I18n.Log_AgingAnimal(animal_name: animal.Name), LogLevel.Trace); animal.age.Value = animal.age.Value + 1; animal.reload(animal.home); @@ -283,7 +283,7 @@ private void IterateOverAnimals() if (this.MaxFullnessEnabled && animal.fullness.Value < byte.MaxValue) { - this.Monitor.Log($"Feeding animal: {animal.Name}", LogLevel.Trace); + this.Monitor.Log(I18n.Log_FeedingAnimal(animal_name: animal.Name), LogLevel.Trace); animal.fullness.Value = byte.MaxValue; stats.Fed++; @@ -291,7 +291,7 @@ private void IterateOverAnimals() if (this.MaxHappinessEnabled && animal.happiness.Value < byte.MaxValue) { - this.Monitor.Log($"Maxing Happiness of animal {animal.Name}", LogLevel.Trace); + this.Monitor.Log(I18n.Log_MaxHappinessAnimal(animal_name: animal.Name), LogLevel.Trace); animal.happiness.Value = byte.MaxValue; stats.MaxHappiness++; @@ -299,7 +299,7 @@ private void IterateOverAnimals() if (this.MaxFriendshipEnabled && animal.friendshipTowardFarmer.Value < 1000) { - this.Monitor.Log($"Maxing Friendship of animal {animal.Name}", LogLevel.Trace); + this.Monitor.Log(I18n.Log_MaxFriendshipAnimal(animal_name: animal.Name), LogLevel.Trace); animal.friendshipTowardFarmer.Value = 1000; stats.MaxFriendship++; @@ -307,7 +307,7 @@ private void IterateOverAnimals() if (animal.currentProduce.Value != null && Convert.ToInt32(animal.currentProduce.Value) > 0 && this.HarvestEnabled) { - this.Monitor.Log($"Has produce: {animal.Name} {animal.currentProduce}", LogLevel.Trace); + this.Monitor.Log(I18n.Log_HasProduce(animal_name: animal.Name, animal_currentProduce: animal.currentProduce.Name), LogLevel.Trace); if (animal.type.Value == "Pig") { @@ -333,7 +333,7 @@ private void IterateOverAnimals() } catch (Exception ex) { - this.Monitor.Log($"Exception onKeyReleased: {ex}", LogLevel.Error); + this.Monitor.Log(I18n.Log_ExceptionOnkeyreleased(ex: ex), LogLevel.Error); } } @@ -352,18 +352,18 @@ private void IterateOverAnimals() if (this.MessagesEnabled) this.ShowMessage(actions, totalCost, doesPlayerHaveEnoughCash, gatheringOnly, stats); - this.Monitor.Log($"Animal sitter performed {actions} actions. Total cost: {totalCost}g", LogLevel.Trace); + this.Monitor.Log(I18n.Log_TotalCost(actions: actions, total_cost: totalCost), LogLevel.Trace); } else if (actions == 0 && this.CostPerAnimal > 0) { if (this.MessagesEnabled) { - HUDMessage msg = new HUDMessage("There's nothing to do for the animals right now."); + HUDMessage msg = new HUDMessage(I18n.Log_NothingToDo()); Game1.addHUDMessage(msg); } - this.Monitor.Log("There's nothing to do for the animals right now.", LogLevel.Trace); + this.Monitor.Log(I18n.Log_NothingToDo(), LogLevel.Trace); } } @@ -411,7 +411,7 @@ private void HarvestTruffles(AnimalTasks stats) } else { - this.Monitor.Log("Inventory full, could not add animal product.", LogLevel.Trace); + this.Monitor.Log(I18n.Log_InventoryFull(), LogLevel.Trace); } } @@ -440,7 +440,7 @@ private void HarvestCoops(AnimalTasks stats) { Object obj = keyvalue.Value; - this.Monitor.Log($"Found coop object: {obj.Name} / {obj.Category}/{obj.isAnimalProduct()}", LogLevel.Trace); + this.Monitor.Log(I18n.Log_FoundCoopObject(obj_name: obj.Name, obj_category: obj.Category, obj_isAnimalProduct: obj.isAnimalProduct()), LogLevel.Trace); if (obj.isAnimalProduct() || obj.ParentSheetIndex == 107 && obj.Name != "Plush Bunny") { @@ -452,7 +452,7 @@ private void HarvestCoops(AnimalTasks stats) } else { - this.Monitor.Log("Inventory full, could not add animal product.", LogLevel.Trace); + this.Monitor.Log(I18n.Log_InventoryFull(), LogLevel.Trace); } } } @@ -521,16 +521,16 @@ private void ShowMessage(int numActions, int totalCost, bool doesPlayerHaveEnoug { if (Game1.player.catPerson) { - message += "Meow.."; + message += I18n.Log_Meow(); } else { - message += "Woof."; + message += I18n.Log_Woof(); } } else { - message += "Your imaginary pet has taken care of your animals."; + message += I18n.Log_ImaginaryPetTakeCare(); } HUDMessage msg = new HUDMessage(message); diff --git a/AnimalSitter/AnimalSitter.csproj b/AnimalSitter/AnimalSitter.csproj index 3f8d193..8a4ec47 100644 --- a/AnimalSitter/AnimalSitter.csproj +++ b/AnimalSitter/AnimalSitter.csproj @@ -1,73 +1,25 @@  - - + - Debug - AnyCPU - {8B61719C-1391-4877-A318-B4592A3B4E24} - Library - Properties - AnimalSitter AnimalSitter - v4.5.2 - 512 - true - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + AnimalSitter + 2.2.0 + net6.0 + AnyCPU + AnyCPU + false + + true - - - - - - - + + + + - - - - - - - - - - - - - - - - Always - - - - Always + + PreserveNewest - - - - - - \ No newline at end of file diff --git a/AnimalSitter/i18n/default.json b/AnimalSitter/i18n/default.json index 9942839..a3faef9 100644 --- a/AnimalSitter/i18n/default.json +++ b/AnimalSitter/i18n/default.json @@ -1,50 +1,112 @@ { - "comment_1": "Indexes in this file that are prefixed with an X rely on specific ordering for the in game dialog to make sense. Other ones are randomly selected, so order doesn't matter. Indexes also need to be in the format group_id, with a single underscore. -oliver", - "Xdialog_1": "%%spouse%% has taken care of the animals.", - "Xdialog_2": "Your animal sitter performed %%numActions%% tasks.", - "Xdialog_3": "The cost was %%totalCost%%g.", - "Xdialog_4": "%%checker%% gathered your animal products.", - "Xdialog_5": " I'm finished taking care of the animals for today.", - "Xdialog_6": " I've invoiced you %%totalCost%%g.", - "Xdialog_7": "%%checker%% has performed %%numActions%% for your animals.", - "greeting_1": "Hi @. ", - "greeting_2": "Good morning @. ", - "greeting_3": "Hey @! ", - "greeting_4": "I'm finished @. ", - "greeting_5": "Hey @, glad I caught you. ", - "greeting_6": "'Sup @? ", - "greeting_7": "Farmer @! ", - "unfinishedmoney_1": " Because of the, er.. cash flow problem we discussed, I wasn't able to take care of all them.", - "unfinishedmoney_2": " I had to ignore some of them to remain within your budget.", - "unfinishedmoney_3": " I wasn't able to take care of all of them. Give me a call if you want me to go out again.", - "unfinishedmoney_4": " You have more animals than you can afford to maintain. I wonder if Joja is hiring.", - "unfinishedmoney_5": " You're broke, so I'm done for the day.", - "unfinishedmoney_6": " Tough break, I know how it is. Let me know if you can scrape up the cash to pay me to take care of the rest of your animals.", - "unfinishedmoney_7": " You might want to go pet a few of them yourself, unless you happen to have some cash waiting in the mailbox.", - "unfinishedmoney_8": " I'd lower my rates, but I don't want to end up broke like you... just kidding.", - "unfinishedinventory_1": " Looks like you don't have enough room for your animal products.", - "unfinishedinventory_2": " You might want to clear some more room in your inventory, or buy a bigger chest.", - "unfinishedinventory_3": " Give me a call when you've cleared some space out for the rest of your stuff.", - "unfinishedinventory_4": " You don't have enough room in your inventory or chest. Let me know when you've cleared some space.", - "smalltalk_1": " It sure is a pleasure doing business with you!", - "smalltalk_2": " The extra money from doing these jobs for you has really made a difference.", - "smalltalk_3": " Let me know if you need anything else done around the farm, always happy to help.", - "smalltalk_4": " So how's life been treating you?", - "smalltalk_5": " I'm sure glad you decided to move to Stardew Valley.", - "smalltalk_6": " It sure is a good time of year for fresh animal produce.", - "smalltalk_7": " How are your crops coming along?", - "smalltalk_8": " Heard any news from your parents lately?", - "smalltalk_9": " So whatcha been doing with all the extra time you've had since hiring me?", - "smalltalk_10": " I've been meaning to ask, what do you think about those rumors that have been going around?", - "smalltalk_11": " By the way, I sure like what you've done to the old farm.", - "smalltalk_12": " Do you need a receipt?", - "smalltalk_13": " Not to sound greedy, but it sure feels good to have a fat stack of cash in your pocket, doesn't it?", - "smalltalk_14": " I could sure use a day off, sure you don't want to go check your pots yourself tomorrow?", - "Shane_1": " This sure beats working at Joja. That job sucked.", - "Shane_2": " Mind if I grab a cold one for the walk home?", - "Haley_1": " This job was fun at first, but I'm not so sure I can handle the smell much longer.", - "Haley_2": " I'm sorry if this comes off as rude, but please hire someone else to do this. I feel like I'm going to die.$a", - "Alex_1": " Have you ever considered getting into the organic meat business? I had to restrain myself from taking a bite out of a couple of your animals!", - "Leah_1": " Would you mind if I painted a portrait of one of your animals sometime?", - "Marnie_1": " You take such good care of your animals, no wonder they give you top quality produce!" + "config.KeyBind": "KeyBind", + "config.KeyBind.description": "The key that you press to tell your animal helper to get to work. This defaults to the 'O' key.", + + "config.GrowUpEnabled": "GrowUpEnabled", + "config.GrowUpEnabled.description": "This open tells your animal helper that you'd like them to use dark magic to instantly bring young animals up to the age where they can become contributing members of your farm. Default is false.", + + "config.MaxHappinessEnabled": "MaxHappinessEnabled", + "config.MaxHappinessEnabled.description": "This option tells your animal helper that you don't care how long (or where) they have to pet your animals, but their job is not done until each animal's happiness is maxed. Default is false.", + + "config.MaxFullnessEnabled": "MaxFullnessEnabled", + "config.MaxFullnessEnabled.description": "This option tells your animal helper to feed your animals. A full animal is a producing animal. Default is false.", + + "config.HarvestEnabled": "HarvestEnabled", + "config.HarvestEnabled.description": "This tells your animal worker to harvest the animal drops. If you like doing this yourself, then set this to false.", + + "config.PettingEnabled": "PettingEnabled", + "config.PettingEnabled.description": "This tells your animal worker that you want your animals petted. This is the whole reason I made this mod, so it defaults to true. So if you set this to false, please keep it to yourself. If you enjoy petting each of your animals (because you don't have a hundred of them) then set it to false.", + + "config.MaxFriendshipEnabled": "MaxFriendshipEnabled", + "config.MaxFriendshipEnabled.description": "This tells your animal worker whether they have to wear your YOU mask, so that the affection of the animals is directed toward you, and not the help. Defaults to false.", + + "config.CostPerAction": "CostPerAction", + "config.CostPerAction.description": "This is how much to charge per action per animal. There have been some suggestions around this option, and I do have plans to introduce a more complex pricing structure in the future, but for now just make sure this includes all services that you want the animal checker to perform, and average it out over the number of actions. Defaults to 25.", + + "config.WhoChecks": "WhoChecks", + "config.WhoChecks.description": "This is the name of the person (or animal) who checks your animals. Defaults to 'spouse'. You can also set it to 'pet'-- they do a really good job, but they don't provide much feedback. You can also set this to any character in the game, which will enable dialogues with that character. If it's set to anything else, that name will be used in messages.", + + + "config.EnableMessages": "EnableMessages", + "config.EnableMessages.description": "This is whether to enable in-game messages and dialogues revolving around your animal checker. It defaults to true.", + + "config.TakeTrufflesFromPigs": "TakeTrufflesFromPigs", + "config.TakeTrufflesFromPigs.description": "Whoever trainedm these pigs did an awful job, as they have a tendency to hide truffles. Where? I'm not exactly sure, but they've got 'em, trust me. With this option enabled, your farm helper will perform a TSA-approved body cavity search and find them. If you love the person who is doing your checking, or if you want your pigs to remain unviolated, or if you consider this cheating, then set it to false.", + + "config.BypassInventory": "BypassInventory", + "config.BypassInventory.description": "Whether to bypass your inventory when depositing animal drops, and go straight to the chests you have defined. Defaults to false.", + + "config.ChestCoords": "ChestCoords", + "config.ChestCoords.description": "These are the coordinates of the default chest where overflow items are placed. It defaults to (73,14) which is the tile location, when you are looking at your screen, is to the immediate right of the sell-box.", + + "config.ChestDefs": "ChestDefs", + "config.ChestDefs.description": "This is a bar-separated list of chest locations that you have defined for specific items. It defaults to blank, but here is an example: '430,70,14|340,7,4,FarmHouse' You can see there are 2 options.", + + "dialog.comment_1": "Indexes in this file that are prefixed with an X rely on specific ordering for the in game dialog to make sense. Other ones are randomly selected, so order doesn't matter. Indexes also need to be in the format group_id, with a single underscore.", + "dialog.Xdialog_1": "{{spouse}} has taken care of the animals.", + "dialog.Xdialog_2": "Your animal sitter performed {{num_actions}} tasks.", + "dialog.Xdialog_3": "The cost was {{total_cost}}g.", + "dialog.Xdialog_4": "{{checker}} gathered your animal products.", + "dialog.Xdialog_5": " I'm finished taking care of the animals for today.", + "dialog.Xdialog_6": " I've invoiced you {{total_cost}}g.", + "dialog.Xdialog_7": "{{checker}} has performed {{num_actions}} for your animals.", + "dialog.greeting_1": "Hi {{name}}.", + "dialog.greeting_2": "Good morning {{name}}.", + "dialog.greeting_3": "Hey {{name}}! ", + "dialog.greeting_4": "I'm finished {{name}}.", + "dialog.greeting_5": "Hey {{name}}, glad I caught you.", + "dialog.greeting_6": "What's up {{name}}?", + "dialog.greeting_7": "Farmer {{name}}!", + "dialog.unfinishedmoney_1": " Because of the, er.. cash flow problem we discussed, I wasn't able to take care of all them.", + "dialog.unfinishedmoney_2": " I had to ignore some of them to remain within your budget.", + "dialog.unfinishedmoney_3": " I wasn't able to take care of all of them. Give me a call if you want me to go out again.", + "dialog.unfinishedmoney_4": " You have more animals than you can afford to maintain. I wonder if Joja is hiring.", + "dialog.unfinishedmoney_5": " You're broke, so I'm done for the day.", + "dialog.unfinishedmoney_6": " Tough break, I know how it is. Let me know if you can scrape up the cash to pay me to take care of the rest of your animals.", + "dialog.unfinishedmoney_7": " You might want to go pet a few of them yourself, unless you happen to have some cash waiting in the mailbox.", + "dialog.unfinishedmoney_8": " I'd lower my rates, but I don't want to end up broke like you... just kidding.", + "dialog.unfinishedinventory_1": " Looks like you don't have enough room for your animal products.", + "dialog.unfinishedinventory_2": " You might want to clear some more room in your inventory, or buy a bigger chest.", + "dialog.unfinishedinventory_3": " Give me a call when you've cleared some space out for the rest of your stuff.", + "dialog.unfinishedinventory_4": " You don't have enough room in your inventory or chest. Let me know when you've cleared some space.", + "dialog.smalltalk_1": " It sure is a pleasure doing business with you!", + "dialog.smalltalk_2": " The extra money from doing these jobs for you has really made a difference.", + "dialog.smalltalk_3": " Let me know if you need anything else done around the farm, always happy to help.", + "dialog.smalltalk_4": " So how's life been treating you?", + "dialog.smalltalk_5": " I'm sure glad you decided to move to Stardew Valley.", + "dialog.smalltalk_6": " It sure is a good time of year for fresh animal produce.", + "dialog.smalltalk_7": " How are your crops coming along?", + "dialog.smalltalk_8": " Heard any news from your parents lately?", + "dialog.smalltalk_9": " So whatcha been doing with all the extra time you've had since hiring me?", + "dialog.smalltalk_10": " I've been meaning to ask, what do you think about those rumors that have been going around?", + "dialog.smalltalk_11": " By the way, I sure like what you've done to the old farm.", + "dialog.smalltalk_12": " Do you need a receipt?", + "dialog.smalltalk_13": " Not to sound greedy, but it sure feels good to have a fat stack of cash in your pocket, doesn't it?", + "dialog.smalltalk_14": " I could sure use a day off, sure you don't want to go check your pots yourself tomorrow?", + "dialog.Shane_1": " This sure beats working at Joja. That job sucked.", + "dialog.Shane_2": " Mind if I grab a cold one for the walk home?", + "dialog.Haley_1": " This job was fun at first, but I'm not so sure I can handle the smell much longer.", + "dialog.Haley_2": " I'm sorry if this comes off as rude, but please hire someone else to do this. I feel like I'm going to die.$a", + "dialog.Alex_1": " Have you ever considered getting into the organic meat business? I had to restrain myself from taking a bite out of a couple of your animals!", + "dialog.Leah_1": " Would you mind if I painted a portrait of one of your animals sometime?", + "dialog.Marnie_1": " You take such good care of your animals, no wonder they give you top quality produce!", + + "log.chestCoords": "chestCoords: {{x}}, {{y}}", + "log.error_parsing_key_bingding": "Error parsing key binding; defaulted to {{default_value}}", + "log.doing_free": "I will do it for free, but I am not paying YOU to take care of YOUR stinking animals!", + "log.set_cost_to_0": "Setting costPerAction to 0.", + "log.exception_onkeyreleased": "Exception onKeyReleased: {{ex}}", + "log.petting_animal": "Petting animal {{animal_name}}", + "log.aging_animal": "Aging animal to mature+1 days {{animal_name}}", + "log.feeding_animal": "Feeding animal {{animal_name}}", + "log.max_happiness_animal": "Maxing Happiness of animal {{animal_name}}", + "log.max_friendship_animal": "Maxing Friendship of animal {{animal_name}}", + "log.has_produce": "Has produce: {{animal_name}} {{animal_currentProduce}}", + "log.total_cost": "Animal sitter performed {{actions}} actions. Total cost: {{total_cost}}g", + "log.nothing_to_do": "There is nothing to do for the animals right now.", + "log.inventory_full": "Inventory full, could not add animal product.", + "log.found_coop_object": "Found coop object: {{obj_name}} / {{obj_category}}/{{obj_isAnimalProduct}}", + "log.meow": "Meow..", + "log.woof": "Woof..", + "log.imaginary_pet_take_care": "Your imaginary pet has taken care of your animals." } \ No newline at end of file diff --git a/AnimalSitter/manifest.json b/AnimalSitter/manifest.json index e9d0515..442bd41 100644 --- a/AnimalSitter/manifest.json +++ b/AnimalSitter/manifest.json @@ -1,7 +1,7 @@ { "Name": "Animal Sitter LTS", "Author": "oliver", - "Version": "2.1.0", + "Version": "2.2.0", "Description": "Long Term Support Mod Version for Animal Sitter Mod. Let someone else pet all those pesky animals!", "UniqueID": "oliver.AnimalSitterLTS", "EntryDll": "AnimalSitter.dll", diff --git a/AnimalSitter/packages.config b/AnimalSitter/packages.config deleted file mode 100644 index 7ecfd0f..0000000 --- a/AnimalSitter/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/README.md b/README.md index 276c5b5..0a78c6e 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# Stardew Valley Mod - AnimalSitter +# Stardew Valley Mod - Animal Sitter Animal Sitter Mod for Stardew Valley with long-term support. ## Introduction This [mod](https://www.nexusmods.com/stardewvalley/mods/20831) provide Long-Term Support for original [Animal Sitter](https://www.nexusmods.com/stardewvalley/mods/581) Mod. It includes: + * Support Stardew Valley v1.6+. * Support SMAPI v4.0.0+. -* TODO: Add i18n Support. -* TODO: Add Mod Config Support. -* TODO: Refactor basic framework. +* Add i18n Support. +* Add Mod Config Support. * Will Continue support future version of game and SMAPI. ## Getting Started @@ -25,7 +25,7 @@ This [mod](https://www.nexusmods.com/stardewvalley/mods/20831) provide Long-Term Here's the default configuration: -``` +```json "keybind": "O", "growUpEnabled": false, "maxHappinessEnabled": false, @@ -78,13 +78,13 @@ The first specifies the item ID and the chest coordinates, this knows to check f ### Customization The `dialog.xnb` file will allow you to customize the dialog to your liking. I've also included the dialog.yaml source file, but the mod will read it from the XNB file. If you don't know how to do it, google "how to unpack and repack stardew valley mods". - + The dialogue elements are arranged in a name_index format. If the name starts with a capital 'X', that means those messages need to stay roughly in that order and in the same format for the dialog to make sense. The number is important. All other elements can be added to, and modified because they are used randomly at the appropriate place in the dialogue. You have to use the same "name" from the "name_id" that are already in the file, but you can add to and remove so long as all the numbers in a particular group are unique. - + Also you'll see that I added a few names down at the bottom,"Shane_1", "Shane_2", "Leah_1", for example. You can add any other Stardew characters dialog to the file in that same format. Those dialogues will be merged in with the "smalltalk" group if your "whoChecks" is set to one of the characters. - + Most of the notation that existing SDV dialogs use will work(for example @ is replaced by the name of the farmer). There's also notation added to use values from this mod in the dialog, they are (along with a description) **%%animalsPet%%** - The number of animals that were petted. @@ -97,9 +97,9 @@ Most of the notation that existing SDV dialogs use will work(for example @ is re **%%numActions%%** - The total number of actions performed. **%%totalCost%%** - The total costs for all animals. **%%spouse%%** - The farmer's spouse's name (if married), the value of whoChecks otherwise. - + The dialog groups in the file, and a quick explanation of when each are used: - + **Xdialog** - Some specific dialogs used when the spouse or non-character check the pots. **greeting** - Greetings the checker will use when addressing the farmer. **unfinishedmoney** - Comments the character checker will make when they weren't able to finish on account of no money. @@ -116,10 +116,12 @@ The dialog groups in the file, and a quick explanation of when each are used: This project will maintain Open Source [here](https://github.com/WuZhuoran/Stardew_AnimalSitter). +For i18n and translation support. Just Add your languages in `i18n` folders. + We appreciate all contributions. Feel Free to raise any issues or pull requests. ## License NOTE: Original Mod Use Apache License. In this repo, MIT License is used. Will update when necessary. -MIT @ Oliver +MIT @ [Oliver](https://github.com/WuZhuoran)