Skip to content

Commit de73a35

Browse files
Merge remote-tracking branch 'origin/master'
# Conflicts: # Resources/Prototypes/_Nuclear14/Entities/Structures/Furniture/junk.yml
2 parents 6695b88 + 8984a09 commit de73a35

3,958 files changed

Lines changed: 82481 additions & 53306 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/labeler-review.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,27 @@ on:
1414
jobs:
1515
add_label:
1616
# Change the repository name after you've made sure the team name is correct for your fork!
17-
if: ${{ (github.repository == 'Goob-Station/Goob-Station') && (github.event.review.state == 'APPROVED') }}
17+
if: ${{ (github.repository == 'ProjectOmu/OmuStation') && (github.event.review.state == 'APPROVED') }}
1818
permissions:
1919
contents: read
2020
pull-requests: write
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: tspascoal/get-user-teams-membership@v3
24-
id: checkUserMember
23+
# - uses: tspascoal/get-user-teams-membership@v3 #Omu, only maints can approve anyway, so this isnt needed.
24+
# id: checkUserMember
25+
# with:
26+
# username: ${{ github.actor }}
27+
# team: "maintainers"
28+
# GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
29+
# - if: "${{ contains(github.event.pull_request.labels.*.name, 'S: Needs Second Approval') }}"
30+
# uses: actions-ecosystem/action-add-labels@v1
31+
# with:
32+
# labels: "S: Approved"
33+
- if: "${{ contains(github.event.pull_request.labels.*.name, 'S: Needs Second Approval') }}"
34+
uses: actions-ecosystem/action-remove-labels@v1
2535
with:
26-
username: ${{ github.actor }}
27-
team: "maintainers"
28-
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
29-
- if: ${{ steps.checkUserMember.outputs.isTeamMember == 'true' }}
36+
labels: "S: Needs Second Approval"
37+
- if: "${{ false == contains(github.event.pull_request.labels.*.name, 'S: Needs Second Approval') }}"
3038
uses: actions-ecosystem/action-add-labels@v1
3139
with:
32-
labels: "S: Approved"
40+
labels: "S: Needs Second Approval"

