8 public override string IdNoRestock
12 return this.owner.id +
"_" + this.ID;
22 return this.owner.GetStr(53,
null);
28 public override bool CanBeShipped
38 public override bool CanBeDestroyed
57 public override void OnCreate(
int lv)
59 this.owner.SetStr(53,
RecipeManager.GetRandomRecipe(lv,
null,
false));
63 public override void OnRead(
Chara c)
65 EClass.player.recipes.Add(this.recipe.id,
true);
66 this.owner.ModNum(-1,
true);
70 public override void SetName(ref
string s)
72 int num =
EClass.player.recipes.knownRecipes.TryGetValue(this.ID, 0);
73 s =
"_recipe".lang(this.recipe.Name.ToTitleCase(
false), s,
null,
null,
null) + ((num == 0) ?
"" :
"recipe_learnt".lang(num.ToString() ??
"",
null,
null,
null,
null));
77 public override bool CanStackTo(
Thing to)
79 return this.ID == to.GetStr(53,
null);
83 public override void WriteNote(UINote n,
bool identified)
85 if (this.recipe.NeedFactory)
87 n.AddText(
"isCraftedAt".lang(this.recipe.NameFactory.ToTitleCase(
true),
null,
null,
null,
null), FontColor.DontChange);
92 public override int GetValue()
94 return this.owner.sourceCard.value * (100 + this.recipe.row.LV * 15) / 100;