public async void OnGeneratorActivated(GeneratorActivatedEventArgs ev) { if (Instance.Config.EventsToLog.GeneratorActivated) { await Network.SendAsync(new RemoteCommand("log", "gameEvents", string.Format(Language.GeneratorFinished, ev.Generator.GetComponentInParent <Room>(), Map.ActivatedGenerators + 1))).ConfigureAwait(false); } }
public async void OnGeneratorActivated(GeneratorActivatedEventArgs ev) { if (Instance.Config.EventsToLog.GeneratorActivated) { await Network.SendAsync(new RemoteCommand("log", "gameEvents", string.Format(Language.GeneratorFinished, ev.Generator.CurRoom, Generator079.mainGenerator.totalVoltage + 1))).ConfigureAwait(false); } }
public void OnGenOn(GeneratorActivatedEventArgs ev) { int curgen = Generator079.mainGenerator.NetworktotalVoltage + 1; if (curgen < 5) { Map.Broadcast(10, Plugin.Instance.Config.Gen1__4.Replace("{curgen}", curgen.ToString())); } else { Map.Broadcast(10, Plugin.Instance.Config.Gen5); } }
internal void GeneratorActivated(GeneratorActivatedEventArgs ev) { if (Plugin.Instance.Config.GeneratorActivated == "") { return; } string message = Plugin.Instance.Config.GeneratorActivated.Replace("%room%", ev.Generator.CurRoom.ToString()); if (Plugin.Instance.Config.debug_to_console) { Log.Debug(message: "[ " + Plugin.Instance.Config.map_name + "] " + message); } Plugin.sendWebHook(Plugin.Instance.Config.map_url, message, Plugin.Instance.Config.map_name); }
private static bool Prefix(Generator079 __instance) { if (__instance.prevFinish || __instance._localTime > 0.0) { return(false); } var ev = new GeneratorActivatedEventArgs(__instance); Map.OnGeneratorActivated(ev); __instance.prevFinish = true; __instance.epsenRenderer.sharedMaterial = __instance.matLetGreen; __instance.epsdisRenderer.sharedMaterial = __instance.matLedBlack; __instance._asource.PlayOneShot(__instance.unlockSound); return(false); }
/// <summary> /// Called after a generator has been activated. /// </summary> /// <param name="ev">The <see cref="GeneratorActivatedEventArgs"/> instance.</param> public static void OnGeneratorActivated(GeneratorActivatedEventArgs ev) => GeneratorActivated.InvokeSafely(ev);
/// <inheritdoc cref="Exiled.Events.Handlers.Map.OnGeneratorActivated(GeneratorActivatedEventArgs)"/> public void OnGeneratorActivated(GeneratorActivatedEventArgs ev) { Log.Info($"A generator has been activated in {ev.Generator.Room.Type}!"); }
/// <inheritdoc cref="Exiled.Events.Handlers.Map.OnGeneratorActivated(GeneratorActivatedEventArgs)"/> public void OnGeneratorActivated(GeneratorActivatedEventArgs ev) { Log.Info($"A generator has been activated in {ev.Generator.gameObject.GetComponent<Room>()?.Name}!"); }