Content.Client/Actions/ActionsSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ private void OnActionAutoHandleState(Entity<ActionComponent> ent, ref AfterAutoH
207207
public override void UpdateAction(Entity<ActionComponent> ent)
208208
{
209209
// TODO: Decouple this.
210-
ent.Comp.IconColor = _sharedCharges.GetCurrentCharges(ent.Owner) == 0 ? ent.Comp.DisabledIconColor : ent.Comp.OriginalIconColor;
210+
ent.Comp.IconColor = _sharedCharges.GetCurrentCharges(ent.Owner) == 0 || !ent.Comp.Enabled ? ent.Comp.DisabledIconColor : ent.Comp.OriginalIconColor; // WD EDIT
211211
base.UpdateAction(ent);
212212
if (_playerManager.LocalEntity != ent.Comp.AttachedEntity)
213213
return;

Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@
188188
using Robust.Shared.Enums;
189189
using Robust.Shared.Physics;
190190
using Robust.Shared.Prototypes;
191+
using Robust.Shared.Physics.Systems;
191192
using Robust.Shared.Utility;
192193
using Direction = Robust.Shared.Maths.Direction;
193194

@@ -390,9 +391,7 @@ public HumanoidProfileEditor(
390391
};
391392

392393
// begin Goobstation: port EE height/width sliders
393-
#region Height and Width
394-
395-
var prototype = _species.Find(x => x.ID == Profile?.Species) ?? _species.First();
394+
#region Height and Width
396395

397396
UpdateHeightWidthSliders();
398397
UpdateDimensions(SliderUpdate.Both);
@@ -402,12 +401,14 @@ public HumanoidProfileEditor(
402401

403402
HeightReset.OnPressed += _ =>
404403
{
404+
var prototype = _species.Find(x => x.ID == Profile?.Species) ?? _species.First();
405405
HeightSlider.Value = prototype.DefaultHeight;
406406
UpdateDimensions(SliderUpdate.Height);
407407
};
408408

409409
WidthReset.OnPressed += _ =>
410410
{
411+
var prototype = _species.Find(x => x.ID == Profile?.Species) ?? _species.First();
411412
WidthSlider.Value = prototype.DefaultWidth;
412413
UpdateDimensions(SliderUpdate.Width);
413414
};
@@ -1698,13 +1699,18 @@ private void UpdateHeightWidthSliders()
16981699

16991700
var species = _species.Find(x => x.ID == Profile?.Species) ?? _species.First();
17001701

1702+
// we increase the min/max values of the sliders before we set their value, just so that we don't accidentally clamp down on a value loaded from a profile when we shouldn't
1703+
HeightSlider.MinValue = 0;
1704+
HeightSlider.MaxValue = 2;
1705+
HeightSlider.SetValueWithoutEvent(Profile?.Height ?? species.DefaultHeight);
17011706
HeightSlider.MinValue = species.MinHeight;
17021707
HeightSlider.MaxValue = species.MaxHeight;
1703-
HeightSlider.SetValueWithoutEvent(Profile?.Height ?? species.DefaultHeight);
17041708

1709+
WidthSlider.MinValue = 0;
1710+
WidthSlider.MaxValue = 2;
1711+
WidthSlider.SetValueWithoutEvent(Profile?.Width ?? species.DefaultWidth);
17051712
WidthSlider.MinValue = species.MinWidth;
17061713
WidthSlider.MaxValue = species.MaxWidth;
1707-
WidthSlider.SetValueWithoutEvent(Profile?.Width ?? species.DefaultWidth);
17081714

17091715
var height = MathF.Round(species.AverageHeight * HeightSlider.Value);
17101716
HeightLabel.Text = Loc.GetString("humanoid-profile-editor-height-label", ("height", (int) height));
@@ -1745,8 +1751,8 @@ private void UpdateDimensions(SliderUpdate updateType)
17451751
heightValue = Math.Clamp(heightValue, species.MinHeight, species.MaxHeight);
17461752
widthValue = Math.Clamp(widthValue, species.MinWidth, species.MaxWidth);
17471753

1748-
HeightSlider.Value = heightValue;
1749-
WidthSlider.Value = widthValue;
1754+
HeightSlider.SetValueWithoutEvent(heightValue);
1755+
WidthSlider.SetValueWithoutEvent(widthValue);
17501756

17511757
SetProfileHeight(heightValue);
17521758
SetProfileWidth(widthValue);
@@ -1767,14 +1773,12 @@ private void UpdateWeight()
17671773

17681774
var species = _species.Find(x => x.ID == Profile.Species) ?? _species.First();
17691775
// TODO: Remove obsolete method
1770-
_prototypeManager.Index(species.Prototype).TryGetComponent<FixturesComponent>(out var fixture);
1776+
_prototypeManager.Index(species.Prototype).TryGetComponent<FixturesComponent>(out var fixture, _entManager.ComponentFactory);
17711777

17721778
if (fixture != null)
17731779
{
1774-
var radius = fixture.Fixtures["fix1"].Shape.Radius;
1775-
var density = fixture.Fixtures["fix1"].Density;
17761780
var avg = (Profile.Width + Profile.Height) / 2;
1777-
var weight = MathF.Round(MathF.PI * MathF.Pow(radius * avg, 2) * density);
1781+
var weight = FixtureSystem.GetMassData(fixture.Fixtures["fix1"].Shape, fixture.Fixtures["fix1"].Density).Mass * avg;
17781782
WeightLabel.Text = Loc.GetString("humanoid-profile-editor-weight-label", ("weight", (int) weight));
17791783
}
17801784
else // Whelp, the fixture doesn't exist, guesstimate it instead

Content.Client/Pinpointer/PinpointerSystem.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//
1111
// SPDX-License-Identifier: MIT
1212

13+
using Content.Client.Alerts;
1314
using Content.Shared.Pinpointer;
1415
using Robust.Client.GameObjects;
1516
using Robust.Client.Graphics;
@@ -21,6 +22,32 @@ public sealed class PinpointerSystem : SharedPinpointerSystem
2122
[Dependency] private readonly IEyeManager _eyeManager = default!;
2223
[Dependency] private readonly SpriteSystem _sprite = default!;
2324

25+
// WD EDIT START
26+
public override void Initialize()
27+
{
28+
base.Initialize();
29+
30+
SubscribeLocalEvent<PinpointerComponent, UpdateAlertSpriteEvent>(OnUpdateAlertSprite);
31+
}
32+
33+
private void OnUpdateAlertSprite(EntityUid uid, PinpointerComponent component, ref UpdateAlertSpriteEvent args)
34+
{
35+
if (args.Alert.ID != component.Alert)
36+
return;
37+
38+
var sprite = args.SpriteViewEnt.Comp;
39+
var eye = _eyeManager.CurrentEye;
40+
var angle = component.DistanceToTarget switch
41+
{
42+
Distance.Close or Distance.Medium or Distance.Far => component.ArrowAngle + eye.Rotation,
43+
_ => Angle.Zero
44+
};
45+
46+
_sprite.LayerSetRotation((args.SpriteViewEnt, sprite), PinpointerLayers.Screen, angle);
47+
sprite.LayerSetState(PinpointerLayers.Screen, component.DistanceToTarget.ToString().ToLower());
48+
}
49+
// WD EDIT END
50+
2451
public override void Update(float frameTime)
2552
{
2653
base.Update(frameTime);
@@ -33,6 +60,11 @@ public override void Update(float frameTime)
3360
var query = EntityQueryEnumerator<PinpointerComponent, SpriteComponent>();
3461
while (query.MoveNext(out var uid, out var pinpointer, out var sprite))
3562
{
63+
// WD EDIT START
64+
if (!sprite.LayerExists(PinpointerLayers.Screen))
65+
continue;
66+
// WD EDIT END
67+
3668
if (!pinpointer.HasTarget)
3769
{
3870
sprite.LayerSetRotation(PinpointerLayers.Screen, Angle.Zero); // Goob edit

Content.Client/RoundEnd/RoundEndSummaryWindow.cs

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
using System.Numerics;
5252
using Content.Client.Message;
5353
using Content.Shared.GameTicking;
54+
using Content.Goobstation.Common.StationReport;
5455
using Robust.Client.UserInterface.Controls;
5556
using Robust.Client.UserInterface.CustomControls;
5657
using Robust.Shared.Utility;
@@ -82,6 +83,7 @@ public RoundEndSummaryWindow(string gm, string roundEnd, TimeSpan roundTimeSpan,
8283
var roundEndTabs = new TabContainer();
8384
roundEndTabs.AddChild(MakeRoundEndSummaryTab(gm, roundEnd, roundTimeSpan, roundId));
8485
roundEndTabs.AddChild(MakePlayerManifestTab(info));
86+
roundEndTabs.AddChild(MakeStationReportTab()); //goob
8587

8688
Contents.AddChild(roundEndTabs);
8789

@@ -216,6 +218,38 @@ private BoxContainer MakePlayerManifestTab(RoundEndMessageEvent.RoundEndPlayerIn
216218

217219
return playerManifestTab;
218220
}
221+
private BoxContainer MakeStationReportTab() //Goob edit start
222+
{
223+
//gets the stationreport varibible and sets the station report tab text to it if the map doesn't have a tablet will say No station report submitted
224+
var stationReportSystem = _entityManager.System<Content.Goobstation.Common.StationReport.StationReportSystem>();
225+
string stationReportText = stationReportSystem.StationReportText ?? Loc.GetString("no-station-report-summited");
226+
var stationReportTab = new BoxContainer
227+
{
228+
Orientation = LayoutOrientation.Vertical,
229+
Name = Loc.GetString("round-end-summary-window-station-report-tab-title")
230+
};
231+
var StationReportContainerScrollbox = new ScrollContainer
232+
{
233+
VerticalExpand = true,
234+
Margin = new Thickness(10),
235+
HScrollEnabled = false,
236+
};
237+
var StationReportContainer = new BoxContainer
238+
{
239+
Orientation = LayoutOrientation.Vertical
240+
};
241+
var StationReportLabel = new RichTextLabel();
242+
var StationReportmessage = new FormattedMessage();
243+
StationReportmessage.AddMarkupOrThrow(stationReportText);
244+
StationReportLabel.SetMessage(StationReportmessage);
245+
StationReportContainer.AddChild(StationReportLabel);
246+
247+
248+
StationReportContainerScrollbox.AddChild(StationReportContainer);
249+
stationReportTab.AddChild(StationReportContainerScrollbox);
250+
return stationReportTab;
251+
}
252+
//Goob edit end
219253
}
220254

221-
}
255+
}

Content.Client/StatusIcon/StatusIconSystem.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ public bool IsVisible(Entity<MetaDataComponent> ent, StatusIconData data)
8585
{
8686
var viewer = _playerManager.LocalSession?.AttachedEntity;
8787

88-
// Always show our icons to our entity
89-
if (viewer == ent.Owner)
88+
89+
if (data.VisibleToOwner && viewer == ent.Owner) // WD EDIT: not always show our icons to our entity
9090
return true;
9191

9292
if (data.VisibleToGhosts && HasComp<GhostComponent>(viewer))
@@ -106,4 +106,4 @@ public bool IsVisible(Entity<MetaDataComponent> ent, StatusIconData data)
106106

107107
return true;
108108
}
109-
}
109+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using Content.Shared._White.Xenomorphs.Infection;
2+
using Content.Shared._White.Xenomorphs.Larva;
3+
using Content.Shared.StatusIcon.Components;
4+
using Robust.Shared.Prototypes;
5+
6+
namespace Content.Client._White.Overlays;
7+
8+
public sealed class XenomorphInfectionIconSystem : EntitySystem
9+
{
10+
[Dependency] private readonly IPrototypeManager _prototype = default!;
11+
12+
public override void Initialize()
13+
{
14+
base.Initialize();
15+
16+
SubscribeLocalEvent<XenomorphInfectedComponent, GetStatusIconsEvent>(OnXenomorphInfectedGetStatusIconsEvent);
17+
SubscribeLocalEvent<XenomorphLarvaVictimComponent, GetStatusIconsEvent>(OnXenomorphLarvaVictimGetStatusIconsEvent);
18+
}
19+
20+
private void OnXenomorphInfectedGetStatusIconsEvent(EntityUid uid, XenomorphInfectedComponent component, ref GetStatusIconsEvent args)
21+
{
22+
if (component.InfectedIcons.TryGetValue(component.GrowthStage, out var infectedIcon)
23+
&& _prototype.TryIndex(infectedIcon, out var icon))
24+
args.StatusIcons.Add(icon);
25+
}
26+
27+
private void OnXenomorphLarvaVictimGetStatusIconsEvent(EntityUid uid, XenomorphLarvaVictimComponent component, ref GetStatusIconsEvent args)
28+
{
29+
if (component.InfectedIcon.HasValue && _prototype.TryIndex(component.InfectedIcon.Value, out var icon))
30+
args.StatusIcons.Add(icon);
31+
}
32+
}

0 commit comments

Comments
 (0)