Ling fixes and tweaks (#259)

* - fix: Bees fix.

* - fix: Transform transfers body type.

* - fix: Chemcap is transfered on transform.

* - fix: Gulag objective actual fix.

* - fix: Fix escape with identity not working.

* - tweak: Fixes & objective tweaks.

* - tweak: More slowdown from ling armor.
This commit is contained in:
Aviu00
2024-04-01 20:36:32 +09:00
committed by GitHub
parent 9603c83adf
commit 2e57cbf514
19 changed files with 143 additions and 45 deletions

View File

@@ -25,6 +25,7 @@ using Content.Shared.Hands.EntitySystems;
using Content.Shared.Interaction;
using Content.Shared.Inventory;
using Content.Shared.Materials;
using Content.Shared.Mind;
using Content.Shared.Parallax.Biomes;
using Content.Shared.Popups;
using Content.Shared.Preferences;
@@ -121,7 +122,7 @@ public sealed partial class GulagSystem : SharedGulagSystem
private void OnJoinedLobby(PlayerJoinedLobbyEvent ev)
{
if(IsUserGulaged(ev.PlayerSession.UserId, out _))
if(IsUserGulagged(ev.PlayerSession.UserId, out _))
{
_chatManager.DispatchServerMessage(ev.PlayerSession, Loc.GetString("gulag-chat-join-message"));
}
@@ -141,7 +142,7 @@ public sealed partial class GulagSystem : SharedGulagSystem
var player = source.PlayerId;
if (!IsUserGulaged(player, out var ban))
if (!IsUserGulagged(player, out var ban))
{
return;
}
@@ -289,13 +290,21 @@ public sealed partial class GulagSystem : SharedGulagSystem
_popupSystem.PopupEntity(Loc.GetString("gulag-ban-time-changed", ("Time", $"{time.TotalSeconds}")), uid, PopupType.Medium);
}
public bool IsUserGulaged(NetUserId playerId, out HashSet<ServerBanDef> bans)
public bool IsUserGulagged(NetUserId playerId, out HashSet<ServerBanDef> bans)
{
bans = _banManager.GetServerBans(playerId);
return bans.Count != 0;
}
public bool IsMindGulagged(EntityUid mindId)
{
if (!TryComp(mindId, out MindComponent? mind) || mind.UserId == null)
return false;
return IsUserGulagged(mind.UserId.Value, out _);
}
private void SendToGulag(EntityUid playerEntity)
{
if (_inventorySystem.TryGetContainerSlotEnumerator(playerEntity, out var enumerator))