protected override void Unload() { Instance = null; Logger.Log("ModeCycle has been unloaded!"); Logger.Log("Visit Tortellio Discord for more! https://discord.gg/pzQwsew", ConsoleColor.Yellow); LightingManager.onDayNightUpdated -= OnDayNightUpdated; DamageTool.damagePlayerRequested -= OnPlayerDamaged; DamageTool.damageAnimalRequested -= OnAnimalDamaged; DamageTool.damageZombieRequested -= OnZombieDamaged; VehicleManager.onDamageVehicleRequested -= OnVehicleDamaged; VehicleManager.onDamageTireRequested -= OnTireDamaged; BarricadeManager.onDamageBarricadeRequested -= OnBarricadeDamaged; StructureManager.onDamageStructureRequested -= OnStructureDamaged; }
protected override void Load() { Instance = this; Logger.Log("ModeCycle has been loaded!", ConsoleColor.Yellow); Logger.Log(PluginName + PluginVersion, ConsoleColor.Yellow); Logger.Log("Made by Tortellio", ConsoleColor.Yellow); if (!Instance.Configuration.Instance.EnablePlugin) { Logger.Log("ModeCycle is disabled in configuration.. unloading!"); Unload(); return; } LightingManager.onDayNightUpdated += OnDayNightUpdated; DamageTool.damagePlayerRequested += OnPlayerDamaged; DamageTool.damageAnimalRequested += OnAnimalDamaged; DamageTool.damageZombieRequested += OnZombieDamaged; VehicleManager.onDamageVehicleRequested += OnVehicleDamaged; VehicleManager.onDamageTireRequested += OnTireDamaged; BarricadeManager.onDamageBarricadeRequested += OnBarricadeDamaged; StructureManager.onDamageStructureRequested += OnStructureDamaged; }