コード例 #1
0
 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);
     }
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        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);
        }
コード例 #6
0
ファイル: Map.cs プロジェクト: helightdev/EXILED
 /// <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);
コード例 #7
0
ファイル: MapHandler.cs プロジェクト: xRoier/EXILED
 /// <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}!");
 }
コード例 #8
0
ファイル: MapHandler.cs プロジェクト: babyboucher/EXILED
 /// <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}!");
 }