diff --git a/Content.Client/_CP14/Knowledge/ClientCP14KnowledgeSystem.cs b/Content.Client/_CP14/Knowledge/ClientCP14KnowledgeSystem.cs new file mode 100644 index 0000000000..f1cc718aa9 --- /dev/null +++ b/Content.Client/_CP14/Knowledge/ClientCP14KnowledgeSystem.cs @@ -0,0 +1,7 @@ +using Content.Shared._CP14.Knowledge; + +namespace Content.Client._CP14.Knowledge; + +public sealed partial class ClientCP14KnowledgeSystem : SharedCP14KnowledgeSystem +{ +} diff --git a/Content.Server/Chemistry/EntitySystems/InjectorSystem.cs b/Content.Server/Chemistry/EntitySystems/InjectorSystem.cs index 4774e9cd67..6445427b67 100644 --- a/Content.Server/Chemistry/EntitySystems/InjectorSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/InjectorSystem.cs @@ -1,7 +1,7 @@ using Content.Server.Body.Components; using Content.Server.Body.Systems; using Content.Shared._CP14.Farming; -using Content.Shared._CP14.Skills; +using Content.Shared._CP14.Knowledge; using Content.Shared.Chemistry; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Components.SolutionManager; @@ -35,8 +35,6 @@ public sealed class InjectorSystem : SharedInjectorSystem private bool TryUseInjector(Entity injector, EntityUid target, EntityUid user) { - RaiseLocalEvent(injector, new CP14TrySkillIssueEvent(user)); //CP14 Skill issue event - var isOpenOrIgnored = injector.Comp.IgnoreClosed || !_openable.IsClosed(target); // Handle injecting/drawing for solutions if (injector.Comp.ToggleState == InjectorToggleMode.Inject) diff --git a/Content.Server/_CP14/Knowledge/CP14AddKnowledgeSpecial.cs b/Content.Server/_CP14/Knowledge/CP14AddKnowledgeSpecial.cs new file mode 100644 index 0000000000..8475ebc246 --- /dev/null +++ b/Content.Server/_CP14/Knowledge/CP14AddKnowledgeSpecial.cs @@ -0,0 +1,27 @@ +using Content.Shared._CP14.Knowledge; +using Content.Shared._CP14.Knowledge.Prototypes; +using Content.Shared.Roles; +using JetBrains.Annotations; +using Robust.Shared.Prototypes; + +namespace Content.Server._CP14.Knowledge; + +/// +/// a component that can be hung on an entity to immediately teach it some skills +/// +[UsedImplicitly] +public sealed partial class CP14AddKnowledgeSpecial : JobSpecial +{ + [DataField(required: true), ViewVariables(VVAccess.ReadOnly)] + public List> Knowledge = new(); + + public override void AfterEquip(EntityUid mob) + { + var entMan = IoCManager.Resolve(); + var knowledgeSystem = entMan.System(); + foreach (var knowledge in Knowledge) + { + knowledgeSystem.TryLearnKnowledge(mob, knowledge, true, true); + } + } +} diff --git a/Content.Server/_CP14/Knowledge/CP14KnowledgeSystem.cs b/Content.Server/_CP14/Knowledge/CP14KnowledgeSystem.cs new file mode 100644 index 0000000000..9dc114dec0 --- /dev/null +++ b/Content.Server/_CP14/Knowledge/CP14KnowledgeSystem.cs @@ -0,0 +1,254 @@ +using System.Text; +using Content.Server.Chat.Managers; +using Content.Server.Mind; +using Content.Server.Popups; +using Content.Shared._CP14.Knowledge; +using Content.Shared._CP14.Knowledge.Components; +using Content.Shared._CP14.Knowledge.Prototypes; +using Content.Shared.Administration; +using Content.Shared.Administration.Logs; +using Content.Shared.Administration.Managers; +using Content.Shared.Chat; +using Content.Shared.Damage; +using Content.Shared.Database; +using Content.Shared.DoAfter; +using Content.Shared.Verbs; +using Robust.Shared.Prototypes; +using Robust.Shared.Random; + +namespace Content.Server._CP14.Knowledge; + +public sealed partial class CP14KnowledgeSystem : SharedCP14KnowledgeSystem +{ + [Dependency] private readonly ISharedAdminManager _admin = default!; + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly PopupSystem _popup = default!; + [Dependency] private readonly DamageableSystem _damageable = default!; + [Dependency] private readonly IPrototypeManager _proto = default!; + [Dependency] private readonly IChatManager _chat = default!; + [Dependency] private readonly MindSystem _mind = default!; + [Dependency] private readonly ISharedAdminLogManager _adminLogger = default!; + [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(AutoAddSkill); + SubscribeLocalEvent>(AddKnowledgeAdminVerb); + SubscribeLocalEvent>(AddKnowledgeLearningVerb); + SubscribeLocalEvent(KnowledgeLearnedEvent); + } + + private void KnowledgeLearnedEvent(Entity ent, ref CP14KnowledgeLearnDoAfterEvent args) + { + if (args.Cancelled || args.Handled) + return; + + args.Handled = true; + + TryLearnKnowledge(ent, args.Knowledge); + } + + private void AddKnowledgeLearningVerb(Entity ent, ref GetVerbsEvent args) + { + var user = args.User; + foreach (var knowledge in ent.Comp.Knowledges) + { + if (!_proto.TryIndex(knowledge, out var indexedKnowledge)) + continue; + + args.Verbs.Add(new Verb() + { + Text = $"{Loc.GetString(indexedKnowledge.Name)}", + Message = Loc.GetString(indexedKnowledge.Desc), + Category = VerbCategory.CP14KnowledgeLearn, + Act = () => + { + _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, + user, + ent.Comp.DoAfter, + new CP14KnowledgeLearnDoAfterEvent() {Knowledge = knowledge}, + user, + ent, + ent) + { + BreakOnDamage = true, + BreakOnMove = true, + }); + }, + Disabled = HasKnowledge(user, knowledge), + Impact = LogImpact.Medium, + }); + } + } + + private void AddKnowledgeAdminVerb(Entity ent, ref GetVerbsEvent args) + { + if (!_admin.HasAdminFlag(args.User, AdminFlags.Admin)) + return; + + //Remove knowledge + foreach (var knowledge in ent.Comp.Knowledges) + { + if (!_proto.TryIndex(knowledge, out var indexedKnowledge)) + continue; + + args.Verbs.Add(new Verb() + { + Text = $"{Loc.GetString(indexedKnowledge.Name)}", + Message = Loc.GetString(indexedKnowledge.Desc), + Category = VerbCategory.CP14KnowledgeRemove, + Act = () => + { + TryForgotKnowledge(ent, knowledge); + }, + Impact = LogImpact.High, + }); + } + + //Add knowledge + foreach (var knowledge in _proto.EnumeratePrototypes()) + { + if (ent.Comp.Knowledges.Contains(knowledge)) + continue; + + args.Verbs.Add(new Verb() + { + Text = $"{Loc.GetString(knowledge.Name)}", + Message = Loc.GetString(knowledge.Desc), + Category = VerbCategory.CP14KnowledgeAdd, + Act = () => + { + TryLearnKnowledge(ent, knowledge, false); + }, + Impact = LogImpact.High, + }); + } + } + + private void AutoAddSkill(Entity ent, ref MapInitEvent args) + { + foreach (var knowledge in ent.Comp.Knowledge) + { + TryLearnKnowledge(ent, knowledge); + } + + RemComp(ent, ent.Comp); + } + + public bool TryLearnKnowledge(EntityUid uid, ProtoId proto, bool force = false, bool silent = false) + { + if (!TryComp(uid, out var knowledgeStorage)) + return false; + + if (!_proto.TryIndex(proto, out var indexedKnowledge)) + return false; + + if (knowledgeStorage.Knowledges.Contains(proto)) + return false; + + foreach (var dependency in indexedKnowledge.Dependencies) + { + if (!_proto.TryIndex(dependency, out var indexedDependency)) + return false; + + if (force) + { + //If we teach by force - we automatically teach all the basics that are necessary for that skill. + if (!TryLearnKnowledge(uid, dependency, true)) + return false; + } + else + { + var passed = true; + var sb = new StringBuilder(); + + sb.Append(Loc.GetString("cp14-cant-learn-knowledge-dependencies", + ("target", Loc.GetString(indexedKnowledge.Desc)))); + + //We cant learnt + if (!HasKnowledge(uid, dependency)) + { + passed = false; + sb.Append("\n- " + Loc.GetString(indexedDependency.Desc)); + } + + if (!passed) + { + if (!silent && _mind.TryGetMind(uid, out var mind, out var mindComp) && mindComp.Session is not null) + { + var wrappedMessage = Loc.GetString("chat-manager-server-wrap-message", ("message", sb.ToString())); + _chat.ChatMessageToOne( + ChatChannel.Server, + sb.ToString(), + wrappedMessage, + default, + false, + mindComp.Session.Channel); + } + + return false; + } + } + } + + //TODO: coding on a sleepy head is a bad idea. Remove duplicate variables. >:( + if (!silent && _mind.TryGetMind(uid, out var mind2, out var mindComp2) && mindComp2.Session is not null) + { + var message = Loc.GetString("cp14-learned-new-knowledge", ("name", Loc.GetString(indexedKnowledge.Name))); + var wrappedMessage2 = Loc.GetString("chat-manager-server-wrap-message", ("message", message)); + + _chat.ChatMessageToOne( + ChatChannel.Server, + message, + wrappedMessage2, + default, + false, + mindComp2.Session.Channel); + } + + _adminLogger.Add( + LogType.Mind, + LogImpact.Medium, + $"{EntityManager.ToPrettyString(uid):player} learned new knowledge: {Loc.GetString(indexedKnowledge.Name)}"); + return knowledgeStorage.Knowledges.Add(proto); + } + + public bool TryForgotKnowledge(EntityUid uid, ProtoId proto, bool silent = false) + { + if (!TryComp(uid, out var knowledgeStorage)) + return false; + + if (!knowledgeStorage.Knowledges.Contains(proto)) + return false; + + if (!_proto.TryIndex(proto, out var indexedKnowledge)) + return false; + + knowledgeStorage.Knowledges.Remove(proto); + + if (_mind.TryGetMind(uid, out var mind, out var mindComp) && mindComp.Session is not null) + { + if (!silent) + { + var message = Loc.GetString("cp14-forgot-knowledge", ("name", Loc.GetString(indexedKnowledge.Name))); + var wrappedMessage = Loc.GetString("chat-manager-server-wrap-message", ("message", message)); + + _chat.ChatMessageToOne( + ChatChannel.Server, + message, + wrappedMessage, + default, + false, + mindComp.Session.Channel); + } + } + + _adminLogger.Add( + LogType.Mind, + LogImpact.Medium, + $"{EntityManager.ToPrettyString(uid):player} forgot knowledge: {Loc.GetString(indexedKnowledge.Name)}"); + return true; + } +} diff --git a/Content.Server/_CP14/Skills/CP14SkillSystem.cs b/Content.Server/_CP14/Skills/CP14SkillSystem.cs deleted file mode 100644 index b9c5126922..0000000000 --- a/Content.Server/_CP14/Skills/CP14SkillSystem.cs +++ /dev/null @@ -1,166 +0,0 @@ -using Content.Server._CP14.Alchemy; -using Content.Server.Popups; -using Content.Shared._CP14.MeleeWeapon.EntitySystems; -using Content.Shared._CP14.Skills; -using Content.Shared._CP14.Skills.Components; -using Content.Shared.Damage; -using Content.Shared.Examine; -using Content.Shared.Hands.EntitySystems; -using Content.Shared.Popups; -using Content.Shared.Throwing; -using Content.Shared.Weapons.Melee; -using Content.Shared.Weapons.Melee.Events; -using Content.Shared.Weapons.Ranged.Systems; -using Robust.Shared.Prototypes; -using Robust.Shared.Random; - -namespace Content.Server._CP14.Skills; - -public sealed partial class CP14SkillSystem : SharedCP14SkillSystem -{ - [Dependency] private readonly IRobustRandom _random = default!; - [Dependency] private readonly PopupSystem _popup = default!; - [Dependency] private readonly DamageableSystem _damageable = default!; - [Dependency] private readonly IPrototypeManager _proto = default!; - [Dependency] private readonly ThrowingSystem _throwing = default!; - [Dependency] private readonly SharedHandsSystem _hands = default!; - - public override void Initialize() - { - SubscribeLocalEvent(OnExamined); - - SubscribeLocalEvent(OnGunShot); - SubscribeLocalEvent(OnMeleeHit); - SubscribeLocalEvent(OnSimpleSkillIssue); - SubscribeLocalEvent(OnSharpning); - SubscribeLocalEvent(OnPestleGrinding); - } - - private void OnExamined(Entity requirement, ref ExaminedEvent args) - { - var text = string.Empty; - text += "\n" + Loc.GetString("cp14-skill-label") + "\n"; - var canUse = HasEnoughSkillToUse(args.Examiner, requirement, out var missingSkills); - - text += Loc.GetString(requirement.Comp.NeedAll ? "cp14-skill-examined-need-all" : "cp14-skill-examined", ("item", MetaData(requirement).EntityName)) + "\n"; - foreach (var skill in requirement.Comp.RequiredSkills) - { - var name = _proto.Index(skill).Name; - if (name == null) - continue; - - var color = missingSkills.Contains(skill) ? "#c23030" : "#3fc488"; - text += Loc.GetString("cp14-skill-examined-skill", ("color", color), ("skill", Loc.GetString(name))) + "\n"; - - } - args.PushMarkup(text); - } - - private void OnPestleGrinding(Entity requirement, ref PestleGrindingEvent args) - { - if (!_random.Prob(requirement.Comp.FuckupChance)) - return; - - if (HasEnoughSkillToUse(args.User, requirement, out _)) - return; - - _popup.PopupEntity(Loc.GetString("cp14-skill-issue-push", ("item", MetaData(args.Target).EntityName)), - args.User, - args.User, - PopupType.Large); - _hands.TryDrop(args.User, args.Target); - _throwing.TryThrow(args.Target, _random.NextAngle().ToWorldVec(), 1, args.User); - } - - private void OnSharpning(Entity requirement, ref SharpingEvent args) - { - if (!_random.Prob(requirement.Comp.FuckupChance)) - return; - - if (HasEnoughSkillToUse(args.User, requirement, out _)) - return; - - switch (_random.Next(2)) - { - case 0: - _popup.PopupEntity(Loc.GetString("cp14-skill-issue-sharp-weapon-harm", ("item", MetaData(args.Target).EntityName)), args.User, args.User, PopupType.Large); - var weaponDamage = new DamageSpecifier(); - weaponDamage.DamageDict.Add("Blunt", _random.NextFloat(5)); - _damageable.TryChangeDamage(args.Target, weaponDamage); - break; - case 1: - _popup.PopupEntity(Loc.GetString("cp14-skill-issue-sharp-self-harm"), args.User, args.User, PopupType.Large); - - var damage = new DamageSpecifier(); - if (TryComp(requirement, out var melee)) - damage = melee.Damage; - else - damage.DamageDict.Add("Slash", _random.NextFloat(10)); - - _damageable.TryChangeDamage(args.User, damage); - break; - } - } - - private void OnSimpleSkillIssue(Entity requirement, ref CP14TrySkillIssueEvent args) - { - if (!_random.Prob(requirement.Comp.FuckupChance)) - return; - - if (HasEnoughSkillToUse(args.User, requirement, out _)) - return; - - BasicSkillIssue(args.User, requirement); - } - - private void OnMeleeHit(Entity requirement, ref MeleeHitEvent args) - { - if (!_random.Prob(requirement.Comp.FuckupChance)) - return; - - if (HasEnoughSkillToUse(args.User, requirement, out _)) - return; - - switch (_random.Next(2)) - { - case 0: - BasicSkillIssue(args.User, requirement); - break; - case 1: - _popup.PopupEntity(Loc.GetString("cp14-skill-issue-self-harm"), args.User, args.User, PopupType.Large); - - var damage = new DamageSpecifier(); - if (TryComp(requirement, out var melee)) - damage = melee.Damage; - else - damage.DamageDict.Add("Blunt", _random.NextFloat(10)); - - _damageable.TryChangeDamage(args.User, damage); - break; - } - } - - private void OnGunShot(Entity requirement, ref GunShotEvent args) - { - if (!_random.Prob(requirement.Comp.FuckupChance)) - return; - - if (HasEnoughSkillToUse(args.User, requirement, out _)) - return; - - _popup.PopupEntity(Loc.GetString("cp14-skill-issue-recoil"), args.User, args.User, PopupType.Large); - _hands.TryDrop(args.User, requirement); - _throwing.TryThrow(requirement, _random.NextAngle().ToWorldVec(), _random.NextFloat(5), args.User); - - var damage = new DamageSpecifier(); - damage.DamageDict.Add("Blunt", _random.NextFloat(10)); - _damageable.TryChangeDamage(args.User, damage); - } - - private void BasicSkillIssue(EntityUid user, EntityUid item, float throwPower = 1) - { - _popup.PopupEntity(Loc.GetString("cp14-skill-issue-drops", ("item", MetaData(item).EntityName)), user, user, PopupType.Large); - _hands.TryDrop(user, item); - _throwing.TryThrow(item, _random.NextAngle().ToWorldVec(), throwPower, user); - } -} diff --git a/Content.Server/_CP14/Workbench/CP14WorkbenchSystem.UI.cs b/Content.Server/_CP14/Workbench/CP14WorkbenchSystem.UI.cs index 2040cc535f..d4c9bac480 100644 --- a/Content.Server/_CP14/Workbench/CP14WorkbenchSystem.UI.cs +++ b/Content.Server/_CP14/Workbench/CP14WorkbenchSystem.UI.cs @@ -20,7 +20,7 @@ public sealed partial class CP14WorkbenchSystem StartCraft(entity, args.Actor, prototype); } - private void UpdateUIRecipes(Entity entity) + private void UpdateUIRecipes(Entity entity, EntityUid user) { var placedEntities = _lookup.GetEntitiesInRange(Transform(entity).Coordinates, entity.Comp.WorkbenchRadius); @@ -30,7 +30,13 @@ public sealed partial class CP14WorkbenchSystem if (!_proto.TryIndex(recipeId, out var indexedRecipe)) continue; - var entry = new CP14WorkbenchUiRecipesEntry(recipeId, CanCraftRecipe(indexedRecipe, placedEntities)); + if (indexedRecipe.KnowledgeRequired is not null) + { + if (!_knowledge.HasKnowledge(user, indexedRecipe.KnowledgeRequired.Value)) + continue; + } + + var entry = new CP14WorkbenchUiRecipesEntry(recipeId, CanCraftRecipe(indexedRecipe, placedEntities, user)); recipes.Add(entry); } diff --git a/Content.Server/_CP14/Workbench/CP14WorkbenchSystem.cs b/Content.Server/_CP14/Workbench/CP14WorkbenchSystem.cs index d43d522f13..3ba7081152 100644 --- a/Content.Server/_CP14/Workbench/CP14WorkbenchSystem.cs +++ b/Content.Server/_CP14/Workbench/CP14WorkbenchSystem.cs @@ -6,6 +6,7 @@ using Content.Server.DoAfter; using Content.Server.Popups; using Content.Server.Stack; +using Content.Shared._CP14.Knowledge; using Content.Shared._CP14.Workbench; using Content.Shared._CP14.Workbench.Prototypes; using Content.Shared.Chemistry.EntitySystems; @@ -29,6 +30,7 @@ public sealed partial class CP14WorkbenchSystem : SharedCP14WorkbenchSystem [Dependency] private readonly UserInterfaceSystem _userInterface = default!; [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; + [Dependency] private readonly SharedCP14KnowledgeSystem _knowledge = default!; private EntityQuery _metaQuery; private EntityQuery _stackQuery; @@ -64,10 +66,9 @@ public sealed partial class CP14WorkbenchSystem : SharedCP14WorkbenchSystem private void OnBeforeUIOpen(Entity ent, ref BeforeActivatableUIOpenEvent args) { - UpdateUIRecipes(ent); + UpdateUIRecipes(ent, args.User); } - // TODO: Replace Del to QueueDel when it's will be works with events private void OnCraftFinished(Entity ent, ref CP14CraftDoAfterEvent args) { if (args.Cancelled || args.Handled) @@ -78,23 +79,26 @@ public sealed partial class CP14WorkbenchSystem : SharedCP14WorkbenchSystem var placedEntities = _lookup.GetEntitiesInRange(Transform(ent).Coordinates, ent.Comp.WorkbenchRadius, LookupFlags.Uncontained); - if (!CanCraftRecipe(recipe, placedEntities)) + if (!CanCraftRecipe(recipe, placedEntities, args.User)) { - _popup.PopupEntity(Loc.GetString("cp14-workbench-no-resource"), ent, args.User); + _popup.PopupEntity(Loc.GetString("cp14-workbench-cant-craft"), ent, args.User); return; } if (!_proto.TryIndex(args.Recipe, out var indexedRecipe)) return; + if (recipe.KnowledgeRequired is not null) + _knowledge.UseKnowledge(args.User, recipe.KnowledgeRequired.Value); + var resultEntity = Spawn(indexedRecipe.Result); _stack.TryMergeToContacts(resultEntity); - _solutionContainer.TryGetSolution(resultEntity, recipe.Solution, out var resultSoln, out var resultSolution); - if (recipe.TryMergeSolutions && resultSoln is not null) + _solutionContainer.TryGetSolution(resultEntity, recipe.Solution, out var resultSolution, out _); + if (recipe.TryMergeSolutions && resultSolution is not null) { - resultSoln.Value.Comp.Solution.MaxVolume = 0; - _solutionContainer.RemoveAllSolution(resultSoln.Value); //If we combine ingredient solutions, we do not use the default solution prescribed in the entity. + resultSolution.Value.Comp.Solution.MaxVolume = 0; + _solutionContainer.RemoveAllSolution(resultSolution.Value); //If we combine ingredient solutions, we do not use the default solution prescribed in the entity. } foreach (var requiredIngredient in recipe.Entities) @@ -102,7 +106,8 @@ public sealed partial class CP14WorkbenchSystem : SharedCP14WorkbenchSystem var requiredCount = requiredIngredient.Value; foreach (var placedEntity in placedEntities) { - if (!TryComp(placedEntity, out var metaData) || metaData.EntityPrototype is null) + var metaData = MetaData(placedEntity); + if (metaData.EntityPrototype is null) continue; var placedProto = metaData.EntityPrototype.ID; @@ -110,11 +115,11 @@ public sealed partial class CP14WorkbenchSystem : SharedCP14WorkbenchSystem { // Trying merge solutions if (recipe.TryMergeSolutions - && resultSoln is not null + && resultSolution is not null && _solutionContainer.TryGetSolution(placedEntity, recipe.Solution, out var ingredientSoln, out var ingredientSolution)) { - resultSoln.Value.Comp.Solution.MaxVolume += ingredientSoln.Value.Comp.Solution.MaxVolume; - _solutionContainer.TryAddSolution(resultSoln.Value, ingredientSolution); + resultSolution.Value.Comp.Solution.MaxVolume += ingredientSoln.Value.Comp.Solution.MaxVolume; + _solutionContainer.TryAddSolution(resultSolution.Value, ingredientSolution); } requiredCount--; @@ -145,7 +150,7 @@ public sealed partial class CP14WorkbenchSystem : SharedCP14WorkbenchSystem } } _transform.SetCoordinates(resultEntity, Transform(ent).Coordinates); - UpdateUIRecipes(ent); + UpdateUIRecipes(ent, args.User); args.Handled = true; } @@ -172,8 +177,13 @@ public sealed partial class CP14WorkbenchSystem : SharedCP14WorkbenchSystem _audio.PlayPvs(recipe.OverrideCraftSound ?? workbench.Comp.CraftSound, workbench); } - private bool CanCraftRecipe(CP14WorkbenchRecipePrototype recipe, HashSet entities) + private bool CanCraftRecipe(CP14WorkbenchRecipePrototype recipe, HashSet entities, EntityUid user) { + //Knowledge check + if (recipe.KnowledgeRequired is not null && !_knowledge.HasKnowledge(user, recipe.KnowledgeRequired.Value)) + return false; + + //Ingredients check var indexedIngredients = IndexIngredients(entities); foreach (var requiredIngredient in recipe.Entities) { @@ -202,25 +212,6 @@ public sealed partial class CP14WorkbenchSystem : SharedCP14WorkbenchSystem return true; } - private string GetCraftRecipeMessage(string desc, CP14WorkbenchRecipePrototype recipe) - { - var result = desc + "\n \n" + Loc.GetString("cp14-workbench-recipe-list")+ "\n"; - - foreach (var pair in recipe.Entities) - { - var proto = _proto.Index(pair.Key); - result += $"{proto.Name} x{pair.Value}\n"; - } - - foreach (var pair in recipe.Stacks) - { - var proto = _proto.Index(pair.Key); - result += $"{proto.Name} x{pair.Value}\n"; - } - - return result; - } - private Dictionary IndexIngredients(HashSet ingredients) { var indexedIngredients = new Dictionary(); diff --git a/Content.Shared/Verbs/VerbCategory.cs b/Content.Shared/Verbs/VerbCategory.cs index a513d0033b..a85b7ac6ce 100644 --- a/Content.Shared/Verbs/VerbCategory.cs +++ b/Content.Shared/Verbs/VerbCategory.cs @@ -95,5 +95,11 @@ namespace Content.Shared.Verbs public static readonly VerbCategory CP14RitualBook = new("cp14-verb-categories-ritual-book", null); //CP14 public static readonly VerbCategory CP14CurrencyConvert = new("cp14-verb-categories-currency-converter", null); //CP14 + + public static readonly VerbCategory CP14KnowledgeAdd = new("cp14-verb-categories-knowledge-add", null); //CP14 + + public static readonly VerbCategory CP14KnowledgeRemove = new("cp14-verb-categories-knowledge-remove", null); //CP14 + + public static readonly VerbCategory CP14KnowledgeLearn = new("cp14-verb-categories-knowledge-learn", null); //CP14 } } diff --git a/Content.Shared/_CP14/Knowledge/Components/CP14AutoAddKnowledgeComponent.cs b/Content.Shared/_CP14/Knowledge/Components/CP14AutoAddKnowledgeComponent.cs new file mode 100644 index 0000000000..3fcb3e7976 --- /dev/null +++ b/Content.Shared/_CP14/Knowledge/Components/CP14AutoAddKnowledgeComponent.cs @@ -0,0 +1,14 @@ +using Content.Shared._CP14.Knowledge.Prototypes; +using Robust.Shared.Prototypes; + +namespace Content.Shared._CP14.Knowledge.Components; + +/// +/// The ability to add a skill to an entity and quickly teach it some skills +/// +[RegisterComponent, Access(typeof(SharedCP14KnowledgeSystem))] +public sealed partial class CP14AutoAddKnowledgeComponent : Component +{ + [DataField] + public List> Knowledge = new(); +} diff --git a/Content.Shared/_CP14/Knowledge/Components/CP14KnowledgeLearningSourceComponent.cs b/Content.Shared/_CP14/Knowledge/Components/CP14KnowledgeLearningSourceComponent.cs new file mode 100644 index 0000000000..23af4f2cb9 --- /dev/null +++ b/Content.Shared/_CP14/Knowledge/Components/CP14KnowledgeLearningSourceComponent.cs @@ -0,0 +1,17 @@ +using Content.Shared._CP14.Knowledge.Prototypes; +using Robust.Shared.Prototypes; + +namespace Content.Shared._CP14.Knowledge.Components; + +/// +/// Allows new knowledge to be learnt through interactions with an object. +/// +[RegisterComponent, Access(typeof(SharedCP14KnowledgeSystem))] +public sealed partial class CP14KnowledgeLearningSourceComponent : Component +{ + [DataField, ViewVariables(VVAccess.ReadOnly)] + public HashSet> Knowledges { get; private set; } = new(); + + [DataField] + public TimeSpan DoAfter = TimeSpan.FromSeconds(5f); +} diff --git a/Content.Shared/_CP14/Knowledge/Components/CP14KnowledgePaperTextComponent.cs b/Content.Shared/_CP14/Knowledge/Components/CP14KnowledgePaperTextComponent.cs new file mode 100644 index 0000000000..7e5f291dc5 --- /dev/null +++ b/Content.Shared/_CP14/Knowledge/Components/CP14KnowledgePaperTextComponent.cs @@ -0,0 +1,10 @@ + +namespace Content.Shared._CP14.Knowledge.Components; + +/// +/// automatically generates content for PaperComponent, based on the knowledge that can be learnt from this object +/// +[RegisterComponent, Access(typeof(SharedCP14KnowledgeSystem))] +public sealed partial class CP14KnowledgePaperTextComponent : Component +{ +} diff --git a/Content.Shared/_CP14/Knowledge/Components/CP14KnowledgeStorageComponent.cs b/Content.Shared/_CP14/Knowledge/Components/CP14KnowledgeStorageComponent.cs new file mode 100644 index 0000000000..cd5605affa --- /dev/null +++ b/Content.Shared/_CP14/Knowledge/Components/CP14KnowledgeStorageComponent.cs @@ -0,0 +1,14 @@ +using Content.Shared._CP14.Knowledge.Prototypes; +using Robust.Shared.Prototypes; + +namespace Content.Shared._CP14.Knowledge.Components; + +/// +/// a list of skills learned by this entity +/// +[RegisterComponent, Access(typeof(SharedCP14KnowledgeSystem))] +public sealed partial class CP14KnowledgeStorageComponent : Component +{ + [DataField, ViewVariables(VVAccess.ReadOnly)] + public HashSet> Knowledges { get; private set; } = new(); +} diff --git a/Content.Shared/_CP14/Knowledge/Prototypes/CP14KnowledgePrototype.cs b/Content.Shared/_CP14/Knowledge/Prototypes/CP14KnowledgePrototype.cs new file mode 100644 index 0000000000..9380c8c40d --- /dev/null +++ b/Content.Shared/_CP14/Knowledge/Prototypes/CP14KnowledgePrototype.cs @@ -0,0 +1,26 @@ +using Robust.Shared.Prototypes; + +namespace Content.Shared._CP14.Knowledge.Prototypes; + +/// +/// Abstract knowledge that may be required to use items or crafts. +/// +[Prototype("CP14Knowledge")] +public sealed partial class CP14KnowledgePrototype : IPrototype +{ + [ViewVariables] + [IdDataField] + public string ID { get; private set; } = default!; + + [DataField(required: true)] + public LocId Name { get; private set; } = default!; + + [DataField] + public LocId Desc{ get; private set; } = default!; + + /// + /// to study this knowledge, other knowledge on which it is based may be necessary. + /// + [DataField] + public HashSet> Dependencies = new(); +} diff --git a/Content.Shared/_CP14/Knowledge/SharedCP14KnowledgeSystem.cs b/Content.Shared/_CP14/Knowledge/SharedCP14KnowledgeSystem.cs new file mode 100644 index 0000000000..0541f86fb0 --- /dev/null +++ b/Content.Shared/_CP14/Knowledge/SharedCP14KnowledgeSystem.cs @@ -0,0 +1,94 @@ +using System.Text; +using Content.Shared._CP14.Knowledge.Components; +using Content.Shared._CP14.Knowledge.Prototypes; +using Content.Shared.DoAfter; +using Content.Shared.MagicMirror; +using Content.Shared.Paper; +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization; + +namespace Content.Shared._CP14.Knowledge; + +public abstract partial class SharedCP14KnowledgeSystem : EntitySystem +{ + [Dependency] private readonly IPrototypeManager _proto = default!; + [Dependency] private readonly PaperSystem _paper = default!; + + public override void Initialize() + { + SubscribeLocalEvent(OnPaperMapInit); + } + + private void OnPaperMapInit(Entity ent, ref MapInitEvent args) + { + if (!TryComp(ent, out var paper)) + return; + if (!TryComp(ent, out var knowledge)) + return; + if (knowledge.Knowledges.Count <= 0) + return; + + var sb = new StringBuilder(); + + sb.Append(Loc.GetString("cp14-knowledge-book-pre-text")); + foreach (var k in knowledge.Knowledges) + { + if (!_proto.TryIndex(k, out var indexedKnowledge)) + continue; + + sb.Append($"\n{Loc.GetString(indexedKnowledge.Desc)}"); + } + + sb.Append($"\n\n{Loc.GetString("cp14-knowledge-book-post-text")}"); + + _paper.SetContent((ent, paper), sb.ToString()); + paper.EditingDisabled = true; + } + + public bool UseKnowledge(EntityUid uid, + ProtoId knowledge, + float factor = 1f, + CP14KnowledgeStorageComponent? knowledgeStorage = null) + { + if (!Resolve(uid, ref knowledgeStorage, false)) + return false; + + if (!knowledgeStorage.Knowledges.Contains(knowledge)) + return false; + + var ev = new CP14KnowledgeUsedEvent(uid, knowledge, factor); + RaiseLocalEvent(uid, ev); + return true; + } + + public bool HasKnowledge(EntityUid uid, + ProtoId knowledge, + CP14KnowledgeStorageComponent? knowledgeStorage = null) + { + if (!Resolve(uid, ref knowledgeStorage, false)) + return false; + + return knowledgeStorage.Knowledges.Contains(knowledge); + } +} + +public sealed class CP14KnowledgeUsedEvent : EntityEventArgs +{ + public readonly EntityUid User; + public readonly ProtoId Knowledge; + public readonly float Factor; + + public CP14KnowledgeUsedEvent(EntityUid uid, ProtoId knowledge, float factor) + { + User = uid; + Knowledge = knowledge; + Factor = factor; + } +} + +[Serializable, NetSerializable] +public sealed partial class CP14KnowledgeLearnDoAfterEvent : DoAfterEvent +{ + public ProtoId Knowledge; + public override DoAfterEvent Clone() => this; +} diff --git a/Content.Shared/_CP14/Skills/Components/CP14AddSkillSpecial.cs b/Content.Shared/_CP14/Skills/Components/CP14AddSkillSpecial.cs deleted file mode 100644 index 8d1b5154ae..0000000000 --- a/Content.Shared/_CP14/Skills/Components/CP14AddSkillSpecial.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Content.Shared._CP14.Skills.Prototypes; -using Content.Shared.Roles; -using JetBrains.Annotations; -using Robust.Shared.Prototypes; - -namespace Content.Shared._CP14.Skills.Components; - -/// -/// a component that can be hung on an entity to immediately teach it some skills -/// -[UsedImplicitly] -public sealed partial class CP14AddSkillSpecial : JobSpecial -{ - [DataField, ViewVariables(VVAccess.ReadOnly)] - public List> Skills = new(); - - public override void AfterEquip(EntityUid mob) - { - var entMan = IoCManager.Resolve(); - var skillSystem = entMan.System(); - foreach (var skill in Skills) - { - skillSystem.TryLearnSkill(mob, skill); - } - } -} diff --git a/Content.Shared/_CP14/Skills/Components/CP14AutoAddSkillComponent.cs b/Content.Shared/_CP14/Skills/Components/CP14AutoAddSkillComponent.cs deleted file mode 100644 index 8c3abc8a05..0000000000 --- a/Content.Shared/_CP14/Skills/Components/CP14AutoAddSkillComponent.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Content.Shared._CP14.Skills.Prototypes; -using Robust.Shared.Prototypes; - -namespace Content.Shared._CP14.Skills.Components; - -/// -/// The ability to add a skill to an entity and quickly teach it some skills -/// -[RegisterComponent, Access(typeof(SharedCP14SkillSystem))] -public sealed partial class CP14AutoAddSkillComponent : Component -{ - [DataField] - public List> Skills = new(); -} diff --git a/Content.Shared/_CP14/Skills/Components/CP14SkillRequirementComponent.cs b/Content.Shared/_CP14/Skills/Components/CP14SkillRequirementComponent.cs deleted file mode 100644 index 593b4c7b2c..0000000000 --- a/Content.Shared/_CP14/Skills/Components/CP14SkillRequirementComponent.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Content.Shared._CP14.Skills.Prototypes; -using Robust.Shared.Prototypes; - -namespace Content.Shared._CP14.Skills.Components; - -/// -/// Limits the use of this entity behind certain skills -/// -[RegisterComponent, Access(typeof(SharedCP14SkillSystem))] -public sealed partial class CP14SkillRequirementComponent : Component -{ - /// - /// Is it necessary to have ALL the skills on the list to be able to use this entity? - /// If not, one of any skill will suffice - /// - [DataField] - public bool NeedAll = false; - - /// - /// the chances of something going wrong when using wihout skill - /// - [DataField] - public float FuckupChance = 0.5f; - - [DataField(required: true)] - public List> RequiredSkills = new(); -} diff --git a/Content.Shared/_CP14/Skills/Components/CP14SkillsStorageComponent.cs b/Content.Shared/_CP14/Skills/Components/CP14SkillsStorageComponent.cs deleted file mode 100644 index b6adc37cb1..0000000000 --- a/Content.Shared/_CP14/Skills/Components/CP14SkillsStorageComponent.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Content.Shared._CP14.Skills.Prototypes; -using Robust.Shared.Prototypes; - -namespace Content.Shared._CP14.Skills.Components; - -/// -/// a list of skills learned by this entity -/// -[RegisterComponent, Access(typeof(SharedCP14SkillSystem))] -public sealed partial class CP14SkillsStorageComponent : Component -{ - [DataField, ViewVariables(VVAccess.ReadOnly)] - public List> Skills { get; private set; }= new(); -} diff --git a/Content.Shared/_CP14/Skills/Prototypes/CP14SkillPrototype.cs b/Content.Shared/_CP14/Skills/Prototypes/CP14SkillPrototype.cs deleted file mode 100644 index a7cd16d168..0000000000 --- a/Content.Shared/_CP14/Skills/Prototypes/CP14SkillPrototype.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Robust.Shared.Prototypes; - -namespace Content.Shared._CP14.Skills.Prototypes; - -/// -/// -/// -[Prototype("CP14Skill")] -public sealed partial class CP14SkillPrototype : IPrototype -{ - [ViewVariables] - [IdDataField] - public string ID { get; private set; } = default!; - - [DataField(required: true)] - public LocId? Name{ get; private set; } - - [DataField] - public LocId? Desc{ get; private set; } - - [DataField] - public ComponentRegistry Components = new(); -} diff --git a/Content.Shared/_CP14/Skills/SharedCP14SkillSystem.cs b/Content.Shared/_CP14/Skills/SharedCP14SkillSystem.cs deleted file mode 100644 index b18455065f..0000000000 --- a/Content.Shared/_CP14/Skills/SharedCP14SkillSystem.cs +++ /dev/null @@ -1,114 +0,0 @@ -using Content.Shared._CP14.Skills.Components; -using Content.Shared._CP14.Skills.Prototypes; -using Robust.Shared.Prototypes; -using Robust.Shared.Random; - -namespace Content.Shared._CP14.Skills; - -public partial class SharedCP14SkillSystem : EntitySystem -{ - [Dependency] private readonly IPrototypeManager _proto = default!; - - public override void Initialize() - { - SubscribeLocalEvent(OnMapInit); - SubscribeLocalEvent(AutoAddSkill); - } - - private void AutoAddSkill(Entity ent, ref MapInitEvent args) - { - foreach (var skill in ent.Comp.Skills) - { - TryLearnSkill(ent, skill); - } - - RemComp(ent, ent.Comp); - } - - private void OnMapInit(Entity ent, ref MapInitEvent args) - { - foreach (var skill in ent.Comp.Skills) - { - TryLearnSkill(ent, skill, force: true); - } - } - - public bool HasEnoughSkillToUse(EntityUid user, EntityUid target, out List> missingSkills) - { - missingSkills = new(); - if (!TryComp(target, out var requirement) || requirement.RequiredSkills.Count == 0) - return true; - - if (!TryComp(user, out var skillStorage)) - { - missingSkills = requirement.RequiredSkills; - return false; - } - - var success = requirement.NeedAll; - foreach (var skill in requirement.RequiredSkills) - { - var hasSkill = skillStorage.Skills.Contains(skill); - - if (requirement.NeedAll && !hasSkill) - { - missingSkills.Add(skill); - success = false; - } - else if (!requirement.NeedAll && hasSkill) - { - success = true; - } - else if (!requirement.NeedAll && !hasSkill) - { - missingSkills.Add(skill); - } - } - - return success; - } - - public bool TryLearnSkill(EntityUid uid, ProtoId skill, bool force = false) - { - if (!TryComp(uid, out var skillStorage)) - return false; - - if (!skillStorage.Skills.Contains(skill)) - { - skillStorage.Skills.Add(skill); - if (!force) - return false; - } - - var proto = _proto.Index(skill); - EntityManager.AddComponents(uid, proto.Components); - - return true; - } - - public bool TryForgotSkill(EntityUid uid, ProtoId skill) - { - if (!TryComp(uid, out var skillStorage)) - return false; - - if (!skillStorage.Skills.Contains(skill)) - return false; - - skillStorage.Skills.Remove(skill); - - var proto = _proto.Index(skill); - EntityManager.RemoveComponents(uid, proto.Components); - - return true; - } -} - -public sealed partial class CP14TrySkillIssueEvent : EntityEventArgs -{ - public readonly EntityUid User; - - public CP14TrySkillIssueEvent(EntityUid uid) - { - User = uid; - } -} diff --git a/Content.Shared/_CP14/Workbench/Prototypes/CP14WorkbenchRecipePrototype.cs b/Content.Shared/_CP14/Workbench/Prototypes/CP14WorkbenchRecipePrototype.cs index 614031e3f5..67d17e3710 100644 --- a/Content.Shared/_CP14/Workbench/Prototypes/CP14WorkbenchRecipePrototype.cs +++ b/Content.Shared/_CP14/Workbench/Prototypes/CP14WorkbenchRecipePrototype.cs @@ -3,6 +3,7 @@ * https://github.com/space-wizards/space-station-14/blob/master/LICENSE.TXT */ +using Content.Shared._CP14.Knowledge.Prototypes; using Content.Shared.Stacks; using Content.Shared.Tag; using Robust.Shared.Audio; @@ -39,4 +40,10 @@ public sealed class CP14WorkbenchRecipePrototype : IPrototype [DataField] public string Solution = "food"; + + /// + /// If the player does not have this knowledge, the recipe will not be displayed in the workbench. + /// + [DataField] + public ProtoId? KnowledgeRequired; } diff --git a/Resources/Locale/en-US/_CP14/knowledge/skill-examined.ftl b/Resources/Locale/en-US/_CP14/knowledge/skill-examined.ftl new file mode 100644 index 0000000000..382335184b --- /dev/null +++ b/Resources/Locale/en-US/_CP14/knowledge/skill-examined.ftl @@ -0,0 +1,18 @@ +cp14-skill-label = [bold]Skill requirements[/bold] +cp14-skill-examined = You need to have one of the following skills to use {$item}: +cp14-skill-examined-need-all = You need to have all of the following skills in order to use {$item}: + +cp14-skill-examined-skill = [color={$color}] - {$skill} [/color] + +cp14-verb-categories-knowledge-add = Add knowledge: +cp14-verb-categories-knowledge-remove = Delete knowledge: +cp14-verb-categories-knowledge-learn = Learn knowledge: +cp14-learned-new-knowledge = You have learned the knowledge of [bold]"{$name}[/bold]"! +cp14-forgot-knowledge = You've lost your knowledge of [bold]"{$name}[/bold]"! + +cp14-cant-learn-knowledge-dependencies = + You were unable to understand {$target}... + You lack the following knowledge: + +cp14-knowledge-book-pre-text = Here you will find detailed instructions that explain +cp14-knowledge-book-post-text = (To explore this knowledge, right-click on the book, and select ‘Learn Knowledge‘) \ No newline at end of file diff --git a/Resources/Locale/en-US/_CP14/skills/skill-issues.ftl b/Resources/Locale/en-US/_CP14/knowledge/skill-issues.ftl similarity index 100% rename from Resources/Locale/en-US/_CP14/skills/skill-issues.ftl rename to Resources/Locale/en-US/_CP14/knowledge/skill-issues.ftl diff --git a/Resources/Locale/en-US/_CP14/knowledge/skill-meta.ftl b/Resources/Locale/en-US/_CP14/knowledge/skill-meta.ftl new file mode 100644 index 0000000000..bb467d1989 --- /dev/null +++ b/Resources/Locale/en-US/_CP14/knowledge/skill-meta.ftl @@ -0,0 +1,24 @@ +# T1 + +cp14-knowledge-sewing-name = Clothing sewing +cp14-knowledge-sewing-desc = how to make simple clothes on sewing table + +cp14-knowledge-wallpaper-name = Wallpaper production +cp14-knowledge-wallpaper-desc = how to create wallpaper on sewing table + +cp14-knowledge-woodwork-name = Woodwork +cp14-knowledge-woodwork-desc = how to make simple objects out of wood + +cp14-knowledge-metall-melting-name = Metall melting +cp14-knowledge-metall-melting-desc = how to smelt ore into valuable metals + +cp14-knowledge-metall-forging-name = Metall forging +cp14-knowledge-metall-forging-desc = how to forge metal into different shapes + +cp14-knowledge-metall-glasswork-name = Glasswork +cp14-knowledge-metall-glasswork-desc = how to work with glass. + +# T2 + +cp14-knowledge-sewing2-name = Advanced clothing sewing +cp14-knowledge-sewing2-desc = how to create quality clothes on sewing table \ No newline at end of file diff --git a/Resources/Locale/en-US/_CP14/skills/skill-examined.ftl b/Resources/Locale/en-US/_CP14/skills/skill-examined.ftl deleted file mode 100644 index d25dfbfbc1..0000000000 --- a/Resources/Locale/en-US/_CP14/skills/skill-examined.ftl +++ /dev/null @@ -1,5 +0,0 @@ -cp14-skill-label = [bold]Skill requirements[/bold] -cp14-skill-examined = You need to have one of the following skills to use {$item}: -cp14-skill-examined-need-all = You need to have all of the following skills in order to use {$item}: - -cp14-skill-examined-skill = [color={$color}] - {$skill} [/color] \ No newline at end of file diff --git a/Resources/Locale/en-US/_CP14/skills/skill-meta.ftl b/Resources/Locale/en-US/_CP14/skills/skill-meta.ftl deleted file mode 100644 index 1a5efde66f..0000000000 --- a/Resources/Locale/en-US/_CP14/skills/skill-meta.ftl +++ /dev/null @@ -1,11 +0,0 @@ -cp14-skill-name-alchemy = Alchemy -cp14-skill-desc-alchemy = You are experienced enough to use complex alchemical equipment with confidence. - -cp14-skill-name-blacksmith = Blacksmithing -cp14-skill-desc-blacksmith = You know the intricacies of working with metal - -cp14-skill-name-warcraft = Mastery of martial weapons -cp14-skill-desc-warcraft = You're good with a serious, martial weapon. - -cp14-skill-name-firearms = Firearms shooting -cp14-skill-desc-firearms = You are experienced enough to use firearms. \ No newline at end of file diff --git a/Resources/Locale/en-US/_CP14/workbench/workbench.ftl b/Resources/Locale/en-US/_CP14/workbench/workbench.ftl index df03423c92..ae8d3fda8e 100644 --- a/Resources/Locale/en-US/_CP14/workbench/workbench.ftl +++ b/Resources/Locale/en-US/_CP14/workbench/workbench.ftl @@ -3,4 +3,4 @@ cp14-workbench-ui-title = Item creation cp14-workbench-craft = Craft cp14-workbench-recipe-list = Recipe: -cp14-workbench-no-resource = There aren't enough ingredients! \ No newline at end of file +cp14-workbench-cant-craft = Craft failed! \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/knowledge/skill-examined.ftl b/Resources/Locale/ru-RU/_CP14/knowledge/skill-examined.ftl new file mode 100644 index 0000000000..fb4d06be77 --- /dev/null +++ b/Resources/Locale/ru-RU/_CP14/knowledge/skill-examined.ftl @@ -0,0 +1,18 @@ +cp14-skill-label = [bold]Требования к навыкам[/bold] +cp14-skill-examined = Вам нужно владеть одним из следующих навыков, чтобы использовать {$item}: +cp14-skill-examined-need-all = Вам нужно владеть всеми следующими навыками, чтобы использовать {$item}: + +cp14-skill-examined-skill = [color={$color}] - {$skill} [/color] + +cp14-verb-categories-knowledge-add = Научить знаниям: +cp14-verb-categories-knowledge-remove = Удалить знания: +cp14-verb-categories-knowledge-learn = Изучить знания: +cp14-learned-new-knowledge = Вы изучили знания о [bold]"{$name}[/bold]"! +cp14-forgot-knowledge = Вы потеряли свои знания о [bold]"{$name}[/bold]"! + +cp14-cant-learn-knowledge-dependencies = + Вы не смогли понять {$target}... + Вам не хватает понимания: + +cp14-knowledge-book-pre-text = Здесь подробно описаны инструкции, объясняющие +cp14-knowledge-book-post-text = (Чтобы изучить эти знания, нажмите ПКМ по книге, и выберите "Изучить знания") \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/skills/skill-issues.ftl b/Resources/Locale/ru-RU/_CP14/knowledge/skill-issues.ftl similarity index 100% rename from Resources/Locale/ru-RU/_CP14/skills/skill-issues.ftl rename to Resources/Locale/ru-RU/_CP14/knowledge/skill-issues.ftl diff --git a/Resources/Locale/ru-RU/_CP14/knowledge/skill-meta.ftl b/Resources/Locale/ru-RU/_CP14/knowledge/skill-meta.ftl new file mode 100644 index 0000000000..ba3903b4d0 --- /dev/null +++ b/Resources/Locale/ru-RU/_CP14/knowledge/skill-meta.ftl @@ -0,0 +1,24 @@ +# T1 + +cp14-knowledge-sewing-name = Шитье одежды +cp14-knowledge-sewing-desc = как создавать простую одежду на ткацком станке + +cp14-knowledge-wallpaper-name = Изготовление обоев +cp14-knowledge-wallpaper-desc = как создавать обои на ткацком станке + +cp14-knowledge-woodwork-name = Работа по дереву +cp14-knowledge-woodwork-desc = как создавать простые предметы из дерева + +cp14-knowledge-metall-melting-name = Переплавка металлов +cp14-knowledge-metall-melting-desc = как переплавлять руду в ценные металлы + +cp14-knowledge-metall-forging-name = Ковка металлов +cp14-knowledge-metall-forging-desc = как перековывать металл в различные формы + +cp14-knowledge-glasswork-name = Работа с стеклом +cp14-knowledge-glasswork-desc = как работать со стеклом + +# T2 + +cp14-knowledge-sewing2-name = Продвинутое шитье одежды +cp14-knowledge-sewing2-desc = как создавать качественную одежду на ткацком станке \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/skills/skill-examined.ftl b/Resources/Locale/ru-RU/_CP14/skills/skill-examined.ftl deleted file mode 100644 index 7bcd2c4b17..0000000000 --- a/Resources/Locale/ru-RU/_CP14/skills/skill-examined.ftl +++ /dev/null @@ -1,5 +0,0 @@ -cp14-skill-label = [bold]Требования к навыкам[/bold] -cp14-skill-examined = Вам нужно владеть одним из следующих навыков, чтобы использовать {$item}: -cp14-skill-examined-need-all = Вам нужно владеть всеми следующими навыками, чтобы использовать {$item}: - -cp14-skill-examined-skill = [color={$color}] - {$skill} [/color] \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/skills/skill-meta.ftl b/Resources/Locale/ru-RU/_CP14/skills/skill-meta.ftl deleted file mode 100644 index 570bd95725..0000000000 --- a/Resources/Locale/ru-RU/_CP14/skills/skill-meta.ftl +++ /dev/null @@ -1,11 +0,0 @@ -cp14-skill-name-alchemy = Алхимия -cp14-skill-desc-alchemy = Вы достаточно опытны, чтобы уверенно пользоваться сложным алхимическим оборудованием. - -cp14-skill-name-blacksmith = Кузнечное дело -cp14-skill-desc-blacksmith = Вы знаете все тонкости работы с металлом. - -cp14-skill-name-warcraft = Владение воинским оружием -cp14-skill-desc-warcraft = Вы хорошо управляетесь с серьезным, воинским оружием. - -cp14-skill-name-firearms = Стрельба из огнестрела -cp14-skill-desc-firearms = Вы достаточно опытны, чтобы пользоваться огнестрельным оружием. \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/workbench/workbench.ftl b/Resources/Locale/ru-RU/_CP14/workbench/workbench.ftl index fe41725618..91ea87ecb1 100644 --- a/Resources/Locale/ru-RU/_CP14/workbench/workbench.ftl +++ b/Resources/Locale/ru-RU/_CP14/workbench/workbench.ftl @@ -3,4 +3,4 @@ cp14-workbench-ui-title = Создание предметов cp14-workbench-craft = Создать cp14-workbench-recipe-list = Рецепт: -cp14-workbench-no-resource = Не хватает ингредиентов! \ No newline at end of file +cp14-workbench-cant-craft = Крафт не удался! \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml index bc78432513..b547a47231 100644 --- a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml +++ b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml @@ -24,16 +24,6 @@ - !type:GroupSelector weight: 75 children: - - !type:GroupSelector - children: - - id: CP14SilverCoin1 - weight: 0.1 - - id: CP14CopperCoin - weight: 0.1 - - id: CP14CopperCoin5 - weight: 0.5 - - id: CP14CopperCoin1 - weight: 1 - !type:GroupSelector children: - id: CP14SpellScrollIceShards @@ -69,6 +59,10 @@ - id: CP14VialSmallBlueAmanita - id: CP14VialTinyChromiumSlime - id: CP14VialTinyLumiMushroom + - !type:GroupSelector + children: + - id: CP14BookKnowledgeClothingSewing + - id: CP14BookKnowledgeWallpaperCraft - id: CP14SilverCoin5 - id: CP14BaseLockpick - id: CP14EnergyCrystalMediumEmpty @@ -109,21 +103,15 @@ - !type:NestedSelector tableId: CP14TableDemiplaneLootT1 weight: 0.25 - # Coins - - !type:GroupSelector - children: - - id: CP14SilverCoin5 - weight: 0.1 - - id: CP14SilverCoin1 - weight: 0.3 - - id: CP14CopperCoin5 - weight: 0.5 - !type:GroupSelector children: - id: CP14SpellScrollShadowStep - id: CP14SpellScrollFireball - id: CP14SpellScrollBeerCreation weight: 0.2 + - !type:GroupSelector + children: + - id: CP14BookKnowledgeAdvancedClothingSewing - id: CP14EnergyCrystalMediumEmpty # Rare - !type:GroupSelector diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/skeleton.yml b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/skeleton.yml index 9cbf47660e..2c1f9b0a6f 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/skeleton.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/skeleton.yml @@ -11,10 +11,6 @@ - type: Loadout prototypes: - CP14MobSkeleton - - type: CP14SkillsStorage - - type: CP14AutoAddSkill - skills: - - Warcraft - type: entity id: CP14MobUndeadSkeletonCloset diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/Species/base.yml b/Resources/Prototypes/_CP14/Entities/Mobs/Species/base.yml index 983dda257c..d7edbce5bf 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/Species/base.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/Species/base.yml @@ -26,6 +26,7 @@ sprite: Mobs/Customization/masking_helpers.rsi state: unisex_full visible: false + - map: [ "shoes" ] - map: [ "shirt" ] - map: [ "pants" ] - map: [ "enum.HumanoidVisualLayers.LFoot" ] @@ -33,7 +34,6 @@ - map: [ "enum.HumanoidVisualLayers.LHand" ] - map: [ "enum.HumanoidVisualLayers.RHand" ] - map: [ "gloves" ] - - map: [ "shoes" ] - map: [ "ears" ] - map: [ "cloak" ] - map: [ "eyes" ] @@ -311,7 +311,7 @@ Asphyxiation: -1.0 - type: FireVisuals alternateState: Standing #TODO - custom visuals - - type: CP14SkillsStorage + - type: CP14KnowledgeStorage - type: entity save: false diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/Species/silva.yml b/Resources/Prototypes/_CP14/Entities/Mobs/Species/silva.yml index 1103f643f5..89a714086b 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/Species/silva.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/Species/silva.yml @@ -24,6 +24,7 @@ sprite: Mobs/Customization/masking_helpers.rsi state: unisex_full visible: false + - map: [ "shoes" ] - map: [ "shirt" ] - map: [ "pants" ] - map: [ "enum.HumanoidVisualLayers.LFoot" ] @@ -33,7 +34,6 @@ - map: [ "enum.HumanoidVisualLayers.HeadSide" ] # Bark Before clothing - map: [ "enum.HumanoidVisualLayers.HeadTop" ] # Bark Before clothing - map: [ "gloves" ] - - map: [ "shoes" ] - map: [ "ears" ] - map: [ "cloak" ] - map: [ "eyes" ] diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/Species/skeleton.yml b/Resources/Prototypes/_CP14/Entities/Mobs/Species/skeleton.yml index 34d3a5ed41..afcc280ef5 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/Species/skeleton.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/Species/skeleton.yml @@ -18,6 +18,7 @@ - map: [ "enum.HumanoidVisualLayers.LArm" ] - map: [ "enum.HumanoidVisualLayers.RLeg" ] - map: [ "enum.HumanoidVisualLayers.LLeg" ] + - map: [ "shoes" ] - map: [ "shirt" ] - map: [ "pants" ] - map: [ "enum.HumanoidVisualLayers.LFoot" ] @@ -25,7 +26,6 @@ - map: [ "enum.HumanoidVisualLayers.LHand" ] - map: [ "enum.HumanoidVisualLayers.RHand" ] - map: [ "gloves" ] - - map: [ "shoes" ] - map: [ "ears" ] - map: [ "cloak" ] - map: [ "eyes" ] diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/Species/zombie.yml b/Resources/Prototypes/_CP14/Entities/Mobs/Species/zombie.yml index 745aeb0cdf..f382633693 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/Species/zombie.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/Species/zombie.yml @@ -19,6 +19,7 @@ - map: [ "enum.HumanoidVisualLayers.LArm" ] - map: [ "enum.HumanoidVisualLayers.RLeg" ] - map: [ "enum.HumanoidVisualLayers.LLeg" ] + - map: [ "shoes" ] - map: [ "shirt" ] - map: [ "pants" ] - map: [ "enum.HumanoidVisualLayers.LFoot" ] @@ -26,7 +27,6 @@ - map: [ "enum.HumanoidVisualLayers.LHand" ] - map: [ "enum.HumanoidVisualLayers.RHand" ] - map: [ "gloves" ] - - map: [ "shoes" ] - map: [ "ears" ] - map: [ "cloak" ] - map: [ "eyes" ] diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Bureaucracy/knowledge_books.yml b/Resources/Prototypes/_CP14/Entities/Objects/Bureaucracy/knowledge_books.yml new file mode 100644 index 0000000000..912f8b4c38 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Objects/Bureaucracy/knowledge_books.yml @@ -0,0 +1,81 @@ +- type: entity + parent: BookRandom + id: CP14BookKnowledgeBase + abstract: true + categories: [ ForkFiltered ] + name: knowledge book + description: This book holds valuable knowledge that you can learn... if you're ready for it. + components: + - type: CP14KnowledgePaperText + +#TODO: Уникальный визуал каждой книжке + +# T0 + +- type: entity + parent: CP14BookKnowledgeBase + id: CP14BookKnowledgeWoodWork + suffix: Wood Work + components: + - type: CP14KnowledgeLearningSource + knowledges: + - WoodWork + +- type: entity + parent: CP14BookKnowledgeBase + id: CP14BookKnowledgeMetallMelting + suffix: Metall Melting + components: + - type: CP14KnowledgeLearningSource + knowledges: + - MetallMelting + +- type: entity + parent: CP14BookKnowledgeBase + id: CP14BookKnowledgeMetallForging + suffix: Metall Forging + components: + - type: CP14KnowledgeLearningSource + knowledges: + - MetallForging + +- type: entity + parent: CP14BookKnowledgeBase + id: CP14BookKnowledgeGlasswork + suffix: Glasswork + components: + - type: CP14KnowledgeLearningSource + knowledges: + - Glasswork + +# T1 + +- type: entity + parent: CP14BookKnowledgeBase + id: CP14BookKnowledgeClothingSewing + suffix: Clothing Sewing + components: + - type: CP14KnowledgeLearningSource + knowledges: + - ClothingSewing + +- type: entity + parent: CP14BookKnowledgeBase + id: CP14BookKnowledgeWallpaperCraft + suffix: Wallpaper Craft + components: + - type: CP14KnowledgeLearningSource + knowledges: + - WallpaperCraft + +# T2 + +- type: entity + parent: CP14BookKnowledgeBase + id: CP14BookKnowledgeAdvancedClothingSewing + suffix: Advanced Clothing Sewing + components: + - type: CP14KnowledgeLearningSource + knowledges: + - AdvancedClothingSewing + \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Alchemy/tools.yml b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Alchemy/tools.yml index 3e3cd857b3..d347a4b458 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Alchemy/tools.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Alchemy/tools.yml @@ -87,10 +87,6 @@ sprite: _CP14/Objects/Specific/Alchemy/mortar_pestle.rsi state: pestle - type: CP14Pestle - - type: CP14SkillRequirement - fuckupChance: 0.05 - requiredSkills: - - Alchemy - type: GuideHelp guides: - CP14_RU_Alchemy diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Tools/sharpening_stone.yml b/Resources/Prototypes/_CP14/Entities/Objects/Tools/sharpening_stone.yml index d3e92da4bf..34ef9613c2 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Tools/sharpening_stone.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Tools/sharpening_stone.yml @@ -25,9 +25,4 @@ - !type:DoActsBehavior acts: ["Destruction"] - type: CP14SharpeningStone - sharpnessHeal: 0.1 - - type: CP14SkillRequirement - fuckupChance: 0.6 - requiredSkills: - - Warcraft - - Blacksmith \ No newline at end of file + sharpnessHeal: 0.1 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/battleHammer.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/battleHammer.yml index c46bc213ce..97a8bc8070 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/battleHammer.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/battleHammer.yml @@ -49,10 +49,6 @@ - type: MeleeThrowOnHit lifetime: 0.05 speed: 5 - - type: CP14SkillRequirement - fuckupChance: 0.5 - requiredSkills: - - Warcraft - type: Tool qualities: - CP14Hammering diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Blacksmith/sharpening_stone.yml b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Blacksmith/sharpening_stone.yml index a90c83661b..696e9467ed 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Blacksmith/sharpening_stone.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Blacksmith/sharpening_stone.yml @@ -43,9 +43,4 @@ sharpnessHeal: 0.1 targetDamage: types: - blunt: 0.5 - - type: CP14SkillRequirement - fuckupChance: 0.5 - requiredSkills: - - Warcraft - - Blacksmith \ No newline at end of file + blunt: 0.5 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Knowledge/knowledges.yml b/Resources/Prototypes/_CP14/Knowledge/knowledges.yml new file mode 100644 index 0000000000..1524898127 --- /dev/null +++ b/Resources/Prototypes/_CP14/Knowledge/knowledges.yml @@ -0,0 +1,42 @@ +# T0 + +- type: CP14Knowledge + id: WoodWork + name: cp14-knowledge-woodwork-name + desc: cp14-knowledge-woodwork-desc + +- type: CP14Knowledge + id: MetallMelting + name: cp14-knowledge-metall-melting-name + desc: cp14-knowledge-metall-melting-desc + +- type: CP14Knowledge + id: MetallForging + name: cp14-knowledge-metall-forging-name + desc: cp14-knowledge-metall-forging-desc + +- type: CP14Knowledge + id: Glasswork + name: cp14-knowledge-glasswork-name + desc: cp14-knowledge-glasswork-desc + +# T1 + +- type: CP14Knowledge + id: ClothingSewing + name: cp14-knowledge-sewing-name + desc: cp14-knowledge-sewing-desc + +- type: CP14Knowledge + id: WallpaperCraft + name: cp14-knowledge-wallpaper-name + desc: cp14-knowledge-wallpaper-desc + +# T2 + +- type: CP14Knowledge + id: AdvancedClothingSewing + name: cp14-knowledge-sewing2-name + desc: cp14-knowledge-sewing2-desc + dependencies: + - ClothingSewing \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/ModularCraft/Blade/rapier.yml b/Resources/Prototypes/_CP14/ModularCraft/Blade/rapier.yml index 8631282876..cef7d29efa 100644 --- a/Resources/Prototypes/_CP14/ModularCraft/Blade/rapier.yml +++ b/Resources/Prototypes/_CP14/ModularCraft/Blade/rapier.yml @@ -12,10 +12,6 @@ - BaseWeaponSharp - !type:AddComponents components: - - type: CP14SkillRequirement - fuckupChance: 0.5 - requiredSkills: - - Warcraft - !type:EditMeleeWeapon newWideAnimation: CP14WeaponArcThrust resetOnHandSelected: true # Disable fast swap diff --git a/Resources/Prototypes/_CP14/ModularCraft/Blade/sword.yml b/Resources/Prototypes/_CP14/ModularCraft/Blade/sword.yml index 2393aebeb9..e2497c70fd 100644 --- a/Resources/Prototypes/_CP14/ModularCraft/Blade/sword.yml +++ b/Resources/Prototypes/_CP14/ModularCraft/Blade/sword.yml @@ -12,10 +12,6 @@ - BaseWeaponSharp - !type:AddComponents components: - - type: CP14SkillRequirement - fuckupChance: 0.3 - requiredSkills: - - Warcraft - !type:EditMeleeWeapon resetOnHandSelected: true # Disable fast swap bonusRange: 0.2 diff --git a/Resources/Prototypes/_CP14/Recipes/Workbench/anvil.yml b/Resources/Prototypes/_CP14/Recipes/Workbench/anvil.yml index 1713ed58bb..ec39360192 100644 --- a/Resources/Prototypes/_CP14/Recipes/Workbench/anvil.yml +++ b/Resources/Prototypes/_CP14/Recipes/Workbench/anvil.yml @@ -6,6 +6,7 @@ CP14WoodenPlanks: 2 CP14IronBar: 2 result: CP14BaseShield + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14BaseCrowbar @@ -14,6 +15,7 @@ stacks: CP14IronBar: 2 result: CP14BaseCrowbar + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14BaseWrench @@ -22,6 +24,7 @@ stacks: CP14IronBar: 2 result: CP14BaseWrench + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ClothingCloakCuirass @@ -30,6 +33,7 @@ stacks: CP14IronBar: 5 result: CP14ClothingCloakCuirass + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ClothingCloakInfantryCuirass @@ -38,6 +42,7 @@ stacks: CP14IronBar: 6 result: CP14ClothingCloakInfantryCuirass + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ClothingCloakCuirassLoincloth @@ -46,6 +51,7 @@ stacks: CP14IronBar: 6 result: CP14ClothingCloakCuirassLoincloth + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ClothingCloakCuirassLeg @@ -54,6 +60,7 @@ stacks: CP14IronBar: 7 result: CP14ClothingCloakCuirassLeg + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14Nail10 @@ -62,6 +69,7 @@ stacks: CP14IronBar: 2 result: CP14Nail10 + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14CrystalLampBlueEmpty @@ -71,6 +79,7 @@ CP14CopperBar: 2 CP14IronBar: 1 result: CP14CrystalLampBlueEmpty + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14CrystalLampOrangeEmpty @@ -80,6 +89,7 @@ CP14CopperBar: 2 CP14IronBar: 1 result: CP14CrystalLampOrangeEmpty + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14Scissors @@ -88,6 +98,7 @@ stacks: CP14IronBar: 1 result: CP14Scissors + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ClothingCloakBrassArmor @@ -96,6 +107,7 @@ stacks: CP14CopperBar: 6 result: CP14ClothingCloakBrassArmor + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14Crossbolt @@ -104,6 +116,7 @@ stacks: CP14CopperBar: 1 result: CP14Crossbolt + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14BaseLockpick @@ -112,6 +125,7 @@ stacks: CP14IronBar: 1 result: CP14BaseLockpick + knowledgeRequired: MetallForging # Dagger @@ -122,6 +136,7 @@ stacks: CP14IronBar: 1 result: CP14ModularBladeIronDagger + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeGoldDagger @@ -130,6 +145,7 @@ stacks: CP14GoldBar: 1 result: CP14ModularBladeGoldDagger + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeCopperDagger @@ -138,6 +154,7 @@ stacks: CP14CopperBar: 1 result: CP14ModularBladeCopperDagger + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeMithrilDagger @@ -146,6 +163,7 @@ stacks: CP14MithrilBar: 1 result: CP14ModularBladeMithrilDagger + knowledgeRequired: MetallForging # Spear @@ -156,6 +174,7 @@ stacks: CP14IronBar: 1 result: CP14ModularBladeIronSpear + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeCopperSpear @@ -164,6 +183,7 @@ stacks: CP14CopperBar: 1 result: CP14ModularBladeCopperSpear + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeGoldSpear @@ -172,6 +192,7 @@ stacks: CP14GoldBar: 1 result: CP14ModularBladeGoldSpear + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeMithrilSpear @@ -180,6 +201,7 @@ stacks: CP14MithrilBar: 1 result: CP14ModularBladeMithrilSpear + knowledgeRequired: MetallForging # Mace @@ -190,6 +212,7 @@ stacks: CP14IronBar: 1 result: CP14ModularBladeIronMace + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeGoldMace @@ -198,6 +221,7 @@ stacks: CP14GoldBar: 1 result: CP14ModularBladeGoldMace + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeCopperMace @@ -206,6 +230,7 @@ stacks: CP14CopperBar: 1 result: CP14ModularBladeCopperMace + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeMithrilMace @@ -214,6 +239,7 @@ stacks: CP14MithrilBar: 1 result: CP14ModularBladeMithrilMace + knowledgeRequired: MetallForging # Sword @@ -224,6 +250,7 @@ stacks: CP14IronBar: 2 result: CP14ModularBladeIronSword + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeGoldSword @@ -232,6 +259,7 @@ stacks: CP14GoldBar: 2 result: CP14ModularBladeGoldSword + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeCopperSword @@ -240,6 +268,7 @@ stacks: CP14CopperBar: 2 result: CP14ModularBladeCopperSword + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeMithrilSword @@ -248,6 +277,7 @@ stacks: CP14MithrilBar: 2 result: CP14ModularBladeMithrilSword + knowledgeRequired: MetallForging # Sickle @@ -258,6 +288,7 @@ stacks: CP14IronBar: 1 result: CP14ModularBladeIronSickle + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeCopperSickle @@ -266,6 +297,7 @@ stacks: CP14CopperBar: 1 result: CP14ModularBladeCopperSickle + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeGoldSickle @@ -274,6 +306,7 @@ stacks: CP14GoldBar: 1 result: CP14ModularBladeGoldSickle + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeMithrilSickle @@ -282,6 +315,7 @@ stacks: CP14MithrilBar: 1 result: CP14ModularBladeMithrilSickle + knowledgeRequired: MetallForging # Shovel @@ -292,6 +326,7 @@ stacks: CP14IronBar: 1 result: CP14ModularBladeIronShovel + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeGoldShovel @@ -300,6 +335,7 @@ stacks: CP14GoldBar: 1 result: CP14ModularBladeGoldShovel + knowledgeRequired: MetallForging - type: CP14Recipe @@ -309,6 +345,7 @@ stacks: CP14CopperBar: 1 result: CP14ModularBladeCopperShovel + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeMithrilShovel @@ -317,6 +354,7 @@ stacks: CP14MithrilBar: 1 result: CP14ModularBladeMithrilShovel + knowledgeRequired: MetallForging # Pickaxe @@ -327,6 +365,7 @@ stacks: CP14IronBar: 1 result: CP14ModularBladeIronPickaxe + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeGoldPickaxe @@ -335,6 +374,7 @@ stacks: CP14GoldBar: 2 result: CP14ModularBladeGoldPickaxe + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeCopperPickaxe @@ -343,6 +383,7 @@ stacks: CP14CopperBar: 2 result: CP14ModularBladeCopperPickaxe + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeMithrilPickaxe @@ -351,6 +392,7 @@ stacks: CP14MithrilBar: 1 result: CP14ModularBladeMithrilPickaxe + knowledgeRequired: MetallForging # Grip @@ -361,6 +403,7 @@ stacks: CP14IronBar: 1 result: CP14ModularGripIron + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularGripCopper @@ -369,6 +412,7 @@ stacks: CP14CopperBar: 1 result: CP14ModularGripCopper + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularGripGolden @@ -377,6 +421,7 @@ stacks: CP14GoldBar: 1 result: CP14ModularGripGolden + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularGripMithril @@ -385,6 +430,7 @@ stacks: CP14MithrilBar: 1 result: CP14ModularGripMithril + knowledgeRequired: MetallForging # Grip long @@ -395,6 +441,7 @@ stacks: CP14IronBar: 2 result: CP14ModularGripIronLong + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularGripCopperLong @@ -403,6 +450,7 @@ stacks: CP14CopperBar: 2 result: CP14ModularGripCopperLong + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularGripGoldLong @@ -411,6 +459,7 @@ stacks: CP14GoldBar: 2 result: CP14ModularGripGoldLong + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularGripMithrilLong @@ -419,6 +468,7 @@ stacks: CP14MithrilBar: 2 result: CP14ModularGripMithrilLong + knowledgeRequired: MetallForging # Rapier @@ -429,6 +479,7 @@ stacks: CP14IronBar: 1 result: CP14ModularBladeIronRapier + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeGoldRapier @@ -437,6 +488,7 @@ stacks: CP14GoldBar: 1 result: CP14ModularBladeGoldRapier + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeCopperRapier @@ -445,6 +497,7 @@ stacks: CP14CopperBar: 1 result: CP14ModularBladeCopperRapier + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeMithrilRapier @@ -453,6 +506,7 @@ stacks: CP14MithrilBar: 1 result: CP14ModularBladeMithrilRapier + knowledgeRequired: MetallForging # Axe @@ -463,6 +517,7 @@ stacks: CP14IronBar: 2 result: CP14ModularBladeIronAxe + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeCopperAxe @@ -471,6 +526,7 @@ stacks: CP14CopperBar: 2 result: CP14ModularBladeCopperAxe + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeGoldAxe @@ -479,6 +535,7 @@ stacks: CP14GoldBar: 2 result: CP14ModularBladeGoldAxe + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularBladeMithrilAxe @@ -487,6 +544,7 @@ stacks: CP14MithrilBar: 2 result: CP14ModularBladeMithrilAxe + knowledgeRequired: MetallForging # Sharp garde @@ -497,6 +555,7 @@ stacks: CP14CopperBar: 1 result: CP14ModularGardeSharpCopper + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularGardeSharpIron @@ -505,6 +564,7 @@ stacks: CP14IronBar: 1 result: CP14ModularGardeSharpIron + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularGardeSharpGold @@ -513,6 +573,7 @@ stacks: CP14GoldBar: 1 result: CP14ModularGardeSharpGold + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularGardeSharpMithril @@ -521,6 +582,7 @@ stacks: CP14MithrilBar: 1 result: CP14ModularGardeSharpMithril + knowledgeRequired: MetallForging # Sturdy garde @@ -531,6 +593,7 @@ stacks: CP14CopperBar: 1 result: CP14ModularGardeSturdyCopper + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularGardeSturdyIron @@ -539,6 +602,7 @@ stacks: CP14IronBar: 1 result: CP14ModularGardeSturdyIron + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularGardeSturdyGold @@ -547,6 +611,7 @@ stacks: CP14GoldBar: 1 result: CP14ModularGardeSturdyGold + knowledgeRequired: MetallForging - type: CP14Recipe id: CP14ModularGardeSturdyMithril @@ -554,4 +619,5 @@ craftTime: 4 stacks: CP14MithrilBar: 1 - result: CP14ModularGardeSturdyMithril \ No newline at end of file + result: CP14ModularGardeSturdyMithril + knowledgeRequired: MetallForging \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Recipes/Workbench/furnace.yml b/Resources/Prototypes/_CP14/Recipes/Workbench/furnace.yml index 45abfc53f0..996b7d91f5 100644 --- a/Resources/Prototypes/_CP14/Recipes/Workbench/furnace.yml +++ b/Resources/Prototypes/_CP14/Recipes/Workbench/furnace.yml @@ -5,6 +5,7 @@ entities: CP14OreCopper: 4 result: CP14CopperBar1 + knowledgeRequired: MetallMelting - type: CP14Recipe id: CP14IronBar1 @@ -13,6 +14,7 @@ entities: CP14OreIron: 4 result: CP14IronBar1 + knowledgeRequired: MetallMelting - type: CP14Recipe id: CP14GoldBar1 @@ -21,6 +23,7 @@ entities: CP14OreGold: 4 result: CP14GoldBar1 + knowledgeRequired: MetallMelting - type: CP14Recipe id: CP14MithrilBar1 @@ -29,6 +32,7 @@ entities: CP14OreMithril: 4 result: CP14MithrilBar1 + knowledgeRequired: MetallMelting - type: CP14Recipe id: CP14GlassSheet1 @@ -37,6 +41,7 @@ entities: CP14QuartzShard: 1 result: CP14GlassSheet1 + knowledgeRequired: Glasswork - type: CP14Recipe id: CP14GlassSheetShard1 @@ -45,6 +50,7 @@ entities: CP14GlassShard: 3 result: CP14GlassSheet1 + knowledgeRequired: Glasswork - type: CP14Recipe id: CP14VialTiny @@ -53,6 +59,7 @@ stacks: CP14GlassSheet: 1 result: CP14VialTiny + knowledgeRequired: Glasswork - type: CP14Recipe id: CP14VialTinyReinforced @@ -62,6 +69,7 @@ CP14CopperBar: 1 CP14GlassSheet: 1 result: CP14VialTinyReinforced + knowledgeRequired: Glasswork - type: CP14Recipe id: CP14VialSmall @@ -70,6 +78,7 @@ stacks: CP14GlassSheet: 2 result: CP14VialSmall + knowledgeRequired: Glasswork - type: CP14Recipe id: CP14VialSmallReinforced @@ -79,4 +88,5 @@ CP14CopperBar: 1 CP14GlassSheet: 2 result: CP14VialSmallReinforced + knowledgeRequired: Glasswork \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Recipes/Workbench/sewing_table.yml b/Resources/Prototypes/_CP14/Recipes/Workbench/sewing_table.yml index a8cbd4d706..afd3dfa5f6 100644 --- a/Resources/Prototypes/_CP14/Recipes/Workbench/sewing_table.yml +++ b/Resources/Prototypes/_CP14/Recipes/Workbench/sewing_table.yml @@ -8,6 +8,7 @@ stacks: CP14Cloth: 2 result: CP14ClothingShirtCottonBlue + knowledgeRequired: ClothingSewing - type: CP14Recipe id: CP14ClothingShirtCottonBlack @@ -19,6 +20,7 @@ stacks: CP14Cloth: 3 result: CP14ClothingShirtCottonBlack + knowledgeRequired: ClothingSewing - type: CP14Recipe id: CP14ClothingShirtCottonPurple @@ -30,6 +32,7 @@ stacks: CP14Cloth: 3 result: CP14ClothingShirtCottonPurple + knowledgeRequired: ClothingSewing - type: CP14Recipe id: CP14ClothingShirtCottonRed @@ -41,6 +44,7 @@ stacks: CP14Cloth: 3 result: CP14ClothingShirtCottonRed + knowledgeRequired: ClothingSewing - type: CP14Recipe id: CP14ClothingShirtCottonWhite @@ -51,6 +55,7 @@ stacks: CP14Cloth: 3 result: CP14ClothingShirtCottonWhite + knowledgeRequired: ClothingSewing - type: CP14Recipe id: CP14ClothingShirtCottonYellow @@ -62,6 +67,147 @@ stacks: CP14Cloth: 3 result: CP14ClothingShirtCottonYellow + knowledgeRequired: ClothingSewing + +- type: CP14Recipe + id: CP14ClothingPantsTrouserWhite + tag: CP14RecipeSewing + craftTime: 2 + entities: + CP14String: 1 + stacks: + CP14Cloth: 2 + result: CP14ClothingPantsTrouserWhite + knowledgeRequired: ClothingSewing + +- type: CP14Recipe + id: CP14ClothingPantsTrouserDarkBlue + tag: CP14RecipeSewing + craftTime: 2 + entities: + CP14String: 1 + CP14DyeBlue: 1 + stacks: + CP14Cloth: 2 + result: CP14ClothingPantsTrouserDarkBlue + knowledgeRequired: ClothingSewing + +- type: CP14Recipe + id: CP14ClothingPantsDressBlack + tag: CP14RecipeSewing + craftTime: 2 + entities: + CP14String: 1 + CP14DyeBlack: 1 + stacks: + CP14Cloth: 2 + result: CP14ClothingPantsDressBlack + knowledgeRequired: ClothingSewing + +- type: CP14Recipe + id: CP14ClothingPantsSouthernMagician + tag: CP14RecipeSewing + craftTime: 2 + entities: + CP14String: 1 + CP14DyeYellow: 1 + stacks: + CP14Cloth: 2 + result: CP14ClothingPantsSouthernMagician + knowledgeRequired: ClothingSewing + +- type: CP14Recipe + id: CP14ClothingHeadBeretRed + tag: CP14RecipeSewing + craftTime: 2 + entities: + CP14String: 1 + CP14DyeRed: 1 + stacks: + CP14Cloth: 1 + result: CP14ClothingHeadBeretRed + knowledgeRequired: ClothingSewing + +- type: CP14Recipe + id: CP14ClothingHeadBeretPurple + tag: CP14RecipeSewing + craftTime: 2 + entities: + CP14String: 1 + CP14DyePurple: 1 + stacks: + CP14Cloth: 1 + result: CP14ClothingHeadBeretPurple + knowledgeRequired: ClothingSewing + +- type: CP14Recipe + id: CP14ClothingHeadBeretYellow + tag: CP14RecipeSewing + craftTime: 2 + entities: + CP14String: 1 + CP14DyeYellow: 1 + stacks: + CP14Cloth: 1 + result: CP14ClothingHeadBeretYellow + knowledgeRequired: ClothingSewing + +- type: CP14Recipe + id: CP14ClothingHeadBeretBlue + tag: CP14RecipeSewing + craftTime: 2 + entities: + CP14String: 1 + CP14DyeBlue: 1 + stacks: + CP14Cloth: 1 + result: CP14ClothingHeadBeretBlue + knowledgeRequired: ClothingSewing + +- type: CP14Recipe + id: CP14ClothingHeadBeretBlack + tag: CP14RecipeSewing + craftTime: 2 + entities: + CP14String: 1 + CP14DyeBlack: 1 + stacks: + CP14Cloth: 1 + result: CP14ClothingHeadBeretBlack + knowledgeRequired: ClothingSewing + +- type: CP14Recipe + id: CP14ClothingHeadBandanaWhite + tag: CP14RecipeSewing + craftTime: 2 + entities: + CP14String: 1 + stacks: + CP14Cloth: 2 + result: CP14ClothingHeadBandanaWhite + knowledgeRequired: ClothingSewing + +- type: CP14Recipe + id: CP14ClothingHeadBandanaYellow + tag: CP14RecipeSewing + craftTime: 2 + entities: + CP14String: 1 + CP14DyeYellow: 1 + stacks: + CP14Cloth: 2 + result: CP14ClothingHeadBandanaYellow + knowledgeRequired: ClothingSewing + +- type: CP14Recipe + id: CP14ClothingHeadWreath + tag: CP14RecipeSewing + craftTime: 2 + entities: + CP14BloodFlower: 2 + CP14Dayflin: 2 + result: CP14ClothingHeadWreath + knowledgeRequired: ClothingSewing - type: CP14Recipe id: CP14ClothingShirtMercenary @@ -74,6 +220,7 @@ stacks: CP14Cloth: 3 result: CP14ClothingShirtMercenary + knowledgeRequired: AdvancedClothingSewing - type: CP14Recipe id: CP14ClothingShirtYellowWizard @@ -87,137 +234,7 @@ stacks: CP14Cloth: 3 result: CP14ClothingShirtYellowWizard - -- type: CP14Recipe - id: CP14ClothingPantsTrouserWhite - tag: CP14RecipeSewing - craftTime: 2 - entities: - CP14String: 1 - stacks: - CP14Cloth: 2 - result: CP14ClothingPantsTrouserWhite - -- type: CP14Recipe - id: CP14ClothingPantsTrouserDarkBlue - tag: CP14RecipeSewing - craftTime: 2 - entities: - CP14String: 1 - CP14DyeBlue: 1 - stacks: - CP14Cloth: 2 - result: CP14ClothingPantsTrouserDarkBlue - -- type: CP14Recipe - id: CP14ClothingPantsDressBlack - tag: CP14RecipeSewing - craftTime: 2 - entities: - CP14String: 1 - CP14DyeBlack: 1 - stacks: - CP14Cloth: 2 - result: CP14ClothingPantsDressBlack - -- type: CP14Recipe - id: CP14ClothingPantsSouthernMagician - tag: CP14RecipeSewing - craftTime: 2 - entities: - CP14String: 1 - CP14DyeYellow: 1 - stacks: - CP14Cloth: 2 - result: CP14ClothingPantsSouthernMagician - -- type: CP14Recipe - id: CP14ClothingPantsMercenaryTrousers - tag: CP14RecipeSewing - craftTime: 2 - entities: - CP14String: 1 - CP14DyeBlue: 1 - CP14DyeRed: 1 - stacks: - CP14Cloth: 2 - result: CP14ClothingPantsMercenaryTrousers - -- type: CP14Recipe - id: CP14ClothingHeadBeretRed - tag: CP14RecipeSewing - craftTime: 2 - entities: - CP14String: 1 - CP14DyeRed: 1 - stacks: - CP14Cloth: 1 - result: CP14ClothingHeadBeretRed - -- type: CP14Recipe - id: CP14ClothingHeadBeretPurple - tag: CP14RecipeSewing - craftTime: 2 - entities: - CP14String: 1 - CP14DyePurple: 1 - stacks: - CP14Cloth: 1 - result: CP14ClothingHeadBeretPurple - -- type: CP14Recipe - id: CP14ClothingHeadBeretYellow - tag: CP14RecipeSewing - craftTime: 2 - entities: - CP14String: 1 - CP14DyeYellow: 1 - stacks: - CP14Cloth: 1 - result: CP14ClothingHeadBeretYellow - -- type: CP14Recipe - id: CP14ClothingHeadBeretBlue - tag: CP14RecipeSewing - craftTime: 2 - entities: - CP14String: 1 - CP14DyeBlue: 1 - stacks: - CP14Cloth: 1 - result: CP14ClothingHeadBeretBlue - -- type: CP14Recipe - id: CP14ClothingHeadBeretBlack - tag: CP14RecipeSewing - craftTime: 2 - entities: - CP14String: 1 - CP14DyeBlack: 1 - stacks: - CP14Cloth: 1 - result: CP14ClothingHeadBeretBlack - -- type: CP14Recipe - id: CP14ClothingHeadBandanaWhite - tag: CP14RecipeSewing - craftTime: 2 - entities: - CP14String: 1 - stacks: - CP14Cloth: 2 - result: CP14ClothingHeadBandanaWhite - -- type: CP14Recipe - id: CP14ClothingHeadBandanaYellow - tag: CP14RecipeSewing - craftTime: 2 - entities: - CP14String: 1 - CP14DyeYellow: 1 - stacks: - CP14Cloth: 2 - result: CP14ClothingHeadBandanaYellow + knowledgeRequired: AdvancedClothingSewing - type: CP14Recipe id: CP14ClothingHeadBeretMercenary @@ -230,15 +247,20 @@ stacks: CP14Cloth: 2 result: CP14ClothingHeadBeretMercenary + knowledgeRequired: AdvancedClothingSewing - type: CP14Recipe - id: CP14ClothingHeadWreath + id: CP14ClothingPantsMercenaryTrousers tag: CP14RecipeSewing craftTime: 2 entities: - CP14BloodFlower: 2 - CP14Dayflin: 2 - result: CP14ClothingHeadWreath + CP14String: 1 + CP14DyeBlue: 1 + CP14DyeRed: 1 + stacks: + CP14Cloth: 2 + result: CP14ClothingPantsMercenaryTrousers + knowledgeRequired: AdvancedClothingSewing # Wallpaper (TODO: Move to separate workbench?) @@ -251,6 +273,7 @@ entities: CP14DyeBlack: 1 result: CP14WallpaperBlack + knowledgeRequired: WallpaperCraft - type: CP14Recipe id: CP14WallpaperGreen @@ -261,6 +284,7 @@ entities: CP14DyeGreen: 1 result: CP14WallpaperGreen + knowledgeRequired: WallpaperCraft - type: CP14Recipe id: CP14WallpaperPurple @@ -271,6 +295,7 @@ entities: CP14DyePurple: 1 result: CP14WallpaperPurple + knowledgeRequired: WallpaperCraft - type: CP14Recipe id: CP14WallpaperRed @@ -281,6 +306,7 @@ entities: CP14DyeRed: 1 result: CP14WallpaperRed + knowledgeRequired: WallpaperCraft - type: CP14Recipe id: CP14WallpaperWhite @@ -289,6 +315,7 @@ stacks: CP14Cloth: 10 result: CP14WallpaperWhite + knowledgeRequired: WallpaperCraft - type: CP14Recipe id: CP14WallpaperWhite2 @@ -297,6 +324,7 @@ stacks: CP14Cloth: 10 result: CP14WallpaperWhite2 + knowledgeRequired: WallpaperCraft - type: CP14Recipe id: CP14WallpaperYellow @@ -307,6 +335,7 @@ entities: CP14DyeYellow: 1 result: CP14WallpaperYellow + knowledgeRequired: WallpaperCraft - type: CP14Recipe id: CP14CrayonBlack @@ -360,4 +389,4 @@ entities: CP14CrayonWhite: 1 CP14DyePurple: 1 - result: CP14CrayonPurple + result: CP14CrayonPurple \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Recipes/Workbench/workbench.yml b/Resources/Prototypes/_CP14/Recipes/Workbench/workbench.yml index 22570efc1f..43440c13af 100644 --- a/Resources/Prototypes/_CP14/Recipes/Workbench/workbench.yml +++ b/Resources/Prototypes/_CP14/Recipes/Workbench/workbench.yml @@ -7,6 +7,7 @@ stacks: CP14WoodenPlanks: 3 result: CP14Bucket + knowledgeRequired: WoodWork - type: CP14Recipe id: CP14WoodenBeerMug @@ -16,6 +17,7 @@ CP14WoodenPlanks: 2 CP14Nail: 1 result: CP14WoodenBeerMug + knowledgeRequired: WoodWork - type: CP14Recipe id: CP14PlateWooden @@ -24,6 +26,7 @@ stacks: CP14WoodenPlanks: 2 result: CP14PlateWooden + knowledgeRequired: WoodWork - type: CP14Recipe id: CP14BaseMop @@ -33,6 +36,7 @@ CP14WoodenPlanks: 2 CP14Cloth: 1 result: CP14BaseMop + knowledgeRequired: WoodWork - type: CP14Recipe id: CP14Torch @@ -59,6 +63,7 @@ stacks: CP14WoodenPlanks: 1 result: CP14ModularGripWooden + knowledgeRequired: WoodWork - type: CP14Recipe id: CP14ModularGripWoodenLong @@ -67,6 +72,7 @@ stacks: CP14WoodenPlanks: 2 result: CP14ModularGripWoodenLong + knowledgeRequired: WoodWork - type: CP14Recipe id: CP14ModularGripLucens @@ -75,6 +81,7 @@ stacks: CP14LucensWoodenPlanks: 1 result: CP14ModularGripLucens + knowledgeRequired: WoodWork - type: CP14Recipe id: CP14ModularGripLucensLong @@ -83,3 +90,4 @@ stacks: CP14LucensWoodenPlanks: 2 result: CP14ModularGripLucensLong + knowledgeRequired: WoodWork diff --git a/Resources/Prototypes/_CP14/Roles/Jobs/Guard/guard.yml b/Resources/Prototypes/_CP14/Roles/Jobs/Guard/guard.yml index d8a6454b14..e5a327698d 100644 --- a/Resources/Prototypes/_CP14/Roles/Jobs/Guard/guard.yml +++ b/Resources/Prototypes/_CP14/Roles/Jobs/Guard/guard.yml @@ -6,10 +6,6 @@ startingGear: CP14GuardGear icon: "CP14JobIconGuard" supervisors: cp14-job-supervisors-guard-commander - special: - - !type:CP14AddSkillSpecial - skills: - - Warcraft - type: startingGear id: CP14GuardGear diff --git a/Resources/Prototypes/_CP14/Roles/Jobs/Guard/guard_commander.yml b/Resources/Prototypes/_CP14/Roles/Jobs/Guard/guard_commander.yml index d2f39c3bed..a6826747f1 100644 --- a/Resources/Prototypes/_CP14/Roles/Jobs/Guard/guard_commander.yml +++ b/Resources/Prototypes/_CP14/Roles/Jobs/Guard/guard_commander.yml @@ -11,10 +11,6 @@ supervisors: cp14-job-supervisors-command weight: 2 setPreference: true - special: - - !type:CP14AddSkillSpecial - skills: - - Warcraft - type: startingGear id: CP14GuardCommanderGear diff --git a/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/adventurer.yml b/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/adventurer.yml index df004b947b..2b59a510e8 100644 --- a/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/adventurer.yml +++ b/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/adventurer.yml @@ -7,9 +7,9 @@ icon: "CP14JobIconAdventurer" supervisors: cp14-job-supervisors-command special: - - !type:CP14AddSkillSpecial - skills: - - Warcraft + - !type:CP14AddKnowledgeSpecial + knowledge: + - WoodWork - type: startingGear id: CP14AdventurerGear diff --git a/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/alchemist.yml b/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/alchemist.yml index 1d22798099..2fa89d4f4e 100644 --- a/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/alchemist.yml +++ b/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/alchemist.yml @@ -7,9 +7,9 @@ icon: "CP14JobIconAlchemist" supervisors: cp14-job-supervisors-command special: - - !type:CP14AddSkillSpecial - skills: - - Alchemy + - !type:CP14AddKnowledgeSpecial + knowledge: + - WoodWork - type: startingGear id: CP14AlchemistGear diff --git a/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/apprentice.yml b/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/apprentice.yml index 51bf92b2b1..d348f823a1 100644 --- a/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/apprentice.yml +++ b/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/apprentice.yml @@ -6,6 +6,10 @@ startingGear: CP14ApprenticeGear icon: "CP14JobIconApprentice" supervisors: cp14-job-supervisors-command + special: + - !type:CP14AddKnowledgeSpecial + knowledge: + - WoodWork - type: startingGear id: CP14ApprenticeGear diff --git a/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/blacksmith.yml b/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/blacksmith.yml index aef1ba29f8..58cf1cc829 100644 --- a/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/blacksmith.yml +++ b/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/blacksmith.yml @@ -7,9 +7,12 @@ icon: "CP14JobIconBlacksmith" supervisors: cp14-job-supervisors-command special: - - !type:CP14AddSkillSpecial - skills: - - Blacksmith + - !type:CP14AddKnowledgeSpecial + knowledge: + - WoodWork + - MetallMelting + - MetallForging + - Glasswork - type: startingGear id: CP14BlacksmithGear diff --git a/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/innkeeper.yml b/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/innkeeper.yml index a5aa1ad380..ea5e58fac9 100644 --- a/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/innkeeper.yml +++ b/Resources/Prototypes/_CP14/Roles/Jobs/Mercenary/innkeeper.yml @@ -6,6 +6,10 @@ startingGear: CP14InnkeeperGear icon: "CP14JobIconInnkeeper" supervisors: cp14-job-supervisors-command + special: + - !type:CP14AddKnowledgeSpecial + knowledge: + - WoodWork - type: startingGear id: CP14InnkeeperGear diff --git a/Resources/Prototypes/_CP14/Skills/skills.yml b/Resources/Prototypes/_CP14/Skills/skills.yml deleted file mode 100644 index 1041e934ec..0000000000 --- a/Resources/Prototypes/_CP14/Skills/skills.yml +++ /dev/null @@ -1,19 +0,0 @@ -- type: CP14Skill - id: Alchemy - name: cp14-skill-name-alchemy - desc: cp14-skill-desc-alchemy - -- type: CP14Skill - id: Blacksmith - name: cp14-skill-name-blacksmith - desc: cp14-skill-desc-blacksmith - -- type: CP14Skill - id: Warcraft - name: cp14-skill-name-warcraft - desc: cp14-skill-desc-warcraft - -- type: CP14Skill - id: Firearms - name: cp14-skill-name-firearms - desc: cp14-skill-desc-firearms \ No newline at end of file