using Rust; namespace Oxide.Plugins; [Info("HealedAirbaloon", "HoPollo", "1.0.0")] [Description("HealedAirbaloon plugin")] public class HealedAirbaloon : RustPlugin { private void OnServerInitialized() { foreach (var entity in BaseNetworkable.serverEntities) { if (entity is HotAirBalloon) { HealeAirBalloonToMax(entity); } } } private void OnEntitySpawned(BaseNetworkable entity) { HealeAirBalloonToMax(entity); } private void HealeAirBalloonToMax(BaseNetworkable entity) { if (entity == null) return; if (entity is HotAirBalloon balloon) { balloon.health = balloon.MaxHealth(); balloon.SendNetworkUpdate(); } } private void OnEntityTakeDamage(BaseCombatEntity entity, HitInfo info) { if (entity is HotAirBalloon && info.damageTypes.Has(DamageType.Decay)) { info.damageTypes.Scale(DamageType.Decay, 0f); } } }