Skip to content

Commit

Permalink
socks
Browse files Browse the repository at this point in the history
  • Loading branch information
ITamiokiI committed Sep 11, 2023
2 parents 8b4a701 + eb42515 commit 52a863d
Show file tree
Hide file tree
Showing 1,349 changed files with 24,606 additions and 9,410 deletions.
40 changes: 14 additions & 26 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
# Last match in file takes precedence.

# Sorting by path instead of by who added it one day :(
# this isn't how codeowners rules work pls read the first comment instead of trying to force a sorting order
/Resources/ConfigPresets/WizardsDen/ @Chief-Engineer

# Moony's Gargantuan List Of Things She Cares About, or MGLOTSCA for short.
# You need to add your name to these entries, not make a new one, if you care about them.
/Content.*/Toolshed/ @moonheart08
**/Toolshed/** @moonheart08
*Command.cs @moonheart08
/Content.*/Administration/ @moonheart08 @PaulRitter @DrSmugleaf @Chief-Engineer
/Content.*/Administration/ @moonheart08 @DrSmugleaf @Chief-Engineer
/Content.*/Station/ @moonheart08
/Content.*/Maps/ @moonheart08
/Content.*/GameTicking/ @moonheart08 @EmoGarbage404
/Resources/ServerInfo/ @moonheart08 @Chief-Engineer
/Resources/ServerInfo/Guidebook/ @moonheart08 @EmoGarbage404
/Resources/engineCommandPerms.yml @moonheart08 @Chief-Engineer
/Resources/clientCommandPerms.yml @moonheart08 @Chief-Engineer
/Resources/Prototypes/species.yml @moonheart08
/Resources/Prototypes/Body/ @moonheart08 @mirrorcult @DrSmugleaf # suffering
/Resources/Prototypes/Maps/ @moonheart08 @Emisse
/Resources/Prototypes/Entities/Mobs/Player/ @moonheart08 @mirrorcult @DrSmugleaf
/Resources/Prototypes/Entities/Mobs/Species/ @moonheart08 @mirrorcult @DrSmugleaf

/Content.*/Body/ @mirrorcult @DrSmugleaf
/Content.*/Chemistry/ @mirrorcult
/Content.*/StatusEffect/ @mirrorcult
/Content.*/Whitelist/ @mirrorcult
/Resources/Prototypes/Reagents/ @mirrorcult
/Resources/Prototypes/Recipes/Reactions @mirrorcult
/Resources/Prototypes/Chemistry @mirrorcult
/Resources/Prototypes/Maps/ @Emisse

/Resources/Prototypes/Body/ @DrSmugleaf # suffering
/Resources/Prototypes/Entities/Mobs/Player/ @DrSmugleaf
/Resources/Prototypes/Entities/Mobs/Species/ @DrSmugleaf
/Content.*/Body/ @DrSmugleaf
/Content.YAMLLinter @DrSmugleaf

/Content.*/Verbs/ @ElectroJr
/Content.Client/ContextMenu/ @ElectroJr
Expand All @@ -54,21 +50,13 @@

/Content.*/Forensics/ @ficcialfaint

/Content.YAMLLinter @PaulRitter @DrSmugleaf
/Content.*/Inventory @PaulRitter
/Content.*/Arcade @PaulRitter
/Content.*/Conveyor @PaulRitter
/Content.*/Decals @PaulRitter
/Content.*/Objectives @PaulRitter
/Content.*/MachineLinking @PaulRitter
/Content.*/Crayon @PaulRitter
/Content.*/Clothing @PaulRitter

# Be they Fluent translations or Freemarker templates, I know them both!
*.ftl @RemieRichards

# SKREEEE
/Content.*.Database/ @PJB3005 @DrSmugleaf
/Content.Shared.Database/Log*.cs @PJB3005 @DrSmugleaf @Chief-Engineer
/Pow3r/ @PJB3005
/Content.Server/Power/Pow3r/ @PJB3005

# notafet
/Content.*/Atmos/ @Partmedia
/Content.*/Botany/ @Partmedia

