Fix kitchen spike (#4008)
* Fix kitchen spike * Add fluent localization * Add newline * Prevent things that are not dead from being spiked
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#nullable enable
|
||||
using Content.Shared.GameObjects.Components.Mobs;
|
||||
using Content.Shared.GameObjects.Components.Mobs.State;
|
||||
using Content.Shared.GameObjects.Components.Nutrition;
|
||||
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -23,15 +24,13 @@ namespace Content.Shared.Kitchen
|
||||
|
||||
bool IDragDropOn.CanDragDropOn(DragDropEventArgs eventArgs)
|
||||
{
|
||||
if (eventArgs.User == eventArgs.Dragged ||
|
||||
!eventArgs.Dragged.TryGetComponent<IMobStateComponent>(out var state) ||
|
||||
(eventArgs.User.TryGetComponent(out SharedCombatModeComponent? combatMode) && !combatMode.IsInCombatMode))
|
||||
if (!eventArgs.Dragged.HasComponent<SharedButcherableComponent>())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: Once we get silicons need to check organic
|
||||
return !state.IsDead();
|
||||
return true;
|
||||
}
|
||||
|
||||
public abstract bool DragDropOn(DragDropEventArgs eventArgs);
|
||||
|
||||
Reference in New Issue
Block a user