Pet Carrier (Zookeeper gameplay?) (#21545)
* add visual * fix item + entityStorage problem, add generation in maints * make pet carrier two-handed * added to cargo * add resistlocker component
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Numerics;
|
||||
using System.Numerics;
|
||||
using Content.Shared.Physics;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Audio;
|
||||
@@ -64,6 +64,12 @@ public abstract partial class SharedEntityStorageComponent : Component
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public float EnteringRange = 0.18f;
|
||||
|
||||
/// <summary>
|
||||
/// If true, there may be mobs inside the container, even if the container is an Item
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public bool ItemCanStoreMobs = false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not to show the contents when the storage is closed
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Shared.Body.Components;
|
||||
@@ -413,6 +413,9 @@ public abstract class SharedEntityStorageSystem : EntitySystem
|
||||
var storeEv = new StoreMobInItemContainerAttemptEvent();
|
||||
RaiseLocalEvent(container, ref storeEv);
|
||||
allowedToEat = storeEv is { Handled: true, Cancelled: false };
|
||||
|
||||
if (component.ItemCanStoreMobs)
|
||||
allowedToEat = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user