Skip to content

Commit

Permalink
Merge branch 'DeltaV-Station:master' into Elegance
Browse files Browse the repository at this point in the history
  • Loading branch information
IAmNotGray authored Jan 9, 2025
2 parents 39f6ae5 + 60c5291 commit ba16492
Show file tree
Hide file tree
Showing 138 changed files with 6,110 additions and 3,377 deletions.
50 changes: 44 additions & 6 deletions Content.Client/CrewManifest/UI/CrewManifestSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,62 @@ public CrewManifestSection(
Text = Loc.GetString($"department-{section.ID}")
});

var gridContainer = new GridContainer()
// Delta-V - changed type from GridContainer to BoxContainer to better handle long names and titles.
var gridContainer = new BoxContainer()
{
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true,
Columns = 2
};

// Delta-V - Start of column BoxContainers.
var namesContainer = new BoxContainer()
{
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true,
SizeFlagsStretchRatio = 3,
};

var titlesContainer = new BoxContainer()
{
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true,
SizeFlagsStretchRatio = 2,
};

gridContainer.AddChild(namesContainer);
gridContainer.AddChild(titlesContainer);
// Delta-V - end of column BoxContainers.

AddChild(gridContainer);

foreach (var entry in entries)
{
var name = new RichTextLabel()
// Delta-V - start of name and pronoun container
var nameContainer = new BoxContainer()
{
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true,
};

var name = new RichTextLabel();
name.SetMessage(entry.Name);

var gender = new RichTextLabel()
{
Margin = new Thickness(6, 0, 0, 0),
StyleClasses = { "CrewManifestGender" }
};
gender.SetMessage(Loc.GetString("gender-display", ("gender", entry.Gender)));

nameContainer.AddChild(name);
nameContainer.AddChild(gender);
// Delta-V - end of name and pronoun container

var titleContainer = new BoxContainer()
{
Orientation = LayoutOrientation.Horizontal,
HorizontalExpand = true
HorizontalExpand = true,
SizeFlagsStretchRatio = 1, // Delta-V
};

var title = new RichTextLabel();
Expand All @@ -69,8 +105,10 @@ public CrewManifestSection(
titleContainer.AddChild(title);
}

gridContainer.AddChild(name);
gridContainer.AddChild(titleContainer);
// Delta-V - grid was replaced with two BoxContainer columns
namesContainer.AddChild(nameContainer);
titlesContainer.AddChild(titleContainer);
// Delta-V - end of grid container change
}
}
}
9 changes: 9 additions & 0 deletions Content.Client/Stylesheets/StyleNano.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ public sealed class StyleNano : StyleBase
public const string StyleClassPinButtonPinned = "pinButtonPinned";
public const string StyleClassPinButtonUnpinned = "pinButtonUnpinned";

//Delta-V - Manifest pronouns
public const string StyleClassCrewManifestGender = "CrewManifestGender";


public override Stylesheet Stylesheet { get; }

Expand Down Expand Up @@ -1291,6 +1294,12 @@ public StyleNano(IResourceCache resCache) : base(resCache)
.Prop("font", notoSansItalic10)
.Prop("font-color", ItemStatusNotHeldColor),

// Delta-V add style for pronouns on the crew manifest
Element<RichTextLabel>()
.Class(StyleClassCrewManifestGender)
.Prop("font", notoSansItalic10)
.Prop("font-style", "italic"),

Element<RichTextLabel>()
.Class(StyleClassItemStatus)
.Prop(nameof(RichTextLabel.LineHeightScale), 0.7f)
Expand Down
1 change: 1 addition & 0 deletions Content.IntegrationTests/Tests/CargoTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public async Task NoCargoBountyArbitrageTest()
var cargo = entManager.System<CargoSystem>();

var bounties = protoManager.EnumeratePrototypes<CargoBountyPrototype>().ToList();
bounties.RemoveAll(bounty => bounty.SkipArbitrage); // DeltaV

