Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
QuestSupplyCat.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using System.Linq;
3using Newtonsoft.Json;
4
6{
7 [JsonProperty]
8 public string idCat;
9
11
12 public override string RefDrama2 => Cat.GetName();
13
14 public override string NameDeliver => Cat.GetName();
15
16 public override bool IsDestThing(Thing t)
17 {
18 if (!t.c_isImportant && !t.isEquipped && t.category.IsChildOf(idCat))
19 {
20 return t.things.Count == 0;
21 }
22 return false;
23 }
24
25 public override void SetIdThing()
26 {
27 List<SourceCategory.Row> list = EClass.sources.categories.rows.Where((SourceCategory.Row c) => c._parent == "meal").ToList();
28 idCat = list.RandomItem().id;
29 }
30
31 public override string GetTextProgress()
32 {
33 string @ref = ((GetDestThing() != null) ? "supplyInInv".lang().TagColor(FontColor.Good) : "supplyNotInInv".lang());
34 return "progressSupply".lang(Cat.GetName() + Lang.space + TextExtra2.IsEmpty(""), @ref);
35 }
36}
FontColor
Definition: FontColor.cs:2
bool c_isImportant
Definition: Card.cs:984
SourceCategory.Row category
Definition: Card.cs:1925
Definition: EClass.cs:5
static SourceManager sources
Definition: EClass.cs:42
override Thing GetDestThing()
override string NameDeliver
override bool IsDestThing(Thing t)
override void SetIdThing()
override string RefDrama2
SourceCategory.Row Cat
override string GetTextProgress()
override string TextExtra2
Definition: QuestSupply.cs:4
SourceCategory categories
Definition: Thing.cs:8
bool isEquipped
Definition: Thing.cs:17