Skip to content

Commit

Permalink
Merge branch 'refs/heads/master' into test_changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
VigersRay committed Jun 13, 2024
2 parents 482fd4b + d93dec5 commit bb7cb8b
Show file tree
Hide file tree
Showing 204 changed files with 3,388 additions and 2,058 deletions.
16 changes: 6 additions & 10 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,11 @@

**Changelog**
<!--
Если вы хотите чтобы о ваших изменениях узнали игроки напишите что вы изменили вне коментария используя шаблон.
Если вы делаете слишком мелкий фикс, не стоит его указывать.
Так же не стоил делать его слишком длинним указывая все детали, пишите кратко и по существу.
Шаблон:
:cl: VigersRay
- add: Добавлено веселье!
- remove: Удалено веселье!
- tweak: Изменено веселье!
- fix: Исправлено веселье!
Если нужно чтобы игроки узнали об изменениях сделаных в данном PR укажите их используя шаблон вне коментария. Кратко и информативно.
Не изменяйте файл чейнжлога сами.
:cl: VigersRay
- add: Добавлено веселье.
- remove: Удалено веселье.
- tweak: Изменено веселье.
- fix: Исправлено веселье.
-->
4 changes: 3 additions & 1 deletion .github/workflows/update_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ jobs:
python-version: '3.x'

- name: Install Dependencies
run: pip install pyyaml
run: pip install pyyaml requests

- name: Extract Changelog from PR
env:
DISCORD_WEBHOOK_URL: ${{ secrets.CHANGELOG_DISCORD_WEBHOOK }}
run: python3 Tools/automatic_changelog.py "Resources/Changelog/ChangelogSunrise.yml" "${{ github.event.pull_request.body }}"

- name: Commit and Push Changes
Expand Down
10 changes: 9 additions & 1 deletion Content.Client/PDA/PdaBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,16 @@ public PdaBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
protected override void Open()
{
base.Open();

if (_menu == null)
CreateMenu();

_menu?.OpenCenteredLeft();
}

private void CreateMenu()
{
_menu = new PdaMenu();
_menu.OpenCenteredLeft();
_menu.OnClose += Close;
_menu.FlashLightToggleButton.OnToggled += _ =>
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Administration/Commands/PlayTimeCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public async void Execute(IConsoleShell shell, string argStr, string[] args)
}

_playTimeTracking.AddTimeToTracker(player, role, TimeSpan.FromMinutes(minutes));
var time = _playTimeTracking.GetOverallPlaytime(player);
var time = _playTimeTracking.GetPlayTimeForTracker(player, role);
shell.WriteLine(Loc.GetString("cmd-playtime_addrole-succeed",
("username", userName),
("role", role),
Expand Down
8 changes: 7 additions & 1 deletion Content.Server/Administration/Systems/AdminSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Content.Server.Forensics;
using Content.Server.GameTicking;
using Content.Server.Hands.Systems;
using Content.Server.IdentityManagement;
using Content.Server.Mind;
using Content.Server.Players.PlayTimeTracking;
using Content.Server.Popups;
Expand Down Expand Up @@ -70,6 +69,7 @@ public override void Initialize()

_playerManager.PlayerStatusChanged += OnPlayerStatusChanged;
_adminManager.OnPermsChanged += OnAdminPermsChanged;
_playTime.SessionPlayTimeUpdated += OnSessionPlayTimeUpdated;

// Panic Bunker Settings
Subs.CVar(_config, CCVars.PanicBunkerEnabled, OnPanicBunkerChanged, true);
Expand Down Expand Up @@ -200,6 +200,7 @@ public override void Shutdown()
base.Shutdown();
_playerManager.PlayerStatusChanged -= OnPlayerStatusChanged;
_adminManager.OnPermsChanged -= OnAdminPermsChanged;
_playTime.SessionPlayTimeUpdated -= OnSessionPlayTimeUpdated;
}

private void OnPlayerStatusChanged(object? sender, SessionStatusEventArgs e)
Expand Down Expand Up @@ -446,5 +447,10 @@ keyStorage.Key is { } key &&

_gameTicker.SpawnObserver(player);
}

private void OnSessionPlayTimeUpdated(ICommonSession session)
{
UpdatePlayerList(session);
}
}
}
2 changes: 1 addition & 1 deletion Content.Server/Body/Systems/InternalsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ private short GetSeverity(InternalsComponent component)
// 3. in-hand tanks
// 4. pocket/belt tanks