await server.WaitAssertion(() =>
{
Expand Down
9 changes: 9 additions & 0 deletions Content.Server/Body/Systems/BodySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ namespace Content.Server.Body.Systems;

public sealed class BodySystem : SharedBodySystem
{
[Dependency] private readonly BloodstreamSystem _bloodstream = default!; // Shitmed Change
[Dependency] private readonly GhostSystem _ghostSystem = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly HumanoidAppearanceSystem _humanoidSystem = default!;
Expand Down Expand Up @@ -195,5 +196,13 @@ protected override void RemoveBodyMarkings(EntityUid target, BodyPartAppearanceC
Dirty(target, bodyAppearance);
}

protected override void PartRemoveDamage(Entity<BodyComponent?> bodyEnt, Entity<BodyPartComponent> partEnt)
{
var bleeding = partEnt.Comp.SeverBleeding;
if (partEnt.Comp.IsVital)
bleeding *= 2f;
_bloodstream.TryModifyBleedAmount(bodyEnt, bleeding);
}

// Shitmed Change End
}
2 changes: 1 addition & 1 deletion Content.Server/Cloning/CloningConsoleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ private CloningConsoleBoundUserInterfaceState GetUserInterfaceState(CloningConso
{
scanBodyInfo = MetaData(scanBody.Value).EntityName;

if (false) // GoobStation: Lets you clone living people
if (!_mobStateSystem.IsDead(scanBody.Value))
{
clonerStatus = ClonerStatus.ScannerOccupantAlive;
}
Expand Down
12 changes: 5 additions & 7 deletions Content.Server/Cloning/CloningSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity<MindComponen
return false;

var mind = mindEnt.Comp;
// GoobStation: Remove this logic entirely, infinite clone army
/*if (ClonesWaitingForMind.TryGetValue(mind, out var clone))
if (ClonesWaitingForMind.TryGetValue(mind, out var clone))
{
if (EntityManager.EntityExists(clone) &&
!_mobStateSystem.IsDead(clone) &&
Expand All @@ -160,11 +159,10 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity<MindComponen
return false; // Mind already has clone

ClonesWaitingForMind.Remove(mind);
}*/
}

// GoobStation: Lets you clone living people
//if (mind.OwnedEntity != null && !_mobStateSystem.IsDead(mind.OwnedEntity.Value))
// return false; // Body controlled by mind is not dead
if (mind.OwnedEntity != null && !_mobStateSystem.IsDead(mind.OwnedEntity.Value))
return false; // Body controlled by mind is not dead

// Yes, we still need to track down the client because we need to open the Eui
if (mind.UserId == null || !_playerManager.TryGetSessionById(mind.UserId.Value, out var client))
Expand Down Expand Up @@ -253,7 +251,7 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity<MindComponen
cloneMindReturn.Mind = mind;
cloneMindReturn.Parent = uid;
_containerSystem.Insert(mob, clonePod.BodyContainer);
//ClonesWaitingForMind.Add(mind, mob); // GoobStation
ClonesWaitingForMind.Add(mind, mob);
UpdateStatus(uid, CloningPodStatus.NoMind, clonePod);
_euiManager.OpenEui(new AcceptCloningEui(mindEnt, mind, this), client);

Expand Down
3 changes: 2 additions & 1 deletion Content.Server/CrewManifest/CrewManifestSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ private void BuildCrewManifest(EntityUid station)
foreach (var recordObject in iter)
{
var record = recordObject.Item2;
var entry = new CrewManifestEntry(record.Name, record.JobTitle, record.JobIcon, record.JobPrototype);
// Delta-V: Added gender to crew manifest
var entry = new CrewManifestEntry(record.Name, record.Gender.ToString().ToLowerInvariant(), record.JobTitle, record.JobIcon, record.JobPrototype);

_prototypeManager.TryIndex(record.JobPrototype, out JobPrototype? job);
entriesSort.Add((job, entry));
Expand Down
6 changes: 6 additions & 0 deletions Content.Server/Kitchen/Components/SharpComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ public sealed partial class SharpComponent : Component
[DataField("butcherDelayModifier")]
public float ButcherDelayModifier = 1.0f;

/// <summary>
/// Shitmed: Whether this item had <c>SurgeryToolComponent</c> before sharp was added.
/// </summary>
[DataField]
public bool HadSurgeryTool;

/// <summary>
/// Shitmed: Whether this item had <c>ScalpelComponent</c> before sharp was added.
/// </summary>
Expand Down

This file was deleted.

47 changes: 0 additions & 47 deletions Content.Server/Nyanotrasen/Abilities/Borgs/FabricateCandySystem.cs

This file was deleted.

68 changes: 68 additions & 0 deletions Content.Server/_DV/FeedbackPopup/FeedbackPopupCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
using System.Linq;
using Content.Server.Administration;
using Content.Shared._DV.FeedbackOverwatch;
using Content.Shared.Administration;
using Robust.Shared.Console;
using Robust.Shared.Prototypes;

namespace Content.Server._DV.FeedbackPopup;

[AdminCommand(AdminFlags.Server)]
public sealed class FeedbackPopupCommand : LocalizedEntityCommands
{
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly SharedFeedbackOverwatchSystem _feedback = default!;

public override string Command => Loc.GetString("feedbackpopup-command-name");

public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 2)
{
shell.WriteError(Loc.GetString("feedbackpopup-command-error-wrong-arguments"));
return;
}

if (!int.TryParse(args[0], out var entityUidInt))
{
shell.WriteError(Loc.GetString("feedbackpopup-command-error-invalid-uid"));
return;
}

var netEnt = new NetEntity(entityUidInt);

if (!EntityManager.TryGetEntity(netEnt, out var target))
{
shell.WriteLine(Loc.GetString("feedbackpopup-command-error-entity-not-found"));
return;
}

if (!_proto.HasIndex<FeedbackPopupPrototype>(args[1]))
{
shell.WriteError(Loc.GetString("feedbackpopup-command-error-invalid-proto"));
return;
}

if (!_feedback.SendPopup(target, args[1]))
{
shell.WriteError(Loc.GetString("feedbackpopup-command-error-popup-send-fail"));
return;
}

shell.WriteLine(Loc.GetString("feedbackpopup-command-success"));
}

public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
{
if (args.Length == 1)
{
return CompletionResult.FromHint(Loc.GetString("feedbackpopup-command-hint-playerUid"));
}

if (args.Length == 2)
{
return CompletionResult.FromHintOptions(_feedback.FeedbackPopupProtoIds, Loc.GetString("feedbackpopup-command-hint-protoId"));
}
return CompletionResult.Empty;
}
}
8 changes: 6 additions & 2 deletions Content.Server/_DV/NPC/Roboisseur/RoboisseurComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ public sealed partial class RoboisseurComponent : Component
"FoodMothHeartburnSoup",
"FoodSoupBisque",
"FoodCakeSlime",
"FoodBurgerCrazy"
"FoodBurgerCrazy",
"FoodMealPoachedPears",
"FoodMealPearsBelleHelene",
"FoodTartPearCheese",
};

[DataField("robossuierRewards")]
Expand Down Expand Up @@ -302,7 +305,8 @@ public sealed partial class RoboisseurComponent : Component
"LeavesCannabisRainbowDried",
"LeavesCannabisDried",
"FoodCakeBrain",
"FoodBurgerBrain"
"FoodBurgerBrain",
"FoodMeatAnomaly",
};
}
}
12 changes: 12 additions & 0 deletions Content.Server/_Shitmed/Medical/Surgery/GhettoSurgerySystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Content.Server.Kitchen.Components;
using Content.Shared._Shitmed.Medical.Surgery.Tools;
using Robust.Shared.Audio;

namespace Content.Server._Shitmed.Medical.Surgery;

Expand All @@ -18,6 +19,17 @@ public override void Initialize()

private void OnSharpInit(Entity<SharpComponent> ent, ref MapInitEvent args)
{
if (EnsureComp<SurgeryToolComponent>(ent, out var tool))
{
ent.Comp.HadSurgeryTool = true;
}
else
{
tool.StartSound = new SoundPathSpecifier("/Audio/_Shitmed/Medical/Surgery/scalpel1.ogg");
tool.EndSound = new SoundPathSpecifier("/Audio/_Shitmed/Medical/Surgery/scalpel2.ogg");
Dirty(ent.Owner, tool);
}

if (EnsureComp<ScalpelComponent>(ent, out var scalpel))
{
ent.Comp.HadScalpel = true;
Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Access/Components/IdCardConsoleComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public WriteToTargetIdMessage(string fullName, string jobTitle, List<ProtoId<Acc
"Prosecutor", // Delta V - Add Prosecutor access
"Robotics", // DeltaV
"Clerk", // Delta V - Add Clerk access
"Surgery", // Delta V - Add Surgery access
};

[Serializable, NetSerializable]
Expand Down
Loading

0 comments on commit ba16492

Please sign in to comment.