13 [
Serialize(
"",
IsPropertySaveable.Yes, description:
"Tag of the character who must fabricate the item. If empty, it doesn't matter who fabricates it.")]
34 DebugConsole.ThrowError($
"Error in event \"{ParentEvent.Prefab.Identifier}\". {nameof(WaitForItemFabricatedAction)} does't define either a tag or an identifier of the item to check.",
39 var fabricator = item.GetComponent<
Fabricator>();
40 if (fabricator !=
null)
49 if (item ==
null) {
return; }
77 return $
"{ToolBox.GetDebugSymbol(counter >= Amount)} {nameof(WaitForItemFabricatedAction)} -> ({ItemTag}, {counter}/{Amount})";
ContentPackage? ContentPackage
readonly ScriptedEvent ParentEvent
bool HasTag(Identifier tag)
static readonly List< Item > ItemList
Action< Item, Character > OnItemFabricated
readonly Identifier Identifier
void AddTarget(Identifier tag, Entity target)
IEnumerable< Entity > GetTargets(Identifier tag)
Waits for some item(s) to be fabricated before continuing the execution of the event.
override string ToDebugString()
Rich test to display in debugdraw
Identifier ApplyTagToItem
Identifier ItemIdentifier
WaitForItemFabricatedAction(ScriptedEvent parentEvent, ContentXElement element)
void OnItemFabricated(Item item, Character character)
override bool IsFinished(ref string goTo)
Has the action finished.