if (!Resolve(user, ref user.Comp1, ref user.Comp2, ref user.Comp3))
if (!Resolve(user, ref user.Comp2, ref user.Comp3))
return null;

if (_inventory.TryGetSlotEntity(user, "back", out var backEntity, user.Comp2, user.Comp3) &&
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Body/Systems/RespiratorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public override void Update(float frameTime)
if (_gameTiming.CurTime >= respirator.LastGaspEmoteTime + respirator.GaspEmoteCooldown)
{
respirator.LastGaspEmoteTime = _gameTiming.CurTime;
_chat.TryEmoteWithChat(uid, respirator.GaspEmote, ignoreActionBlocker: true);
_chat.TryEmoteWithChat(uid, respirator.GaspEmote, ChatTransmitRange.HideChat, ignoreActionBlocker: true);
}

TakeSuffocationDamage((uid, respirator));
Expand Down
6 changes: 5 additions & 1 deletion Content.Server/Communications/CommunicationsConsoleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,13 @@ private bool CanCallOrRecall(CommunicationsConsoleComponent comp)
if (_emergency.EmergencyShuttleArrived || !_roundEndSystem.CanCallOrRecall())
return false;

// Ensure that we can communicate with the shuttle (either call or recall)
if (!comp.CanShuttle)
return false;

// Calling shuttle checks
if (_roundEndSystem.ExpectedCountdownEnd is null)
return comp.CanShuttle;
return true;

// Recalling shuttle checks
var recallThreshold = _cfg.GetCVar(CCVars.EmergencyRecallTurningPoint);
Expand Down
3 changes: 2 additions & 1 deletion Content.Server/Forensics/Systems/ForensicsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using Content.Shared.Weapons.Melee.Events;
using Robust.Shared.Random;
using Content.Shared.Verbs;
using Robust.Shared.Utility;

namespace Content.Server.Forensics
{
Expand Down Expand Up @@ -125,7 +126,7 @@ private void OnUtilityVerb(Entity<CleansForensicsComponent> entity, ref GetVerbs
var verb = new UtilityVerb()
{
Act = () => TryStartCleaning(entity, user, target),
IconEntity = GetNetEntity(entity),
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/bubbles.svg.192dpi.png")),
Text = Loc.GetString(Loc.GetString("forensics-verb-text")),
Message = Loc.GetString(Loc.GetString("forensics-verb-message")),
// This is important because if its true using the cleaning device will count as touching the object.
Expand Down
1 change: 0 additions & 1 deletion Content.Server/Medical/HealingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ entity.Comp.DamageContainerID is not null &&
_bloodstreamSystem.TryModifyBleedAmount(entity.Owner, healing.BloodlossModifier);
if (isBleeding != bloodstream.BleedAmount > 0)
{
dontRepeat = true;
_popupSystem.PopupEntity(Loc.GetString("medical-item-stop-bleeding"), entity, args.User);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,10 @@ public void SetStrength(EntityUid uid, ParticleAcceleratorPowerState strength, E
var impact = strength switch
{
ParticleAcceleratorPowerState.Standby => LogImpact.Low,
ParticleAcceleratorPowerState.Level0 => LogImpact.Medium,
ParticleAcceleratorPowerState.Level1 => LogImpact.High,
ParticleAcceleratorPowerState.Level2
or ParticleAcceleratorPowerState.Level3
or _ => LogImpact.Extreme,
ParticleAcceleratorPowerState.Level0
or ParticleAcceleratorPowerState.Level1
or ParticleAcceleratorPowerState.Level2 => LogImpact.Medium,
ParticleAcceleratorPowerState.Level3 => LogImpact.Extreme,
};

_adminLogger.Add(LogType.Action, impact, $"{ToPrettyString(player):player} has set the strength of {ToPrettyString(uid)} to {strength}");
Expand Down
16 changes: 16 additions & 0 deletions Content.Server/Players/PlayTimeTracking/PlayTimeTrackingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ public sealed class PlayTimeTrackingManager : ISharedPlaytimeManager, IPostInjec

public event CalcPlayTimeTrackersCallback? CalcTrackers;

public event Action<ICommonSession>? SessionPlayTimeUpdated;

public void Initialize()
{
_sawmill = Logger.GetSawmill("play_time");
Expand Down Expand Up @@ -217,6 +219,7 @@ private void SendPlayTimes(ICommonSession pSession)
};

_net.ServerSendMessage(msg, pSession.Channel);
SessionPlayTimeUpdated?.Invoke(pSession);
}

/// <summary>
Expand Down Expand Up @@ -370,6 +373,19 @@ public bool TryGetTrackerTimes(ICommonSession id, [NotNullWhen(true)] out Dictio
return true;
}

public bool TryGetTrackerTime(ICommonSession id, string tracker, [NotNullWhen(true)] out TimeSpan? time)
{
time = null;
if (!TryGetTrackerTimes(id, out var times))
return false;

if (!times.TryGetValue(tracker, out var t))
return false;

time = t;
return true;
}

public Dictionary<string, TimeSpan> GetTrackerTimes(ICommonSession id)
{
if (!_playTimeData.TryGetValue(id, out var data) || !data.Initialized)
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Roles/RoleBriefingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ public override void Initialize()

private void OnGetBriefing(EntityUid uid, RoleBriefingComponent comp, ref GetBriefingEvent args)
{
args.Append(comp.Briefing);
args.Append(Loc.GetString(comp.Briefing));
}
}
13 changes: 2 additions & 11 deletions Content.Server/Shuttles/Systems/DockingSystem.Shuttle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,8 @@ private bool CanDock(
!shuttleDockXform.Anchored ||
!gridDockXform.Anchored))
{
if (ignored)
{
Undock(gridDock);
}
else
{
if (!ignored)
return false;
}
}

// First, get the station dock's position relative to the shuttle, this is where we rotate it around
Expand Down Expand Up @@ -213,10 +207,7 @@ private List<DockingConfig> GetDockingConfigs(
// Check if there's no intersecting grids (AKA oh god it's docking at cargo).
grids.Clear();
_mapManager.FindGridsIntersecting(targetGridXform.MapID, dockedBounds, ref grids, includeMap: false);
if (ignored)
{
}
else if (grids.Any(o => o.Owner != targetGrid && o.Owner != targetGridXform.MapUid))
if (grids.Any(o => o.Owner != targetGrid && o.Owner != targetGridXform.MapUid) && !ignored)
{
continue;
}
Expand Down
5 changes: 5 additions & 0 deletions Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ private void OnShuttleRequestPosition(EmergencyShuttleRequestPositionMessage msg
if (config == null)
return;

foreach (var configDock in config.Docks)
{
_dock.Undock((configDock.DockBUid, configDock.DockB));
}

RaiseNetworkEvent(new EmergencyShuttlePositionMessage()
{
StationUid = GetNetEntity(targetGrid),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,12 @@ public void Update(EntityUid uid, EventHorizonComponent? eventHorizon = null, Tr
/// </summary>
public void ConsumeEntity(EntityUid hungry, EntityUid morsel, EventHorizonComponent eventHorizon, BaseContainer? outerContainer = null)
{
if (!EntityManager.IsQueuedForDeletion(morsel) // I saw it log twice a few times for some reason?
&& (HasComp<MindContainerComponent>(morsel)
if (EntityManager.IsQueuedForDeletion(morsel)) // already handled, and we're substepping
return;

if (HasComp<MindContainerComponent>(morsel)
|| _tagSystem.HasTag(morsel, "HighRiskItem")
|| HasComp<ContainmentFieldGeneratorComponent>(morsel)))
|| HasComp<ContainmentFieldGeneratorComponent>(morsel))
{
_adminLogger.Add(LogType.EntityDelete, LogImpact.Extreme, $"{ToPrettyString(morsel)} entered the event horizon of {ToPrettyString(hungry)} and was deleted");
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/CCVar/CCVars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ public static readonly CVarDef<bool>
/// Minimum particle accelerator strength to create an admin alert message.
/// </summary>
public static readonly CVarDef<int> AdminAlertParticleAcceleratorMinPowerState =
CVarDef.Create("admin.alert.particle_accelerator_min_power_state", 3, CVar.SERVERONLY);
CVarDef.Create("admin.alert.particle_accelerator_min_power_state", 5, CVar.SERVERONLY); // strength 4

/// <summary>
/// Should the ban details in admin channel include PII? (IP, HWID, etc)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,14 @@ private void OnMagazineTakeAmmo(EntityUid uid, MagazineAmmoProviderComponent com
private void FinaliseMagazineTakeAmmo(EntityUid uid, MagazineAmmoProviderComponent component, int count, int capacity, EntityUid? user, AppearanceComponent? appearance)
{
// If no ammo then check for autoeject
if (component.AutoEject && count == 0)
var ejectMag = component.AutoEject && count == 0;
if (ejectMag)
{
EjectMagazine(uid, component);
Audio.PlayPredicted(component.SoundAutoEject, uid, user);
}

UpdateMagazineAppearance(uid, appearance, true, count, capacity);
UpdateMagazineAppearance(uid, appearance, !ejectMag, count, capacity);
}

private void UpdateMagazineAppearance(EntityUid uid, MagazineAmmoProviderComponent component, EntityUid magEnt)
Expand Down
32 changes: 20 additions & 12 deletions Content.Shared/Wieldable/WieldableSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using Content.Shared.Weapons.Ranged.Systems;
using Content.Shared.Wieldable.Components;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Network;
using Robust.Shared.Timing;

namespace Content.Shared.Wieldable;
Expand All @@ -32,6 +33,7 @@ public sealed class WieldableSystem : EntitySystem
[Dependency] private readonly UseDelaySystem _delay = default!;
[Dependency] private readonly SharedGunSystem _gun = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly INetManager _netManager = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -213,21 +215,27 @@ public bool TryWield(EntityUid used, WieldableComponent component, EntityUid use
if (component.WieldSound != null)
_audioSystem.PlayPredicted(component.WieldSound, used, user);

var virtuals = new List<EntityUid>();
for (var i = 0; i < component.FreeHandsRequired; i++)
//This section handles spawning the virtual item(s) to occupy the required additional hand(s).
//Since the client can't currently predict entity spawning, only do this if this is running serverside.
//Remove this check if TrySpawnVirtualItem in SharedVirtualItemSystem is allowed to complete clientside.
if (_netManager.IsServer)
{
if (_virtualItemSystem.TrySpawnVirtualItemInHand(used, user, out var virtualItem, true))
var virtuals = new List<EntityUid>();
for (var i = 0; i < component.FreeHandsRequired; i++)
{
virtuals.Add(virtualItem.Value);
continue;
if (_virtualItemSystem.TrySpawnVirtualItemInHand(used, user, out var virtualItem, true))
{
virtuals.Add(virtualItem.Value);
continue;
}

foreach (var existingVirtual in virtuals)
{
QueueDel(existingVirtual);
}

return false;
}

foreach (var existingVirtual in virtuals)
{
QueueDel(existingVirtual);
}

return false;
}

if (TryComp(used, out UseDelayComponent? useDelay)
Expand Down
Binary file removed Resources/Audio/Lobby/Spac_Stac.ogg
Binary file not shown.
Binary file removed Resources/Audio/Lobby/Spectral_Synth.ogg
Binary file not shown.
Binary file removed Resources/Audio/Lobby/TO.ogg
Binary file not shown.
Binary file removed Resources/Audio/Lobby/The_first_day_on_orbit.ogg
Binary file not shown.
Binary file removed Resources/Audio/Lobby/atomicamnesiammx.ogg
Binary file not shown.
Binary file removed Resources/Audio/Lobby/comet_haley.ogg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Resources/Audio/Lobby/mod.flip-flap.ogg
Binary file not shown.
Binary file removed Resources/Audio/Lobby/peace_in_the_lags.ogg
Binary file not shown.
Binary file removed Resources/Audio/Lobby/pwmur.ogg
Binary file not shown.
Binary file removed Resources/Audio/Lobby/singuloose.ogg
Binary file not shown.
Binary file removed Resources/Audio/Lobby/thunderdome.ogg
Binary file not shown.
Binary file removed Resources/Audio/Lobby/title2.ogg
Binary file not shown.
Binary file removed Resources/Audio/Lobby/title3.ogg
Binary file not shown.
7 changes: 7 additions & 0 deletions Resources/Changelog/Admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,5 +298,12 @@ Entries:
id: 36
time: '2024-06-08T10:40:33.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/28664
- author: ShadowCommander
changes:
- message: Player tab playtime no longer changes to Unknown when a player reconnects.
type: Fix
id: 37
time: '2024-06-13T06:38:44.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/28876
Name: Admin
Order: 1
Loading

0 comments on commit bb7cb8b

Please sign in to comment.