Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update newmaps branch #16

Merged
merged 101 commits into from
Jun 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
249e4a9
Fix guns appearing to cycle bolt when wielded (#28756)
Doomsdrayk Jun 13, 2024
d38ad12
Fix `playtime_addrole` command printing the wrong time (#28783)
ElectroJr Jun 13, 2024
99f2e6f
Automatic changelog update
PJBot Jun 13, 2024
68dc1fb
Fix ninja Spider Clan charge not getting a target (#28871)
Tayrtahn Jun 13, 2024
8791f98
Fix playtime on player tab getting set to Unknown (#28876)
ShadowCommander Jun 13, 2024
e02ef68
Automatic changelog update
PJBot Jun 13, 2024
7f5476b
Fix Drozd and C-20r unwielding on use-in-hand (#28728)
Doomsdrayk Jun 13, 2024
1bffa2a
Automatic changelog update
PJBot Jun 13, 2024
221cb73
Fix construction rotation (#28427)
EmoGarbage404 Jun 13, 2024
1559b08
Automatic changelog update
PJBot Jun 13, 2024
c3720f9
Add order quantity to cargo invoice label (#28821)
lzk228 Jun 13, 2024
29fa184
Automatic changelog update
PJBot Jun 13, 2024
ccd402d
Adjust softdrink restock crate name (#28934)
lzk228 Jun 13, 2024
4e8375e
bagel update (#28946)
Emisse Jun 13, 2024
222d3b5
Override under-pressure lock-out in air alarm "Fill" mode (#28909)
MjrLandWhale Jun 13, 2024
47bf64b
Fix no combat knives in sec techfab (#28086)
Ghagliiarghii Jun 14, 2024
ad3f1f7
Nodescanner now works with right click (#26873)
osjarw Jun 14, 2024
e481925
Automatic changelog update
PJBot Jun 14, 2024
57858cd
Lasers passover objects like projectiles unless the target is clicked…
Cojoke-dot Jun 14, 2024
af11bc3
Automatic changelog update
PJBot Jun 14, 2024
f40267e
Add trailing comments on multiline lists - editorconfig. (#28922)
Titian3 Jun 14, 2024
c79849a
Remove Rat King from MouseMigration and add it to it's own Event (#28…
Scruq445 Jun 14, 2024
6c343dd
Move SleepingSystem to Shared & cleanup (#28672)
Tayrtahn Jun 14, 2024
8059028
makes PKA able to mine rocks in one hit (#27476)
Boaz1111 Jun 14, 2024
bcf8594
Automatic changelog update
PJBot Jun 14, 2024
c52073f
Add chicken speech sound (#28948)
KyuPolaris Jun 14, 2024
39d7afe
Automatic changelog update
PJBot Jun 14, 2024
df2c3ec
Evac shuttle for Oasis (#27998)
IProduceWidgets Jun 14, 2024
4c18229
uncuffCooldown *= 5 (#28095)
Killerqu00 Jun 14, 2024
e7a3fd5
Automatic changelog update
PJBot Jun 14, 2024
adad6b2
cargo can now order fax machines (#28968)
Moomoobeef Jun 14, 2024
0d869a3
Automatic changelog update
PJBot Jun 14, 2024
e70131e
Lighten throwing knive's border (#28977)
UbaserB Jun 14, 2024
c9ee199
Create meta.json
Teapug Jun 14, 2024
8793d68
Centcom backpack textures
Teapug Jun 14, 2024
20cc8c8
Update nanotrasen_representative.yml
Teapug Jun 14, 2024
cd83cb5
Update backpacks.yml
Teapug Jun 14, 2024
3b3163c
SS-28662 Add cvars to support forcing people to departures and making…
FairlySadPanda Jun 14, 2024
6539682
give ntr cc access
Piras314 Jun 14, 2024
24e7653
Resprite rodent inhands + add hamlet inhands (#28955)
Vermidia Jun 14, 2024
6d71ec1
Non-uplink PDAs no longer can have TC inserted into them (#28985)
Zonespace27 Jun 14, 2024
795196c
Automatic changelog update
PJBot Jun 14, 2024
05cc754
Rename generic drugs (#28989)
dffdff2423 Jun 14, 2024
8a2a3c5
Moving textures to the correct directory
Teapug Jun 14, 2024
9efa5de
Automatic changelog update
PJBot Jun 14, 2024
5d62c70
Moved textured to correct directory
Teapug Jun 14, 2024
681de6b
added centcom backpack textures
Teapug Jun 14, 2024
3578625
Update backpacks.yml
Teapug Jun 14, 2024
592a3be
Update backpacks.yml
Teapug Jun 14, 2024
2c02e1b
Create backpacks.yml
Teapug Jun 14, 2024
7cf09f7
Update backpacks.yml
Teapug Jun 14, 2024
ba6853d
It is pride month, nukies. You know what that means. (#28992)
PJB3005 Jun 14, 2024
2711ef7
Automatic changelog update
PJBot Jun 14, 2024
4b56c02
add highpop map versions to postmapinit
Piras314 Jun 14, 2024
c769eb2
add highpop map versions to maploadbenchmark
Piras314 Jun 14, 2024
04dcb24
Update PostMapInitTest.cs
Piras314 Jun 14, 2024
8c1c6aa
Update PostMapInitTest.cs
Piras314 Jun 14, 2024
9576666
piras314 is a dumbass
Piras314 Jun 14, 2024
9ebfb1d
Fix Loadout Requirements Only Displaying One Requirement (#28994)
Aeshus Jun 14, 2024
e8dd5d4
Automatic changelog update
PJBot Jun 14, 2024
a4ade69
Move secure crate labels to the left (#28952)
Vermidia Jun 14, 2024
68807cb
Changes all the uplink ally icons to be a combination of the mob + ra…
Vermidia Jun 14, 2024
27ba344
Automatic changelog update
PJBot Jun 14, 2024
e803871
Adds witch robes (#28965)
K-Dynamic Jun 15, 2024
8eb85a0
Automatic changelog update
PJBot Jun 15, 2024
9e4d191
make RefillableSolution optional for SolutionTransfer (#28830)
deltanedas Jun 15, 2024
3cd740c
Replaces reagent-effect-guidebook-missing with more descriptive guide…
Zonespace27 Jun 15, 2024
835d1dd
Prevent borgs from getting duplicate modules (#28943)
Plykiya Jun 15, 2024
7d0798c
Automatic changelog update
PJBot Jun 15, 2024
41a081d
Donk co. microwave + microwave tweaks (#28951)
Vermidia Jun 15, 2024
6132b5e
Automatic changelog update
PJBot Jun 15, 2024
48f9032
Allow vending machines to be repaired (#28920)
robertmanbob Jun 15, 2024
97695cf
Automatic changelog update
PJBot Jun 15, 2024
298de1b
fix(uplink): Remove useless gps from death rattle box (#28999)
Brandon-Huu Jun 15, 2024
1d5840c
Automatic changelog update
PJBot Jun 15, 2024
f136657
Revamped Meteor Swarm (#28974)
EmoGarbage404 Jun 15, 2024
06c8238
Automatic changelog update
PJBot Jun 15, 2024
748e583
Add moon boots (#29009)
EmoGarbage404 Jun 15, 2024
d6b8b34
Automatic changelog update
PJBot Jun 15, 2024
d907e4e
make pulled uncuffing slower & reduce uncuff spam cooldown (#29008)
EmoGarbage404 Jun 15, 2024
2953e87
Automatic changelog update
PJBot Jun 15, 2024
c339773
Fixes the ShowRulesCommand and the client not syncing rules correctly…
AJCM-git Jun 15, 2024
ba24cc8
Fix drinking from openable containers (#29010)
EmoGarbage404 Jun 15, 2024
16e7fec
Automatic changelog update
PJBot Jun 15, 2024
65424e0
saltern update (#29001)
deltanedas Jun 15, 2024
7afbe3c
Adds 2 new space ruins (#28971)
Flareguy Jun 15, 2024
62b9e42
Automatic changelog update
PJBot Jun 15, 2024
bb61191
Set ahelp new player icon to use minutes, not seconds (#29014)
LankLTE Jun 15, 2024
a3d9f72
Fix IComponentFactory mock in benchmark (#29015)
ElectroJr Jun 15, 2024
f0fbedd
Fix RoleLoadout equality (#28737)
metalgearsloth Jun 15, 2024
8f12e90
Don't use invalid defaults for loadouts (#28740)
metalgearsloth Jun 15, 2024
7b6e30d
Automatic changelog update
PJBot Jun 15, 2024
9b8c544
Update submodule to 225.0.0 (#29016)
metalgearsloth Jun 15, 2024
9dc9e22
Bwoink fix (#28899)
nikthechampiongr Jun 15, 2024
e16bf41
Automatic changelog update
PJBot Jun 15, 2024
2f506a7
Merge pull request #274 from Piras314/Piras314-postmap-1
Aidenkrz Jun 15, 2024
068b264
Merge pull request #273 from Piras314/patch-1
Aidenkrz Jun 15, 2024
4c77ddc
Merge pull request #272 from Teapug/master
Aidenkrz Jun 15, 2024
3484907
Merge branch 'master' of https://github.com/space-wizards/space-stati…
Aidenkrz Jun 15, 2024
cf9651e
Quick fix :-)
Aidenkrz Jun 15, 2024
f7153ec
Builds the server for release.
Aidenkrz Jun 15, 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
14 changes: 8 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
root = true

[*]

charset = utf-8
Expand Down Expand Up @@ -278,7 +279,7 @@ dotnet_naming_style.t_upper_camel_case_style.capitalization = pascal_case
dotnet_naming_style.t_upper_camel_case_style.required_prefix = T
dotnet_naming_style.upper_camel_case_style.capitalization = pascal_case

dotnet_naming_symbols.constants_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected
dotnet_naming_symbols.constants_symbols.applicable_accessibilities = public, internal, protected, protected_internal, private_protected
dotnet_naming_symbols.constants_symbols.applicable_kinds = field
dotnet_naming_symbols.constants_symbols.required_modifiers = const

Expand Down Expand Up @@ -317,20 +318,20 @@ dotnet_naming_symbols.private_static_fields_symbols.required_modifiers = static

dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds = field
dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = static,readonly
dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = static, readonly

dotnet_naming_symbols.property_symbols.applicable_accessibilities = *
dotnet_naming_symbols.property_symbols.applicable_kinds = property

dotnet_naming_symbols.public_fields_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected
dotnet_naming_symbols.public_fields_symbols.applicable_accessibilities = public, internal, protected, protected_internal, private_protected
dotnet_naming_symbols.public_fields_symbols.applicable_kinds = field

dotnet_naming_symbols.static_readonly_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected
dotnet_naming_symbols.static_readonly_symbols.applicable_accessibilities = public, internal, protected, protected_internal, private_protected
dotnet_naming_symbols.static_readonly_symbols.applicable_kinds = field
dotnet_naming_symbols.static_readonly_symbols.required_modifiers = static,readonly
dotnet_naming_symbols.static_readonly_symbols.required_modifiers = static, readonly

dotnet_naming_symbols.types_and_namespaces_symbols.applicable_accessibilities = *
dotnet_naming_symbols.types_and_namespaces_symbols.applicable_kinds = namespace,class,struct,enum,delegate
dotnet_naming_symbols.types_and_namespaces_symbols.applicable_kinds = namespace, class, struct, enum, delegate

dotnet_naming_symbols.type_parameters_symbols.applicable_accessibilities = *
dotnet_naming_symbols.type_parameters_symbols.applicable_kinds = type_parameter
Expand All @@ -342,6 +343,7 @@ resharper_csharp_wrap_parameters_style = chop_if_long
resharper_keep_existing_attribute_arrangement = true
resharper_wrap_chained_binary_patterns = chop_if_long
resharper_wrap_chained_method_calls = chop_if_long
resharper_csharp_trailing_comma_in_multiline_lists = true

[*.{csproj,xml,yml,yaml,dll.config,msbuildproj,targets,props}]
indent_size = 2
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/dotnetserver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow builds for the server.
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET Server Build
on:
push:
branches: [ "master" ]

jobs:
build:

runs-on: linux-x64

steps:
- name: Checkout Master
uses: actions/[email protected]

- name: Setup Submodule
run: |
git submodule update --init --recursive

- name: Pull engine updates
uses: space-wizards/[email protected]

- name: Update Engine Submodules
run: |
cd RobustToolbox/
git submodule update --init --recursive

- name: Setup .NET Core
uses: actions/[email protected]
with:
dotnet-version: 8.0.x

- name: Install dependencies
run: dotnet restore

- name: Build Project
run: dotnet run --project Content.Packaging server --hybrid-acz --platform linux-x64
1 change: 1 addition & 0 deletions Content.Benchmarks/EntityManagerGetAllComponents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public void Setup()

var componentFactory = new Mock<IComponentFactory>();
componentFactory.Setup(p => p.GetComponent<DummyComponent>()).Returns(new DummyComponent());
componentFactory.Setup(m => m.GetIndex(typeof(DummyComponent))).Returns(CompIdx.Index<DummyComponent>());
componentFactory.Setup(p => p.GetRegistration(It.IsAny<DummyComponent>())).Returns(dummyReg);
componentFactory.Setup(p => p.GetAllRegistrations()).Returns(new[] { dummyReg });
componentFactory.Setup(p => p.GetAllRefTypes()).Returns(new[] { CompIdx.Index<DummyComponent>() });
Expand Down
2 changes: 1 addition & 1 deletion Content.Benchmarks/MapLoadBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public async Task Cleanup()
PoolManager.Shutdown();
}

public static readonly string[] MapsSource = { "Empty", "Box", "Bagel", "Dev", "CentComm", "Atlas", "Core", "TestTeg", "Saltern", "Packed", "Omega", "Cluster", "Reach", "Origin", "Meta", "Marathon", "Europa", "MeteorArena", "Fland", "Barratry", "Oasis" };
public static readonly string[] MapsSource = { "Empty", "Box", "Bagel", "Dev", "CentComm", "Atlas", "Core", "TestTeg", "Saltern", "Packed", "Omega", "Cluster", "Reach", "Origin", "Meta", "Marathon", "Europa", "MeteorArena", "Fland", "Barratry", "Oasis", "FlandHighPop", "OasisHighPop", "OriginHighPop" };

[ParamsSource(nameof(MapsSource))]
public string Map;
Expand Down
6 changes: 3 additions & 3 deletions Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public BwoinkControl()
if (info.Antag && info.ActiveThisRound)
sb.Append(new Rune(0x1F5E1)); // 🗡

if (info.OverallPlaytime <= TimeSpan.FromSeconds(_cfg.GetCVar(CCVars.NewPlayerThreshold)))
if (info.OverallPlaytime <= TimeSpan.FromMinutes(_cfg.GetCVar(CCVars.NewPlayerThreshold)))
sb.Append(new Rune(0x23F2)); // ⏲

sb.AppendFormat("\"{0}\"", text);
Expand Down Expand Up @@ -226,7 +226,7 @@ private string FormatTabTitle(ItemList.Item li, PlayerInfo? pl = default)
if (pl.Antag)
sb.Append(new Rune(0x1F5E1)); // 🗡

if (pl.OverallPlaytime <= TimeSpan.FromSeconds(_cfg.GetCVar(CCVars.NewPlayerThreshold)))
if (pl.OverallPlaytime <= TimeSpan.FromMinutes(_cfg.GetCVar(CCVars.NewPlayerThreshold)))
sb.Append(new Rune(0x23F2)); // ⏲

sb.AppendFormat("\"{0}\"", pl.CharacterName);
Expand All @@ -243,9 +243,9 @@ private void SwitchToChannel(NetUserId? ch)
{
UpdateButtons();

AHelpHelper.HideAllPanels();
if (ch != null)
{
AHelpHelper.HideAllPanels();
var panel = AHelpHelper.EnsurePanel(ch.Value);
panel.Visible = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public BwoinkWindow()
{
if (sel is null)
{
Title = Loc.GetString("bwoink-none-selected");
Title = Loc.GetString("bwoink-title-none-selected");
return;
}

Expand Down
8 changes: 0 additions & 8 deletions Content.Client/Bed/SleepingSystem.cs

This file was deleted.

8 changes: 0 additions & 8 deletions Content.Client/Clothing/MagbootsSystem.cs

This file was deleted.

4 changes: 2 additions & 2 deletions Content.Client/Lobby/LobbyUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public void GiveDummyJobClothesLoadout(EntityUid dummy, JobPrototype? jobProto,

if (_prototypeManager.HasIndex<RoleLoadoutPrototype>(LoadoutSystem.GetJobPrototype(job.ID)))
{
var loadout = profile.GetLoadoutOrDefault(LoadoutSystem.GetJobPrototype(job.ID), profile.Species, EntityManager, _prototypeManager);
var loadout = profile.GetLoadoutOrDefault(LoadoutSystem.GetJobPrototype(job.ID), _playerManager.LocalSession, profile.Species, EntityManager, _prototypeManager);
GiveDummyLoadout(dummy, loadout);
}
}
Expand Down Expand Up @@ -414,7 +414,7 @@ public EntityUid LoadProfileEntity(HumanoidCharacterProfile? humanoid, JobProtot

if (_prototypeManager.HasIndex<RoleLoadoutPrototype>(LoadoutSystem.GetJobPrototype(job.ID)))
{
var loadout = humanoid.GetLoadoutOrDefault(LoadoutSystem.GetJobPrototype(job.ID), humanoid.Species, EntityManager, _prototypeManager);
var loadout = humanoid.GetLoadoutOrDefault(LoadoutSystem.GetJobPrototype(job.ID), _playerManager.LocalSession, humanoid.Species, EntityManager, _prototypeManager);
GiveDummyLoadout(dummyEnt, loadout);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ public void RefreshJobs()
if (loadout == null)
{
loadout = new RoleLoadout(roleLoadoutProto.ID);
loadout.SetDefault(_prototypeManager);
loadout.SetDefault(Profile, _playerManager.LocalSession, _prototypeManager);
}

OpenLoadout(job, loadout, roleLoadoutProto);
Expand Down
30 changes: 21 additions & 9 deletions Content.Client/UserInterface/Systems/Info/InfoUIController.cs
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
using Content.Client.Gameplay;
using Content.Client.Info;
using Content.Shared.CCVar;
using Content.Shared.Guidebook;
using Content.Shared.Info;
using Robust.Client.Console;
using Robust.Client.UserInterface.Controllers;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Configuration;
using Robust.Shared.Network;
using Robust.Shared.Prototypes;

namespace Content.Client.UserInterface.Systems.Info;

public sealed class InfoUIController : UIController, IOnStateExited<GameplayState>
{
[Dependency] private readonly IConfigurationManager _cfg = default!;
[Dependency] private readonly IClientConsoleHost _consoleHost = default!;
[Dependency] private readonly INetManager _netManager = default!;
[Dependency] private readonly IPrototypeManager _prototype = default!;
[Dependency] private readonly ILogManager _logMan = default!;

private RulesPopup? _rulesPopup;
private RulesAndInfoWindow? _infoWindow;
private ISawmill _sawmill = default!;

[ValidatePrototypeId<GuideEntryPrototype>]
private const string DefaultRuleset = "DefaultRuleset";

public ProtoId<GuideEntryPrototype> RulesEntryId = DefaultRuleset;

public override void Initialize()
{
base.Initialize();


_sawmill = _logMan.GetSawmill("rules");
_netManager.RegisterNetMessage<RulesAcceptedMessage>();
_netManager.RegisterNetMessage<ShowRulesPopupMessage>(OnShowRulesPopupMessage);
_netManager.RegisterNetMessage<SendRulesInformationMessage>(OnRulesInformationMessage);

_consoleHost.RegisterCommand("fuckrules",
"",
Expand All @@ -39,9 +43,12 @@ public override void Initialize()
});
}

private void OnShowRulesPopupMessage(ShowRulesPopupMessage message)
private void OnRulesInformationMessage(SendRulesInformationMessage message)
{
ShowRules(message.PopupTime);
RulesEntryId = message.CoreRules;

if (message.ShouldShowRules)
ShowRules(message.PopupTime);
}

public void OnStateExited(GameplayState state)
Expand Down Expand Up @@ -84,8 +91,13 @@ private void OnAcceptPressed()

public GuideEntryPrototype GetCoreRuleEntry()
{
var guide = _cfg.GetCVar(CCVars.RulesFile);
var guideEntryPrototype = _prototype.Index<GuideEntryPrototype>(guide);
if (!_prototype.TryIndex(RulesEntryId, out var guideEntryPrototype))
{
guideEntryPrototype = _prototype.Index<GuideEntryPrototype>(DefaultRuleset);
_sawmill.Error($"Couldn't find the following prototype: {RulesEntryId}. Falling back to {DefaultRuleset}, please check that the server has the rules set up correctly");
return guideEntryPrototype;
}

return guideEntryPrototype;
}

Expand Down
7 changes: 5 additions & 2 deletions Content.IntegrationTests/Tests/PostMapInitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public sealed class PostMapInitTest
"/Maps/centcomm.yml",
"/Maps/Shuttles/cargo.yml",
"/Maps/Shuttles/emergency.yml",
"/Maps/Goobstation/Shuttles/infiltrator.yml", // Goobstation - use custom infiltrator
"/Maps/Goobstation/Shuttles/infiltrator.yml" // Goobstation - use custom infiltrator
};

private static readonly string[] GameMaps =
Expand All @@ -64,7 +64,10 @@ public sealed class PostMapInitTest
"Atlas",
"Reach",
"Train",
"Oasis"
"Oasis",
"FlandHighPop", // Goobstation - add highpop maps
"OasisHighPop",
"OriginHighPop"
};

/// <summary>
Expand Down
16 changes: 14 additions & 2 deletions Content.Server/Access/Systems/IdCardSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Content.Shared.Popups;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Content.Server.Kitchen.EntitySystems;

namespace Content.Server.Access.Systems;

Expand All @@ -18,6 +19,7 @@ public sealed class IdCardSystem : SharedIdCardSystem
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly MicrowaveSystem _microwave = default!;

public override void Initialize()
{
Expand All @@ -27,12 +29,13 @@ public override void Initialize()

private void OnMicrowaved(EntityUid uid, IdCardComponent component, BeingMicrowavedEvent args)
{
if (!component.CanMicrowave)
return;
if (!component.CanMicrowave || !TryComp<MicrowaveComponent>(args.Microwave, out var micro) || micro.Broken)
return;

if (TryComp<AccessComponent>(uid, out var access))
{
float randomPick = _random.NextFloat();

// if really unlucky, burn card
if (randomPick <= 0.15f)
{
Expand All @@ -49,6 +52,14 @@ private void OnMicrowaved(EntityUid uid, IdCardComponent component, BeingMicrowa
EntityManager.QueueDeleteEntity(uid);
return;
}

//Explode if the microwave can't handle it
if (!micro.CanMicrowaveIdsSafely)
{
_microwave.Explode((args.Microwave, micro));
return;
}

// If they're unlucky, brick their ID
if (randomPick <= 0.25f)
{
Expand All @@ -73,6 +84,7 @@ private void OnMicrowaved(EntityUid uid, IdCardComponent component, BeingMicrowa

_adminLogger.Add(LogType.Action, LogImpact.Medium,
$"{ToPrettyString(args.Microwave)} added {random.ID} access to {ToPrettyString(uid):entity}");

}
}
}
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);
}
}
}
Loading
Loading