Merge branch 'master' into 2020-08-19-firelocks

This commit is contained in:
Víctor Aguilera Puerto
2020-09-07 12:47:52 +02:00
28 changed files with 979 additions and 289 deletions

View File

@@ -41,7 +41,7 @@ namespace Content.Server.GameObjects.Components.Interactable
var coordinates = mapGrid.GridTileToLocal(tile.GridIndices);
if (!user.InRangeUnobstructed(coordinates, popup: true))
if (!user.InRangeUnobstructed(coordinates, popup: false))
return;
var tileDef = (ContentTileDefinition)_tileDefinitionManager[tile.Tile.TypeId];

View File

@@ -1,5 +1,4 @@

using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects;
using Content.Shared.GameObjects.Components;
namespace Content.Server.GameObjects.Components
@@ -8,7 +7,7 @@ namespace Content.Server.GameObjects.Components
/// A component which applies a specific behaviour to a PointLightComponent on its owner.
/// </summary>
[RegisterComponent]
public class LightBehaviourComponent : SharedLightBehaviourComponent
public class LightBehaviourComponent : SharedLightBehaviourComponent
{
}

View File

@@ -159,7 +159,6 @@ namespace Content.Server.GameTicking.GamePresets
return true;
}
public override string ModeTitle => "Suspicion";
public override string Description => "Suspicion on the Space Station. There are traitors on board... Can you kill them before they kill you?";
}

View File

@@ -411,6 +411,12 @@ namespace Content.Server.GameTicking
_netManager.ServerSendToAll(GetStatusSingle(player, status));
}
public void ToggleDisallowLateJoin(bool disallowLateJoin)
{
DisallowLateJoin = disallowLateJoin;
UpdateLateJoinStatus();
}
public T AddGameRule<T>() where T : GameRule, new()
{
var instance = _dynamicTypeFactory.CreateInstance<T>();

View File

@@ -244,6 +244,26 @@ namespace Content.Server.GameTicking
}
}
class ToggleDisallowLateJoinCommand: IClientCommand
{
public string Command => "toggledisallowlatejoin";
public string Description => "Allows or disallows latejoining during mid-game.";
public string Help => $"Usage: {Command} <disallow>";
public void Execute(IConsoleShell shell, IPlayerSession player, string[] args)
{
if (args.Length != 1)
{
shell.SendText(player, "Need exactly one argument.");
return;
}
var ticker = IoCManager.Resolve<IGameTicker>();
ticker.ToggleDisallowLateJoin(bool.Parse(args[0]));
}
}
class SetGamePresetCommand : IClientCommand
{
public string Command => "setgamepreset";

View File

@@ -30,6 +30,7 @@ namespace Content.Server.Interfaces.GameTicking
void MakeObserve(IPlayerSession player);
void MakeJoinGame(IPlayerSession player, string jobId);
void ToggleReady(IPlayerSession player, bool ready);
void ToggleDisallowLateJoin(bool disallowLateJoin);
EntityCoordinates GetLateJoinSpawnPoint();
EntityCoordinates GetJobSpawnPoint(string jobId);