Don't spin thrown pies (#4328)
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
|
using System;
|
||||||
using Content.Server.Interaction;
|
using Content.Server.Interaction;
|
||||||
using Content.Server.Items;
|
using Content.Server.Items;
|
||||||
using Content.Shared.MobState;
|
using Content.Shared.MobState;
|
||||||
|
using Content.Shared.Tag;
|
||||||
using Content.Shared.Throwing;
|
using Content.Shared.Throwing;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Log;
|
using Robust.Shared.Log;
|
||||||
@@ -43,7 +45,14 @@ namespace Content.Server.Throwing
|
|||||||
{
|
{
|
||||||
entity.EnsureComponent<ThrownItemComponent>().Thrower = user;
|
entity.EnsureComponent<ThrownItemComponent>().Thrower = user;
|
||||||
// Give it a l'il spin.
|
// Give it a l'il spin.
|
||||||
physicsComponent.ApplyAngularImpulse(ThrowAngularImpulse);
|
if (!entity.HasTag("NoSpinOnThrow"))
|
||||||
|
{
|
||||||
|
physicsComponent.ApplyAngularImpulse(ThrowAngularImpulse);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
entity.Transform.LocalRotation = direction.ToWorldAngle() - Math.PI;
|
||||||
|
}
|
||||||
|
|
||||||
if (user != null)
|
if (user != null)
|
||||||
EntitySystem.Get<InteractionSystem>().ThrownInteraction(user, entity);
|
EntitySystem.Get<InteractionSystem>().ThrownInteraction(user, entity);
|
||||||
|
|||||||
@@ -18,6 +18,9 @@
|
|||||||
Quantity: 15
|
Quantity: 15
|
||||||
- type: SliceableFood
|
- type: SliceableFood
|
||||||
count: 4
|
count: 4
|
||||||
|
- type: Tag
|
||||||
|
tags:
|
||||||
|
- NoSpinOnThrow
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: FoodPieBase
|
parent: FoodPieBase
|
||||||
|
|||||||
@@ -34,6 +34,9 @@
|
|||||||
- type: Tag
|
- type: Tag
|
||||||
id: Ingot
|
id: Ingot
|
||||||
|
|
||||||
|
- type: Tag
|
||||||
|
id: NoSpinOnThrow
|
||||||
|
|
||||||
- type: Tag
|
- type: Tag
|
||||||
id: Ore
|
id: Ore
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user