Skip to content

Commit

Permalink
Merge branch 'master' into puddle-viscosity
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkmajia authored Sep 5, 2024
2 parents 2910e4d + 318ae9c commit 036d5df
Show file tree
Hide file tree
Showing 189 changed files with 4,115 additions and 1,863 deletions.
42 changes: 4 additions & 38 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,11 @@
<!-- Impstation note: there's no need to read all the official contributing guidelines,
but please DON'T combine upstream changes and your own changes.
Make separate pull requests for separate changes. -->
<!-- Please read these guidelines before opening your PR: https://docs.spacestation14.io/en/getting-started/pr-guideline -->
<!-- The text between the arrows are comments - they will not be visible on your PR. -->

## About the PR
<!-- What did you change in this PR? -->

## Why / Balance
<!-- Why was it changed? Link any discussions or issues here. Please discuss how this would affect game balance. -->

## Technical details
<!-- If this is a code change, summarize at high level how your new code works. This makes it easier to review. -->

## Media
<!--
PRs which make ingame changes (adding clothing, items, new features, etc) are required to have media attached that showcase the changes.
Small fixes/refactors are exempt.
Any media may be used in SS14 progress reports, with clear credit given.
If you're unsure whether your PR will require media, ask a maintainer.
-->

## Requirements
<!--
Due to influx of PR's we require to ensure that PR's are following the correct guidelines.
Please take a moment to read these if its your first time.
Check the boxes below to confirm that you have in fact seen these (put an X in the brackets, like [X]):
-->
- [ ] I have read and I am following the [Pull Request Guidelines](https://docs.spacestation14.com/en/general-development/codebase-info/pull-request-guidelines.html). I understand that not doing so may get my pr closed at maintainer’s discretion
- [ ] I have added screenshots/videos to this PR showcasing its changes ingame, **or** this PR does not require an ingame showcase

## Breaking changes
<!--
List any breaking changes, including namespace, public class/method/field changes, prototype renames; and provide instructions for fixing them. This will be pasted in #codebase-changes.
Impstation note: there's no need to read all the official contributing guidelines, but please DON'T combine upstream changes with your own changes. Make separate pull requests for separate changes.
-->
<!-- Please read these guidelines before opening your PR: https://docs.spacestation14.io/en/getting-started/pr-guideline -->
<!-- The text between the arrows are comments - they will not be visible on your PR. -->

**Changelog**
<!-- Impstation note: we have our own changelog now, so please DO use this section! -->
<!-- Impstation note: we have our own AUTOMATIC changelog now, so please DO use this section! -->
<!--
Make players aware of new features and changes that could affect how they play the game by adding a Changelog entry. Please read the Changelog guidelines located at: https://docs.spacestation14.io/en/getting-started/pr-guideline#changelog
-->
Expand Down
2 changes: 1 addition & 1 deletion Content.Benchmarks/MapLoadBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public async Task Cleanup()
}

public static readonly string[] MapsSource = { "Empty", "Satlern", "Box", "Bagel", "Dev", "CentComm", "Core", "TestTeg", "Packed", "Omega", "Reach", "Origin", "Meta", "Marathon", "MeteorArena", "Fland", "Oasis", "Cog" };

[ParamsSource(nameof(MapsSource))]
public string Map;

Expand Down
5 changes: 5 additions & 0 deletions Content.Client/Labels/UI/HandLabelerBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ protected override void Open()

_window = this.CreateWindow<HandLabelerWindow>();

if (_entManager.TryGetComponent(Owner, out HandLabelerComponent? labeler))
{
_window.SetMaxLabelLength(labeler!.MaxLabelChars);
}

