14 return RefZone.Get(this.owner.refVal);
18 this.owner.refVal = ((value !=
null) ? value.uid : 0);
24 public override bool IsTool
33 public override void TrySetHeldAct(
ActPlan p)
35 if (
EClass._zone.GetTopZone() !=
this.zone)
39 p.pos.Things.ForEach(delegate(
Thing t)
41 if (!t.IsInstalled || !t.isNPCProperty || !t.trait.CanBeHeld || t.trait.IsDoor || t.isMasked || t.source.value == 0)
49 int price = this.GetPrice(t) * t.Num;
50 p.TrySetAct(
"actCollectFurniture".lang(price.ToString() ??
"", t.Name,
null,
null,
null) + ((t.category.ticket >= 10) ?
"ticketNotIntended".lang() :
""), delegate()
52 if (this.owner.Num < price)
54 Msg.Say(
"notEnoughTicket");
58 this.owner.ModNum(-price,
true);
59 t.isNPCProperty =
false;
64 EClass.pc.Pick(t,
true,
true);
71 public int GetPrice(
Thing t)
73 int num = (t.GetPrice(CurrencyType.Money,
false, PriceType.Default,
null) / 500 + 1) * t.category.ticket;
80 num = Mathf.Max(num +
EClass.player.little_dead -
EClass.player.little_saved / 5, num);
86 public override void SetName(ref
string s)
88 if (this.zone !=
null)
90 s =
"_of".lang(this.zone.Name, s,
null,
null,
null);
95 public static void SetZone(
Zone zone,
Thing t)
102 num = zone.GetTopZone().uid;
104 if (zone.IsPCFaction)
106 num =
EClass.game.spatials.Find(
"mysilia").uid;
111 num =
EClass.game.spatials.Find(
"palmia").uid;