Elin Decompiled Documentation EA 23.345.1 Nightly
Loading...
Searching...
No Matches
TraitGeneratorHamster.cs
Go to the documentation of this file.
2{
3 public override bool UseExtra => owner.isOn;
4
5 public override bool IsAnimeOn => owner.isOn;
6
7 public override string IdSoundToggleOn => "switch_on_spin";
8
9 public override string IdSoundToggleOff => "switch_off_spin";
10
11 public override ToggleType ToggleType => ToggleType.Custom;
12
13 public override bool IsOn => owner.isOn;
14
15 public override bool Waterproof => true;
16
17 public override bool CanUse(Chara c)
18 {
19 return owner.IsInstalled;
20 }
21
22 public override bool OnUse(Chara c)
23 {
25 return true;
26 }
27
28 public override void OnDie()
29 {
31 {
32 Chara c = EClass._zone.SpawnMob(owner.pos.GetNearestPoint(allowBlock: false, allowChara: false), new SpawnSetting
33 {
34 id = "hamster"
35 });
36 Msg.Say("package_chara", c, owner);
37 }
38 }
39}
ToggleType
Definition: ToggleType.cs:2
Point pos
Definition: Card.cs:60
bool IsInstalled
Definition: Card.cs:2451
bool isOn
Definition: Card.cs:545
Definition: Chara.cs:10
Definition: EClass.cs:6
static Zone _zone
Definition: EClass.cs:21
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int minRadius=0)
Definition: Point.cs:624
virtual bool IsRegion
Definition: Spatial.cs:515
override bool OnUse(Chara c)
override string IdSoundToggleOn
override string IdSoundToggleOff
override bool CanUse(Chara c)
virtual void Toggle(bool on, bool silent=false)
Definition: Trait.cs:1355
Card owner
Definition: Trait.cs:28
Chara SpawnMob(string id, Point pos=null)
Definition: Zone.cs:2979