_window.OnLabelChanged += OnLabelChanged;
Reload();
}
Expand Down
11 changes: 10 additions & 1 deletion Content.Client/Labels/UI/HandLabelerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public HandLabelerWindow()
{
RobustXamlLoader.Load(this);

LabelLineEdit.OnTextEntered += e =>
LabelLineEdit.OnTextChanged += e =>
{
_label = e.Text;
OnLabelChanged?.Invoke(_label);
Expand All @@ -33,6 +33,10 @@ public HandLabelerWindow()
_focused = false;
LabelLineEdit.Text = _label;
};

// Give the editor keybard focus, since that's the only
// thing the user will want to be doing with this UI
LabelLineEdit.GrabKeyboardFocus();
}

public void SetCurrentLabel(string label)
Expand All @@ -44,5 +48,10 @@ public void SetCurrentLabel(string label)
if (!_focused)
LabelLineEdit.Text = label;
}

public void SetMaxLabelLength(int maxLength)
{
LabelLineEdit.IsValid = s => s.Length <= maxLength;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override void Open()
{
stationName = gridMetaData.EntityName;
}

if (EntMan.TryGetComponent<StationMapComponent>(Owner, out var comp) && comp.ShowLocation)
_window.Set(stationName, gridUid, Owner);
else
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Stylesheets/StyleNano.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@ public StyleNano(IResourceCache resCache) : base(resCache)
.Class(StyleClassItemStatusNotHeld)
.Prop("font", notoSansItalic10)
.Prop("font-color", ItemStatusNotHeldColor),

Element<RichTextLabel>()
.Class(StyleClassCrewManifestGender)
.Prop("font", notoSansItalic10)
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Announcements/AnnounceCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args)

shell.WriteLine("Sent!");
}

