protected override void OnAddonAwake() { singleton = this; CharacterContextProbeTrait trait = base.GetTrait <CharacterContextProbeTrait>(); this.raycastLength = trait.rayLength; }
protected override void OnControlEngauge() { base.OnControlEngauge(); if (base.localControlled) { CameraMount componentInChildren = base.GetComponentInChildren <CameraMount>(); if (componentInChildren != null) { componentInChildren.open = true; } this.contextProbe = (this.contextProbe == null) ? base.AddAddon <ContextProbe>() : this.contextProbe; this.localRadiation = (this.localRadiation == null) ? base.AddAddon <LocalRadiationEffect>() : this.localRadiation; if (this.onceEngaged) { if (this.proxyTest != null) { this.proxyTest.treatAsProxy = false; } } else { this.proxyTest = base.GetComponent <PlayerProxyTest>(); this.onceEngaged = true; } base.enabled = true; } }
protected override void OnWillRemoveAddon() { if (singleton == this) { singleton = null; } this.hasHighlight = false; this.lastUseHighlight = null; }
protected override void OnWillRemoveAddon() { if (ContextProbe.singleton == this) { ContextProbe.singleton = null; } this.hasHighlight = false; this.lastUseHighlight = null; }
protected override void OnAddonAwake() { ContextProbe.singleton = this; this.raycastLength = base.GetTrait<CharacterContextProbeTrait>().rayLength; }
protected override void OnControlEngauge() { base.OnControlEngauge(); if (base.localControlled) { CameraMount componentInChildren = base.GetComponentInChildren<CameraMount>(); if (componentInChildren) { componentInChildren.open = true; } this.contextProbe = (!this.contextProbe ? base.AddAddon<ContextProbe>() : this.contextProbe); this.localRadiation = (!this.localRadiation ? base.AddAddon<LocalRadiationEffect>() : this.localRadiation); if (!this.onceEngaged) { this.proxyTest = base.GetComponent<PlayerProxyTest>(); this.onceEngaged = true; } else if (this.proxyTest) { this.proxyTest.treatAsProxy = false; } base.enabled = true; } }