8 public override bool CanStack
22 return EClass.core.refs.invStyle[this.IDInvStyle];
27 public override void TrySetHeldAct(
ActPlan p)
36 public override void TrySetAct(
ActPlan p)
38 if (this.owner.c_lockLv > 0)
42 target = this.owner.Thing
46 if (!this.CanOpenContainer)
50 if (this.owner.GetRootCard() ==
EClass.pc &&
this.owner.parentCard !=
null && !
this.owner.parentCard.IsPC && !(
this.owner.parentCard.trait is
TraitToolBelt))
54 p.TrySetAct(
"actContainer", delegate()
58 }, this.owner, CursorSystem.Container, 1, this.ShowOpenActAsCrime,
true,
false);
64 if (this.owner.c_lockLv == 0)
69 if (this.owner.GetRootCard() ==
EClass.pc &&
EClass.pc.HasNoGoal &&
EClass.ui.layers.Count == 0)
73 target = this.owner.Thing
75 EClass.player.EndTurn(
true);
82 public virtual void Open()
87 this.owner.c_idRefCard =
null;
88 EClass._zone.AddCard(chara, (this.owner.ExistsOnMap ?
this.owner.pos :
EClass.pc.pos).GetNearestPoint(
false,
false,
true,
false));
89 this.owner.things.DestroyAll(
null);
90 Msg.Say(
"package_chara", chara, this.owner,
null,
null);
95 if (this.InvStyle.sound !=
null)
97 this.InvStyle.sound.Play();
105 public override void OnSetCardGrid(
ButtonGrid b)
109 b.Attach(
"open",
false);