Knowledge system (#770)
* remove all requirements * clean up and renaming to knowledge * update code * add admin knowledge verbs * move shoes under pants * knowledge based recipes * clean up * sewing knowledges * knowledge dependencies * knowledge learning objects * more knowledge * metallforging skill * knowledge books * start knowledges, T1 and T2 books in demiplanes * remove coins from demiplanes * roundstart knowledge
This commit is contained in:
@@ -20,7 +20,7 @@ public sealed partial class CP14WorkbenchSystem
|
||||
StartCraft(entity, args.Actor, prototype);
|
||||
}
|
||||
|
||||
private void UpdateUIRecipes(Entity<CP14WorkbenchComponent> entity)
|
||||
private void UpdateUIRecipes(Entity<CP14WorkbenchComponent> 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user