public override void OnAttacked(HitInfo info) { if (IsTooHot() && info.WeaponPrefab is BaseMelee) { if (info.Initiator is BasePlayer) { HitInfo hitInfo = new HitInfo(); hitInfo.damageTypes.Add(DamageType.Heat, 5f); hitInfo.DoHitEffects = true; hitInfo.DidHit = true; hitInfo.HitBone = 0u; hitInfo.Initiator = this; hitInfo.PointStart = base.transform.position; Effect.server.Run("assets/bundled/prefabs/fx/impacts/additive/fire.prefab", info.Initiator, 0u, new Vector3(0f, 1f, 0f), Vector3.up); } } else { if ((bool)resourceDispenser) { resourceDispenser.OnAttacked(info); } base.OnAttacked(info); } }
public override void OnAttacked(HitInfo info) { if (base.isServer) { ResetRemovalTime(); if ((bool)resourceDispenser) { resourceDispenser.OnAttacked(info); } if (!info.DidGather) { base.OnAttacked(info); } } }