private void OnPlayerDisconnected(BasePlayer player, string reason) { if (!configData.Options.damageSleepers) { AcidRads c = player.gameObject.GetComponent <AcidRads>(); if (c != null) { UnityEngine.Object.Destroy(c); } } }
private void AddRadComponent(BasePlayer player) { if (player.gameObject.GetComponent <AcidRads>()) { UnityEngine.Object.Destroy(player.gameObject.GetComponent <AcidRads>()); } AcidRads c = player.gameObject.AddComponent <AcidRads>(); c.Options = new Options { lolevelbump = configData.Options.lolevelbump, lopoisonbump = configData.Options.lopoisonbump, hilevelbump = configData.Options.hilevelbump, hipoisonbump = configData.Options.hipoisonbump, notifyTimer = configData.Options.notifyTimer }; }