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

Partial Merge Up to 2024-11-17 #402

Merged
Merged
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
12e5363
Update Credits (#1179)
github-actions[bot] Nov 7, 2024
ffdaa84
Updates Health Analyzer UI (#1183)
gluesniffler Nov 7, 2024
779583d
Automatic Changelog Update (#1183)
SimpleStation14 Nov 7, 2024
fa87a39
Nerf The Shit Out Of Familiars (#1184)
VMSolidus Nov 8, 2024
9e85b73
Automatic Changelog Update (#1184)
SimpleStation14 Nov 8, 2024
3209838
Show Language Names In Chat (#1165)
VMSolidus Nov 8, 2024
ff43313
Automatic Changelog Update (#1165)
SimpleStation14 Nov 8, 2024
8116581
Minor Fixes on Rad and Gax (#1178)
Ichaie Nov 8, 2024
ae204a8
Port Cool Punpun (#1157)
DEATHB4DEFEAT Nov 8, 2024
d521d46
Automatic Changelog Update (#1178)
SimpleStation14 Nov 8, 2024
e7d40d1
Traits V2 (#1182)
VMSolidus Nov 8, 2024
9b8ad31
Automatic Changelog Update (#1182)
SimpleStation14 Nov 8, 2024
09ffbd3
Disable Shadowkin (#1187)
VMSolidus Nov 8, 2024
b72d7c3
Automatic Changelog Update (#1187)
SimpleStation14 Nov 8, 2024
55e2170
Cherry Pick WizDen PR #28488 (#1194)
sleepyyapril Nov 8, 2024
8faeaa7
Port Bloodstains And Footprints (#1190)
VMSolidus Nov 9, 2024
8d5572b
Automatic Changelog Update (#1190)
SimpleStation14 Nov 9, 2024
a2b86bc
Beacons (#1196)
sleepyyapril Nov 9, 2024
4713261
Cherry-Pick Wizden PR 28375 (#1191)
VMSolidus Nov 9, 2024
94157bd
Fix Call Shuttle (#1199)
sleepyyapril Nov 10, 2024
4de7f50
Fix AddTrait And ReplaceTrait Functions (#1195)
VMSolidus Nov 10, 2024
e469816
Automatic Changelog Update (#1195)
SimpleStation14 Nov 10, 2024
6305e2d
Update Credits (#1202)
github-actions[bot] Nov 10, 2024
04cdc14
Add Missing `DOTNET_ROOT` Environment Variable For Nix Devs (#1203)
DocNITE Nov 11, 2024
20ac0b3
Swapped Hands HUD Fix (#1207)
Suraru Nov 13, 2024
c909724
Fix Butlertron's Hitbox (#1192)
VMSolidus Nov 13, 2024
66490ca
Automatic Changelog Update (#1192)
SimpleStation14 Nov 13, 2024
d1e4d11
The Hive: Update Engineering (#1201)
Ichaie Nov 13, 2024
4071d41
Automatic Changelog Update (#1201)
SimpleStation14 Nov 13, 2024
12c0a63
Return Old Lobby Music (#1204)
DocNITE Nov 13, 2024
74688cf
Automatic Changelog Update (#1204)
SimpleStation14 Nov 13, 2024
a77f581
Prevent Listening Posts From Spawning On Planets (#1188)
VMSolidus Nov 13, 2024
7063c79
Automatic Changelog Update (#1188)
SimpleStation14 Nov 13, 2024
ccb26b2
Fix Silver Crate Name (#1218)
sleepyyapril Nov 14, 2024
6b2ec00
Auto Voting System (#1213)
sleepyyapril Nov 14, 2024
8385fb1
Automatic Changelog Update (#1213)
SimpleStation14 Nov 14, 2024
3c31771
Fix Trait Component Removal (#1221)
DEATHB4DEFEAT Nov 14, 2024
387a362
Some Language Fixes (#1223)
Mnemotechnician Nov 14, 2024
8739096
Automatic Changelog Update (#1223)
SimpleStation14 Nov 14, 2024
3423e93
The Return of Spray Paint (#1222)
DEATHB4DEFEAT Nov 15, 2024
cfdc273
Bounties Localization Fix (#1219)
sleepyyapril Nov 15, 2024
45fdd0c
Automatic Changelog Update (#1222)
SimpleStation14 Nov 15, 2024
a505ed7
Change some Code Style Settings (#1226)
DEATHB4DEFEAT Nov 16, 2024
71185a7
Give Penguins Cold Resistance (#1229)
zelezniciar1 Nov 16, 2024
1c20299
Automatic Changelog Update (#1229)
SimpleStation14 Nov 16, 2024
7573650
Merge commit '1c202993ed0986f72205c31a14176f4fbb8e1420' into floof/fe…
Mnemotechnician Dec 4, 2024
2342a3b
Tonight's the night, we discover entity parenting
Mnemotechnician Dec 4, 2024
14d52ed
some fixes or something?
Mnemotechnician Dec 5, 2024
3bde61d
yaml fixes
Mnemotechnician Dec 9, 2024
7feee73
Merge remote-tracking branch 'floofstation/master' into floof/feat/pa…
Mnemotechnician Dec 9, 2024
cada5ea
Exclude rodentia and resomi from lightweight
Mnemotechnician Dec 9, 2024
971fe73
Nevermind - trystan was right
Mnemotechnician Dec 9, 2024
9283d62
Fix disposal trunk ejection
Mnemotechnician Dec 12, 2024
a0e6fcb
Merge remote-tracking branch 'origin-floofstation-fork/floof/feat/par…
Mnemotechnician Dec 12, 2024
626231a
Remove useless ccvar
Fansana Dec 14, 2024
56293da
Update BatteryRampPegSolver.cs
Fansana Dec 14, 2024
44b9192
Update PowerNetSystem.cs
Fansana Dec 14, 2024
e6d88cd
Update CCVars.cs
Fansana Dec 14, 2024
dfbbd99
update summary
Fansana Dec 14, 2024
a38504e
enable roundstart shadowkin
Fansana Dec 14, 2024
8c096b7
scales slider fixes (Thanks april)
Fansana Dec 14, 2024
903e3e9
Revert "scales slider fixes (Thanks april)"
Fansana Dec 15, 2024
f7ff7dd
skibedi
Fansana Dec 15, 2024
33f8509
rizzler
Fansana Dec 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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ csharp_style_expression_bodied_constructors = false:suggestion
#csharp_style_expression_bodied_indexers = true:silent
#csharp_style_expression_bodied_lambdas = true:silent
#csharp_style_expression_bodied_local_functions = false:silent
csharp_style_expression_bodied_methods = false:suggestion
csharp_style_expression_bodied_methods = true:suggestion
#csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:suggestion

Expand Down
65 changes: 65 additions & 0 deletions Content.Client/FootPrint/FootPrintsVisualizerSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
using Content.Shared.FootPrint;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Shared.Random;

namespace Content.Client.FootPrint;

public sealed class FootPrintsVisualizerSystem : VisualizerSystem<FootPrintComponent>
{
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly IRobustRandom _random = default!;

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

SubscribeLocalEvent<FootPrintComponent, ComponentInit>(OnInitialized);
SubscribeLocalEvent<FootPrintComponent, ComponentShutdown>(OnShutdown);
}

private void OnInitialized(EntityUid uid, FootPrintComponent comp, ComponentInit args)
{
if (!TryComp<SpriteComponent>(uid, out var sprite))
return;

sprite.LayerMapReserveBlank(FootPrintVisualLayers.Print);
UpdateAppearance(uid, comp, sprite);
}

private void OnShutdown(EntityUid uid, FootPrintComponent comp, ComponentShutdown args)
{
if (TryComp<SpriteComponent>(uid, out var sprite)
&& sprite.LayerMapTryGet(FootPrintVisualLayers.Print, out var layer))
sprite.RemoveLayer(layer);
}

private void UpdateAppearance(EntityUid uid, FootPrintComponent component, SpriteComponent sprite)
{
if (!sprite.LayerMapTryGet(FootPrintVisualLayers.Print, out var layer)
|| !TryComp<FootPrintsComponent>(component.PrintOwner, out var printsComponent)
|| !TryComp<AppearanceComponent>(uid, out var appearance)
|| !_appearance.TryGetData<FootPrintVisuals>(uid, FootPrintVisualState.State, out var printVisuals, appearance))
return;

sprite.LayerSetState(layer, new RSI.StateId(printVisuals switch
{
FootPrintVisuals.BareFootPrint => printsComponent.RightStep ? printsComponent.RightBarePrint : printsComponent.LeftBarePrint,
FootPrintVisuals.ShoesPrint => printsComponent.ShoesPrint,
FootPrintVisuals.SuitPrint => printsComponent.SuitPrint,
FootPrintVisuals.Dragging => _random.Pick(printsComponent.DraggingPrint),
_ => throw new ArgumentOutOfRangeException($"Unknown {printVisuals} parameter.")
}), printsComponent.RsiPath);

if (_appearance.TryGetData<Color>(uid, FootPrintVisualState.Color, out var printColor, appearance))
sprite.LayerSetColor(layer, printColor);
}

protected override void OnAppearanceChange (EntityUid uid, FootPrintComponent component, ref AppearanceChangeEvent args)
{
if (args.Sprite is not { } sprite)
return;

UpdateAppearance(uid, component, sprite);
}
}
4 changes: 2 additions & 2 deletions Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
Orientation="Vertical">
<BoxContainer Orientation="Horizontal" Margin="0 0 0 5">
<SpriteView OverrideDirection="South" Scale="2 2" Name="SpriteView" Access="Public" SetSize="64 64" />
<TextureRect Name="NoDataTex" Access="Public" SetSize="64 64" Visible="false" Stretch="KeepAspectCentered" TexturePath="/Textures/Interface/Misc/health_analyzer_out_of_range.png"/>
<BoxContainer Margin="5 0 0 0" Orientation="Vertical" VerticalAlignment="Top">
<RichTextLabel Name="NameLabel" SetWidth="150" />
<Label Name="SpeciesLabel" VerticalAlignment="Top" StyleClasses="LabelSubText" />
Expand All @@ -46,8 +47,7 @@

<PanelContainer Name="AlertsDivider" Visible="False" StyleClasses="LowDivider" />

<BoxContainer Name="AlertsContainer" Visible="False" Margin="0 5" Orientation="Horizontal"
HorizontalExpand="True" HorizontalAlignment="Center">
<BoxContainer Name="AlertsContainer" Visible="False" Margin="0 5" Orientation="Vertical" HorizontalAlignment="Center">

</BoxContainer>

Expand Down
37 changes: 28 additions & 9 deletions Content.Client/HealthAnalyzer/UI/HealthAnalyzerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ public void Populate(HealthAnalyzerScannedUserMessage msg)
// Patient Information

SpriteView.SetEntity(target.Value);
SpriteView.Visible = msg.ScanMode.HasValue && msg.ScanMode.Value;
NoDataTex.Visible = !SpriteView.Visible;

var name = new FormattedMessage();
name.PushColor(Color.White);
Expand Down Expand Up @@ -108,17 +110,34 @@ public void Populate(HealthAnalyzerScannedUserMessage msg)

// Alerts

AlertsDivider.Visible = msg.Bleeding == true;
AlertsContainer.Visible = msg.Bleeding == true;
var showAlerts = msg.Unrevivable == true || msg.Bleeding == true;

AlertsDivider.Visible = showAlerts;
AlertsContainer.Visible = showAlerts;

if (showAlerts)
AlertsContainer.DisposeAllChildren();

if (msg.Unrevivable == true) // Right now this does nothing, but we have it just for parity :)
{
var unrevivableLabel = new RichTextLabel
{
Margin = new Thickness(0, 4),
MaxWidth = 300
};
unrevivableLabel.SetMessage(Loc.GetString("health-analyzer-window-entity-unrevivable-text"), defaultColor: Color.Red);
AlertsContainer.AddChild(unrevivableLabel);
}

if (msg.Bleeding == true)
{
AlertsContainer.DisposeAllChildren();
AlertsContainer.AddChild(new Label
var bleedingLabel = new RichTextLabel
{
Text = Loc.GetString("health-analyzer-window-entity-bleeding-text"),
FontColorOverride = Color.Red,
});
Margin = new Thickness(0, 4),
MaxWidth = 300
};
bleedingLabel.SetMessage(Loc.GetString("health-analyzer-window-entity-bleeding-text"), defaultColor: Color.Red);
AlertsContainer.AddChild(bleedingLabel);
}

// Damage Groups
Expand Down Expand Up @@ -180,11 +199,11 @@ private void DrawDiagnosticGroups(

var damageString = Loc.GetString(
"health-analyzer-window-damage-type-text",
("damageType", Loc.GetString("damage-type-" + type.ToLower())),
("damageType", Loc.GetString("health-analyzer-window-damage-type-" + type)),
("amount", typeAmount)
);

groupContainer.AddChild(CreateDiagnosticItemLabel(damageString.Insert(0, "- ")));
groupContainer.AddChild(CreateDiagnosticItemLabel(damageString.Insert(0, " · ")));
}
}
}
Expand Down
101 changes: 101 additions & 0 deletions Content.Client/Paint/PaintVisualizerSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
using Robust.Client.GameObjects;
using static Robust.Client.GameObjects.SpriteComponent;
using Content.Shared.Clothing;
using Content.Shared.Hands;
using Content.Shared.Paint;
using Robust.Client.Graphics;
using Robust.Shared.Prototypes;

namespace Content.Client.Paint;

public sealed class PaintedVisualizerSystem : VisualizerSystem<PaintedComponent>
{
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly IPrototypeManager _protoMan = default!;


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

SubscribeLocalEvent<PaintedComponent, HeldVisualsUpdatedEvent>(OnHeldVisualsUpdated);
SubscribeLocalEvent<PaintedComponent, ComponentShutdown>(OnShutdown);
SubscribeLocalEvent<PaintedComponent, EquipmentVisualsUpdatedEvent>(OnEquipmentVisualsUpdated);
}


protected override void OnAppearanceChange(EntityUid uid, PaintedComponent component, ref AppearanceChangeEvent args)
{
if (args.Sprite == null
|| !_appearance.TryGetData(uid, PaintVisuals.Painted, out bool isPainted))
return;

var shader = _protoMan.Index<ShaderPrototype>(component.ShaderName).Instance();
foreach (var spriteLayer in args.Sprite.AllLayers)
{
if (spriteLayer is not Layer layer)
continue;

if (layer.Shader == null || layer.Shader == shader)
{
layer.Shader = shader;
layer.Color = component.Color;
}
}
}

private void OnShutdown(EntityUid uid, PaintedComponent component, ref ComponentShutdown args)
{
if (!TryComp(uid, out SpriteComponent? sprite))
return;
component.BeforeColor = sprite.Color;

if (Terminating(uid))
return;

foreach (var spriteLayer in sprite.AllLayers)
{
if (spriteLayer is not Layer layer
|| layer.Shader != _protoMan.Index<ShaderPrototype>(component.ShaderName).Instance())
continue;

layer.Shader = null;
if (layer.Color == component.Color)
layer.Color = component.BeforeColor;
}
}

private void OnHeldVisualsUpdated(EntityUid uid, PaintedComponent component, HeldVisualsUpdatedEvent args) =>
UpdateVisuals(component, args);
private void OnEquipmentVisualsUpdated(EntityUid uid, PaintedComponent component, EquipmentVisualsUpdatedEvent args) =>
UpdateVisuals(component, args);
private void UpdateVisuals(PaintedComponent component, EntityEventArgs args)
{
var layers = new HashSet<string>();
var entity = EntityUid.Invalid;

switch (args)
{
case HeldVisualsUpdatedEvent hgs:
layers = hgs.RevealedLayers;
entity = hgs.User;
break;
case EquipmentVisualsUpdatedEvent eqs:
layers = eqs.RevealedLayers;
entity = eqs.Equipee;
break;
}

if (layers.Count == 0 || !TryComp(entity, out SpriteComponent? sprite))
return;

foreach (var revealed in layers)
{
if (!sprite.LayerMapTryGet(revealed, out var layer))
continue;

sprite.LayerSetShader(layer, component.ShaderName);
sprite.LayerSetColor(layer, component.Color);
}
}
}
19 changes: 8 additions & 11 deletions Content.Server/AutoVote/AutoVoteSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,15 @@ public override void Initialize()
SubscribeLocalEvent<PlayerJoinedLobbyEvent>(OnPlayerJoinedLobby);
}

public void OnReturnedToLobby(RoundRestartCleanupEvent ev)
{
CallAutovote();
}
public void OnReturnedToLobby(RoundRestartCleanupEvent ev) => CallAutovote();

public void OnPlayerJoinedLobby(PlayerJoinedLobbyEvent ev)
{
if (_shouldVoteNextJoin)
{
CallAutovote();
_shouldVoteNextJoin = false;
}
if (!_shouldVoteNextJoin)
return;

CallAutovote();
_shouldVoteNextJoin = false;
}

private void CallAutovote()
Expand All @@ -50,8 +47,8 @@ private void CallAutovote()
}

if (_cfg.GetCVar(CCVars.MapAutoVoteEnabled))
_voteManager.CreateStandardVote(null, StandardVoteType.Preset);
if (_cfg.GetCVar(CCVars.PresetAutoVoteEnabled))
_voteManager.CreateStandardVote(null, StandardVoteType.Map);
if (_cfg.GetCVar(CCVars.PresetAutoVoteEnabled))
_voteManager.CreateStandardVote(null, StandardVoteType.Preset);
}
}
6 changes: 5 additions & 1 deletion Content.Server/Chat/Systems/ChatSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -963,14 +963,18 @@ public string WrapMessage(LocId wrapId, InGameICChatType chatType, EntityUid sou
var color = DefaultSpeakColor;
if (language.SpeechOverride.Color is { } colorOverride)
color = Color.InterpolateBetween(color, colorOverride, colorOverride.A);
var languageDisplay = language.IsVisibleLanguage
? $"{language.ChatName} | "
: "";

return Loc.GetString(wrapId,
("color", color),
("entityName", entityName),
("verb", Loc.GetString(verbId)),
("fontType", language.SpeechOverride.FontId ?? speech.FontId),
("fontSize", language.SpeechOverride.FontSize ?? speech.FontSize),
("message", message));
("message", message),
("language", languageDisplay));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,13 @@ public void ExitDisposals(EntityUid uid, DisposalHolderComponent? holder = null,
else
{
_xformSystem.AttachToGridOrMap(entity, xform);
var direction = holder.CurrentDirection == Direction.Invalid ? holder.PreviousDirection : holder.CurrentDirection;

if (holder.PreviousDirection != Direction.Invalid && gridUid != null && _xformQuery.TryGetComponent(gridUid, out var parentXform))
if (direction != Direction.Invalid && _xformQuery.TryGetComponent(gridUid, out var gridXform))
{
var direction = holder.CurrentDirection.ToAngle();
direction += _xformSystem.GetWorldRotation(parentXform);
_throwing.TryThrow(entity, direction.ToWorldVec() * 3f, 10f);
var directionAngle = direction.ToAngle();
directionAngle += _xformSystem.GetWorldRotation(gridXform);
_throwing.TryThrow(entity, directionAngle.ToWorldVec() * 3f, 10f);
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions Content.Server/Dragon/DragonRiftSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ public override void Update(float frameTime)
comp.State = DragonRiftState.AlmostFinished;
Dirty(comp);

var location = xform.LocalPosition;
_announcer.SendAnnouncement(_announcer.GetAnnouncementId("CarpRift"), Filter.Broadcast(),
"carp-rift-warning", colorOverride: Color.Red, localeArgs: ("location", location));
"carp-rift-warning", colorOverride: Color.Red, localeArgs: ("location", FormattedMessage.RemoveMarkupPermissive(_navMap.GetNearestBeaconString((uid, xform)))));
_navMap.SetBeaconEnabled(uid, true);
}

Expand Down
Loading
Loading