This commit is contained in:
Evil Factory
2022-06-15 13:26:49 -03:00
410 changed files with 11140 additions and 5815 deletions
@@ -781,7 +781,7 @@ namespace Barotrauma
return;
}
GameMain.GameSession.EventManager.ActiveEvents.Add(newEvent);
newEvent.Init(true);
newEvent.Init();
NewMessage($"Initialized event {eventPrefab.Identifier}", Color.Aqua);
return;
}
@@ -1123,7 +1123,7 @@ namespace Barotrauma
{
var gamesession = new GameSession(
SubmarineInfo.SavedSubmarines.GetRandomUnsynced(s => s.Type == SubmarineType.Player && !s.HasTag(SubmarineTag.HideInMenus)),
GameModePreset.DevSandbox);
GameModePreset.DevSandbox ?? GameModePreset.Sandbox);
string seed = ToolBox.RandomSeed(16);
gamesession.StartRound(seed);
@@ -1830,6 +1830,17 @@ namespace Barotrauma
}));
#endif
commands.Add(new Command("startitems|startitemset", "start item set identifier", (string[] args) =>
{
if (args.Length == 0)
{
ThrowError($"No start item set identifier defined!");
return;
}
AutoItemPlacer.DefaultStartItemSet = args[0].ToIdentifier();
NewMessage($"Start item set changed to \"{AutoItemPlacer.DefaultStartItemSet}\"");
}, isCheat: false));
//"dummy commands" that only exist so that the server can give clients permissions to use them
//TODO: alphabetical order?
commands.Add(new Command("control", "control [character name]: Start controlling the specified character (client-only).", null, () =>
@@ -2516,5 +2527,15 @@ namespace Barotrauma
ThrowError("Saving debug console log to " + filePath + " failed", e);
}
}
public static void DeactivateCheats()
{
#if CLIENT
GameMain.DebugDraw = false;
GameMain.LightManager.LightingEnabled = true;
#endif
Hull.EditWater = false;
Hull.EditFire = false;
}
}
}