10 public override InvOwnerDraglet.ProcessType processType
20 public override string langTransfer
36 public override bool ShouldShowGuide(
Thing t)
38 return t.c_DNA !=
null && this.tg.feat >= t.c_DNA.cost;
42 public override void _OnProcess(
Thing t)
44 DNA.Type type = t.c_DNA.type;
45 if (type !=
DNA.Type.Inferior &&
this.tg.c_genes !=
null &&
this.tg.c_genes.items.Count >=
this.tg.MaxGene)
48 Msg.Say(
"tooManyGene", this.tg,
null,
null,
null);
51 if (type ==
DNA.Type.Brain)
53 if (this.tg.c_genes ==
null)
57 using (List<DNA>.Enumerator enumerator = this.tg.c_genes.items.GetEnumerator())
59 while (enumerator.MoveNext())
61 if (enumerator.Current.type ==
DNA.Type.Brain)
64 Msg.Say(
"invalidGeneBrain", this.tg,
null,
null,
null);
71 Element invalidFeat = t.c_DNA.GetInvalidFeat(this.tg);
72 if (invalidFeat !=
null)
75 Msg.Say(
"invalidGeneFeat", this.tg, invalidFeat.Name.ToTitleCase(
false),
null,
null);
78 Element invalidAction = t.c_DNA.GetInvalidAction(this.tg);
79 if (invalidAction !=
null)
82 Msg.Say(
"invalidGeneAction", this.tg, invalidAction.Name.ToTitleCase(
false),
null,
null);
87 this.tg.PlayEffect(
"identify",
true, 0f,
default(Vector3));
88 Msg.Say(
"gene_modify", this.tg, t,
null,
null);
92 condition.duration = t.c_DNA.GetDurationHour();
93 condition.dateFinish =
EClass.world.date.GetRaw(condition.duration);