public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
{
switch (args.Length)
Expand Down
2 changes: 0 additions & 2 deletions Content.Server/Antag/AntagSelectionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -515,5 +515,3 @@ public record struct AntagSelectLocationEvent(ICommonSession? Session, Entity<An
/// </summary>
[ByRefEvent]
public readonly record struct AfterAntagEntitySelectedEvent(ICommonSession? Session, EntityUid EntityUid, Entity<AntagSelectionComponent> GameRule, AntagSelectionDefinition Def);


6 changes: 2 additions & 4 deletions Content.Server/Morgue/MorgueSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using Content.Shared.Examine;
using Content.Shared.Morgue;
using Content.Shared.Morgue.Components;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Player;

Expand All @@ -25,12 +23,12 @@ public override void Initialize()
/// <summary>
/// Handles the examination text for looking at a morgue.
/// </summary>
private void OnExamine(EntityUid uid, MorgueComponent component, ExaminedEvent args)
private void OnExamine(Entity<MorgueComponent> ent, ref ExaminedEvent args)
{
if (!args.IsInDetailsRange)
return;

_appearance.TryGetData<MorgueContents>(uid, MorgueVisuals.Contents, out var contents);
_appearance.TryGetData<MorgueContents>(ent.Owner, MorgueVisuals.Contents, out var contents);

var text = contents switch
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected override void Added(EntityUid uid, BluespaceArtifactRuleComponent comp
return;

base.Added(uid, component, gameRule, args);

_announcer.SendAnnouncement(
_announcer.GetAnnouncementId(args.RuleId),
Filter.Broadcast(),
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/StationEvents/Events/RandomSentienceRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public sealed class RandomSentienceRule : StationEventSystem<RandomSentienceRule
[Dependency] private readonly IPrototypeManager _prototype = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly AnnouncerSystem _announcer = default!;

protected override void Started(EntityUid uid, RandomSentienceRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)
{
if (!TryGetRandomStation(out var station))
Expand Down Expand Up @@ -71,7 +71,7 @@ protected override void Started(EntityUid uid, RandomSentienceRuleComponent comp
var kind1 = groupList.Count > 0 ? groupList[0] : "???";
var kind2 = groupList.Count > 1 ? groupList[1] : "???";
var kind3 = groupList.Count > 2 ? groupList[2] : "???";

_announcer.SendAnnouncement(
_announcer.GetAnnouncementId(args.RuleId),
Filter.Broadcast(),
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/StationEvents/Events/VentClogRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public sealed class VentClogRule : StationEventSystem<VentClogRuleComponent>
{
[Dependency] private readonly SmokeSystem _smoke = default!;
[Dependency] private readonly AnnouncerSystem _announcer = default!;

protected override void Added(EntityUid uid, VentClogRuleComponent component, GameRuleComponent gameRule, GameRuleAddedEvent args)
{
base.Added(uid, component, gameRule, args);
Expand Down
8 changes: 4 additions & 4 deletions Content.Shared/Excretion/ExcretionComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,25 @@ public sealed partial class ExcretionComponent : Component
[ViewVariables(VVAccess.ReadWrite)]
[AutoNetworkedField]
public ThirstThreshold MinThirstThreshold = ThirstThreshold.Okay;

/// <summary>
/// The amount of slowdown applied to snails.
/// </summary>
[DataField("snailSlowdownModifier"), ViewVariables(VVAccess.ReadWrite)]
[AutoNetworkedField]
public float SnailSlowdownModifier = 0.5f;

/// The reagent to be spilled.
[DataField("excretedReagent")]
[ViewVariables(VVAccess.ReadWrite)]
[AutoNetworkedField]
public string ExcretedReagent = "Mucin";

/// <summary>
/// The amount of reagent to be spilled.
/// </summary>
[DataField("excretedVolume"), ViewVariables(VVAccess.ReadWrite)]
[AutoNetworkedField]
public float ExcretedVolume = 15f;

}
5 changes: 2 additions & 3 deletions Content.Shared/Excretion/ExcretionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private void OnExcretionDoAfter(EntityUid uid, ExcretionComponent comp, Excretio
{
/*
/// if there aren't values for the desired reagent and its volume, don't do anything.
if ((comp.ExcretedReagent != "") &&
if ((comp.ExcretedReagent != "") &&
(comp.ExcretedVolume !<= 0))
{
*/
Expand All @@ -121,7 +121,7 @@ private void OnExcretionDoAfter(EntityUid uid, ExcretionComponent comp, Excretio

args.Repeat = false;
}

}

/// <summary>
Expand All @@ -134,4 +134,3 @@ public sealed partial class ExcretionActionEvent : InstantActionEvent { }
/// </summary>
[Serializable, NetSerializable]
public sealed partial class ExcretionDoAfterEvent : SimpleDoAfterEvent { }

9 changes: 4 additions & 5 deletions Content.Shared/Morgue/Components/MorgueComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,18 @@ public sealed partial class MorgueComponent : Component
/// <summary>
/// Whether or not the morgue beeps if a living player is inside.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("doSoulBeep")]
[DataField]
public bool DoSoulBeep = true;

[ViewVariables]
[DataField]
public float AccumulatedFrameTime = 0f;

/// <summary>
/// The amount of time between each beep.
/// </summary>
[ViewVariables]
[DataField]
public float BeepTime = 10f;

[DataField("occupantHasSoulAlarmSound")]
[DataField]
public SoundSpecifier OccupantHasSoulAlarmSound = new SoundPathSpecifier("/Audio/Weapons/Guns/EmptyAlarm/smg_empty_alarm.ogg");
}
4 changes: 2 additions & 2 deletions Content.Shared/Nutrition/EntitySystems/ThirstSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@ private void UpdateEffects(EntityUid uid, ThirstComponent component)
throw new ArgumentOutOfRangeException($"No thirst threshold found for {component.CurrentThirstThreshold}");
}
}

/// a check that returns if the entity is below a thirst threshold (used in Excretion system)
public bool IsThirstBelowState(EntityUid uid, ThirstThreshold threshold, float? drink = null, ThirstComponent? comp = null)
{
if (!Resolve(uid, ref comp))
return false; // If entity does not have the ability to be thirsty, don't check it.

return GetThirstThreshold (comp) < threshold;
}

Expand Down
20 changes: 20 additions & 0 deletions Content.Shared/Silicons/StationAi/SharedStationAiSystem.Held.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using Content.Shared.Actions.Events;
using Content.Shared.IdentityManagement;
using Content.Shared.Interaction.Events;
using Content.Shared.Verbs;
using Robust.Shared.Serialization;
Expand All @@ -12,6 +13,9 @@ public abstract partial class SharedStationAiSystem
/*
* Added when an entity is inserted into a StationAiCore.
*/

//TODO: Fix this, please
private const string JobNameLocId = "job-name-station-ai";

private void InitializeHeld()
{
Expand All @@ -22,6 +26,22 @@ private void InitializeHeld()
SubscribeLocalEvent<StationAiHeldComponent, InteractionAttemptEvent>(OnHeldInteraction);
SubscribeLocalEvent<StationAiHeldComponent, AttemptRelayActionComponentChangeEvent>(OnHeldRelay);
SubscribeLocalEvent<StationAiHeldComponent, JumpToCoreEvent>(OnCoreJump);
SubscribeLocalEvent<TryGetIdentityShortInfoEvent>(OnTryGetIdentityShortInfo);
}

private void OnTryGetIdentityShortInfo(TryGetIdentityShortInfoEvent args)
{
if (args.Handled)
{
return;
}

if (!HasComp<StationAiHeldComponent>(args.ForActor))
{
return;
}
args.Title = $"{Name(args.ForActor)} ({Loc.GetString(JobNameLocId)})";
args.Handled = true;
}

private void OnCoreJump(Entity<StationAiHeldComponent> ent, ref JumpToCoreEvent args)
Expand Down
8 changes: 4 additions & 4 deletions Content.Shared/SnailSpeed/SnailSpeedSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ public override void Initialize()
SubscribeLocalEvent<SnailSpeedComponent, MapInitEvent>(OnMapInit);
SubscribeLocalEvent<SnailSpeedComponent, RefreshMovementSpeedModifiersEvent>(OnRefreshMovespeed);
}

private void OnMapInit(EntityUid uid, SnailSpeedComponent comp, MapInitEvent args)
{
_movementSpeedModifier.RefreshMovementSpeedModifiers(uid);
}

/// apply constant movespeed modifier as long as entity is not flying
private void OnRefreshMovespeed(EntityUid uid, SnailSpeedComponent component, RefreshMovementSpeedModifiersEvent args)
{
if (_jetpack.IsUserFlying(uid))
return;


args.ModifySpeed(component.SnailSlowdownModifier, component.SnailSlowdownModifier);
}

Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Teleportation/Systems/SharedPortalSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private void OnCollide(EntityUid uid, PortalComponent component, ref StartCollid
if (TryComp<PullerComponent>(subject, out var pullerComp)
&& TryComp<PullableComponent>(pullerComp.Pulling, out var subjectPulling))
{
_pulling.TryStopPull(subject, subjectPulling);
_pulling.TryStopPull(pullerComp.Pulling.Value, subjectPulling);
}

// if they came from another portal, just return and wait for them to exit the portal
Expand Down
8 changes: 4 additions & 4 deletions Resources/Audio/Effects/Footsteps/attributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
license: "CC-BY-SA-4.0"
copyright: "Made by JustInvoke freesound.org"
source: "https://freesound.org/people/JustInvoke/sounds/446100/"

- files:
- jesterstep1.ogg
- jesterstep2.ogg
Expand Down Expand Up @@ -63,7 +63,7 @@
license: "CC-BY-SA-3.0"
copyright: "Taken from https://github.com/tgstation/tgstation"
source: "https://github.com/tgstation/tgstation/blob/34d5ab2e46e3fb4dd9d7475f587d33441df9651c/sound/effects"

- files:
- spurs1.ogg
- spurs2.ogg
Expand All @@ -82,5 +82,5 @@
- files:
- snailstep.ogg
license: "CC-BY-SA-3.0"
copyright: "by widgetbeck"
source: "by widgetbeck"
copyright: "Widgetbeck"
source: "https://github.com/impstation/imp-station-14/pull/184"
Loading

0 comments on commit 036d5df

Please sign in to comment.