C#:
// Все права принадлежат дискорд сообществу https://discord.gg/VgNHPpNrz6
using Facepunch;
using Newtonsoft.Json;
using Oxide.Core;
using Oxide.Core.Configuration;
using Oxide.Core.Plugins;
using Oxide.Game.Rust.Cui;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEngine;
using Newtonsoft.Json.Converters;
/* Suggestions
* Add command option to give recipe cards to target player on command.* Add message when a player picks up a recipe card that describes the buffs.*/
/* 2.0.9 Change Log
* Added a few missing language translations for ingredient drops.* Added a config option to set market quantities to 0 on a new wipe.* Added new command: setcookingmarketstock <amount> - sets the global ingredient stock to the specified value.* Added new command: setcookingmarketstockfor <ingredient> <amount> - sets the stock for ingredient to the specified value.* Added option to class: allowDefaultEffects.This will ignore the config setting.* Added buffs: Hydration and Hunger.These will be banes that can be added to meals for balance.* Fixed a potential exception error under HandleDispenserDrops method.* Added a redundancy for the quantity input field under recipes.Should prevent exceptions when letters are entered.* Added option for meals and/or ingredients to be added to loot crates.*/
namespace Oxide.Plugins {
[Info("Cooking 2.0", "imthenewguy", "2.0.9")]
[Description("Extends Rust's cooking functionality.")]
class Cooking : RustPlugin {
#region Config
private Configuration config;
public class Configuration {
[JsonProperty("General Settings")]
public GeneralSettings generalSettings = new GeneralSettings();
[JsonProperty("Meal Settings")]
public MealSettings mealSettings = new MealSettings();
[JsonProperty("Menu Settings")]
public MenuSettings menuSettings = new MenuSettings();
[JsonProperty("Ingredient Settings")]
public IngredientSettings ingredientSettings = new IngredientSettings();
[JsonProperty("Wipe Settings")]
public WipeSettings wipeSettings = new WipeSettings();
[JsonProperty("API Settings")]
public APISettings apiSettings = new APISettings();
public string ToJson() => JsonConvert.SerializeObject(this);
public Dictionary<string, object> ToDictionary() => JsonConvert.DeserializeObject<Dictionary<string, object>>(ToJson());
}
#region Menu classes
public class APISettings {
[JsonProperty("RandomTrader Integration")]
public RandomTraderAPI random_trader_api = new RandomTraderAPI();
[JsonProperty("SkillTree Integration")]
public SkillTreeInfo skilltree_settings = new SkillTreeInfo();
[JsonProperty("SurvivalArena Integration")]
public SurvivalArenaSettings survivalArenaSettings = new SurvivalArenaSettings();
}
public class SurvivalArenaSettings {
[JsonProperty("Prevent players joining the Survival Arena event while buffed with the following meals")]
public List<string> meal_blacklist = new List<string>();
}
public class SkillTreeInfo {
[JsonProperty("Integrate Cooking nodes to SkillTree?")]
public bool enabled = false;
[JsonProperty("Cooking skills list")]
public Dictionary<string, SkillTreeNodeStructure> Skills = new Dictionary<string, SkillTreeNodeStructure>();
}
Dictionary<string, SkillTreeNodeStructure> DefaultSkills {
get {
return new Dictionary<string, SkillTreeNodeStructure>() {
["Slow Metabolism"]
= new SkillTreeNodeStructure(false, 5, 0.2f, "This skill increases the duration of cooking buffs by <color=#42f105>{0}%</color> per level.", SkillTreeBuffTypes.BuffDuration, 3005740453, "https://www.dropbox.com/s/fvpgzz8tfpzupuq/Shamanskill_04_nobg.v1.png?dl=1", 2), ["Master Chef"] = new SkillTreeNodeStructure(false, 5, 0.2f, "This skill decreases the cooking time of meals by <color=#42f105>{0}%</color> per level.", SkillTreeBuffTypes.CookingTime, 3005749415, "https://www.dropbox.com/s/cvwi4gjiq39hl3o/Assassinskill_43_nobg.v1.png?dl=1", 1), ["Keen Eye"] = new SkillTreeNodeStructure(false, 5, 0.2f, "This skill increases the chance of finding ingredients by <color=#42f105>{0}%</color> per level.", SkillTreeBuffTypes.IngredientChance, 3005757959, "https://www.dropbox.com/s/74fbjt2qzf11het/Druideskill_17_nobg.v1.png?dl=1", 3),
}
;
}
}
public class SkillTreeNodeStructure {
public bool enabled;
public int max_level;
public float value_per_level;
public string description;
public SkillTreeBuffTypes buffType;
public ulong icon_skin_id;
public string icon_url;
public string node_name;
public int tier;
public SkillTreeNodeStructure(bool enabled, int max_level, float value_per_level, string description, SkillTreeBuffTypes buffType, ulong icon_skin_id, string icon_url, int tier) {
this.enabled = enabled;
this.max_level = max_level;
this.value_per_level = value_per_level;
this.description = description;
this.buffType = buffType;
this.icon_skin_id = icon_skin_id;
this.icon_url = icon_url;
this.tier = tier;
}
}
[JsonConverter(typeof(StringEnumConverter))]
public enum SkillTreeBuffTypes {
CookingTime, BuffDuration, IngredientChance,
}
public class GeneralSettings {
[JsonProperty("Commands to open up the recipe menu")]
public List<string> recipeMenuCMDs = new List<string>();
[JsonProperty("Should cooking handle the item splitting for ingredients and meals? [set to false if using a stacks plugin]")]
public bool cookingHandleSplits = true;
[JsonProperty("Permission settings")]
public PermissionSettings permissionSettings = new PermissionSettings();
[JsonProperty("Buff settings")]
public BuffSettings buffSettings = new BuffSettings();
[JsonProperty("Chance modifier for ingredient drops when collecting player grown entities [0.5 = half the normal chance]")]
public float chance_modifier_grown = 0.5f;
[JsonProperty("Only roll ingredient chances on the final hit of a node?")]
public bool final_hit_only = false;
[JsonProperty("Drop sources")]
public Dictionary<GatherSource, float> dropSources = new Dictionary<GatherSource, float>();
[JsonProperty("Ingredient bag settings")]
public IngredientBagSettings ingredientBagSettings = new IngredientBagSettings();
[JsonProperty("Sound settings")]
public SoundSettings soundSettings = new SoundSettings();
[JsonProperty("Market settings")]
public MarketSettings marketSettings = new MarketSettings();
[JsonProperty("Power Tool Settings")]
public PowerToolSettings powerToolSettings = new PowerToolSettings();
}
public class MarketSettings {
[JsonProperty("Currency type [scrap, economics, serverrewards]")]
public string currency = "scrap";
[JsonProperty("Command to open the farmers market")]
public string marketCMD = "market";
[JsonProperty("Reset market stock to 0 on wipe?")]
public bool reset_market_on_wipe = true;
public bool allow_sell = true;
public bool allow_buy = true;
[JsonProperty("Settings for market NPCs")]
public NPCSettings npcSettings = new NPCSettings();
}
public class NPCSettings {
[JsonProperty("Wipe the NPC location data when the service wipes?")]
public bool remove_on_wipe = false;
[JsonProperty("List of items that the NPC will wear")]
public List<NPCItems> wornItems = new List<NPCItems>();
[JsonProperty("Item that the NPC will hold")]
public NPCItems heldItem = new NPCItems();
public class NPCItems {
public string shortname;
public ulong skin;
public NPCItems(string shortname, ulong skin) {
this.shortname = shortname;
this.skin = skin;
}
public NPCItems() {
}
}
}
public class SoundSettings {
[JsonProperty("Sound when interacting with most cooking menu elements [set empty to disable]")]
public string navigation_into_menu_sound = "assets/prefabs/tools/medical syringe/effects/pop_button_cap.prefab";
[JsonProperty("Sound when going back from the recipe menu to recipes list [set empty to disable]")]
public string navigation_back_sound = "assets/prefabs/misc/orebonus/effects/bonus_fail.prefab";
[JsonProperty("Sound when successfully adding a meal to the queue or cooking it [set empty to disable]")]
public string cook_queued_sound = "assets/prefabs/misc/halloween/pumpkin_bucket/effects/eggexplosion.prefab";
[JsonProperty("Sound when a cooking attempt fails [set empty to disable]")]
public string invalid_cook_sound = "assets/prefabs/misc/easter/painted eggs/effects/egg_upgrade.prefab";
[JsonProperty("Sound when toggling a button in the settings menu [set empty to disable]")]
public string settings_buttons_sound = "assets/prefabs/tools/medical syringe/effects/pop_button_cap.prefab";
[JsonProperty("Sound when adding a recipe to favourites [set empty to disable]")]
public string add_to_favourites_sound = "assets/prefabs/voiceaudio/discoball/effects/disco-ball-deploy.prefab";
[JsonProperty("Sound when removing a recipe from favourites [set empty to disable]")]
public string remove_from_favourites_sound = "assets/prefabs/deployable/bear trap/effects/bear-trap-deploy.prefab";
[JsonProperty("Sound when canceling a cooking job [set empty to disable]")]
public string cancel_cook_sound = "assets/prefabs/deployable/bbq/effects/barbeque-deploy.prefab";
[JsonProperty("Sound when pressing the cooking button from an oven [set empty to disable]")]
public string press_cooking_button_sound = "assets/prefabs/deployable/campfire/effects/campfire-deploy.prefab";
}
public class IngredientBagSettings {
[JsonProperty("Command to open up the ingredients bag")]
public string iBagCMD = "ibag";
[JsonProperty("Prefab to use for the ingredient bag")]
public string bag_prefab = "assets/prefabs/deployable/large wood storage/box.wooden.large.prefab";
[JsonProperty("Consolidate the stacks of the bag to 1 slot for each item [exceeds max stack sizes]")]
public bool consolidate_stacks = true;
[JsonProperty("Bag item settings [Make sure these are the same as the recipe]")]
public BagItemSettings bagItemSettings = new BagItemSettings();
public class BagItemSettings {
public string shortname = "halloween.lootbag.large";
public ulong skinID = 2578002003;
public string displayName = "ingredient bag";
}
[JsonProperty("Whitelist of shortnames that can be placed into the ingredient bag, in addition to ingredients")]
public List<string> whitelist = new List<string>();
[JsonProperty("Blacklist of shortnames that canot be placed into the ingredient bag, even if they are an ingredient")]
public List<string> blacklist = new List<string>();
[JsonProperty("Place gathered ingredients directly into the ibag?")]
public bool gather_directly_into_bag = true;
[JsonProperty("Maximum ibag slots")]
public int maxSlots = 30;
[JsonProperty("Should ingredient bags drop on death?")]
public bool dropOnDeath = false;
}
public class PermissionSettings {
[JsonProperty("Drop chance multiplier permissions [1.0 = double chance]")]
public Dictionary<string, float> DropChanceMultiplier = new Dictionary<string, float>();
}
#region Buff settings classes
public class BuffSettings {
[JsonProperty("Allow the stacking of buffs [false = selects the highest]?")]
public bool allow_buff_stacking = true;
[JsonProperty("Settings for the Wealth buff")]
public WealthSettings wealthSettings = new WealthSettings();
[JsonProperty("Settings for the Component Luck buff")]
public ComponentLuckSettings componentLuckSettings = new ComponentLuckSettings();
[JsonProperty("Settings for the Electronics Luck buff")]
public ElectronicsLuckSettings electronicsLuckSettings = new ElectronicsLuckSettings();
[JsonProperty("Settings for the Crafting Refund buff")]
public CraftingRefundSettings craftingRefundSettings = new CraftingRefundSettings();
[JsonProperty("Settings for the Duplicator buff")]
public DuplicatorSettings duplicatorSettings = new DuplicatorSettings();
[JsonProperty("Settings for the Loot Pickup buff")]
public LootPickupSettings lootPickupSettings = new LootPickupSettings();
[JsonProperty("Settings for the Fishing Luck buff")]
public FishingLuckSettings fishingLuckSettings = new FishingLuckSettings();
[JsonProperty("Settings for the Comfortable buff")]
public ComfortSettings comfortableSettings = new ComfortSettings();
[JsonProperty("Settings for the Food Share buff")]
public FoodShareSettings foodShareSettings = new FoodShareSettings();
[JsonProperty("Settings for the Heal Share buff")]
public HealShareSettings healShareSettings = new HealShareSettings();
[JsonProperty("Settings for the Health Regen buff")]
public HealthRegenSettings healthRegenSettings = new HealthRegenSettings();
[JsonProperty("Settings for the Madness buff")]
public MadnessSettings madnessSettings = new MadnessSettings();
}
public class MadnessSettings {
[JsonProperty("How far away can this player be heard from when under the effect of the madness buff")]
public float distanceHeard = 30;
[JsonProperty("Effect prefab to use")]
public string madnessPrefab = "assets/bundled/prefabs/fx/player/beartrap_scream.prefab";
}
public class HealthRegenSettings {
[JsonProperty("How long should the buff stop working when a player takes damage?")]
public float damageCooldown = 5;
}
public class HealShareSettings {
[JsonProperty("Distance for the effect to work")]
public float shareDistance = 5f;
}
public class FoodShareSettings {
[JsonProperty("Maximum distance from the player that players will be shared food")]
public float foodShareRadius = 20f;
}
public class ComfortSettings {
[JsonProperty("Comfort radius")]
public float comfortRadius = 10f;
[JsonProperty("Comfort amount [1.0 = 100%]")]
public float comfortAmount = 1f;
}
public class FishingLuckSettings {
[JsonProperty("Minimum quantity per drop")]
public int min;
[JsonProperty("Maximum quantity per drop")]
public int max;
[JsonProperty("Use the defined loot table for this skill? [Setting false will allow most items in the game to be obtained]")]
public bool use_defined_loottable = false;
[JsonProperty("Blacklist of items if not using the defined loot table")]
public List<string> non_defined_loottable_blacklist = new List<string>();
[JsonProperty("Defined loot table")]
public List<string> definedLootTable = new List<string>();
}
public class WealthSettings {
[JsonProperty("Currency type to use for the wealth buff [scrap, economics, serverrewards]")]
public string currencyType = "scrap";
public int min_quantity = 1;
public int max_quantity = 3;
}
public class ComponentLuckSettings {
public int min = 1;
public int max = 2;
[JsonProperty("List of items to blacklist from the Component Luck buff")]
public List<string> blacklist = new List<string>();
}
public class ElectronicsLuckSettings {
public int min = 1;
public int max = 2;
[JsonProperty("List of items to blacklist from the Electronics Luck buff")]
public List<string> blacklist = new List<string>();
}
public class CraftingRefundSettings {
[JsonProperty("List of components to blacklist from refunding")]
public List<string> blacklist = new List<string>();
}
public class DuplicatorSettings {
[JsonProperty("List of items to blacklist from duplicating")]
public List<string> blacklist = new List<string>();
}
public class LootPickupSettings {
[JsonProperty("Maximum distance that the loot pickup buff can trigger from [0 = Unlimited]")]
public float maxDistance = 0f;
[JsonProperty("Only allow this perk to work with melee attacks?")]
public bool meleeOnly = false;
}
#endregion
public class MenuSettings {
[JsonProperty("Icon that appears when a meal is not favourited")]
public ulong favourite_unselected = 2932803496;
[JsonProperty("Icon that appears when a meal is favourited")]
public ulong favourite_selected = 2932804164;
[JsonProperty("Cooking queue settings")]
public QueueMenuSettings queueMenuSettings = new QueueMenuSettings();
[JsonProperty("Buff UI settings")]
public BuffUISettings buffUISettings = new BuffUISettings();
[JsonProperty("Recipe menu settings")]
public RecipeMenuSettings recipeMenuSettings = new RecipeMenuSettings();
[JsonProperty("Favourites menu settings")]
public FavouritesMenuSettings favouriteMenuSettings = new FavouritesMenuSettings();
[JsonProperty("Core menu settings")]
public CoreMenuSettings coreMenuSettings = new CoreMenuSettings();
[JsonProperty("Recipe detailed menu settings")]
public RecipeDetailedMenuSettings recipeDetailedMenuSettings = new RecipeDetailedMenuSettings();
[JsonProperty("Ingredient menu settings")]
public IngredientMenuSettings ingredientMenuSettings = new IngredientMenuSettings();
[JsonProperty("UI Anchor settings")]
public AnchorSettings anchorSettings = new AnchorSettings();
[JsonProperty("HUD button settings")]
public HudButtonSettings hudButtonSettings = new HudButtonSettings();
[JsonProperty("Whitelist of ovens that will exclusively show the recipe menu button [prefab shortnames]")]
public List<string> ovenWhitelist = new List<string>();
[JsonProperty("Blacklist of ovens that will not show the recipe menu button [prefab shortnames]")]
public List<string> ovenBlacklist = new List<string>();
}
public class HudButtonSettings {
[JsonProperty("Enable the HUD buttons")]
public bool enable = true;
[JsonProperty("Button anchor offset x min")]
public float offset_x_min = -182.9f;
[JsonProperty("Button anchor offset y min")]
public float offset_y_min = 106.6f;
[JsonProperty("Button anchor offset x max")]
public float offset_x_max = -132.9f;
[JsonProperty("Button anchor offset y max")]
public float offset_y_max = 156.6f;
[JsonProperty("Button colour [Red, Green, Blue, Alpha.1.0 = full]")]
public string buttonColour = "0.4352942 0.5294118 0.2627451 1";
}
public class AnchorSettings {
[JsonProperty("Craft queue anchor settings")]
public AnchorClass craftQueue = new AnchorClass("1 1", "1 1", "-118 -59", "-81 -23");
[JsonProperty("Buff icon anchor settings")]
public AnchorClass buffIcons = new AnchorClass("1 0.5", "1 0.5", "-70 0", "-24 46");
[JsonProperty("Oven button anchor settings")]
public AnchorClass ovenButton = new AnchorClass("0.5 0", "0.5 0", "463 481.9", "573 507.9");
[JsonProperty("UI buttons anchor settings")]
public AnchorClass uiButtons = new AnchorClass("1 0", "1 0", "-183.5 1", "-147.5 15");
}
public class AnchorClass {
public string anchorMin;
public string anchorMax;
public string offsetMin;
public string offsetMax;
public AnchorClass(string anchorMin, string anchorMax, string offsetMin, string offsetMax) {
this.anchorMin = anchorMin;
this.anchorMax = anchorMax;
this.offsetMin = offsetMin;
this.offsetMax = offsetMax;
}
}
public class IngredientMenuSettings {
public string title_bar_colour = "0.2941177 0.2901961 0.2784314 0.8";
public string ingredient_backpanel_colour = "0.2941177 0.2901961 0.2784314 1";
public string ingredient_frontpanel_colour = "0.4901961 0.4901961 0.4901961 1";
}
public class RecipeDetailedMenuSettings {
public string title_bar_colour = "0.2941177 0.2901961 0.2784314 0.8";
public string image_backpanel_colour = "0.09411765 0.09411765 0.09411765 1";
public string image_frontpanel_colour = "0.2941177 0.2901961 0.2784314 0.8";
public string ingredient_image_backpanel_colour = "0.09411765 0.09411765 0.09411765 1";
public string ingredient_image_frontpanel_colour = "0.2941177 0.2901961 0.2784314 0.8";
public string quantity_backpanel_colour = "0.09411765 0.09411765 0.09411765 1";
public string quantity_frontpanel_colour = "0.2941177 0.2901961 0.2784314 0.8";
public string quantity_inputtext_panel_colour = "0.4901961 0.4901961 0.4901961 1";
public string craft_button_backpanel_colour = "0.09411765 0.09411765 0.09411765 1";
public string craft_button_frontpanel_colour = "0.2941177 0.2901961 0.2784314 0.8";
}
public class QueueMenuSettings {
public string backpanel = "0.2941177 0.2901961 0.2784314 0.8";
public string frontpanel = "0.4901961 0.4901961 0.4901961 1";
}
public class BuffUISettings {
public string backpanel = "0.1981132 0.1981132 0.1981132 1";
public string frontpanel = "0.5283019 0.5283019 0.5283019 1";
}
public class MealSettings {
[JsonProperty("Maximum meals that a player can have active at once")]
public int maxMealsAllowed = 3;
[JsonProperty("Allow the default effects of the base item to trigger (calories, hydration, healing, sickness etc)?")]
public bool allowDefaultMealEffects = false;
[JsonProperty("Cookbook settings")]
public CookbookSettings cookbookSettings = new CookbookSettings();
[JsonProperty("Settings to handle meals being added to loot containers")]
public LootSettings lootSettings = new LootSettings();
[JsonProperty("Meals")]
public Dictionary<string, MealInfo> meals = new Dictionary<string, MealInfo>(StringComparer.InvariantCultureIgnoreCase);
}
public class LootSettings {
[JsonProperty("Enable these items to spawn in loot containers?")]
public bool enable = false;
[JsonProperty("Minimum items to provide")]
public int min = 1;
[JsonProperty("Maximum items to provide")]
public int max = 1;
[JsonProperty("Container sources and chances for these items to spawn")]
public Dictionary<string, float> dropChance = new Dictionary<string, float>();
[JsonProperty("Blacklist of items that cannot be added to containers")]
public List<string> blacklist = new List<string>();
}
public class CookbookSettings {
[JsonProperty("Only allow players to cook recipes that they have learnt?")]
public bool enabled = false;
[JsonProperty("If using recipe cards, what meals should players start with by default?")]
public List<string> defaultMeals = new List<string>();
[JsonProperty("Allow players to find duplicates of recipes they already have?")]
public bool allowFindDuplicates = true;
[JsonProperty("Drop chances")]
public Dictionary<string, float> recipeDropChance = new Dictionary<string, float>() {
["crate_normal_2"]
= 3f, ["crate_normal"] = 5f, ["crate_elite"] = 15f, ["crate_underwater_basic"] = 6f, ["crate_underwater_advanced"] = 12f, ["heli_crate"] = 10f, ["bradley_crate"] = 10f, ["codelockedhackablecrate"] = 10f, ["codelockedhackablecrate_oilrig"] = 10f, ["crate_tools"] = 1.5f, ["loot-barrel-1"] = 1f, ["loot_barrel_1"] = 1f, ["loot-barrel-2"] = 2f, ["loot_barrel_2"] = 2f
}
;
[JsonProperty("Blueprint item")]
public LearnableItem blueprint = new LearnableItem("xmas.present.large", 2939176668, "recipe card: {0}", "unwrap");
public class LearnableItem {
public string shortname;
public ulong skin;
public string displayName;
public string triggerWord;
public LearnableItem(string shortname, ulong skin, string displayName, string triggerWord) {
this.shortname = shortname;
this.skin = skin;
this.displayName = displayName;
this.triggerWord = triggerWord;
}
}
}
public class CoreMenuSettings {
public string button_backpanel_colour = "0.09433961 0.09433961 0.09433961 1";
public string button_colour = "0.2924528 0.2886735 0.2800374 0.8";
public string selected_colour = "0.1961107 0.3025389 0.3679245 0.5019608";
}
public class FavouritesMenuSettings {
public string title_bar_colour = "0.2941177 0.2901961 0.2784314 0.8";
public string recipe_backpanel_colour = "0.2941177 0.2901961 0.2784314 0.8";
public string recipe_img_panel_colour = "0.490566 0.490566 0.490566 1";
public string recipe_title_panel_colour = "0.2712 0.3956 0.4528 1";
public string recipe_info_benefits_panel_colour = "0.3867925 0.3867925 0.3867925 1";
public string recipe_info_benefits_backpanel_colour = "0.490566 0.490566 0.490566 1";
public string recipe_info_missing_ingredients_panel_colour = "0.3867925 0.3867925 0.3867925 1";
}
public class RecipeMenuSettings {
public string title_bar_colour = "0.2941177 0.2901961 0.2784314 0.8";
public string recipe_backpanel_colour = "0.2941177 0.2901961 0.2784314 0.8";
public string recipe_img_panel_colour = "0.490566 0.490566 0.490566 1";
public string recipe_title_panel_colour = "0.2712 0.3956 0.4528 1";
public string recipe_info_benefits_panel_colour = "0.3867925 0.3867925 0.3867925 1";
public string recipe_info_benefits_backpanel_colour = "0.490566 0.490566 0.490566 1";
public string recipe_info_missing_ingredients_panel_colour = "0.3867925 0.3867925 0.3867925 1";
}
public class IngredientSettings {
[JsonProperty("Allow the default effects of an item that an ingredient inherits to apply when eaten [if no other buffs are assigned]?")]
public bool allow_default_ingredient_effects = true;
[JsonProperty("Settings to handle ingredients being added to loot containers")]
public LootSettings lootSettings = new LootSettings();
public Dictionary<string, IngredientsInfo> ingredients = new Dictionary<string, IngredientsInfo>(StringComparer.InvariantCultureIgnoreCase);
}
public class PowerToolSettings {
[JsonProperty("Ingredient chance modifier when using a chainsaw [0 = no ingredients drops]")]
public float chainsawIngredientModifier = 1.0f;
[JsonProperty("Ingredient chance modifier when using a jackhammer [0 = no ingredients drops]")]
public float jackhammerIngredientModifier = 1.0f;
[JsonProperty("Buff modifier when using a jackhammer [0 = won't work with buffs]")]
public float jackhammerBuffModifier = 1.0f;
[JsonProperty("Buff modifier when using a chainsaw [0 = won't work with buffs]")]
public float chainsawBuffModifier = 1.0f;
}
public class WipeSettings {
[JsonProperty("Reset the learned recipes for all players when the server wipes [only applicable if using recipe cards]?")]
public bool ResetRecipeCardsOnWipe = true;
[JsonProperty("Wipe the contents of players ingredients bags on wipe?")]
public bool ResetIngredientBagOnWipe = true;
}
#endregion
#region Default config
protected override void LoadDefaultConfig() {
config = new Configuration();
config.mealSettings.meals = DefaultBasicMeals;
config.ingredientSettings.ingredients = DefaultBasicIngredients;
config.generalSettings.dropSources = DefaultGatherSources();
config.menuSettings.ovenBlacklist = new List<string>() {
"furnace", "furnace.large", "electricfurnace.deployed"
}
;
config.generalSettings.ingredientBagSettings.blacklist.Add("cloth");
config.apiSettings.skilltree_settings.Skills = DefaultSkills;
config.mealSettings.lootSettings.dropChance = DefaultMealIngredientLootChances;
}
#region Default recipes and ingredients
Dictionary<string, MealInfo> DefaultBasicMeals {
get {
return new Dictionary<string, MealInfo>() {
// Crafted ingredients
["ingredient bag"]
= new MealInfo(true, "halloween.lootbag.large", 2578002003, "A bag to hold your ingredients.", 0, 10, new Dictionary<Buff, float>() {
[Buff.Ingredient_Storage]
= 0
}
, new Dictionary<string, int>() {
["cloth"]
= 1000
}
), ["cheese"] = new MealInfo(true, "apple", 2572178709, "A useful cooking ingredient.", 0, 10, new Dictionary<Buff, float>() {
[Buff.Ingredient]
= 0
}
, new Dictionary<string, int>() {
["milk"]
= 2
}
), ["bread"] = new MealInfo(true, "apple", 2783707218, "A useful cooking ingredient.", 0, 10, new Dictionary<Buff, float>() {
[Buff.Ingredient]
= 0
}
, new Dictionary<string, int>() {
["flour"]
= 3
}
), // buff recipes
["berry cobbler"]
= new MealInfo(true, "fish.cooked", 2572717597, "Better than a shoe maker.", 60, 15, new Dictionary<Buff, float>() {
[Buff.Heal_Share]
= 1
}
, new Dictionary<string, int>() {
["flour"]
= 2, ["blue berry"] = 5, ["red berry"] = 5, ["spices"] = 1
}
), ["icecream"] = new MealInfo(true, "fish.cooked", 2575799596, "You scream I scream we all scream for...", 1200, 15, new Dictionary<Buff, float>() {
[Buff.Cold_Resist]
= 0.5f
}
, new Dictionary<string, int>() {
["milk"]
= 2, ["sugar"] = 2, ["egg"] = 1,
}
), ["chocolate brownie"] = new MealInfo(true, "fish.cooked", 2579578852, "I am starting to feel a bit weird...", 300, 15, new Dictionary<Buff, float>() {
[Buff.Melee_Resist]
= 0.7f
}
, new Dictionary<string, int>() {
["flour"]
= 2, ["chocolate bar"] = 5, ["milk"] = 1, ["sugar"] = 1,
}
), ["apple cake"] = new MealInfo(true, "fish.cooked", 2657028513, "Smells delicious, eh?", 600, 15, new Dictionary<Buff, float>() {
[Buff.Condition_Loss_Reduction]
= 0.5f
}
, new Dictionary<string, int>() {
["flour"]
= 2, ["sugar"] = 2, ["milk"] = 1, ["apple"] = 5,
}
), ["sponge cake"] = new MealInfo(true, "fish.cooked", 2579277272, "This cake feels extra bouncy.", 600, 15, new Dictionary<Buff, float>() {
[Buff.Fall_Damage_resist]
= 0.5f
}
, new Dictionary<string, int>() {
["flour"]
= 2, ["sugar"] = 1, ["milk"] = 1, ["egg"] = 1,
}
), ["dark chocolate mousse"] = new MealInfo(true, "fish.cooked", 2762932872, "Dark chocolate makes you smarter.", 300, 15, new Dictionary<Buff, float>() {
[Buff.Wealth]
= 0.5f
}
, new Dictionary<string, int>() {
["chocolate bar"]
= 5, ["sugar"] = 1, ["milk"] = 1, ["egg"] = 1,
}
), ["mozzarella sticks"] = new MealInfo(true, "fish.cooked", 2831609635, "Chicken fingers be damned!", 600, 15, new Dictionary<Buff, float>() {
[Buff.Harvest]
= 0.5f
}
, new Dictionary<string, int>() {
["cheese"]
= 2, ["flour"] = 1, ["spices"] = 1, ["milk"] = 1,
}
), ["sausage roll"] = new MealInfo(true, "fish.cooked", 2657034158, "Baked to perfection.", 3600, 15, new Dictionary<Buff, float>() {
[Buff.Metabolism_Overload]
= 0.5f
}
, new Dictionary<string, int>() {
["raw pork"]
= 5, ["flour"] = 2, ["spices"] = 1, ["raw bear meat"] = 5,
}
), ["cheese toasty"] = new MealInfo(true, "fish.cooked", 2783365998, "A yummy snack!", 120, 15, new Dictionary<Buff, float>() {
[Buff.Comfort]
= 1.0f
}
, new Dictionary<string, int>() {
["bread"]
= 2, ["cheese"] = 3
}
), ["french toast"] = new MealInfo(true, "fish.cooked", 2572718376, "Icecream on toast for breakfast, because...French!", 60, 15, new Dictionary<Buff, float>() {
[Buff.Explosion_Resist]
= 1.0f
}
, new Dictionary<string, int>() {
["bread"]
= 2, ["sugar"] = 1, ["spices"] = 1
}
), ["burrito"] = new MealInfo(true, "fish.cooked", 2575621666, "A delicious concoction of meat, spices and vegies, wrapped in a cornflour blanket.", 1200, 15, new Dictionary<Buff, float>() {
[Buff.Animal_Resist]
= 0.5f
}
, new Dictionary<string, int>() {
["raw bear meat"]
= 10, ["cheese"] = 3, ["flour"] = 1, ["tomato"] = 1
}
), ["chilli cheese fries"] = new MealInfo(true, "fish.cooked", 2656955863, "This isn't actually that hot...", 600, 15, new Dictionary<Buff, float>() {
[Buff.Electronics_Luck]
= 0.25f
}
, new Dictionary<string, int>() {
["potato"]
= 10, ["cheese"] = 3, ["spices"] = 1, ["raw pork"] = 1
}
), ["sushi"] = new MealInfo(true, "fish.cooked", 2428317574, "I sure hope this is fresh.", 600, 15, new Dictionary<Buff, float>() {
[Buff.Fishing_Luck]
= 0.1f
}
, new Dictionary<string, int>() {
["raw fish"]
= 5, ["rice"] = 1, ["seaweed"] = 1
}
), ["fish eye soup"] = new MealInfo(true, "fish.cooked", 2572718277, "The soup that stares back.", 600, 15, new Dictionary<Buff, float>() {
[Buff.Water_Breathing]
= 1.0f
}
, new Dictionary<string, int>() {
["small trout"]
= 1, ["mushroom"] = 5, ["spices"] = 1
}
), ["mushroom soup"] = new MealInfo(true, "fish.cooked", 2572739812, "I always said the only thing missing from soup was fungas.", 120, 15, new Dictionary<Buff, float>() {
[Buff.Farming_Yield]
= 1.0f
}
, new Dictionary<string, int>() {
["spices"]
= 1, ["mushroom"] = 6, ["milk"] = 1
}
), ["pancakes"] = new MealInfo(true, "fish.cooked", 2572718486, "Delicious syrup covered discs.", 60, 15, new Dictionary<Buff, float>() {
[Buff.Spectre]
= 1.0f
}
, new Dictionary<string, int>() {
["flour"]
= 2, ["blue berry"] = 5, ["egg"] = 1, ["milk"] = 1
}
), ["pepperoni pizza"] = new MealInfo(true, "fish.cooked", 2572740655, "Enjoyed by the rich and poor alike.", 600, 15, new Dictionary<Buff, float>() {
[Buff.Barrel_Smasher]
= 1.0f
}
, new Dictionary<string, int>() {
["flour"]
= 1, ["tomato"] = 2, ["raw pork"] = 4, ["cheese"] = 2
}
), ["vegetable pizza"] = new MealInfo(true, "fish.cooked", 2783544007, "Enjoyed by the rich and poor alike.", 60, 15, new Dictionary<Buff, float>() {
[Buff.Crafting_Refund]
= 0.2f
}
, new Dictionary<string, int>() {
["flour"]
= 1, ["tomato"] = 2, ["pumpkin"] = 6, ["cheese"] = 2
}
), ["chicken & mushroom"] = new MealInfo(true, "fish.cooked", 2783548673, "Enjoyed by the rich and poor alike.", 60, 15, new Dictionary<Buff, float>() {
[Buff.Passive_Regen]
= 1.0f
}
, new Dictionary<string, int>() {
["flour"]
= 1, ["raw chicken breast"] = 5, ["cheese"] = 2, ["mushroom"] = 5
}
), ["scrambled eggs"] = new MealInfo(true, "fish.cooked", 2572740525, "Delightlyfully fluffy.", 300, 15, new Dictionary<Buff, float>() {
[Buff.Fall_Damage_resist]
= 1.0f
}
, new Dictionary<string, int>() {
["egg"]
= 4, ["milk"] = 1
}
), ["packed lunch"] = new MealInfo(true, "fish.cooked", 2575805059, "Your mum definitely packed this for you.", 600, 15, new Dictionary<Buff, float>() {
[Buff.Condition_Loss_Reduction]
= 1.0f
}
, new Dictionary<string, int>() {
["bread"]
= 1, ["potato"] = 2, ["blue berry"] = 2, ["egg"] = 2
}
), ["horse feed"] = new MealInfo(true, "fish.cooked", 2578938050, "Crack, but for horses.", 600, 15, new Dictionary<Buff, float>() {
[Buff.Horse_Stats]
= 1.0f
}
, new Dictionary<string, int>() {
["pumpkin"]
= 4, ["potato"] = 4, ["corn"] = 4, ["mushroom"] = 5
}
), ["fried chicken"] = new MealInfo(true, "fish.cooked", 2783384817, "Crispy, delicious, tasty goodness.", 600, 15, new Dictionary<Buff, float>() {
[Buff.Ingredient_Chance]
= 1.0f
}
, new Dictionary<string, int>() {
["flour"]
= 1, ["raw chicken breast"] = 6, ["spices"] = 1, ["milk"] = 1
}
), ["fish and chips"] = new MealInfo(true, "fish.cooked", 2572740021, "Who doesn't love this?", 120, 15, new Dictionary<Buff, float>() {
[Buff.Upgrade_Refund]
= 0.25f
}
, new Dictionary<string, int>() {
["raw fish"]
= 5, ["potato"] = 5, ["spices"] = 1
}
), ["bear burger"] = new MealInfo(true, "fish.cooked", 2578829863, "Delicious bear between 2 heavenly buns.", 60, 15, new Dictionary<Buff, float>() {
[Buff.Research_Refund]
= 0.2f
}
, new Dictionary<string, int>() {
["bread"]
= 1, ["cheese"] = 1, ["spices"] = 1, ["raw bear meat"] = 6
}
), ["chicken burger"] = new MealInfo(true, "fish.cooked", 2783705157, "Delicious chicken between 2 heavenly buns.", 600, 15, new Dictionary<Buff, float>() {
[Buff.Woodcutting_Hotspot]
= 1.0f
}
, new Dictionary<string, int>() {
["bread"]
= 1, ["cheese"] = 1, ["spices"] = 1, ["raw chicken breast"] = 6
}
), ["bangers and mash"] = new MealInfo(true, "fish.cooked", 2572717440, "This is Australian sausages and mashed potato.", 600, 15, new Dictionary<Buff, float>() {
[Buff.Mining_Yield]
= 1.0f
}
, new Dictionary<string, int>() {
["raw pork"]
= 6, ["potato"] = 5, ["spices"] = 1
}
), ["steak dinner"] = new MealInfo(true, "fish.cooked", 2578965785, "Winner winner...Steak dinner?", 600, 15, new Dictionary<Buff, float>() {
[Buff.Bleed_Resist]
= 1.0f
}
, new Dictionary<string, int>() {
["raw bear meat"]
= 5, ["potato"] = 3, ["spices"] = 1, ["pumpkin"] = 2,
}
), ["grilled pork kebab"] = new MealInfo(true, "fish.cooked", 2783484494, "A few of these on a BBQ, thats a good evening...", 600, 15, new Dictionary<Buff, float>() {
[Buff.Woodcutting_Yield]
= 1.0f
}
, new Dictionary<string, int>() {
["raw pork"]
= 5, ["flour"] = 1, ["cheese"] = 1, ["spices"] = 2,
}
), ["spaghetti and meatballs"] = new MealInfo(true, "fish.cooked", 2575783557, "Just like momma used to make.", 60, 15, new Dictionary<Buff, float>() {
[Buff.Max_Repair]
= 1.0f
}
, new Dictionary<string, int>() {
["raw bear meat"]
= 5, ["tomato"] = 3, ["flour"] = 2, ["spices"] = 2,
}
), ["chicken dinner"] = new MealInfo(true, "fish.cooked", 2572718021, "Winner winner...", 600, 15, new Dictionary<Buff, float>() {
[Buff.Loot_Pickup]
= 1.0f
}
, new Dictionary<string, int>() {
["raw chicken breast"]
= 6, ["potato"] = 4, ["spices"] = 1, ["pumpkin"] = 2
}
), ["roast chicken pie"] = new MealInfo(true, "fish.cooked", 2579560886, "I hope this is chicken.", 300, 15, new Dictionary<Buff, float>() {
[Buff.Reviver]
= 1.0f
}
, new Dictionary<string, int>() {
["flour"]
= 1, ["raw chicken breast"] = 10, ["spices"] = 1
}
), ["pork omelette"] = new MealInfo(true, "fish.cooked", 2572740170, "Pigs are the animal that just keep giving.", 120, 15, new Dictionary<Buff, float>() {
[Buff.Duplicator]
= 0.2f
}
, new Dictionary<string, int>() {
["egg"]
// ... [Code preview truncated due to length. Full source in attached file] ...