some fixes
removes unused interface from DrinkComponent adds capability to fit inside dispensers for TransformableContainer removes stomach component from character setup dummy
This commit is contained in:
@@ -37,6 +37,12 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
|||||||
_initialDescription = Owner.Description;
|
_initialDescription = Owner.Description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void Startup()
|
||||||
|
{
|
||||||
|
base.Startup();
|
||||||
|
Owner.GetComponent<SolutionComponent>().Capabilities |= SolutionCaps.FitsInDispenser;;
|
||||||
|
}
|
||||||
|
|
||||||
public void CancelTransformation()
|
public void CancelTransformation()
|
||||||
{
|
{
|
||||||
_currentReagent = null;
|
_currentReagent = null;
|
||||||
@@ -48,7 +54,6 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
|||||||
void ISolutionChange.SolutionChanged(SolutionChangeEventArgs eventArgs)
|
void ISolutionChange.SolutionChanged(SolutionChangeEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
var solution = eventArgs.Owner.GetComponent<SolutionComponent>();
|
var solution = eventArgs.Owner.GetComponent<SolutionComponent>();
|
||||||
|
|
||||||
//Transform container into initial state when emptied
|
//Transform container into initial state when emptied
|
||||||
if (_currentReagent != null && solution.ReagentList.Count == 0)
|
if (_currentReagent != null && solution.ReagentList.Count == 0)
|
||||||
{
|
{
|
||||||
@@ -71,7 +76,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
|||||||
{
|
{
|
||||||
var spriteSpec = new SpriteSpecifier.Rsi(new ResourcePath("Objects/Drinks/" + proto.SpriteReplacementPath),"icon");
|
var spriteSpec = new SpriteSpecifier.Rsi(new ResourcePath("Objects/Drinks/" + proto.SpriteReplacementPath),"icon");
|
||||||
_sprite.LayerSetSprite(0, spriteSpec);
|
_sprite.LayerSetSprite(0, spriteSpec);
|
||||||
Owner.Name = proto.Name;
|
Owner.Name = proto.Name + " glass";
|
||||||
//Owner.Description = proto.Description;
|
//Owner.Description = proto.Description;
|
||||||
_currentReagent = proto;
|
_currentReagent = proto;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ using Robust.Shared.ViewVariables;
|
|||||||
namespace Content.Server.GameObjects.Components.Nutrition
|
namespace Content.Server.GameObjects.Components.Nutrition
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
public class DrinkComponent : Component, IAfterAttack, IUse, ISolutionChange
|
public class DrinkComponent : Component, IAfterAttack, IUse
|
||||||
{
|
{
|
||||||
#pragma warning disable 649
|
#pragma warning disable 649
|
||||||
[Dependency] private readonly ILocalizationManager _localizationManager;
|
[Dependency] private readonly ILocalizationManager _localizationManager;
|
||||||
@@ -132,47 +132,6 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
|||||||
}
|
}
|
||||||
_drinking = false;
|
_drinking = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Finish(user);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Trigger finish behavior in the drink if applicable.
|
|
||||||
/// Depending on the drink this will either delete it,
|
|
||||||
/// or convert it to another entity, like an empty variant.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="user">The entity that is using the drink</param>
|
|
||||||
/*
|
|
||||||
public void Finish(IEntity user)
|
|
||||||
{
|
|
||||||
// Drink containers are mostly transient.
|
|
||||||
// are you sure about that
|
|
||||||
if (_drinking || !_despawnOnFinish || UsesLeft() > 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
var gridPos = Owner.Transform.GridPosition;
|
|
||||||
Owner.Delete();
|
|
||||||
|
|
||||||
if (_finishPrototype == null || user == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
var finisher = Owner.EntityManager.SpawnEntity(_finishPrototype, Owner.Transform.GridPosition);
|
|
||||||
if (user.TryGetComponent(out HandsComponent handsComponent) && finisher.TryGetComponent(out ItemComponent itemComponent))
|
|
||||||
{
|
|
||||||
if (handsComponent.CanPutInHand(itemComponent))
|
|
||||||
{
|
|
||||||
handsComponent.PutInHand(itemComponent);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
finisher.Transform.GridPosition = gridPos;
|
|
||||||
if (finisher.TryGetComponent(out DrinkComponent drinkComponent))
|
|
||||||
{
|
|
||||||
drinkComponent.MaxVolume = MaxVolume;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
void ISolutionChange.SolutionChanged(SolutionChangeEventArgs eventArgs) { } //Finish(null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,8 +150,6 @@
|
|||||||
hands:
|
hands:
|
||||||
- left
|
- left
|
||||||
- right
|
- right
|
||||||
# Organs
|
|
||||||
- type: Stomach
|
|
||||||
|
|
||||||
- type: Inventory
|
- type: Inventory
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
|
|||||||
Reference in New Issue
Block a user