38f1ddb...178a853: v0.8.9.1, removed content folder

This commit is contained in:
Joonas Rikkonen
2019-03-18 19:46:58 +02:00
parent 38f1ddb6fe
commit 6c0679c297
1054 changed files with 151673 additions and 144931 deletions
@@ -1,4 +1,5 @@
using Barotrauma.Networking;
using Microsoft.Xna.Framework;
using System;
namespace Barotrauma
@@ -22,6 +23,19 @@ namespace Barotrauma
}
private string levelSeed = "";
public void SetLevelDifficulty(float difficulty)
{
difficulty = MathHelper.Clamp(difficulty, 0.0f, 100.0f);
if (GameMain.Server != null)
{
GameMain.Server.SelectedLevelDifficulty = difficulty;
lastUpdateID++;
}
#if CLIENT
levelDifficultyScrollBar.BarScroll = difficulty / 100.0f;
#endif
}
public void ToggleTraitorsEnabled(int dir)
{
@@ -36,6 +50,33 @@ namespace Barotrauma
SetTraitorsEnabled((YesNoMaybe)index);
}
public void SetBotCount(int botCount)
{
if (GameMain.Server != null)
{
if (botCount < 0) botCount = GameMain.Server.MaxBotCount;
if (botCount > GameMain.Server.MaxBotCount) botCount = 0;
GameMain.Server.BotCount = botCount;
lastUpdateID++;
}
#if CLIENT
(botCountText as GUITextBlock).Text = botCount.ToString();
#endif
}
public void SetBotSpawnMode(BotSpawnMode botSpawnMode)
{
if (GameMain.Server != null)
{
GameMain.Server.BotSpawnMode = botSpawnMode;
lastUpdateID++;
}
#if CLIENT
(botSpawnModeText as GUITextBlock).Text = botSpawnMode.ToString();
#endif
}
public void SetTraitorsEnabled(YesNoMaybe enabled)
{
if (GameMain.Server != null) GameMain.Server.TraitorsEnabled = enabled;