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;
|
||||
}
|
||||
|
||||
protected override void Startup()
|
||||
{
|
||||
base.Startup();
|
||||
Owner.GetComponent<SolutionComponent>().Capabilities |= SolutionCaps.FitsInDispenser;;
|
||||
}
|
||||
|
||||
public void CancelTransformation()
|
||||
{
|
||||
_currentReagent = null;
|
||||
@@ -48,7 +54,6 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
||||
void ISolutionChange.SolutionChanged(SolutionChangeEventArgs eventArgs)
|
||||
{
|
||||
var solution = eventArgs.Owner.GetComponent<SolutionComponent>();
|
||||
|
||||
//Transform container into initial state when emptied
|
||||
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");
|
||||
_sprite.LayerSetSprite(0, spriteSpec);
|
||||
Owner.Name = proto.Name;
|
||||
Owner.Name = proto.Name + " glass";
|
||||
//Owner.Description = proto.Description;
|
||||
_currentReagent = proto;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ using Robust.Shared.ViewVariables;
|
||||
namespace Content.Server.GameObjects.Components.Nutrition
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class DrinkComponent : Component, IAfterAttack, IUse, ISolutionChange
|
||||
public class DrinkComponent : Component, IAfterAttack, IUse
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly ILocalizationManager _localizationManager;
|
||||
@@ -132,47 +132,6 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
||||
}
|
||||
_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:
|
||||
- left
|
||||
- right
|
||||
# Organs
|
||||
- type: Stomach
|
||||
|
||||
- type: Inventory
|
||||
- type: Sprite
|
||||
|
||||
Reference in New Issue
Block a user