Skip to content

Commit

Permalink
Update to latest main
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed Jul 15, 2024
2 parents c813567 + eab6989 commit 8bfd26c
Show file tree
Hide file tree
Showing 26 changed files with 780 additions and 509 deletions.
53 changes: 53 additions & 0 deletions Fika.Core/Console/FikaCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Fika.Core.Coop.GameMode;
using Fika.Core.Coop.Players;
using Fika.Core.Coop.Utils;
using System.Collections.Generic;

namespace Fika.Core.Console
{
Expand Down Expand Up @@ -91,6 +92,58 @@ public static void God([ConsoleArgument(false, "true or false to toggle god mode
ConsoleScreen.LogWarning("Could not find CoopHandler.");
}
}

[ConsoleCommand("extract", "", null, "Extract from raid", [])]
public static void Extract()
{
CoopGame coopGame = (CoopGame)Singleton<IFikaGame>.Instance;

if (coopGame == null)
{
ConsoleScreen.LogWarning("You are not in a game.");
return;
}

if (coopGame.Status != GameStatus.Started)
{
ConsoleScreen.LogWarning("Game is not running.");
return;
}

CoopPlayer localPlayer = (CoopPlayer)Singleton<GameWorld>.Instance.MainPlayer;

coopGame.Extract(localPlayer, null);
}

[ConsoleCommand("despawnallai", "", null, "Despawns all AI Bots", [])]
public static void DespawnAllAI()
{
if (Singleton<IFikaGame>.Instance is CoopGame game)
{
if (!FikaBackendUtils.IsServer)
{
ConsoleScreen.LogWarning("You are not the host.");
return;
}

CoopHandler.TryGetCoopHandler(out CoopHandler coopHandler);

List<IPlayer> Bots = new List<IPlayer>(game.BotsController.Players);

foreach (Player bot in Bots)
{
if (bot.AIData.BotOwner == null)
{
continue;
}

ConsoleScreen.Log($"Despawning: {bot.Profile.Nickname}");

game.DespawnBot(coopHandler, bot);
}
}
}

#endif

[ConsoleCommand("debug", "", null, "Toggle debug window", [])]
Expand Down
260 changes: 0 additions & 260 deletions Fika.Core/Coop/Airdrops/FikaAirdropBox.cs

This file was deleted.

Loading

0 comments on commit 8bfd26c

Please sign in to comment.