20 changes: 6 additions & 14 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,17 @@ publish:
script:
- mkdir .git/hooks -p
- python3 RUN_THIS.py
- Tools/package_server_build.py -p win-x64 linux-x64 osx-x64 linux-arm64 > server_build.log
- Tools/package_client_build.py > client_build.log
- Tools/package_server_build.py -p win-x64 linux-x64 osx-x64 linux-arm64
- Tools/package_client_build.py
- Tools/gen_build_info.py
- mkdir release/$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA
- mv release/*.zip release/$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA
- eval $(ssh-agent -s)
- ssh-add - <<< "${SSH_PRIVATE_KEY}"
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
- ssh-keyscan $SSH_REMOTE_IP >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- rsync -avz release/$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA $SSH_USER@$SSH_REMOTE_IP:~/builds/builds/
- ssh $SSH_USER@$SSH_REMOTE_IP "~/push.ps1 $CI_COMMIT_REF_NAME-$CI_COMMIT_SHA $CI_COMMIT_REF_NAME"
artifacts:
name: "Build logs $CI_COMMIT_REF_NAME"
paths:
- server_build.log
- client_build.log

publish-artifact:
stage: publish
Expand All @@ -71,9 +64,8 @@ publish-artifact:
- mkdir .git/hooks -p
- python3 RUN_THIS.py
# We create artifact only for Windows and x64 Linux, because almost noone uses OSX and Linux on arm for development among our contributors. This will save for us some amount of storage. You can just add osx-x64 or linux-arm64 if you really need it.
- Tools/package_server_build.py -p win-x64 linux-x64 --hybrid-acz > server_build.log
- Tools/package_server_build.py -p win-x64 linux-x64 --hybrid-acz
artifacts:
name: "$CI_COMMIT_SHA"
name: "$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA"
paths:
- release
- server_build.log
- release/SS14.Server_*
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"omnisharp.analyzeOpenDocumentsOnly": true
"omnisharp.analyzeOpenDocumentsOnly": true,
"dotnet.defaultSolution": "SpaceStation14.sln"
}
2 changes: 2 additions & 0 deletions Content.Benchmarks/DeviceNetworkingBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public class DeviceNetworkingBenchmark
public async Task SetupAsync()
{
ProgramShared.PathOffset = "../../../../";
PoolManager.Startup(typeof(DeviceNetworkingBenchmark).Assembly);
_pair = await PoolManager.GetServerClient();
var server = _pair.Server;

Expand Down Expand Up @@ -91,6 +92,7 @@ await server.WaitPost(() =>
public async Task Cleanup()
{
await _pair.DisposeAsync();
PoolManager.Shutdown();
}

[Benchmark(Baseline = true, Description = "Entity Events")]
Expand Down
2 changes: 2 additions & 0 deletions Content.Benchmarks/MapLoadBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public class MapLoadBenchmark
public void Setup()
{
ProgramShared.PathOffset = "../../../../";
PoolManager.Startup(null);

_pair = PoolManager.GetServerClient().GetAwaiter().GetResult();
var server = _pair.Server;
Expand All @@ -42,6 +43,7 @@ public void Setup()
public async Task Cleanup()
{
await _pair.DisposeAsync();
PoolManager.Shutdown();
}

public static IEnumerable<string> MapsSource { get; set; }
Expand Down
8 changes: 5 additions & 3 deletions Content.Benchmarks/Program.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Running;
using Content.IntegrationTests;
using Content.Server.Maps;
#if DEBUG
using BenchmarkDotNet.Configs;
#else
using Robust.Benchmarks.Configs;
#endif
using Robust.Shared.Prototypes;

namespace Content.Benchmarks
Expand All @@ -25,6 +28,7 @@ public static async Task MainAsync(string[] args)
var gameMaps = pair.Server.ResolveDependency<IPrototypeManager>().EnumeratePrototypes<GameMapPrototype>().ToList();
MapLoadBenchmark.MapsSource = gameMaps.Select(x => x.ID);
await pair.CleanReturnAsync();
PoolManager.Shutdown();

#if DEBUG
Console.ForegroundColor = ConsoleColor.Red;
Expand All @@ -35,8 +39,6 @@ public static async Task MainAsync(string[] args)
var config = Environment.GetEnvironmentVariable("ROBUST_BENCHMARKS_ENABLE_SQL") != null ? DefaultSQLConfig.Instance : null;
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, config);
#endif

PoolManager.Shutdown();
}
}
}
66 changes: 66 additions & 0 deletions Content.Benchmarks/SpawnEquipDeleteBenchmark.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
using Content.IntegrationTests;
using Content.IntegrationTests.Pair;
using Content.Server.Station.Systems;
using Content.Shared.Roles;
using Robust.Shared;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;

namespace Content.Benchmarks;

/// <summary>
/// This benchmarks spawns several humans, gives them captain equipment and then deletes them.
/// This measures performance for spawning, deletion, containers, and inventory code.
/// </summary>
[Virtual, MemoryDiagnoser]
public class SpawnEquipDeleteBenchmark
{
private TestPair _pair = default!;
private StationSpawningSystem _spawnSys = default!;
private const string Mob = "MobHuman";
private StartingGearPrototype _gear = default!;
private EntityUid _entity;
private EntityCoordinates _coords;

[Params(1, 4, 16, 64)]
public int N;

[GlobalSetup]
public async Task SetupAsync()
{
ProgramShared.PathOffset = "../../../../";
PoolManager.Startup(null);
_pair = await PoolManager.GetServerClient();
var server = _pair.Server;

var mapData = await _pair.CreateTestMap();
_coords = mapData.GridCoords;
_spawnSys = server.System<StationSpawningSystem>();
_gear = server.ProtoMan.Index<StartingGearPrototype>("CaptainGear");
}

[GlobalCleanup]
public async Task Cleanup()
{
await _pair.DisposeAsync();
PoolManager.Shutdown();
}

[Benchmark]
public async Task SpawnDeletePlayer()
{
await _pair.Server.WaitPost(() =>
{
var server = _pair.Server;
for (var i = 0; i < N; i++)
{
_entity = server.EntMan.SpawnAttachedTo(Mob, _coords);
_spawnSys.EquipStartingGear(_entity, _gear, null);
server.EntMan.DeleteEntity(_entity);
}
});
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Robust.Client.AutoGenerated;
using Robust.Client.Console;
using Robust.Client.UserInterface.Controls;
Expand Down Expand Up @@ -176,16 +177,16 @@ private void UpdateThermalBox(Solution solution)
/// <summary>
/// Add a single reagent entry to the list
/// </summary>
private void AddReagentEntry(Solution.ReagentQuantity reagent)
private void AddReagentEntry(ReagentQuantity reagentQuantity)
{
var box = new BoxContainer();
var spin = new FloatSpinBox(1, 2);

spin.Value = reagent.Quantity.Float();
spin.OnValueChanged += (args) => SetReagent(args, reagent.ReagentId);
spin.Value = reagentQuantity.Quantity.Float();
spin.OnValueChanged += (args) => SetReagent(args, reagentQuantity.Reagent.Prototype);
spin.HorizontalExpand = true;

box.AddChild(new Label() { Text = reagent.ReagentId , HorizontalExpand = true});
box.AddChild(new Label() { Text = reagentQuantity.Reagent.Prototype , HorizontalExpand = true});
box.AddChild(spin);

ReagentList.AddChild(box);
Expand All @@ -194,18 +195,18 @@ private void AddReagentEntry(Solution.ReagentQuantity reagent)
/// <summary>
/// Execute a command to modify the reagents in the solution.
/// </summary>
private void SetReagent(FloatSpinBox.FloatSpinBoxEventArgs args, string reagentId)
private void SetReagent(FloatSpinBox.FloatSpinBoxEventArgs args, string prototype)
{
if (_solutions == null || _selectedSolution == null)
return;

var current = _solutions[_selectedSolution].GetReagentQuantity(reagentId);
var current = _solutions[_selectedSolution].GetTotalPrototypeQuantity(prototype);
var delta = args.Value - current.Float();

if (MathF.Abs(delta) < 0.01)
return;

var command = $"addreagent {_target} {_selectedSolution} {reagentId} {delta}";
var command = $"addreagent {_target} {_selectedSolution} {prototype} {delta}";
_consoleHost.ExecuteCommand(command);
}

Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Animations/ReusableAnimations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static void AnimateEntityPickup(EntityUid entity, EntityCoordinates initi

var animatableClone = entMan.SpawnEntity("clientsideclone", initialPosition);
string val = entMan.GetComponent<MetaDataComponent>(entity).EntityName;
entMan.GetComponent<MetaDataComponent>(animatableClone).EntityName = val;
entMan.System<MetaDataSystem>().SetEntityName(animatableClone, val);

if (!entMan.TryGetComponent(entity, out SpriteComponent? sprite0))
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/CharacterInfo/CharacterInfoSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public readonly record struct CharacterData(
EntityUid Entity,
string Job,
Dictionary<string, List<ConditionInfo>> Objectives,
string Briefing,
string? Briefing,
string EntityName
);

Expand Down
10 changes: 0 additions & 10 deletions Content.Client/Chemistry/Components/InjectorComponent.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
using Content.Client.Items.Components;
using Content.Client.Message;
using Content.Client.Stylesheets;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.GameObjects;
using Robust.Shared.Localization;
using Robust.Shared.Timing;
using Robust.Shared.ViewVariables;

namespace Content.Client.Chemistry.Components
{
Expand Down
Loading

0 comments on commit 52a863d

Please sign in to comment.