Skip to content

Commit

Permalink
Merge branch 'master' into space-wizards_space-station-14_26167_2024-…
Browse files Browse the repository at this point in the history
…04-22
  • Loading branch information
VMSolidus authored Jul 10, 2024
2 parents 5d4e692 + 83d6633 commit df8264b
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 26 deletions.
4 changes: 2 additions & 2 deletions Content.Packaging/ClientPackaging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static class ClientPackaging
/// <summary>
/// Be advised this can be called from server packaging during a HybridACZ build.
/// </summary>
public static async Task PackageClient(bool skipBuild, IPackageLogger logger)
public static async Task PackageClient(bool skipBuild, string configuration, IPackageLogger logger)
{
logger.Info("Building client...");

Expand All @@ -26,7 +26,7 @@ await ProcessHelpers.RunCheck(new ProcessStartInfo
{
"build",
Path.Combine("Content.Client", "Content.Client.csproj"),
"-c", "Release",
"-c", configuration,
"--nologo",
"/v:m",
"/t:Rebuild",
Expand Down
23 changes: 21 additions & 2 deletions Content.Packaging/CommandLineArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public sealed class CommandLineArgs
/// </summary>
public bool HybridAcz { get; set; }

/// <summary>
/// Configuration used for when packaging the server. (Release, Debug, Tools)
/// </summary>
public string Configuration { get; set; }

// CommandLineArgs, 3rd of her name.
public static bool TryParse(IReadOnlyList<string> args, [NotNullWhen(true)] out CommandLineArgs? parsed)
{
Expand All @@ -39,6 +44,7 @@ public static bool TryParse(IReadOnlyList<string> args, [NotNullWhen(true)] out
var skipBuild = false;
var wipeRelease = true;
var hybridAcz = false;
var configuration = "Release";
List<string>? platforms = null;

using var enumerator = args.GetEnumerator();
Expand Down Expand Up @@ -89,6 +95,16 @@ public static bool TryParse(IReadOnlyList<string> args, [NotNullWhen(true)] out
platforms ??= new List<string>();
platforms.Add(enumerator.Current);
}
else if (arg == "--configuration")
{
if (!enumerator.MoveNext())
{
Console.WriteLine("No configuration provided");
return false;
}

configuration = enumerator.Current;
}
else if (arg == "--help")
{
PrintHelp();
Expand All @@ -106,7 +122,7 @@ public static bool TryParse(IReadOnlyList<string> args, [NotNullWhen(true)] out
return false;
}

parsed = new CommandLineArgs(client.Value, skipBuild, wipeRelease, hybridAcz, platforms);
parsed = new CommandLineArgs(client.Value, skipBuild, wipeRelease, hybridAcz, platforms, configuration);
return true;
}

Expand All @@ -120,6 +136,7 @@ private static void PrintHelp()
--no-wipe-release Don't wipe the release folder before creating files.
--hybrid-acz Use HybridACZ for server builds.
--platform Platform for server builds. Default will output several x64 targets.
--configuration Configuration to use for building the server (Release, Debug, Tools). Default is Release.
");
}

Expand All @@ -128,12 +145,14 @@ private CommandLineArgs(
bool skipBuild,
bool wipeRelease,
bool hybridAcz,
List<string>? platforms)
List<string>? platforms,
string configuration)
{
Client = client;
SkipBuild = skipBuild;
WipeRelease = wipeRelease;
HybridAcz = hybridAcz;
Platforms = platforms;
Configuration = configuration;
}
}
4 changes: 2 additions & 2 deletions Content.Packaging/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

if (parsed.Client)
{
await ClientPackaging.PackageClient(parsed.SkipBuild, logger);
await ClientPackaging.PackageClient(parsed.SkipBuild, parsed.Configuration, logger);
}
else
{
await ServerPackaging.PackageServer(parsed.SkipBuild, parsed.HybridAcz, logger, parsed.Platforms);
await ServerPackaging.PackageServer(parsed.SkipBuild, parsed.HybridAcz, logger, parsed.Configuration, parsed.Platforms);
}

void WipeBin()
Expand Down
18 changes: 9 additions & 9 deletions Content.Packaging/ServerPackaging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static class ServerPackaging
"zh-Hant"
};

public static async Task PackageServer(bool skipBuild, bool hybridAcz, IPackageLogger logger, List<string>? platforms = null)
public static async Task PackageServer(bool skipBuild, bool hybridAcz, IPackageLogger logger, string configuration, List<string>? platforms = null)
{
if (platforms == null)
{
Expand All @@ -82,7 +82,7 @@ public static async Task PackageServer(bool skipBuild, bool hybridAcz, IPackageL
// Rather than hosting the client ZIP on the watchdog or on a separate server,
// Hybrid ACZ uses the ACZ hosting functionality to host it as part of the status host,
// which means that features such as automatic UPnP forwarding still work properly.
await ClientPackaging.PackageClient(skipBuild, logger);
await ClientPackaging.PackageClient(skipBuild, configuration, logger);
}

// Good variable naming right here.
Expand All @@ -91,13 +91,13 @@ public static async Task PackageServer(bool skipBuild, bool hybridAcz, IPackageL
if (!platforms.Contains(platform.Rid))
continue;

await BuildPlatform(platform, skipBuild, hybridAcz, logger);
await BuildPlatform(platform, skipBuild, hybridAcz, configuration, logger);
}
}

private static async Task BuildPlatform(PlatformReg platform, bool skipBuild, bool hybridAcz, IPackageLogger logger)
private static async Task BuildPlatform(PlatformReg platform, bool skipBuild, bool hybridAcz, string configuration, IPackageLogger logger)
{
logger.Info($"Building project for {platform}...");
logger.Info($"Building project for {platform.TargetOs}...");

if (!skipBuild)
{
Expand All @@ -108,7 +108,7 @@ await ProcessHelpers.RunCheck(new ProcessStartInfo
{
"build",
Path.Combine("Content.Server", "Content.Server.csproj"),
"-c", "Release",
"-c", configuration,
"--nologo",
"/v:m",
$"/p:TargetOs={platform.TargetOs}",
Expand All @@ -118,7 +118,7 @@ await ProcessHelpers.RunCheck(new ProcessStartInfo
}
});

await PublishClientServer(platform.Rid, platform.TargetOs);
await PublishClientServer(platform.Rid, platform.TargetOs, configuration);
}

logger.Info($"Packaging {platform.Rid} server...");
Expand All @@ -137,7 +137,7 @@ await ProcessHelpers.RunCheck(new ProcessStartInfo
logger.Info($"Finished packaging server in {sw.Elapsed}");
}

private static async Task PublishClientServer(string runtime, string targetOs)
private static async Task PublishClientServer(string runtime, string targetOs, string configuration)
{
await ProcessHelpers.RunCheck(new ProcessStartInfo
{
Expand All @@ -147,7 +147,7 @@ await ProcessHelpers.RunCheck(new ProcessStartInfo
"publish",
"--runtime", runtime,
"--no-self-contained",
"-c", "Release",
"-c", configuration,
$"/p:TargetOs={targetOs}",
"/p:FullRelease=True",
"/m",
Expand Down
8 changes: 8 additions & 0 deletions Content.Server/Implants/SubdermalImplantSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
using Robust.Shared.Physics.Components;
using Robust.Shared.Random;
using System.Numerics;
using Content.Shared.Movement.Pulling.Components;
using Content.Shared.Movement.Pulling.Systems;

namespace Content.Server.Implants;

Expand All @@ -34,6 +36,7 @@ public sealed class SubdermalImplantSystem : SharedSubdermalImplantSystem
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly SharedTransformSystem _xform = default!;
[Dependency] private readonly ForensicsSystem _forensicsSystem = default!;
[Dependency] private readonly PullingSystem _pullingSystem = default!;

private EntityQuery<PhysicsComponent> _physicsQuery;

Expand Down Expand Up @@ -98,6 +101,11 @@ private void OnScramImplant(EntityUid uid, SubdermalImplantComponent component,
if (!TryComp<ScramImplantComponent>(uid, out var implant))
return;

// We need stop the user from being pulled so they don't just get "attached" with whoever is pulling them.
// This can for example happen when the user is cuffed and being pulled.
if (TryComp<PullableComponent>(ent, out var pull) && _pullingSystem.IsPulled(ent, pull))
_pullingSystem.TryStopPull(ent, pull);

var xform = Transform(ent);
var entityCoords = xform.Coordinates.ToMap(EntityManager, _xform);

Expand Down
1 change: 1 addition & 0 deletions Resources/Locale/en-US/store/categories.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ store-category-implants = Implants
store-category-job = Job
store-category-armor = Armor
store-category-pointless = Pointless
store-category-deception = Deception
# Revenant
store-category-abilities = Abilities
24 changes: 13 additions & 11 deletions Resources/Prototypes/Catalog/uplink_catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,6 @@
tags:
- NukeOpsUplink

- type: listing
id: UplinkSyndicateBombFake
name: uplink-exploding-syndicate-bomb-fake-name
description: uplink-exploding-syndicate-bomb-fake-desc
productEntity: SyndicateBombFake
cost:
Telecrystal: 4
categories:
- UplinkExplosives

- type: listing
id: UplinkClusterGrenade
name: uplink-cluster-grenade-name
Expand Down Expand Up @@ -787,7 +777,19 @@
cost:
Telecrystal: 6
categories:
- UplinkBundles
- UplinkBundles

- type: listing
id: UplinkSyndicateBombFake
name: uplink-exploding-syndicate-bomb-fake-name
description: uplink-exploding-syndicate-bomb-fake-desc
productEntity: SyndicateBombFake
cost:
Telecrystal: 4
categories:
- UplinkDeception

# Disruption

- type: listing
id: UplinkAmmoBundle
Expand Down
5 changes: 5 additions & 0 deletions Resources/Prototypes/Store/categories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
name: store-category-pointless
priority: 9

- type: storeCategory
id: UplinkDeception
name: store-category-deception
priority: 10

#revenant
- type: storeCategory
id: RevenantAbilities
Expand Down

0 comments on commit df8264b

Please sign in to comment.