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

Starting fresh #40

Merged
merged 25 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5740a88
Fix Station AI being affected by Bureaucratic Event (#32021)
SlamBamActionman Sep 11, 2024
69f96a2
Automatic changelog update
PJBot Sep 11, 2024
07afed1
Reduced atmos canister sell price (#31965)
K-Dynamic Sep 11, 2024
7f76af4
Automatic changelog update
PJBot Sep 11, 2024
e510504
Hivelord mob (#31322)
EmoGarbage404 Sep 11, 2024
6fe649c
Automatic changelog update
PJBot Sep 11, 2024
5290e64
TechAnomaly fixes (#32067)
TheShuEd Sep 11, 2024
8fb7857
Ore Processors can now produce Reinforced Glass (#32069)
PeccNeck Sep 11, 2024
20c4aeb
Automatic changelog update
PJBot Sep 11, 2024
38a0ca7
Fixes swords not being able to be used to make bats (#32075)
Plykiya Sep 11, 2024
dba10a1
Reduce vertical margin on vending machine UI (#32074)
Plykiya Sep 11, 2024
982be4e
Automatic changelog update
PJBot Sep 11, 2024
bb21244
Banners are no longer indestructible (#32077)
Plykiya Sep 11, 2024
01713ac
Automatic changelog update
PJBot Sep 11, 2024
f2f76f7
Fix cauterization spam from space damage (#32080)
themias Sep 11, 2024
2d7aa82
dont log missing ArtifactComponent for artifexium (#32073)
deltanedas Sep 11, 2024
d156e69
Automatic changelog update
PJBot Sep 11, 2024
125258e
add material composition to some salv treasure (#31970)
deltanedas Sep 11, 2024
5d1627d
Automatic changelog update
PJBot Sep 11, 2024
0df5319
Make the pr link more visible in the changelog bot (#32047)
VasilisThePikachu Sep 11, 2024
5b88b0b
Change forensic pad to use label isntead of name changing (#31842)
lzk228 Sep 12, 2024
9702757
Automatic changelog update
PJBot Sep 12, 2024
e140b3f
fixes a ton of contraband issues (#32078)
Plykiya Sep 12, 2024
3e26be8
Upstream merge for starting fresh
invalid-email-address Sep 12, 2024
8c64ea3
Update Changelog.yml
KeldWolf Sep 12, 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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
SeparationOverride="4">
<EntityPrototypeView
Name="ItemPrototype"
Margin="4 4"
Margin="4 0 0 0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
MinSize="32 32"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:co="clr-namespace:Content.Client.UserInterface.Controls">
<BoxContainer Name="MainContainer" Orientation="Vertical">
<LineEdit Name="SearchBar" PlaceHolder="{Loc 'vending-machine-component-search-filter'}" HorizontalExpand="True" Margin ="4 4"/>
<co:SearchListContainer Name="VendingContents" VerticalExpand="True" Margin="4 0"/>
<co:SearchListContainer Name="VendingContents" VerticalExpand="True" Margin="4 4"/>
<!-- Footer -->
<BoxContainer Orientation="Vertical">
<PanelContainer StyleClasses="LowDivider" />
Expand Down
6 changes: 3 additions & 3 deletions Content.Server/Anomaly/Effects/TechAnomalySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public override void Update(float frameTime)
while (query.MoveNext(out var uid, out var tech, out var anom))
{
if (_timing.CurTime < tech.NextTimer)
return;
continue;

tech.NextTimer = _timing.CurTime + TimeSpan.FromSeconds(tech.TimerFrequency * anom.Stability);
tech.NextTimer += TimeSpan.FromSeconds(tech.TimerFrequency * anom.Stability);

_signal.InvokePort(uid, tech.TimerPort);
}
Expand All @@ -61,7 +61,7 @@ private void CreateNewRandomLink(Entity<TechAnomalyComponent> tech, int count)
var devices = _lookup.GetEntitiesInRange<DeviceLinkSinkComponent>(Transform(tech).Coordinates, range);
if (devices.Count < 1)
return;

for (var i = 0; i < count; i++)
{
var device = _random.Pick(devices);
Expand Down
7 changes: 7 additions & 0 deletions Content.Server/Body/Components/BloodstreamComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ public sealed partial class BloodstreamComponent : Component
[DataField]
public SoundSpecifier BloodHealedSound = new SoundPathSpecifier("/Audio/Effects/lightburn.ogg");

/// <summary>
/// The minimum amount damage reduction needed to play the healing sound/popup.
/// This prevents tiny amounts of heat damage from spamming the sound, e.g. spacing.
/// </summary>
[DataField]
public float BloodHealedSoundThreshold = -0.1f;

// TODO probably damage bleed thresholds.

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Body/Systems/BloodstreamSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private void OnDamageChanged(Entity<BloodstreamComponent> ent, ref DamageChanged
}

// Heat damage will cauterize, causing the bleed rate to be reduced.
else if (totalFloat < 0 && oldBleedAmount > 0)
else if (totalFloat <= ent.Comp.BloodHealedSoundThreshold && oldBleedAmount > 0)
{
// Magically, this damage has healed some bleeding, likely
// because it's burn damage that cauterized their wounds.
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/EntityEffects/Effects/ActivateArtifact.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public sealed partial class ActivateArtifact : EntityEffect
public override void Effect(EntityEffectBaseArgs args)
{
var artifact = args.EntityManager.EntitySysManager.GetEntitySystem<ArtifactSystem>();
artifact.TryActivateArtifact(args.TargetEntity);
artifact.TryActivateArtifact(args.TargetEntity, logMissing: false);
}

protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) =>
Expand Down
14 changes: 7 additions & 7 deletions Content.Server/Forensics/Systems/ForensicPadSystem.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using Content.Shared.Examine;
using Content.Shared.Interaction;
using Content.Shared.Inventory;
using Content.Server.Labels;
using Content.Server.Popups;
using Content.Shared.DoAfter;
using Content.Shared.Examine;
using Content.Shared.Forensics;
using Content.Shared.IdentityManagement;
using Content.Shared.Interaction;
using Content.Shared.Inventory;

namespace Content.Server.Forensics
{
Expand All @@ -17,6 +18,7 @@ public sealed class ForensicPadSystem : EntitySystem
[Dependency] private readonly InventorySystem _inventory = default!;
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly MetaDataSystem _metaData = default!;
[Dependency] private readonly LabelSystem _label = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -99,10 +101,8 @@ private void OnDoAfter(EntityUid uid, ForensicPadComponent padComponent, Forensi

if (args.Args.Target != null)
{
var name = HasComp<FingerprintComponent>(args.Args.Target)
? "forensic-pad-fingerprint-name"
: "forensic-pad-gloves-name";
_metaData.SetEntityName(uid, Loc.GetString(name, ("entity", args.Args.Target)));
string label = Identity.Name(args.Args.Target.Value, EntityManager);
_label.Label(uid, label);
}

padComponent.Sample = args.Sample;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
using Content.Server.StationEvents.Events;
using Content.Server.StationEvents.Events;
using Content.Shared.Roles;
using Robust.Shared.Prototypes;

namespace Content.Server.StationEvents.Components;

[RegisterComponent, Access(typeof(BureaucraticErrorRule))]
public sealed partial class BureaucraticErrorRuleComponent : Component
{

/// <summary>
/// The jobs that are ignored by this rule and won't have their slots changed.
/// </summary>
[DataField]
public List<ProtoId<JobPrototype>> IgnoredJobs = new();
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Linq;
using Content.Server.GameTicking.Rules.Components;
using Content.Server.Station.Components;
using Content.Server.Station.Systems;
using Content.Server.StationEvents.Components;
using Content.Shared.GameTicking.Components;
using Content.Shared.Roles;
using JetBrains.Annotations;
using Robust.Shared.Random;

Expand All @@ -23,6 +23,9 @@ protected override void Started(EntityUid uid, BureaucraticErrorRuleComponent co

var jobList = _stationJobs.GetJobs(chosenStation.Value).Keys.ToList();

foreach(var job in component.IgnoredJobs)
jobList.Remove(job);

if (jobList.Count == 0)
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,11 @@ public void RandomizeArtifact(EntityUid uid, ArtifactComponent component)
/// <param name="uid"></param>
/// <param name="user"></param>
/// <param name="component"></param>
/// <param name="logMissing">Set this to false if you don't know if the entity is an artifact.</param>
/// <returns></returns>
public bool TryActivateArtifact(EntityUid uid, EntityUid? user = null, ArtifactComponent? component = null)
public bool TryActivateArtifact(EntityUid uid, EntityUid? user = null, ArtifactComponent? component = null, bool logMissing = true)
{
if (!Resolve(uid, ref component))
if (!Resolve(uid, ref component, logMissing))
return false;

// check if artifact is under suppression field
Expand Down
6 changes: 6 additions & 0 deletions Content.Shared/Atmos/Rotting/PerishableComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ public sealed partial class PerishableComponent : Component

[DataField, AutoNetworkedField]
public int Stage;

/// <summary>
/// If true, rot will always progress.
/// </summary>
[DataField, AutoNetworkedField]
public bool ForceRotProgression;
}


Expand Down
4 changes: 4 additions & 0 deletions Content.Shared/Atmos/Rotting/SharedRottingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ public bool IsRotProgressing(EntityUid uid, PerishableComponent? perishable)
if (!Resolve(uid, ref perishable, false))
return false;

// Overrides all the other checks.
if (perishable.ForceRotProgression)
return true;

// only dead things or inanimate objects can rot
if (TryComp<MobStateComponent>(uid, out var mobState) && !_mobState.IsDead(uid, mobState))
return false;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Robust.Shared.GameStates;

namespace Content.Shared.Damage.Components;

/// <summary>
/// This is used for an effect that nullifies <see cref="SlowOnDamageComponent"/> and adds an alert.
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(SlowOnDamageSystem))]
public sealed partial class IgnoreSlowOnDamageComponent : Component;
19 changes: 19 additions & 0 deletions Content.Shared/Damage/Systems/SlowOnDamageSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ public override void Initialize()
SubscribeLocalEvent<ClothingSlowOnDamageModifierComponent, ExaminedEvent>(OnExamined);
SubscribeLocalEvent<ClothingSlowOnDamageModifierComponent, ClothingGotEquippedEvent>(OnGotEquipped);
SubscribeLocalEvent<ClothingSlowOnDamageModifierComponent, ClothingGotUnequippedEvent>(OnGotUnequipped);

SubscribeLocalEvent<IgnoreSlowOnDamageComponent, ComponentStartup>(OnIgnoreStartup);
SubscribeLocalEvent<IgnoreSlowOnDamageComponent, ComponentShutdown>(OnIgnoreShutdown);
SubscribeLocalEvent<IgnoreSlowOnDamageComponent, ModifySlowOnDamageSpeedEvent>(OnIgnoreModifySpeed);
}

private void OnRefreshMovespeed(EntityUid uid, SlowOnDamageComponent component, RefreshMovementSpeedModifiersEvent args)
Expand Down Expand Up @@ -84,6 +88,21 @@ private void OnGotUnequipped(Entity<ClothingSlowOnDamageModifierComponent> ent,
{
_movementSpeedModifierSystem.RefreshMovementSpeedModifiers(args.Wearer);
}

private void OnIgnoreStartup(Entity<IgnoreSlowOnDamageComponent> ent, ref ComponentStartup args)
{
_movementSpeedModifierSystem.RefreshMovementSpeedModifiers(ent);
}

private void OnIgnoreShutdown(Entity<IgnoreSlowOnDamageComponent> ent, ref ComponentShutdown args)
{
_movementSpeedModifierSystem.RefreshMovementSpeedModifiers(ent);
}

private void OnIgnoreModifySpeed(Entity<IgnoreSlowOnDamageComponent> ent, ref ModifySlowOnDamageSpeedEvent args)
{
args.Speed = 1f;
}
}

[ByRefEvent]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public sealed partial class RechargeBasicEntityAmmoComponent : Component

[DataField("rechargeSound")]
[AutoNetworkedField]
public SoundSpecifier RechargeSound = new SoundPathSpecifier("/Audio/Magic/forcewall.ogg")
public SoundSpecifier? RechargeSound = new SoundPathSpecifier("/Audio/Magic/forcewall.ogg")
{
Params = AudioParams.Default.WithVolume(-5f)
};
Expand All @@ -27,4 +27,7 @@ public sealed partial class RechargeBasicEntityAmmoComponent : Component
AutoNetworkedField]
[AutoPausedField]
public TimeSpan? NextCharge;

[DataField, AutoNetworkedField]
public bool ShowExamineText = true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ private void OnInit(EntityUid uid, RechargeBasicEntityAmmoComponent component, M

private void OnExamined(EntityUid uid, RechargeBasicEntityAmmoComponent component, ExaminedEvent args)
{
if (!component.ShowExamineText)
return;

if (!TryComp<BasicEntityAmmoProviderComponent>(uid, out var ammo)
|| ammo.Count == ammo.Capacity ||
component.NextCharge == null)
Expand Down
Loading
Loading