Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Mapers mersen #198

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b39b25c
fix weird behavior with storage HUD buttons (#27961) (#1365)
dvir001 May 17, 2024
3041bb1
Mapchecker (Update) (#1381)
dvir001 May 17, 2024
eed8933
Frontier Bug Fixing, EMP and Missing Tiles Code. (#1372)
dvir001 May 17, 2024
5db6bf5
Harambe Fix (#1368)
dvir001 May 17, 2024
d79ae9e
Automatic Changelog (#1368)
FrontierATC May 17, 2024
2186aee
Added empty sakazuki and put in boozemat (#1348)
MoistBiscuits May 17, 2024
f25a4c6
Salvage Mob Restrictions (#1333)
dvir001 May 17, 2024
f208a44
Automatic Changelog (#1348)
FrontierATC May 17, 2024
442146f
Increase maxvol of pieslice and upped base slice reagents (#1371)
MoistBiscuits May 17, 2024
fbc9a08
fix orphaned storage grid pieces getting stuck to the cursor (#27960)…
dvir001 May 17, 2024
d23d0dc
BankLable Corvax (#1379)
dvir001 May 17, 2024
d2c8f0b
Update misc.yml (#1367)
dvir001 May 18, 2024
35445d8
UAC Ambition - (New atmospherics ship) (#1344)
Cu1r May 18, 2024
d5a085c
Automatic Changelog (#1344)
FrontierATC May 18, 2024
a732b7b
Restore TV Audio (#1334)
whatston3 May 18, 2024
08563d5
Automatic Changelog (#1334)
FrontierATC May 18, 2024
108c09f
Add plates and misc service recipes to the service techfab (#1369)
Cheackraze May 18, 2024
5b64092
Automatic Changelog (#1369)
FrontierATC May 18, 2024
4220e4d
Optimize Debris Code (#1374)
dvir001 May 18, 2024
4da7b42
Loadout Hotfix (#1385)
ErhardSteinhauer May 18, 2024
a6fd22c
Automatic Changelog (#1385)
FrontierATC May 18, 2024
79ad11d
Switched out catwalks in the salvage area for cargo pallets. (#1386)
Cu1r May 18, 2024
b89bf7e
Revert "Optimize Debris Code (#1374)" (#1383)
Cheackraze May 18, 2024
17b4878
NT Fishbowl (New) - Central commander personal transport/office (admi…
Tych0theSynth May 18, 2024
f6e2486
Automatic Changelog (#1223)
FrontierATC May 18, 2024
6c4aece
Revert "BankLable Corvax (#1379)" (#1390)
Cheackraze May 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/mapchecker/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@
]
# List of matchers that are illegal to use, unless the map is a ship and the ship belongs to the keyed shipyard.
CONDITIONALLY_ILLEGAL_MATCHES = {
"Civilian": [
"ButtonFrameCautionSecurity", # Decal.
],
"Scrap": [
"ButtonFrameCautionSecurity", # Decal.
],
"Expedition": [
"ButtonFrameCautionSecurity", # Decal.
],
"Custom": [
"ButtonFrameCautionSecurity", # Decal.
],
"Security": [ # These matchers are illegal unless the ship is part of the security shipyard.
"Security", # Anything with the word security in it should also only be appearing on security ships.
"Plastitanium", # Plastitanium walls should only be appearing on security ships.
Expand All @@ -29,6 +41,7 @@
],
"Syndicate": [
"Plastitanium", # And also on blackmarket ships cause syndicate.
"ButtonFrameCautionSecurity", # Decal.
],
"BlackMarket": [
"Plastitanium", # And also on blackmarket ships cause syndicate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public void BuildItemPieces()

//todo. at some point, we may want to only rebuild the pieces that have actually received new data.

_pieceGrid.Children.Clear();
_pieceGrid.RemoveAllChildren();
_pieceGrid.Rows = boundingGrid.Height + 1;
_pieceGrid.Columns = boundingGrid.Width + 1;
for (var y = boundingGrid.Bottom; y <= boundingGrid.Top; y++)
Expand All @@ -275,18 +275,29 @@ public void BuildItemPieces()

if (_entity.TryGetComponent<ItemComponent>(itemEnt, out var itemEntComponent))
{
var gridPiece = new ItemGridPiece((itemEnt, itemEntComponent), itemPos, _entity)
ItemGridPiece gridPiece;

if (_storageController.CurrentlyDragging?.Entity is { } dragging
&& dragging == itemEnt)
{
_storageController.CurrentlyDragging.Orphan();
gridPiece = _storageController.CurrentlyDragging;
}
else
{
MinSize = size,
Marked = Array.IndexOf(containedEntities, itemEnt) switch
gridPiece = new ItemGridPiece((itemEnt, itemEntComponent), itemPos, _entity)
{
0 => ItemGridPieceMarks.First,
1 => ItemGridPieceMarks.Second,
_ => null,
}
};
gridPiece.OnPiecePressed += OnPiecePressed;
gridPiece.OnPieceUnpressed += OnPieceUnpressed;
MinSize = size,
Marked = Array.IndexOf(containedEntities, itemEnt) switch
{
0 => ItemGridPieceMarks.First,
1 => ItemGridPieceMarks.Second,
_ => null,
}
};
gridPiece.OnPiecePressed += OnPiecePressed;
gridPiece.OnPieceUnpressed += OnPieceUnpressed;
}

control.AddChild(gridPiece);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,16 @@ private void OnPieceUnpressed(GUIBoundKeyEventArgs args, ItemGridPiece control)
_entity.GetNetEntity(storageEnt)));
}

_menuDragHelper.EndDrag();
_container?.BuildItemPieces();
}
else //if we just clicked, then take it out of the bag.
{
_menuDragHelper.EndDrag();
_entity.RaisePredictiveEvent(new StorageInteractWithItemEvent(
_entity.GetNetEntity(control.Entity),
_entity.GetNetEntity(storageEnt)));
}
_menuDragHelper.EndDrag();
args.Handle();
}

Expand Down
9 changes: 8 additions & 1 deletion Content.Server/Chat/Systems/ChatSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,11 @@ private MessageRangeCheckResult MessageRangeCheck(ICommonSession session, ICChat
case ChatTransmitRange.NoGhosts:
initialResult = (data.Observer && !_adminManager.IsAdmin(session)) ? MessageRangeCheckResult.Disallowed : MessageRangeCheckResult.Full;
break;
// Frontier - prevent TVs from spamming the poor, poor admins
case ChatTransmitRange.GhostRangeLimitNoAdminCheck:
initialResult = (data.Observer && data.Range < 0) ? MessageRangeCheckResult.HideChat : MessageRangeCheckResult.Full;
break;
// End Frontier
}
var insistHideChat = data.HideChatOverride ?? false;
var insistNoHideChat = !(data.HideChatOverride ?? true);
Expand Down Expand Up @@ -964,5 +969,7 @@ public enum ChatTransmitRange : byte
/// Hidden from the chat window.
HideChat,
/// Ghosts can't hear or see it at all. Regular players can if in-range.
NoGhosts
NoGhosts,
/// Frontier: Normal, ghosts are still range-limited, and won't spam admins
GhostRangeLimitNoAdminCheck,
}
10 changes: 5 additions & 5 deletions Content.Server/Emp/EmpSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public override void Initialize()
SubscribeLocalEvent<EmpDisabledComponent, ApcToggleMainBreakerAttemptEvent>(OnApcToggleMainBreaker);
SubscribeLocalEvent<EmpDisabledComponent, SurveillanceCameraSetActiveAttemptEvent>(OnCameraSetActive);
//SubscribeLocalEvent<EmpDisabledComponent, ThrusterToggleAttemptEvent>(OnThrusterToggle);
SubscribeLocalEvent<EmpDisabledComponent, ShuttleToggleAttemptEvent>(OnShuttleConsoleToggle);
//SubscribeLocalEvent<EmpDisabledComponent, ShuttleToggleAttemptEvent>(OnShuttleConsoleToggle);
}

/// <summary>
Expand Down Expand Up @@ -143,10 +143,10 @@ private void OnCameraSetActive(EntityUid uid, EmpDisabledComponent component, re
// args.Cancelled = true;
//}

private void OnShuttleConsoleToggle(EntityUid uid, EmpDisabledComponent component, ref ShuttleToggleAttemptEvent args)
{
args.Cancelled = true;
}
//private void OnShuttleConsoleToggle(EntityUid uid, EmpDisabledComponent component, ref ShuttleToggleAttemptEvent args)
//{
// args.Cancelled = true;
//}
}

/// <summary>
Expand Down
50 changes: 2 additions & 48 deletions Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,12 @@
using Robust.Shared.GameStates;
using Robust.Shared.Map;
using Robust.Shared.Utility;
using Content.Server.Emp;
using Content.Shared.Tools.Components;
using Content.Shared.Emp;
using Content.Shared.UserInterface;
using Robust.Shared.Timing;

namespace Content.Server.Shuttles.Systems;

public sealed partial class ShuttleConsoleSystem : SharedShuttleConsoleSystem
{
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly ActionBlockerSystem _blocker = default!;
[Dependency] private readonly AlertsSystem _alertsSystem = default!;
Expand Down Expand Up @@ -80,9 +75,6 @@ public override void Initialize()
SubscribeLocalEvent<FTLDestinationComponent, ComponentStartup>(OnFtlDestStartup);
SubscribeLocalEvent<FTLDestinationComponent, ComponentShutdown>(OnFtlDestShutdown);

SubscribeLocalEvent<ShuttleConsoleComponent, EmpPulseEvent>(OnEmpPulse);
SubscribeLocalEvent<ShuttleConsoleComponent, ToolUseAttemptEvent>(OnToolUseAttempt);

InitializeFTL();
}

Expand Down Expand Up @@ -135,7 +127,7 @@ public void RefreshShuttleConsoles()

while (query.MoveNext(out var uid, out _))
{
UpdateState(uid,ref dockState);
UpdateState(uid, ref dockState);
}
}

Expand All @@ -144,7 +136,7 @@ public void RefreshShuttleConsoles()
/// </summary>
private void OnConsoleUIClose(EntityUid uid, ShuttleConsoleComponent component, BoundUIClosedEvent args)
{
if ((ShuttleConsoleUiKey) args.UiKey != ShuttleConsoleUiKey.Key)
if ((ShuttleConsoleUiKey)args.UiKey != ShuttleConsoleUiKey.Key)
{
return;
}
Expand Down Expand Up @@ -371,21 +363,6 @@ public void ClearPilots(ShuttleConsoleComponent component)
if (query.TryGetComponent(pilot, out var pilotComponent))
RemovePilot(pilot, pilotComponent);
}

// Frontier - Adds EMP functionality - PR 526
// This makes the Shuttle Console kick pilots like its removed, to make sure EMP in effect.
var disabled = EntityQueryEnumerator<EmpDisabledComponent, ShuttleConsoleComponent>();
while (disabled.MoveNext(out var uid, out _, out var comp))
{
if (comp.TimeoutFromEmp <= _timing.CurTime)
{
ClearPilots(comp);
comp.TimeoutFromEmp += TimeSpan.FromSeconds(0.1);
comp.MainBreakerEnabled = false;
}
else
comp.MainBreakerEnabled = true;
}
}

/// <summary>
Expand Down Expand Up @@ -454,27 +431,4 @@ public ShuttleMapInterfaceState GetMapState(Entity<FTLComponent?> shuttle)
beacons ?? new List<ShuttleBeaconObject>(),
exclusions ?? new List<ShuttleExclusionObject>());
}

// Frontier - Adds EMP functionality - PR 526
private void OnEmpPulse(EntityUid uid, ShuttleConsoleComponent component, ref EmpPulseEvent args)
{
args.Affected = true;
args.Disabled = true;
component.TimeoutFromEmp = _timing.CurTime;
}

// Frontier - Adds EMP functionality - PR 526
private void OnToolUseAttempt(EntityUid uid, ShuttleConsoleComponent component, ToolUseAttemptEvent args)
{
if (!HasComp<EmpDisabledComponent>(uid))
return;

// prevent reconstruct exploit to skip cooldowns
if (!component.MainBreakerEnabled)
args.Cancel();
}

// Frontier - Adds EMP functionality - PR 526
[ByRefEvent]
public record struct ShuttleToggleAttemptEvent(bool Cancelled);
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ public sealed partial class SurveillanceCameraMicrophoneComponent : Component

[ViewVariables(VVAccess.ReadWrite)]
[DataField("range")]
public int Range { get; private set; } = 10;
public int Range { get; private set; } = 6; //Frontier: 10>6
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ private void OnSpeechSent(EntityUid uid, SurveillanceCameraSpeakerComponent comp
var name = Loc.GetString("speech-name-relay", ("speaker", Name(uid)),
("originalName", nameEv.Name));

// Frontier: Do not send TV messages to admins that are out of range. (GhostRangeLimit>GhostRangeLimitNoAdminCheck)
// log to chat so people can identity the speaker/source, but avoid clogging ghost chat if there are many radios
_chatSystem.TrySendInGameICMessage(uid, args.Message, InGameICChatType.Speak, ChatTransmitRange.GhostRangeLimit, nameOverride: name);
_chatSystem.TrySendInGameICMessage(uid, args.Message, InGameICChatType.Speak, ChatTransmitRange.GhostRangeLimitNoAdminCheck, nameOverride: name);
}
}
22 changes: 22 additions & 0 deletions Content.Server/_NF/Salvage/SalvageMobRestrictionsGridComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
using System;

namespace Content.Server._NF.Salvage;

/// <summary>
/// This component is attached to grids when a salvage mob is
/// spawned on them.
/// This attachment is done by SalvageMobRestrictionsSystem.
/// *Simply put, when this component is removed, the mobs die.*
/// *This applies even if the mobs are off-grid at the time.*
/// </summary>
[RegisterComponent]
public sealed partial class SalvageMobRestrictionsGridComponent : Component
{
[ViewVariables(VVAccess.ReadOnly)]
[DataField("mobsToKill")]
public List<EntityUid> MobsToKill = new();
}
22 changes: 22 additions & 0 deletions Content.Server/_NF/Salvage/SalvageMobRestrictionsNFComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
using System;

namespace Content.Server._NF.Salvage;

/// <summary>
/// This component exists as a sort of stateful marker for a
/// killswitch meant to keep salvage mobs from doing stuff they
/// really shouldn't (attacking station).
/// The main thing is that adding this component ties the mob to
/// whatever it's currently parented to.
/// </summary>
[RegisterComponent]
public sealed partial class SalvageMobRestrictionsNFComponent : Component
{
[ViewVariables(VVAccess.ReadOnly)]
[DataField("linkedGridEntity")]
public EntityUid LinkedGridEntity = EntityUid.Invalid;
}
85 changes: 85 additions & 0 deletions Content.Server/_NF/Salvage/SalvageMobRestrictionsSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
using Content.Shared.CCVar;
using Content.Shared.Examine;
using Content.Shared.Interaction;
using Content.Shared.Damage;
using Content.Shared.Damage;
using Content.Server.Body.Components;
using Robust.Server.Maps;
using Robust.Shared.Configuration;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Log;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using System;
using System.Collections.Generic;
using System.Linq;
using Content.Shared.Body.Components;
using Content.Server.Body.Systems;

namespace Content.Server._NF.Salvage;

public sealed class SalvageMobRestrictionsSystem : EntitySystem
{
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
[Dependency] private readonly BodySystem _body = default!;
public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<SalvageMobRestrictionsNFComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<SalvageMobRestrictionsNFComponent, ComponentRemove>(OnRemove);
SubscribeLocalEvent<SalvageMobRestrictionsGridComponent, ComponentRemove>(OnRemoveGrid);
}

private void OnInit(EntityUid uid, SalvageMobRestrictionsNFComponent component, ComponentInit args)
{
var gridUid = Transform(uid).ParentUid;
if (!EntityManager.EntityExists(gridUid))
{
// Give up, we were spawned improperly
return;
}
// When this code runs, the salvage magnet hasn't actually gotten ahold of the entity yet.
// So it therefore isn't in a position to do this.
if (!TryComp(gridUid, out SalvageMobRestrictionsGridComponent? rg))
{
rg = AddComp<SalvageMobRestrictionsGridComponent>(gridUid);
}
rg!.MobsToKill.Add(uid);
component.LinkedGridEntity = gridUid;
}

private void OnRemove(EntityUid uid, SalvageMobRestrictionsNFComponent component, ComponentRemove args)
{
if (TryComp(component.LinkedGridEntity, out SalvageMobRestrictionsGridComponent? rg))
{
rg.MobsToKill.Remove(uid);
}
}

private void OnRemoveGrid(EntityUid uid, SalvageMobRestrictionsGridComponent component, ComponentRemove args)
{
foreach (EntityUid target in component.MobsToKill)
{
if (TryComp(target, out BodyComponent? body))
{
// Just because.
var gibs = _body.GibBody(target, body: body, gibOrgans: true);
foreach (var gib in gibs)
Del(gib);
}
else if (TryComp(target, out DamageableComponent? dc))
{
_damageableSystem.SetAllDamage(target, dc, 200);
}
}
}
}

2 changes: 1 addition & 1 deletion Content.Shared/Inventory/InventorySystem.Slots.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public partial class InventorySystem : EntitySystem
private void InitializeSlots()
{
SubscribeLocalEvent<InventoryComponent, ComponentInit>(OnInit);
SubscribeNetworkEvent<OpenSlotStorageNetworkMessage>(OnOpenSlotStorage);
SubscribeAllEvent<OpenSlotStorageNetworkMessage>(OnOpenSlotStorage);

_vvm.GetTypeHandler<InventoryComponent>()
.AddHandler(HandleViewVariablesSlots, ListViewVariablesSlots);
Expand Down
Loading
Loading