Cargo price tweaks 2 (#11307)
* Cargo price tweaks 2 * Allow cargo selling dead organics
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Linq;
|
||||
using Content.Server.Cargo.Components;
|
||||
using Content.Server.Labels.Components;
|
||||
using Content.Server.MobState;
|
||||
using Content.Server.Shuttles.Components;
|
||||
using Content.Server.Shuttles.Events;
|
||||
using Content.Server.UserInterface;
|
||||
@@ -39,6 +40,7 @@ public sealed partial class CargoSystem
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly EntityLookupSystem _lookup = default!;
|
||||
[Dependency] private readonly MobStateSystem _mobState = default!;
|
||||
[Dependency] private readonly PricingSystem _pricing = default!;
|
||||
[Dependency] private readonly ShuttleConsoleSystem _console = default!;
|
||||
[Dependency] private readonly ShuttleSystem _shuttle = default!;
|
||||
@@ -534,8 +536,8 @@ public sealed partial class CargoSystem
|
||||
|
||||
while (childEnumerator.MoveNext(out var child))
|
||||
{
|
||||
if (mobQuery.HasComponent(child.Value) ||
|
||||
FoundOrganics(child.Value, mobQuery, xformQuery)) return true;
|
||||
if ((mobQuery.TryGetComponent(child.Value, out var mobState) && !_mobState.IsDead(child.Value, mobState))
|
||||
|| FoundOrganics(child.Value, mobQuery, xformQuery)) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user