Add hunger and thirst (#363)
* Add hunger and thirst Based on the SS13 systems. Food (Nutriment) / Drink -> Stomach -> Hunger / Thirst * Cleanup rebase * Cleanup stuff that was prototyped * Address feedback Still need to add a statuseffects system in a separate branch * More cleanup on nutrition Fix Remie's feedback and also damage tick. * Re-implement nutrition with master * Updated to use the StatusEffectsUI update * Removed all clientside components as they only receive the UI updates now * Implemented PR feedback * Had to make a slight adjustment to the chemistry SolutionComponent given it doesn't have an Owner, same with Solution Still TODO: * Metabolisation effects * Change drink contents to alcohol / wine etc. * Add items to the dispensers * For transparent containers use RecalculateColor Could probably genericise DrinkFoodContainer as well to be a temporary item dispenser * Fix broken bottle parent
@@ -112,6 +112,12 @@ namespace Content.Client
|
||||
"MedicalScanner",
|
||||
"WirePlacer",
|
||||
"Species",
|
||||
"Drink",
|
||||
"Food",
|
||||
"DrinkFoodContainer",
|
||||
"Stomach",
|
||||
"Hunger",
|
||||
"Thirst",
|
||||
"Rotatable",
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Shared.GameObjects.Components.Nutrition;
|
||||
using Content.Shared.Utility;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.Utility;
|
||||
using YamlDotNet.RepresentationModel;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Nutrition
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class DrinkFoodContainerVisualizer2D : AppearanceVisualizer
|
||||
{
|
||||
private string _baseState;
|
||||
private int _steps;
|
||||
private DrinkFoodContainerVisualMode _mode;
|
||||
|
||||
public override void LoadData(YamlMappingNode node)
|
||||
{
|
||||
base.LoadData(node);
|
||||
|
||||
_baseState = node.GetNode("base_state").AsString();
|
||||
_steps = node.GetNode("steps").AsInt();
|
||||
try
|
||||
{
|
||||
_mode = node.GetNode("mode").AsEnum<DrinkFoodContainerVisualMode>();
|
||||
}
|
||||
catch (KeyNotFoundException)
|
||||
{
|
||||
_mode = DrinkFoodContainerVisualMode.Rounded;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnChangeData(AppearanceComponent component)
|
||||
{
|
||||
var sprite = component.Owner.GetComponent<ISpriteComponent>();
|
||||
|
||||
if (!component.TryGetData<int>(DrinkFoodContainerVisuals.Current, out var current))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!component.TryGetData<int>(DrinkFoodContainerVisuals.Capacity, out var capacity))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int step;
|
||||
|
||||
switch (_mode)
|
||||
{
|
||||
case DrinkFoodContainerVisualMode.Discrete:
|
||||
step = Math.Min(_steps - 1, current);
|
||||
break;
|
||||
case DrinkFoodContainerVisualMode.Rounded:
|
||||
step = ContentHelpers.RoundToLevels(current, capacity, _steps);
|
||||
break;
|
||||
default:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
sprite.LayerSetState(0, $"{_baseState}-{step}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using Content.Shared.GameObjects.Components.Nutrition;
|
||||
using Content.Shared.Utility;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.Utility;
|
||||
using YamlDotNet.RepresentationModel;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Nutrition
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class DrinkFoodVisualizer2D : AppearanceVisualizer
|
||||
{
|
||||
private int _steps;
|
||||
|
||||
public override void LoadData(YamlMappingNode node)
|
||||
{
|
||||
base.LoadData(node);
|
||||
|
||||
_steps = node.GetNode("steps").AsInt();
|
||||
}
|
||||
|
||||
public override void OnChangeData(AppearanceComponent component)
|
||||
{
|
||||
var sprite = component.Owner.GetComponent<ISpriteComponent>();
|
||||
if (!component.TryGetData<int>(SharedFoodComponent.FoodVisuals.MaxUses, out var maxUses))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.TryGetData<int>(SharedFoodComponent.FoodVisuals.Visual, out var usesLeft))
|
||||
{
|
||||
var step = ContentHelpers.RoundToLevels(usesLeft, maxUses, _steps);
|
||||
sprite.LayerSetState(0, $"icon-{step}");
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite.LayerSetState(0, $"icon-0");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,11 +32,21 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
||||
protected override void Startup()
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
|
||||
_reactions = _prototypeManager.EnumeratePrototypes<ReactionPrototype>();
|
||||
_audioSystem = _entitySystemManager.GetEntitySystem<AudioSystem>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the SolutionComponent if it doesn't have an owner
|
||||
/// </summary>
|
||||
public void InitializeFromPrototype()
|
||||
{
|
||||
// Because Initialize needs an Owner, Startup isn't called, etc.
|
||||
IoCManager.InjectDependencies(this);
|
||||
_reactions = _prototypeManager.EnumeratePrototypes<ReactionPrototype>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transfers solution from the held container to the target container.
|
||||
/// </summary>
|
||||
@@ -193,7 +203,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
||||
}
|
||||
}
|
||||
|
||||
public bool TryAddReagent(string reagentId, int quantity, out int acceptedQuantity, bool skipReactionCheck = false)
|
||||
public bool TryAddReagent(string reagentId, int quantity, out int acceptedQuantity, bool skipReactionCheck = false, bool skipColor = false)
|
||||
{
|
||||
if (quantity > _maxVolume - _containedSolution.TotalVolume)
|
||||
{
|
||||
@@ -206,20 +216,24 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
||||
}
|
||||
|
||||
_containedSolution.AddReagent(reagentId, acceptedQuantity);
|
||||
RecalculateColor();
|
||||
if (!skipColor) {
|
||||
RecalculateColor();
|
||||
}
|
||||
if(!skipReactionCheck)
|
||||
CheckForReaction();
|
||||
OnSolutionChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool TryAddSolution(Solution solution, bool skipReactionCheck = false)
|
||||
public bool TryAddSolution(Solution solution, bool skipReactionCheck = false, bool skipColor = false)
|
||||
{
|
||||
if (solution.TotalVolume > (_maxVolume - _containedSolution.TotalVolume))
|
||||
return false;
|
||||
|
||||
_containedSolution.AddSolution(solution);
|
||||
RecalculateColor();
|
||||
if (!skipColor) {
|
||||
RecalculateColor();
|
||||
}
|
||||
if(!skipReactionCheck)
|
||||
CheckForReaction();
|
||||
OnSolutionChanged();
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
using System;
|
||||
using Content.Server.GameObjects.Components.Chemistry;
|
||||
using Content.Server.GameObjects.Components.Sound;
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Shared.Chemistry;
|
||||
using Content.Shared.GameObjects.Components.Nutrition;
|
||||
using Content.Shared.Interfaces;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Nutrition
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class DrinkComponent : Component, IAfterAttack, IUse
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly ILocalizationManager _localizationManager;
|
||||
#pragma warning restore 649
|
||||
public override string Name => "Drink";
|
||||
[ViewVariables]
|
||||
private SolutionComponent _contents;
|
||||
|
||||
private AppearanceComponent _appearanceComponent;
|
||||
|
||||
[ViewVariables]
|
||||
private string _useSound;
|
||||
[ViewVariables]
|
||||
private string _finishPrototype;
|
||||
|
||||
public int TransferAmount => _transferAmount;
|
||||
[ViewVariables]
|
||||
private int _transferAmount = 2;
|
||||
|
||||
public int MaxVolume
|
||||
{
|
||||
get => _contents.MaxVolume;
|
||||
set => _contents.MaxVolume = value;
|
||||
}
|
||||
|
||||
private Solution _initialContents; // This is just for loading from yaml
|
||||
|
||||
private bool _despawnOnFinish;
|
||||
|
||||
public int UsesLeft()
|
||||
{
|
||||
// In case transfer amount exceeds volume left
|
||||
if (_contents.CurrentVolume == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return Math.Max(1, _contents.CurrentVolume / _transferAmount);
|
||||
}
|
||||
|
||||
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
serializer.DataField(ref _initialContents, "contents", null);
|
||||
serializer.DataField(ref _useSound, "use_sound", "/Audio/items/drink.ogg");
|
||||
// E.g. cola can when done or clear bottle, whatever
|
||||
// Currently this will enforce it has the same volume but this may change.
|
||||
serializer.DataField(ref _despawnOnFinish, "despawn_empty", true);
|
||||
serializer.DataField(ref _finishPrototype, "spawn_on_finish", null);
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
if (_contents == null)
|
||||
{
|
||||
if (Owner.TryGetComponent(out SolutionComponent solutionComponent))
|
||||
{
|
||||
_contents = solutionComponent;
|
||||
}
|
||||
else
|
||||
{
|
||||
_contents = Owner.AddComponent<SolutionComponent>();
|
||||
_contents.Initialize();
|
||||
}
|
||||
}
|
||||
|
||||
_contents.MaxVolume = _initialContents.TotalVolume;
|
||||
}
|
||||
|
||||
protected override void Startup()
|
||||
{
|
||||
base.Startup();
|
||||
if (_initialContents != null)
|
||||
{
|
||||
_contents.TryAddSolution(_initialContents, true, true);
|
||||
}
|
||||
_initialContents = null;
|
||||
Owner.TryGetComponent(out AppearanceComponent appearance);
|
||||
_appearanceComponent = appearance;
|
||||
_appearanceComponent?.SetData(SharedFoodComponent.FoodVisuals.MaxUses, MaxVolume);
|
||||
_updateAppearance();
|
||||
}
|
||||
|
||||
private void _updateAppearance()
|
||||
{
|
||||
_appearanceComponent?.SetData(SharedFoodComponent.FoodVisuals.Visual, UsesLeft());
|
||||
}
|
||||
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
UseDrink(eventArgs.User);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void IAfterAttack.AfterAttack(AfterAttackEventArgs eventArgs)
|
||||
{
|
||||
UseDrink(eventArgs.Attacked);
|
||||
}
|
||||
|
||||
void UseDrink(IEntity user)
|
||||
{
|
||||
if (user == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (UsesLeft() == 0 && !_despawnOnFinish)
|
||||
{
|
||||
user.PopupMessage(user, _localizationManager.GetString("Empty"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (user.TryGetComponent(out StomachComponent stomachComponent))
|
||||
{
|
||||
var transferAmount = Math.Min(_transferAmount, _contents.CurrentVolume);
|
||||
var split = _contents.SplitSolution(transferAmount);
|
||||
if (stomachComponent.TryTransferSolution(split))
|
||||
{
|
||||
if (_useSound != null)
|
||||
{
|
||||
Owner.GetComponent<SoundComponent>()?.Play(_useSound);
|
||||
user.PopupMessage(user, _localizationManager.GetString("Slurp"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add it back in
|
||||
_contents.TryAddSolution(split);
|
||||
user.PopupMessage(user, _localizationManager.GetString("Can't drink"));
|
||||
}
|
||||
}
|
||||
|
||||
// Drink containers are mostly transient.
|
||||
if (!_despawnOnFinish || UsesLeft() > 0)
|
||||
{
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
Owner.Delete();
|
||||
|
||||
if (_finishPrototype != null)
|
||||
{
|
||||
var finisher = Owner.EntityManager.SpawnEntity(_finishPrototype);
|
||||
if (user.TryGetComponent(out HandsComponent handsComponent) && finisher.TryGetComponent(out ItemComponent itemComponent))
|
||||
{
|
||||
if (handsComponent.CanPutInHand(itemComponent))
|
||||
{
|
||||
handsComponent.PutInHand(itemComponent);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
finisher.Transform.GridPosition = user.Transform.GridPosition;
|
||||
if (finisher.TryGetComponent(out DrinkComponent drinkComponent))
|
||||
{
|
||||
drinkComponent.MaxVolume = MaxVolume;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Server.GameObjects.Components.Sound;
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Shared.GameObjects.Components.Nutrition;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.GameObjects.Components.Container;
|
||||
using Robust.Server.Interfaces.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Random;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Nutrition
|
||||
{
|
||||
[RegisterComponent]
|
||||
public sealed class DrinkFoodContainerComponent : SharedDrinkFoodContainerComponent, IMapInit, IUse
|
||||
{
|
||||
public override string Name => "DrinkFoodContainer";
|
||||
private string _useSound;
|
||||
private Container _foodContainer;
|
||||
// Optimisation scabbed from BallisticMagazineComponent to avoid loading entities until needed
|
||||
[ViewVariables] private readonly Stack<IEntity> _loadedFood = new Stack<IEntity>();
|
||||
private AppearanceComponent _appearanceComponent;
|
||||
[ViewVariables] public int Count => _availableSpawnCount + _loadedFood.Count;
|
||||
private int _availableSpawnCount;
|
||||
private Dictionary<string, int> _prototypes;
|
||||
private string _finishPrototype;
|
||||
public int Capacity => _capacity;
|
||||
private int _capacity;
|
||||
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
serializer.DataField(ref _useSound, "use_sound", null);
|
||||
// Is a dictionary for stuff with probabilities (mainly donut box)
|
||||
serializer.DataField(ref _prototypes, "prototypes", null);
|
||||
// If you want the final item to be different e.g. trash
|
||||
serializer.DataField(ref _finishPrototype, "spawn_on_finish", null);
|
||||
serializer.DataField(ref _availableSpawnCount, "available_spawn_count", 0);
|
||||
serializer.DataField(ref _capacity, "capacity", 5);
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
Owner.TryGetComponent(out AppearanceComponent appearance);
|
||||
_appearanceComponent = appearance;
|
||||
if (_prototypes == null)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
if (_prototypes.Sum(x => x.Value) != 100)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
|
||||
public void MapInit()
|
||||
{
|
||||
_availableSpawnCount = Capacity;
|
||||
}
|
||||
|
||||
protected override void Startup()
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
_foodContainer =
|
||||
ContainerManagerComponent.Ensure<Container>("food_container", Owner, out var existed);
|
||||
|
||||
if (existed)
|
||||
{
|
||||
foreach (var entity in _foodContainer.ContainedEntities)
|
||||
{
|
||||
_loadedFood.Push(entity);
|
||||
}
|
||||
}
|
||||
|
||||
_updateAppearance();
|
||||
_appearanceComponent?.SetData(DrinkFoodContainerVisuals.Capacity, Capacity);
|
||||
}
|
||||
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
// TODO: Potentially change this depending upon desired functionality
|
||||
IEntity item = TakeItem(eventArgs.User);
|
||||
if (item == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (item.TryGetComponent(out ItemComponent itemComponent) &&
|
||||
eventArgs.User.TryGetComponent(out HandsComponent handsComponent))
|
||||
{
|
||||
if (handsComponent.CanPutInHand(itemComponent))
|
||||
{
|
||||
handsComponent.PutInHand(itemComponent);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
item.Transform.GridPosition = eventArgs.User.Transform.GridPosition;
|
||||
return true;
|
||||
}
|
||||
|
||||
// TODO: Somewhat shitcode
|
||||
// Tried using .Prob() buuuuuttt trying that for each item wouldn't work.
|
||||
private string _getProbItem(Dictionary<string, int> prototypes)
|
||||
{
|
||||
if (prototypes.Count == 1)
|
||||
{
|
||||
return prototypes.Keys.ToList()[0];
|
||||
}
|
||||
var prob = IoCManager.Resolve<IRobustRandom>();
|
||||
var result = prob.Next(0, 100);
|
||||
var runningTotal = 0;
|
||||
foreach (var item in prototypes)
|
||||
{
|
||||
runningTotal += item.Value;
|
||||
if (result < runningTotal)
|
||||
{
|
||||
return item.Key;
|
||||
}
|
||||
|
||||
}
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public IEntity TakeItem(IEntity user)
|
||||
{
|
||||
if (_useSound != null)
|
||||
{
|
||||
if (Owner.TryGetComponent(out SoundComponent soundComponent) && _useSound != null)
|
||||
{
|
||||
soundComponent.Play(_useSound);
|
||||
}
|
||||
}
|
||||
IEntity item = null;
|
||||
if (_loadedFood.Count > 0)
|
||||
{
|
||||
item = _loadedFood.Pop();
|
||||
_foodContainer.Remove(item);
|
||||
}
|
||||
|
||||
if (_availableSpawnCount > 0)
|
||||
{
|
||||
var prototypeName = _getProbItem(_prototypes);
|
||||
item = Owner.EntityManager.SpawnEntity(prototypeName);
|
||||
_availableSpawnCount -= 1;
|
||||
|
||||
}
|
||||
|
||||
_tryDelete(user);
|
||||
_updateAppearance();
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
private void _tryDelete(IEntity user)
|
||||
{
|
||||
if (Count <= 0)
|
||||
{
|
||||
// Ideally this takes priority to be put into inventory rather than the desired item
|
||||
if (_finishPrototype != null)
|
||||
{
|
||||
var item = Owner.EntityManager.SpawnEntity(_finishPrototype);
|
||||
item.Transform.GridPosition = Owner.Transform.GridPosition;
|
||||
Owner.Delete();
|
||||
if (user.TryGetComponent(out HandsComponent handsComponent) &&
|
||||
item.TryGetComponent(out ItemComponent itemComponent))
|
||||
{
|
||||
if (handsComponent.CanPutInHand(itemComponent))
|
||||
{
|
||||
handsComponent.PutInHand(itemComponent);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
Owner.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
private void _updateAppearance()
|
||||
{
|
||||
_appearanceComponent?.SetData(DrinkFoodContainerVisuals.Current, Count);
|
||||
}
|
||||
}
|
||||
}
|
||||
181
Content.Server/GameObjects/Components/Nutrition/FoodComponent.cs
Normal file
@@ -0,0 +1,181 @@
|
||||
using System;
|
||||
using Content.Server.GameObjects.Components.Chemistry;
|
||||
using Content.Server.GameObjects.Components.Sound;
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Shared.Chemistry;
|
||||
using Content.Shared.GameObjects.Components.Nutrition;
|
||||
using Content.Shared.Interfaces;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Nutrition
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class FoodComponent : Component, IAfterAttack, IUse
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly ILocalizationManager _localizationManager;
|
||||
#pragma warning restore 649
|
||||
// Currently the design is similar to drinkcomponent but it's susceptible to change so left as is for now.
|
||||
public override string Name => "Food";
|
||||
|
||||
private AppearanceComponent _appearanceComponent;
|
||||
|
||||
[ViewVariables]
|
||||
private string _useSound;
|
||||
[ViewVariables]
|
||||
private string _finishPrototype;
|
||||
[ViewVariables]
|
||||
private SolutionComponent _contents;
|
||||
[ViewVariables]
|
||||
private int _transferAmount;
|
||||
|
||||
private Solution _initialContents; // This is just for loading from yaml
|
||||
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
// Default is 1 use restoring 30
|
||||
serializer.DataField(ref _initialContents, "contents", null);
|
||||
serializer.DataField(ref _useSound, "use_sound", "/Audio/items/eatfood.ogg");
|
||||
// Default is transfer 30 units
|
||||
serializer.DataField(ref _transferAmount,
|
||||
"transfer_amount",
|
||||
30 / StomachComponent.NutrimentFactor);
|
||||
// E.g. empty chip packet when done
|
||||
serializer.DataField(ref _finishPrototype, "spawn_on_finish", null);
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
if (_contents == null)
|
||||
{
|
||||
if (Owner.TryGetComponent(out SolutionComponent solutionComponent))
|
||||
{
|
||||
_contents = solutionComponent;
|
||||
}
|
||||
else
|
||||
{
|
||||
_contents = Owner.AddComponent<SolutionComponent>();
|
||||
_contents.Initialize();
|
||||
}
|
||||
}
|
||||
|
||||
_contents.MaxVolume = _initialContents.TotalVolume;
|
||||
}
|
||||
|
||||
protected override void Startup()
|
||||
{
|
||||
base.Startup();
|
||||
if (_initialContents != null)
|
||||
{
|
||||
_contents.TryAddSolution(_initialContents, true, true);
|
||||
}
|
||||
|
||||
_initialContents = null;
|
||||
if (_contents.CurrentVolume == 0)
|
||||
{
|
||||
_contents.TryAddReagent("chem.Nutriment", 30 / StomachComponent.NutrimentFactor,
|
||||
out _);
|
||||
}
|
||||
Owner.TryGetComponent(out AppearanceComponent appearance);
|
||||
_appearanceComponent = appearance;
|
||||
// UsesLeft() at the start should match the max, at least currently.
|
||||
_appearanceComponent?.SetData(SharedFoodComponent.FoodVisuals.MaxUses, UsesLeft());
|
||||
_updateAppearance();
|
||||
}
|
||||
|
||||
private void _updateAppearance()
|
||||
{
|
||||
_appearanceComponent?.SetData(SharedFoodComponent.FoodVisuals.Visual, UsesLeft());
|
||||
}
|
||||
|
||||
public int UsesLeft()
|
||||
{
|
||||
// In case transfer amount exceeds volume left
|
||||
if (_contents.CurrentVolume == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return Math.Max(1, _contents.CurrentVolume / _transferAmount);
|
||||
}
|
||||
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
UseFood(eventArgs.User);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void IAfterAttack.AfterAttack(AfterAttackEventArgs eventArgs)
|
||||
{
|
||||
UseFood(eventArgs.Attacked);
|
||||
}
|
||||
|
||||
void UseFood(IEntity user)
|
||||
{
|
||||
if (user == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (UsesLeft() == 0)
|
||||
{
|
||||
user.PopupMessage(user, _localizationManager.GetString("Empty"));
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: Add putting food back in boxes here?
|
||||
if (user.TryGetComponent(out StomachComponent stomachComponent))
|
||||
{
|
||||
var transferAmount = Math.Min(_transferAmount, _contents.CurrentVolume);
|
||||
var split = _contents.SplitSolution(transferAmount);
|
||||
if (stomachComponent.TryTransferSolution(split))
|
||||
{
|
||||
if (_useSound != null)
|
||||
{
|
||||
Owner.GetComponent<SoundComponent>()?.Play(_useSound);
|
||||
user.PopupMessage(user, _localizationManager.GetString("Nom"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add it back in
|
||||
_contents.TryAddSolution(split);
|
||||
user.PopupMessage(user, _localizationManager.GetString("Can't eat"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (UsesLeft() > 0)
|
||||
{
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
Owner.Delete();
|
||||
|
||||
if (_finishPrototype != null)
|
||||
{
|
||||
var finisher = Owner.EntityManager.SpawnEntity(_finishPrototype);
|
||||
if (user.TryGetComponent(out HandsComponent handsComponent) && finisher.TryGetComponent(out ItemComponent itemComponent))
|
||||
{
|
||||
if (handsComponent.CanPutInHand(itemComponent))
|
||||
{
|
||||
handsComponent.PutInHand(itemComponent);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
finisher.Transform.GridPosition = user.Transform.GridPosition;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Server.GameObjects.Components.Mobs;
|
||||
using Content.Server.GameObjects.Components.Movement;
|
||||
using Content.Shared.GameObjects;
|
||||
using Content.Shared.GameObjects.Components.Mobs;
|
||||
using Content.Shared.GameObjects.Components.Nutrition;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Interfaces.Random;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Nutrition
|
||||
{
|
||||
[RegisterComponent]
|
||||
public sealed class HungerComponent : Component
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IRobustRandom _random;
|
||||
#pragma warning restore 649
|
||||
|
||||
public override string Name => "Hunger";
|
||||
|
||||
// Base stuff
|
||||
public float BaseDecayRate => _baseDecayRate;
|
||||
[ViewVariables] private float _baseDecayRate;
|
||||
public float ActualDecayRate => _actualDecayRate;
|
||||
[ViewVariables] private float _actualDecayRate;
|
||||
|
||||
// Hunger
|
||||
public HungerThreshold CurrentHungerThreshold => _currentHungerThreshold;
|
||||
private HungerThreshold _currentHungerThreshold;
|
||||
private HungerThreshold _lastHungerThreshold;
|
||||
public float CurrentHunger => _currentHunger;
|
||||
[ViewVariables] private float _currentHunger;
|
||||
|
||||
public Dictionary<HungerThreshold, float> HungerThresholds => _hungerThresholds;
|
||||
private Dictionary<HungerThreshold, float> _hungerThresholds = new Dictionary<HungerThreshold, float>
|
||||
{
|
||||
{HungerThreshold.Overfed, 600.0f},
|
||||
{HungerThreshold.Okay, 450.0f},
|
||||
{HungerThreshold.Peckish, 300.0f},
|
||||
{HungerThreshold.Starving, 150.0f},
|
||||
{HungerThreshold.Dead, 0.0f},
|
||||
};
|
||||
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
serializer.DataField(ref _baseDecayRate, "base_decay_rate", 0.5f);
|
||||
}
|
||||
|
||||
public void HungerThresholdEffect(bool force = false)
|
||||
{
|
||||
if (_currentHungerThreshold != _lastHungerThreshold || force) {
|
||||
Logger.InfoS("hunger", $"Updating hunger state for {Owner.Name}");
|
||||
|
||||
// Revert slow speed if required
|
||||
if (_lastHungerThreshold == HungerThreshold.Starving && _currentHungerThreshold != HungerThreshold.Dead &&
|
||||
Owner.TryGetComponent(out PlayerInputMoverComponent playerSpeedupComponent))
|
||||
{
|
||||
// TODO shitcode: Come up something better
|
||||
playerSpeedupComponent.WalkMoveSpeed = playerSpeedupComponent.WalkMoveSpeed * 2;
|
||||
playerSpeedupComponent.SprintMoveSpeed = playerSpeedupComponent.SprintMoveSpeed * 4;
|
||||
}
|
||||
|
||||
// Update UI
|
||||
Owner.TryGetComponent(out ServerStatusEffectsComponent statusEffectsComponent);
|
||||
statusEffectsComponent?.ChangeStatus(StatusEffect.Hunger, "/Textures/Mob/UI/Hunger/" +
|
||||
_currentHungerThreshold + ".png");
|
||||
|
||||
switch (_currentHungerThreshold)
|
||||
{
|
||||
case HungerThreshold.Overfed:
|
||||
_lastHungerThreshold = _currentHungerThreshold;
|
||||
_actualDecayRate = _baseDecayRate * 1.2f;
|
||||
return;
|
||||
|
||||
case HungerThreshold.Okay:
|
||||
_lastHungerThreshold = _currentHungerThreshold;
|
||||
_actualDecayRate = _baseDecayRate;
|
||||
return;
|
||||
|
||||
case HungerThreshold.Peckish:
|
||||
// Same as okay except with UI icon saying eat soon.
|
||||
_lastHungerThreshold = _currentHungerThreshold;
|
||||
_actualDecayRate = _baseDecayRate * 0.8f;
|
||||
return;
|
||||
|
||||
case HungerThreshold.Starving:
|
||||
// TODO: If something else bumps this could cause mega-speed.
|
||||
// If some form of speed update system if multiple things are touching it use that.
|
||||
if (Owner.TryGetComponent(out PlayerInputMoverComponent playerInputMoverComponent)) {
|
||||
playerInputMoverComponent.WalkMoveSpeed = playerInputMoverComponent.WalkMoveSpeed / 2;
|
||||
playerInputMoverComponent.SprintMoveSpeed = playerInputMoverComponent.SprintMoveSpeed / 4;
|
||||
}
|
||||
_lastHungerThreshold = _currentHungerThreshold;
|
||||
_actualDecayRate = _baseDecayRate * 0.6f;
|
||||
return;
|
||||
|
||||
case HungerThreshold.Dead:
|
||||
return;
|
||||
default:
|
||||
Logger.ErrorS("hunger", $"No hunger threshold found for {_currentHungerThreshold}");
|
||||
throw new ArgumentOutOfRangeException($"No hunger threshold found for {_currentHungerThreshold}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Startup()
|
||||
{
|
||||
base.Startup();
|
||||
// Similar functionality to SS13. Should also stagger people going to the chef.
|
||||
_currentHunger = _random.Next(
|
||||
(int)_hungerThresholds[HungerThreshold.Peckish] + 10,
|
||||
(int)_hungerThresholds[HungerThreshold.Okay] - 1);
|
||||
_currentHungerThreshold = GetHungerThreshold(_currentHunger);
|
||||
_lastHungerThreshold = HungerThreshold.Okay; // TODO: Potentially change this -> Used Okay because no effects.
|
||||
HungerThresholdEffect(true);
|
||||
}
|
||||
|
||||
public HungerThreshold GetHungerThreshold(float food)
|
||||
{
|
||||
HungerThreshold result = HungerThreshold.Dead;
|
||||
var value = HungerThresholds[HungerThreshold.Overfed];
|
||||
foreach (var threshold in _hungerThresholds)
|
||||
{
|
||||
if (threshold.Value <= value && threshold.Value >= food)
|
||||
{
|
||||
result = threshold.Key;
|
||||
value = threshold.Value;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public void UpdateFood(float amount)
|
||||
{
|
||||
_currentHunger = Math.Min(_currentHunger + amount, HungerThresholds[HungerThreshold.Overfed]);
|
||||
}
|
||||
|
||||
// TODO: If mob is moving increase rate of consumption?
|
||||
// Should use a multiplier as something like a disease would overwrite decay rate.
|
||||
public void OnUpdate(float frametime)
|
||||
{
|
||||
_currentHunger -= frametime * ActualDecayRate;
|
||||
var calculatedHungerThreshold = GetHungerThreshold(_currentHunger);
|
||||
// _trySound(calculatedThreshold);
|
||||
if (calculatedHungerThreshold != _currentHungerThreshold)
|
||||
{
|
||||
_currentHungerThreshold = calculatedHungerThreshold;
|
||||
HungerThresholdEffect();
|
||||
}
|
||||
if (_currentHungerThreshold == HungerThreshold.Dead)
|
||||
{
|
||||
// TODO: Remove from dead people
|
||||
if (Owner.TryGetComponent(out DamageableComponent damage))
|
||||
{
|
||||
damage.TakeDamage(DamageType.Brute, 2);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum HungerThreshold
|
||||
{
|
||||
Overfed,
|
||||
Okay,
|
||||
Peckish,
|
||||
Starving,
|
||||
Dead,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
using Content.Server.GameObjects.Components.Chemistry;
|
||||
using Content.Shared.Chemistry;
|
||||
using Content.Shared.GameObjects.Components.Nutrition;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Nutrition
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class StomachComponent : SharedStomachComponent
|
||||
{
|
||||
// Essentially every time it ticks it'll pull out the MetabolisationAmount of reagents and process them.
|
||||
// Generic food goes under "nutriment" like SS13
|
||||
// There's also separate hunger and thirst components which means you can have a stomach
|
||||
// but not require food / water.
|
||||
public static readonly int NutrimentFactor = 30;
|
||||
public static readonly int HydrationFactor = 30;
|
||||
public static readonly int MetabolisationAmount = 5;
|
||||
|
||||
private SolutionComponent _stomachContents;
|
||||
public float MetaboliseDelay => _metaboliseDelay;
|
||||
[ViewVariables]
|
||||
private float _metaboliseDelay; // How long between metabolisation for 5 units
|
||||
|
||||
public int MaxVolume
|
||||
{
|
||||
get => _stomachContents.MaxVolume;
|
||||
set => _stomachContents.MaxVolume = value;
|
||||
}
|
||||
|
||||
private float _metabolisationCounter = 0.0f;
|
||||
|
||||
private int _initialMaxVolume;
|
||||
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
serializer.DataField(ref _metaboliseDelay, "metabolise_delay", 6.0f);
|
||||
serializer.DataField(ref _initialMaxVolume, "max_volume", 20);
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
// Shouldn't add to Owner to avoid cross-contamination (e.g. with blood or whatever they made hold other solutions)
|
||||
_stomachContents = new SolutionComponent();
|
||||
_stomachContents.InitializeFromPrototype();
|
||||
_stomachContents.MaxVolume = _initialMaxVolume;
|
||||
}
|
||||
|
||||
public bool TryTransferSolution(Solution solution)
|
||||
{
|
||||
// TODO: For now no partial transfers. Potentially change by design
|
||||
if (solution.TotalVolume + _stomachContents.CurrentVolume > _stomachContents.MaxVolume)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_stomachContents.TryAddSolution(solution, false, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is where the magic happens. Make people throw up, increase nutrition, whatever
|
||||
/// </summary>
|
||||
/// <param name="solution"></param>
|
||||
public void React(Solution solution)
|
||||
{
|
||||
// TODO: Implement metabolism post from here
|
||||
// https://github.com/space-wizards/space-station-14/issues/170#issuecomment-481835623 as raised by moneyl
|
||||
var hungerUpdate = 0;
|
||||
var thirstUpdate = 0;
|
||||
foreach (var reagent in solution.Contents)
|
||||
{
|
||||
switch (reagent.ReagentId)
|
||||
{
|
||||
case "chem.Nutriment":
|
||||
hungerUpdate++;
|
||||
break;
|
||||
case "chem.H2O":
|
||||
thirstUpdate++;
|
||||
break;
|
||||
case "chem.Alcohol":
|
||||
thirstUpdate++;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Quantity x restore amount per unit
|
||||
if (hungerUpdate > 0 && Owner.TryGetComponent(out HungerComponent hungerComponent))
|
||||
{
|
||||
hungerComponent.UpdateFood(hungerUpdate * NutrimentFactor);
|
||||
}
|
||||
|
||||
if (thirstUpdate > 0 && Owner.TryGetComponent(out ThirstComponent thirstComponent))
|
||||
{
|
||||
thirstComponent.UpdateThirst(thirstUpdate * HydrationFactor);
|
||||
}
|
||||
|
||||
// TODO: Dispose solution?
|
||||
}
|
||||
|
||||
public void Metabolise()
|
||||
{
|
||||
if (_stomachContents.CurrentVolume == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var metabolisation = _stomachContents.SplitSolution(MetabolisationAmount);
|
||||
|
||||
React(metabolisation);
|
||||
}
|
||||
|
||||
public void OnUpdate(float frameTime)
|
||||
{
|
||||
_metabolisationCounter += frameTime;
|
||||
if (_metabolisationCounter >= MetaboliseDelay)
|
||||
{
|
||||
// Going to be rounding issues with frametime but no easy way to avoid it with int reagents.
|
||||
// It is a long-term mechanic so shouldn't be a big deal.
|
||||
Metabolise();
|
||||
_metabolisationCounter -= MetaboliseDelay;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Server.GameObjects.Components.Mobs;
|
||||
using Content.Server.GameObjects.Components.Movement;
|
||||
using Content.Shared.GameObjects;
|
||||
using Content.Shared.GameObjects.Components.Mobs;
|
||||
using Content.Shared.GameObjects.Components.Nutrition;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Interfaces.Random;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Nutrition
|
||||
{
|
||||
[RegisterComponent]
|
||||
public sealed class ThirstComponent : Component
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IRobustRandom _random;
|
||||
#pragma warning restore 649
|
||||
|
||||
public override string Name => "Thirst";
|
||||
|
||||
// Base stuff
|
||||
public float BaseDecayRate => _baseDecayRate;
|
||||
[ViewVariables] private float _baseDecayRate;
|
||||
public float ActualDecayRate => _actualDecayRate;
|
||||
[ViewVariables] private float _actualDecayRate;
|
||||
|
||||
// Thirst
|
||||
public ThirstThreshold CurrentThirstThreshold => _currentThirstThreshold;
|
||||
private ThirstThreshold _currentThirstThreshold;
|
||||
private ThirstThreshold _lastThirstThreshold;
|
||||
public float CurrentThirst => _currentThirst;
|
||||
[ViewVariables] private float _currentThirst;
|
||||
|
||||
public Dictionary<ThirstThreshold, float> ThirstThresholds => _thirstThresholds;
|
||||
private Dictionary<ThirstThreshold, float> _thirstThresholds = new Dictionary<ThirstThreshold, float>
|
||||
{
|
||||
{ThirstThreshold.OverHydrated, 400.0f},
|
||||
{ThirstThreshold.Okay, 300.0f},
|
||||
{ThirstThreshold.Thirsty, 200.0f},
|
||||
{ThirstThreshold.Parched, 100.0f},
|
||||
{ThirstThreshold.Dead, 0.0f},
|
||||
};
|
||||
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
serializer.DataField(ref _baseDecayRate, "base_decay_rate", 0.5f);
|
||||
}
|
||||
|
||||
public void ThirstThresholdEffect(bool force = false)
|
||||
{
|
||||
if (_currentThirstThreshold != _lastThirstThreshold || force) {
|
||||
Logger.InfoS("thirst", $"Updating Thirst state for {Owner.Name}");
|
||||
|
||||
// Revert slow speed if required
|
||||
if (_lastThirstThreshold == ThirstThreshold.Parched && _currentThirstThreshold != ThirstThreshold.Dead &&
|
||||
Owner.TryGetComponent(out PlayerInputMoverComponent playerSpeedupComponent))
|
||||
{
|
||||
// TODO shitcode: Come up something better
|
||||
playerSpeedupComponent.WalkMoveSpeed = playerSpeedupComponent.WalkMoveSpeed * 2;
|
||||
playerSpeedupComponent.SprintMoveSpeed = playerSpeedupComponent.SprintMoveSpeed * 4;
|
||||
}
|
||||
|
||||
// Update UI
|
||||
Owner.TryGetComponent(out ServerStatusEffectsComponent statusEffectsComponent);
|
||||
statusEffectsComponent?.ChangeStatus(StatusEffect.Thirst, "/Textures/Mob/UI/Thirst/" +
|
||||
_currentThirstThreshold + ".png");
|
||||
|
||||
switch (_currentThirstThreshold)
|
||||
{
|
||||
case ThirstThreshold.OverHydrated:
|
||||
_lastThirstThreshold = _currentThirstThreshold;
|
||||
_actualDecayRate = _baseDecayRate * 1.2f;
|
||||
return;
|
||||
|
||||
case ThirstThreshold.Okay:
|
||||
_lastThirstThreshold = _currentThirstThreshold;
|
||||
_actualDecayRate = _baseDecayRate;
|
||||
return;
|
||||
|
||||
case ThirstThreshold.Thirsty:
|
||||
// Same as okay except with UI icon saying drink soon.
|
||||
_lastThirstThreshold = _currentThirstThreshold;
|
||||
_actualDecayRate = _baseDecayRate * 0.8f;
|
||||
return;
|
||||
|
||||
case ThirstThreshold.Parched:
|
||||
// TODO: If something else bumps this could cause mega-speed.
|
||||
// If some form of speed update system if multiple things are touching it use that.
|
||||
if (Owner.TryGetComponent(out PlayerInputMoverComponent playerInputMoverComponent)) {
|
||||
playerInputMoverComponent.WalkMoveSpeed = playerInputMoverComponent.WalkMoveSpeed / 2;
|
||||
playerInputMoverComponent.SprintMoveSpeed = playerInputMoverComponent.SprintMoveSpeed / 4;
|
||||
}
|
||||
_lastThirstThreshold = _currentThirstThreshold;
|
||||
_actualDecayRate = _baseDecayRate * 0.6f;
|
||||
return;
|
||||
|
||||
case ThirstThreshold.Dead:
|
||||
return;
|
||||
default:
|
||||
Logger.ErrorS("thirst", $"No thirst threshold found for {_currentThirstThreshold}");
|
||||
throw new ArgumentOutOfRangeException($"No thirst threshold found for {_currentThirstThreshold}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Startup()
|
||||
{
|
||||
base.Startup();
|
||||
_currentThirst = _random.Next(
|
||||
(int)_thirstThresholds[ThirstThreshold.Thirsty] + 10,
|
||||
(int)_thirstThresholds[ThirstThreshold.Okay] - 1);
|
||||
_currentThirstThreshold = GetThirstThreshold(_currentThirst);
|
||||
_lastThirstThreshold = ThirstThreshold.Okay; // TODO: Potentially change this -> Used Okay because no effects.
|
||||
// TODO: Check all thresholds make sense and throw if they don't.
|
||||
ThirstThresholdEffect(true);
|
||||
}
|
||||
|
||||
public ThirstThreshold GetThirstThreshold(float drink)
|
||||
{
|
||||
ThirstThreshold result = ThirstThreshold.Dead;
|
||||
var value = ThirstThresholds[ThirstThreshold.OverHydrated];
|
||||
foreach (var threshold in _thirstThresholds)
|
||||
{
|
||||
if (threshold.Value <= value && threshold.Value >= drink)
|
||||
{
|
||||
result = threshold.Key;
|
||||
value = threshold.Value;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public void UpdateThirst(float amount)
|
||||
{
|
||||
_currentThirst = Math.Min(_currentThirst + amount, ThirstThresholds[ThirstThreshold.OverHydrated]);
|
||||
}
|
||||
|
||||
// TODO: If mob is moving increase rate of consumption.
|
||||
// Should use a multiplier as something like a disease would overwrite decay rate.
|
||||
public void OnUpdate(float frametime)
|
||||
{
|
||||
_currentThirst -= frametime * ActualDecayRate;
|
||||
var calculatedThirstThreshold = GetThirstThreshold(_currentThirst);
|
||||
// _trySound(calculatedThreshold);
|
||||
if (calculatedThirstThreshold != _currentThirstThreshold)
|
||||
{
|
||||
_currentThirstThreshold = calculatedThirstThreshold;
|
||||
ThirstThresholdEffect();
|
||||
}
|
||||
|
||||
if (_currentThirstThreshold == ThirstThreshold.Dead)
|
||||
{
|
||||
// TODO: Remove from dead people
|
||||
if (Owner.TryGetComponent(out DamageableComponent damage))
|
||||
{
|
||||
damage.TakeDamage(DamageType.Brute, 2);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum ThirstThreshold
|
||||
{
|
||||
// Hydrohomies
|
||||
OverHydrated,
|
||||
Okay,
|
||||
Thirsty,
|
||||
Parched,
|
||||
Dead,
|
||||
}
|
||||
}
|
||||
31
Content.Server/GameObjects/EntitySystems/HungerSystem.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Content.Server.GameObjects.Components.Nutrition;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
|
||||
namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public class HungerSystem : EntitySystem
|
||||
{
|
||||
private float _accumulatedFrameTime;
|
||||
public override void Initialize()
|
||||
{
|
||||
EntityQuery = new TypeEntityQuery(typeof(HungerComponent));
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
_accumulatedFrameTime += frameTime;
|
||||
if (_accumulatedFrameTime > 1.0f)
|
||||
{
|
||||
foreach (var entity in RelevantEntities)
|
||||
{
|
||||
var comp = entity.GetComponent<HungerComponent>();
|
||||
comp.OnUpdate(_accumulatedFrameTime);
|
||||
_accumulatedFrameTime = 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
32
Content.Server/GameObjects/EntitySystems/StomachSystem.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Content.Server.GameObjects.Components.Nutrition;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
|
||||
namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public class StomachSystem : EntitySystem
|
||||
{
|
||||
private float _accumulatedFrameTime;
|
||||
public override void Initialize()
|
||||
{
|
||||
EntityQuery = new TypeEntityQuery(typeof(StomachComponent));
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
_accumulatedFrameTime += frameTime;
|
||||
// TODO: Potential performance improvement (e.g. going through say 1/5th the entities every tick)
|
||||
if (_accumulatedFrameTime > 1.0f)
|
||||
{
|
||||
foreach (var entity in RelevantEntities)
|
||||
{
|
||||
var comp = entity.GetComponent<StomachComponent>();
|
||||
comp.OnUpdate(_accumulatedFrameTime);
|
||||
_accumulatedFrameTime = 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Content.Server/GameObjects/EntitySystems/ThirstSystem.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Content.Server.GameObjects.Components.Nutrition;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
|
||||
namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public class ThirstSystem : EntitySystem
|
||||
{
|
||||
private float _accumulatedFrameTime;
|
||||
public override void Initialize()
|
||||
{
|
||||
EntityQuery = new TypeEntityQuery(typeof(ThirstComponent));
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
_accumulatedFrameTime += frameTime;
|
||||
if (_accumulatedFrameTime > 1.0f)
|
||||
{
|
||||
foreach (var entity in RelevantEntities)
|
||||
{
|
||||
var comp = entity.GetComponent<ThirstComponent>();
|
||||
comp.OnUpdate(_accumulatedFrameTime);
|
||||
_accumulatedFrameTime = 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ namespace Content.Shared.GameObjects.Components.Chemistry
|
||||
#pragma warning restore 649
|
||||
|
||||
[ViewVariables]
|
||||
protected Solution _containedSolution;
|
||||
protected Solution _containedSolution = new Solution();
|
||||
protected int _maxVolume;
|
||||
private SolutionCaps _capabilities;
|
||||
|
||||
@@ -68,14 +68,14 @@ namespace Content.Shared.GameObjects.Components.Chemistry
|
||||
|
||||
/// <inheritdoc />
|
||||
public sealed override Type StateType => typeof(SolutionComponentState);
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
|
||||
serializer.DataField(ref _maxVolume, "maxVol", 0);
|
||||
serializer.DataField(ref _containedSolution, "contents", new Solution());
|
||||
serializer.DataField(ref _containedSolution, "contents", _containedSolution);
|
||||
serializer.DataField(ref _capabilities, "caps", SolutionCaps.None);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,5 +32,7 @@ namespace Content.Shared.GameObjects.Components.Mobs
|
||||
public enum StatusEffect
|
||||
{
|
||||
Health,
|
||||
Hunger,
|
||||
Thirst,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.GameObjects.Components.Nutrition
|
||||
{
|
||||
public abstract class SharedDrinkFoodContainerComponent : Component
|
||||
{
|
||||
}
|
||||
|
||||
[NetSerializable, Serializable]
|
||||
public enum DrinkFoodContainerVisualMode
|
||||
{
|
||||
/// <summary>
|
||||
/// Discrete: 50 eggs in a carton -> down to 25, will show 12/12 until it gets below max
|
||||
/// Rounded: 50 eggs in a carton -> down to 25, will round it to 6 of 12
|
||||
/// </summary>
|
||||
Discrete,
|
||||
Rounded,
|
||||
}
|
||||
|
||||
[NetSerializable, Serializable]
|
||||
public enum DrinkFoodContainerVisuals
|
||||
{
|
||||
Capacity,
|
||||
Current,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.GameObjects.Components.Nutrition
|
||||
{
|
||||
public class SharedFoodComponent
|
||||
{
|
||||
// TODO: Remove maybe? Add visualizer for food
|
||||
[Serializable, NetSerializable]
|
||||
public enum FoodVisuals
|
||||
{
|
||||
Visual,
|
||||
MaxUses,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.GameObjects.Components.Nutrition
|
||||
{
|
||||
|
||||
public class SharedStomachComponent : Component
|
||||
{
|
||||
public override string Name => "Stomach";
|
||||
}
|
||||
}
|
||||
@@ -30,5 +30,6 @@
|
||||
public const uint COMBATMODE = 1025;
|
||||
public const uint STATUSEFFECTS = 1026;
|
||||
public const uint OVERLAYEFFECTS = 1027;
|
||||
public const uint STOMACH = 1028;
|
||||
}
|
||||
}
|
||||
|
||||
BIN
Resources/Audio/items/canopen.ogg
Normal file
BIN
Resources/Audio/items/drink.ogg
Normal file
BIN
Resources/Audio/items/eatfood.ogg
Normal file
@@ -24,6 +24,7 @@
|
||||
- chem.C
|
||||
- chem.Cu
|
||||
- chem.N
|
||||
- chem.Nutriment
|
||||
- chem.Fe
|
||||
- chem.F
|
||||
- chem.Al
|
||||
|
||||
2670
Resources/Prototypes/Entities/items/Consumables/drinks.yml
Normal file
@@ -0,0 +1,287 @@
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkAbsintheBottleFull
|
||||
name: Jailbreaker Verte
|
||||
description: One sip of this and you just know you're gonna have a good time.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
spawn_on_finish: DrinkBottleAbsinthe
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/absinthebottle.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/absinthebottle.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkAlcoGreenFull
|
||||
name: Emeraldine Melon Liquor
|
||||
description: A bottle of 46 proof Emeraldine Melon Liquor. Sweet and light.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
spawn_on_finish: DrinkBottleAlcoClear
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/alco-green.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/alco-green.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkAleBottleFull
|
||||
name: Magm-Ale
|
||||
description: A true dorf's drink of choice.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
spawn_on_finish: DrinkBottleAle
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/alebottle.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/alebottle.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkBottleOfNothingFull
|
||||
name: Bottle of nothing
|
||||
description: A bottle filled with nothing
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
spawn_on_finish: DrinkBottleAlcoClear
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/bottleofnothing.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/bottleofnothing.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkCognacBottleFull
|
||||
name: Cognac bottle
|
||||
description: A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. You might as well not scream 'SHITCURITY' this time.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
spawn_on_finish: DrinkBottleCognac
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/cognacbottle.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/cognacbottle.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkGinBottleFull
|
||||
name: Griffeater gin bottle
|
||||
description: A bottle of high quality gin, produced in the New London Space Station.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
spawn_on_finish: DrinkBottleGin
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/ginbottle.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/ginbottle.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkGoldschlagerBottleFull
|
||||
name: Goldschlager bottle
|
||||
description: 100 proof cinnamon schnapps, made for alcoholic teen girls on spring break.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
spawn_on_finish: DrinkBottleGoldschlager
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/goldschlagerbottle.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/goldschlagerbottle.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkKahluaBottleFull
|
||||
name: Kahlua bottle
|
||||
description: A widely known, Mexican coffee-flavoured liqueur. In production since 1936, HONK
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
spawn_on_finish: DrinkBottleKahlua
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/kahluabottle.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/kahluabottle.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkPatronBottleFull
|
||||
name: Wrapp artiste patron bottle
|
||||
description: Silver laced tequilla, served in space night clubs across the galaxy.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
spawn_on_finish: DrinkBottlePatron
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/patronbottle.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/patronbottle.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkPoisonWinebottleFull
|
||||
name: Warlock's velvet bottle
|
||||
description: What a delightful packaging for a surely high quality wine! The vintage must be amazing!
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
spawn_on_finish: DrinkBottlePoisonWine
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/pwinebottle.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/pwinebottle.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkRumbottleFull
|
||||
name: Captain Pete's cuban spiced rum
|
||||
description: This isn't just rum, oh no. It's practically GRIFF in a bottle.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
spawn_on_finish: DrinkBottleRum
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/rumbottle.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/rumbottle.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkTequilabottleFull
|
||||
name: Caccavo guaranteed quality tequila bottle
|
||||
description: Made from premium petroleum distillates, pure thalidomide and other fine quality ingredients!
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
spawn_on_finish: DrinkBottleTequila
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/tequillabottle.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/tequillabottle.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkVermouthBottleFull
|
||||
name: Goldeneye vermouth bottle
|
||||
description: Sweet, sweet dryness~
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
spawn_on_finish: DrinkBottleVermouth
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/vermouthbottle.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/vermouthbottle.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkVodkaBottleFull
|
||||
name: Vodka bottle
|
||||
description: Aah, vodka. Prime choice of drink AND fuel by Russians worldwide.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
spawn_on_finish: DrinkBottleVodka
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/vodkabottle.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/vodkabottle.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkWhiskeyBottleFull
|
||||
name: Uncle Git's special reserve
|
||||
description: A premium single-malt whiskey, gently matured inside the tunnels of a nuclear shelter. TUNNEL WHISKEY RULES.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
spawn_on_finish: DrinkBottleWhiskey
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/whiskeybottle.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/whiskeybottle.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkWineBottleFull
|
||||
name: Doublebearded bearded special wine bottle
|
||||
description: A faint aura of unease and asspainery surrounds the bottle.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
spawn_on_finish: DrinkBottleWine
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/winebottle.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/winebottle.rsi
|
||||
258
Resources/Prototypes/Entities/items/Consumables/drinks_cans.yml
Normal file
@@ -0,0 +1,258 @@
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Base can
|
||||
id: DrinkFoodContainerBaseCan
|
||||
abstract: true
|
||||
components:
|
||||
- type: Sound
|
||||
- type: DrinkFoodContainer
|
||||
use_sound: /Audio/items/canopen.ogg
|
||||
capacity: 1
|
||||
|
||||
# Below are grouped paired as "unopened" and "opened"
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBaseCan
|
||||
name: Space cola (unopened)
|
||||
id: DrinkFoodContainerColaCanUnopened
|
||||
components:
|
||||
- type: Sound
|
||||
- type: DrinkFoodContainer
|
||||
prototypes:
|
||||
DrinkColaCan: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/cola.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/cola.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkColaCan
|
||||
name: Space cola
|
||||
description: A refreshing beverage.
|
||||
components:
|
||||
- type: Drink
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/cola.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/cola.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBaseCan
|
||||
name: Ice tea can (unopened)
|
||||
id: DrinkFoodContainerIceTeaCanUnopened
|
||||
components:
|
||||
- type: Sound
|
||||
- type: DrinkFoodContainer
|
||||
prototypes:
|
||||
DrinkIceTeaCan: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/ice_tea_can.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/ice_tea_can.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkIceTeaCan
|
||||
name: Ice tea can
|
||||
description: ''
|
||||
components:
|
||||
- type: Drink
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/ice_tea_can.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/ice_tea_can.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBaseCan
|
||||
name: Lemon-lime can (unopened)
|
||||
id: DrinkFoodContainerLemonLimeCanUnopened
|
||||
components:
|
||||
- type: Sound
|
||||
- type: DrinkFoodContainer
|
||||
prototypes:
|
||||
DrinkLemonLimeCan: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/lemon-lime.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/lemon-lime.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkLemonLimeCan
|
||||
name: Lemon-lime can
|
||||
description: You wanted ORANGE. It gave you Lemon Lime.
|
||||
components:
|
||||
- type: Drink
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/lemon-lime.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/lemon-lime.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBaseCan
|
||||
name: Purple can (unopened)
|
||||
id: DrinkFoodContainerPurpleCanUnopened
|
||||
components:
|
||||
- type: Sound
|
||||
- type: DrinkFoodContainer
|
||||
prototypes:
|
||||
DrinkPurpleCan: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/purple_can.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/purple_can.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkPurpleCan
|
||||
name: Purple Can
|
||||
description: ''
|
||||
components:
|
||||
- type: Drink
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/purple_can.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/purple_can.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBaseCan
|
||||
name: Space mountain wind can (unopened)
|
||||
id: DrinkFoodContainerSpaceMountainWindCanUnopened
|
||||
components:
|
||||
- type: Sound
|
||||
- type: DrinkFoodContainer
|
||||
prototypes:
|
||||
DrinkSpaceMountainWindCan: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/space_mountain_wind.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/space_mountain_wind.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkSpaceMountainWindCan
|
||||
name: Space mountain wind can
|
||||
description: Blows right through you like a space wind.
|
||||
components:
|
||||
- type: Drink
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/space_mountain_wind.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/space_mountain_wind.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBaseCan
|
||||
name: Space-up can (unopened)
|
||||
id: DrinkFoodContainerSpaceUpCanUnopened
|
||||
components:
|
||||
- type: Sound
|
||||
- type: DrinkFoodContainer
|
||||
prototypes:
|
||||
DrinkSpaceUpCan: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/space-up.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/space-up.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkSpaceUpCan
|
||||
name: Space-up can
|
||||
description: Tastes like a hull breach in your mouth.
|
||||
components:
|
||||
- type: Drink
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/space-up.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/space-up.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBaseCan
|
||||
name: Starkist can (unopened)
|
||||
id: DrinkFoodContaineStarkistCanUnopened
|
||||
components:
|
||||
- type: Sound
|
||||
- type: DrinkFoodContainer
|
||||
prototypes:
|
||||
DrinkStarkistCan: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/starkist.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/starkist.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkStarkistCan
|
||||
name: Starkist can
|
||||
description: The taste of a star in liquid form. And, a bit of tuna...?
|
||||
components:
|
||||
- type: Drink
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/starkist.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/starkist.rsi
|
||||
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBaseCan
|
||||
name: Thirteen loko can (unopened)
|
||||
id: DrinkFoodContaineThirteenLokoCanUnopened
|
||||
components:
|
||||
- type: Sound
|
||||
- type: DrinkFoodContainer
|
||||
prototypes:
|
||||
DrinkThirteenLokoCan: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/thirteen_loko.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/thirteen_loko.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBase
|
||||
id: DrinkThirteenLokoCan
|
||||
name: Thirteen loko can
|
||||
description: The MBO has advised crew members that consumption of Thirteen Loko may result in seizures, blindness, drunkeness, or even death. Please Drink Responsibly.
|
||||
components:
|
||||
- type: Drink
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/thirteen_loko.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/thirteen_loko.rsi
|
||||
236
Resources/Prototypes/Entities/items/Consumables/drinks_cups.yml
Normal file
@@ -0,0 +1,236 @@
|
||||
# Empty drink containers; different from bottles in that these are intended to be spawned empty
|
||||
- type: entity
|
||||
parent: BaseItem
|
||||
id: DrinkBaseCup
|
||||
name: Base cup
|
||||
abstract: true
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 4
|
||||
despawn_empty: false
|
||||
- type: Sprite
|
||||
state: icon
|
||||
- type: Icon
|
||||
state: icon
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkGoldenCup
|
||||
name: Golden cup
|
||||
description: A golden cup
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 10
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/golden_cup.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/golden_cup.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkPitcher
|
||||
name: Insulated pitcher
|
||||
description: A stainless steel insulated pitcher. Everyone's best friend in the morning.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 15
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/pitcher.rsi
|
||||
state: icon-6
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/pitcher.rsi
|
||||
state: icon-6
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer2D
|
||||
steps: 7
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMug
|
||||
name: Mug
|
||||
description: A plain white mug.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/mug.rsi
|
||||
state: icon-3
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/mug.rsi
|
||||
state: icon-3
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer2D
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugBlack
|
||||
name: Mug Black
|
||||
description: A sleek black mug.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/mug_black.rsi
|
||||
state: icon-3
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/mug_black.rsi
|
||||
state: icon-3
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer2D
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugBlue
|
||||
name: Mug Blue
|
||||
description: A blue and black mug.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/mug_blue.rsi
|
||||
state: icon-3
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/mug_blue.rsi
|
||||
state: icon-3
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer2D
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugGreen
|
||||
name: Mug Green
|
||||
description: A pale green and pink mug.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/mug_green.rsi
|
||||
state: icon-3
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/mug_green.rsi
|
||||
state: icon-3
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer2D
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugHeart
|
||||
name: Mug Heart
|
||||
description: A white mug, it prominently features a red heart.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/mug_heart.rsi
|
||||
state: icon-3
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/mug_heart.rsi
|
||||
state: icon-3
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer2D
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugMetal
|
||||
name: Mug Metal
|
||||
description: A metal mug. You're not sure which metal.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/mug_metal.rsi
|
||||
state: icon-3
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/mug_metal.rsi
|
||||
state: icon-3
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer2D
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugMoebius
|
||||
name: Mug Moebius
|
||||
description: A mug with a Moebius Laboratories logo on it. Not even your morning coffee is safe from corporate advertising.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/mug_moebius.rsi
|
||||
state: icon-3
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/mug_moebius.rsi
|
||||
state: icon-3
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer2D
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugOne
|
||||
name: "#1 mug"
|
||||
description: "A white mug, it prominently features a #1."
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/mug_one.rsi
|
||||
state: icon-3
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/mug_one.rsi
|
||||
state: icon-3
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer2D
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugRainbow
|
||||
name: Mug Rainbow
|
||||
description: A rainbow mug. The colors are almost as blinding as a welder.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/mug_rainbow.rsi
|
||||
state: icon-3
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/mug_rainbow.rsi
|
||||
state: icon-3
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer2D
|
||||
steps: 4
|
||||
|
||||
- type: entity
|
||||
parent: DrinkBaseCup
|
||||
id: DrinkMugRed
|
||||
name: Mug Red
|
||||
description: A red and black mug.
|
||||
components:
|
||||
- type: Drink
|
||||
max_volume: 4
|
||||
- type: Sprite
|
||||
sprite: Objects/Drinks/mug_red.rsi
|
||||
state: icon-3
|
||||
- type: Icon
|
||||
sprite: Objects/Drinks/mug_red.rsi
|
||||
state: icon-3
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodVisualizer2D
|
||||
steps: 4
|
||||
2850
Resources/Prototypes/Entities/items/Consumables/food.yml
Normal file
@@ -0,0 +1,447 @@
|
||||
- type: entity
|
||||
parent: BaseItem
|
||||
id: DrinkFoodContainerBase
|
||||
abstract: true
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
- type: Sprite
|
||||
state: icon
|
||||
netsync: false
|
||||
- type: Icon
|
||||
state: icon
|
||||
|
||||
# Containers
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Apple cake
|
||||
id: DrinkFoodContainerAppleCake
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodAppleCakeSlice: 100
|
||||
spawn_on_finish: TrashTray
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/apple_cake.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/apple_cake.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Banana bread
|
||||
id: DrinkFoodContainerBananaBread
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodBananaBreadSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/bananabread.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/bananabread.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Birthday cake
|
||||
id: DrinkFoodContainerBirthdayCake
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodBirthdayCakeSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/birthdaycake.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/birthdaycake.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Brain cake
|
||||
id: DrinkFoodContainerBrainCake
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodBrainCakeSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/braincake.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/braincake.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Bread
|
||||
id: DrinkFoodContainerBread
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodBreadSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/bread.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/bread.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Carrot cake
|
||||
id: DrinkFoodContainerCarrotCake
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodCarrotCakeSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/carrotcake.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/carrotcake.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Cheesecake
|
||||
id: DrinkFoodContainerCheeseCake
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodCheeseCakeSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/cheesecake.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/cheesecake.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Cheese wheel
|
||||
id: DrinkFoodContainerCheeseWheel
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodCheeseWedge: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/apple_cake.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/apple_cake.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Chocolate cake
|
||||
id: DrinkFoodContainerChocolateCake
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodChocolateCakeSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/chocolatecake.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/chocolatecake.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Cream cheese bread
|
||||
id: DrinkFoodContainerCreamCheeseBread
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodCreamCheeseBreadSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/creamcheesebread.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/creamcheesebread.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Donut box
|
||||
id: DrinkFoodContainerDonutBox
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 6
|
||||
prototypes:
|
||||
FoodDonut: 70
|
||||
FoodFrostedDonut: 30
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/donutbox.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/donutbox.rsi
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodContainerVisualizer2D
|
||||
mode: Discrete
|
||||
base_state: donutbox
|
||||
steps: 7
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Egg box (shut)
|
||||
id: DrinkFoodContainerEggBoxShut
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 1
|
||||
prototypes:
|
||||
DrinkFoodContainerEggBox: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/eggbox_shut.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/eggbox_shut.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Egg box
|
||||
id: DrinkFoodContainerEggBox
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 12
|
||||
prototypes:
|
||||
FoodEgg: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/eggbox.rsi
|
||||
state: eggbox-12
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/eggbox.rsi
|
||||
state: eggbox-12
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodContainerVisualizer2D
|
||||
mode: Discrete
|
||||
base_state: eggbox
|
||||
steps: 13
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Lemon cake
|
||||
id: DrinkFoodContainerLemonCake
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodLemonCakeSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/lemoncake.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/lemoncake.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Lime cake
|
||||
id: DrinkFoodContainerLimeCake
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodLimeCakeSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/limecake.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/limecake.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Meat bread
|
||||
id: DrinkFoodContainerMeatBread
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodMeatBreadSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/meatbread.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/meatbread.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Meat pizza
|
||||
id: DrinkFoodContainerMeatPizza
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 6
|
||||
prototypes:
|
||||
FoodMeatPizzaSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/meatpizza.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/meatpizza.rsi
|
||||
|
||||
# These two will probably get moved one day
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Monkey cube box
|
||||
id: DrinkFoodContainerMonkeyCubeBox
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
DrinkFoodContainerMonkeyCubeWrap: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/monkeycubebox.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/monkeycubebox.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Monkey cube wrap
|
||||
id: DrinkFoodContainerMonkeyCubeWrap
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodMonkeyCube: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/monkeycubewrap.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/monkeycubewrap.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Mushroom pizza
|
||||
id: DrinkFoodContainerMushroomPizza
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 6
|
||||
prototypes:
|
||||
FoodMushroomPizzaSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/mushroompizza.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/mushroompizza.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Orange cake
|
||||
id: DrinkFoodContainerOrangeCake
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodOrangeCakeSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/orangecake.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/orangecake.rsi
|
||||
|
||||
# TODO: Probably replace it with a stacking thing
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Pizza box stack
|
||||
id: DrinkFoodContainerPizzaBoxStack
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
DrinkFoodContainerPizzaBox: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/pizzaboxstack.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/pizzaboxstack.rsi
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: DrinkFoodContainerVisualizer2D
|
||||
mode: Discrete
|
||||
base_state: pizzaboxstack
|
||||
steps: 5
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Pizza box
|
||||
id: DrinkFoodContainerPizzaBox
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 1
|
||||
prototypes:
|
||||
DrinkFoodContainerMeatPizza: 25
|
||||
DrinkFoodContainerMargheritaPizza: 25
|
||||
DrinkFoodContainerMushroomPizza: 25
|
||||
DrinkFoodContainerVegetablePizza: 25
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/pizzabox_open.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/pizzabox_open.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Margherita pizza
|
||||
id: DrinkFoodContainerMargheritaPizza
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 6
|
||||
prototypes:
|
||||
FoodMargheritaPizzaSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/pizzamargherita.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/pizzamargherita.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Plain cake
|
||||
id: DrinkFoodContainerPlainCake
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodPlainCakeSlice: 100
|
||||
spawn_on_finish: TrashTray
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/plaincake.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/plaincake.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Pumpkin pie
|
||||
id: DrinkFoodContainerPumpkinPie
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodPumpkinPieSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/pumpkinpie.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/pumpkinpie.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Tofu bread
|
||||
id: DrinkFoodContainerTofuBread
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodTofuBreadSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/tofubread.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/tofubread.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Vegetable pizza
|
||||
id: DrinkFoodContainerVegetablePizza
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 6
|
||||
prototypes:
|
||||
FoodVegetablePizzaSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/vegetablepizza.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/vegetablepizza.rsi
|
||||
|
||||
- type: entity
|
||||
parent: DrinkFoodContainerBase
|
||||
name: Xenomeat bread
|
||||
id: DrinkFoodContainerXenomeatBread
|
||||
components:
|
||||
- type: DrinkFoodContainer
|
||||
capacity: 5
|
||||
prototypes:
|
||||
FoodXenomeatBreadSlice: 100
|
||||
- type: Sprite
|
||||
sprite: Objects/DrinkFoodContainers/xenomeatbread.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/DrinkFoodContainers/xenomeatbread.rsi
|
||||
202
Resources/Prototypes/Entities/items/Consumables/trash.yml
Normal file
@@ -0,0 +1,202 @@
|
||||
- type: entity
|
||||
parent: BaseItem
|
||||
id: TrashBase
|
||||
description: This is rubbish.
|
||||
abstract: true
|
||||
components:
|
||||
- type: Sprite
|
||||
state: icon
|
||||
- type: Icon
|
||||
state: icon
|
||||
|
||||
# Trash mountain
|
||||
- type: entity
|
||||
name: 4 no raisins (trash)
|
||||
parent: TrashBase
|
||||
id: TrashRaisins
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/4no_raisins.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/4no_raisins.rsi
|
||||
|
||||
- type: entity
|
||||
name: Candy (trash)
|
||||
parent: TrashBase
|
||||
id: TrashCandy
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/candy.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/candy.rsi
|
||||
|
||||
- type: entity
|
||||
name: Cheesie honkers (trash)
|
||||
parent: TrashBase
|
||||
id: TrashCheesieHonkers
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/cheesie_honkers.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/cheesie_honkers.rsi
|
||||
|
||||
- type: entity
|
||||
name: Chips (trash)
|
||||
parent: TrashBase
|
||||
id: TrashChips
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/chips.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/chips.rsi
|
||||
|
||||
- type: entity
|
||||
name: Corn cob (trash)
|
||||
parent: TrashBase
|
||||
id: TrashCornCob
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/corncob.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/corncob.rsi
|
||||
|
||||
- type: entity
|
||||
name: Liquid food (trash)
|
||||
parent: TrashBase
|
||||
id: TrashLiquidFood
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/liquidfood.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/liquidfood.rsi
|
||||
|
||||
- type: entity
|
||||
name: Pistachos pack (trash)
|
||||
parent: TrashBase
|
||||
id: TrashPistachiosPack
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/pistachios_pack.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/pistachios_pack.rsi
|
||||
|
||||
- type: entity
|
||||
name: Messy pizza box (trash)
|
||||
parent: TrashBase
|
||||
id: TrashPizzaBoxMessy
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/pizzabox_messy.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/pizzabox_messy.rsi
|
||||
|
||||
- type: entity
|
||||
name: Plastic bag (trash)
|
||||
parent: TrashBase
|
||||
id: TrashPlasticBag
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/plasticbag.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/plasticbag.rsi
|
||||
|
||||
- type: entity
|
||||
name: Plate (trash)
|
||||
parent: TrashBase
|
||||
id: TrashPlate
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/plate.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/plate.rsi
|
||||
|
||||
- type: entity
|
||||
name: Popcorn (trash)
|
||||
parent: TrashBase
|
||||
id: TrashPopcorn
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/popcorn.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/popcorn.rsi
|
||||
|
||||
- type: entity
|
||||
name: Semki pack (trash)
|
||||
parent: TrashBase
|
||||
id: TrashSemkiPack
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/semki_pack.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/semki_pack.rsi
|
||||
|
||||
- type: entity
|
||||
name: Snack bowl (trash)
|
||||
parent: TrashBase
|
||||
id: TrashSnackBowl
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/snack_bowl.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/snack_bowl.rsi
|
||||
|
||||
- type: entity
|
||||
name: SOS jerky (trash)
|
||||
parent: TrashBase
|
||||
id: TrashSOSJerky
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/sosjerky.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/sosjerky.rsi
|
||||
|
||||
- type: entity
|
||||
name: Syndi cakes (trash)
|
||||
parent: TrashBase
|
||||
id: TrashSyndiCakes
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/syndi_cakes.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/syndi_cakes.rsi
|
||||
|
||||
- type: entity
|
||||
name: Tasty bread (trash)
|
||||
parent: TrashBase
|
||||
id: TrashTastyBread
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/tastybread.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/tastybread.rsi
|
||||
|
||||
# TODO: Container
|
||||
- type: entity
|
||||
name: Trash bag (trash)
|
||||
parent: TrashBase
|
||||
id: TrashBag
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/trashbag.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/trashbag.rsi
|
||||
|
||||
- type: entity
|
||||
name: Tray (trash)
|
||||
parent: TrashBase
|
||||
id: TrashTray
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/tray.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/tray.rsi
|
||||
|
||||
- type: entity
|
||||
name: Waffles (trash)
|
||||
parent: TrashBase
|
||||
id: TrashWaffles
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Trash/waffles.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/Trash/waffles.rsi
|
||||
212
Resources/Prototypes/Entities/items/Consumables/trash_drinks.yml
Normal file
@@ -0,0 +1,212 @@
|
||||
# These can still be used as containers
|
||||
- type: entity
|
||||
name: Base empty bottle
|
||||
parent: BaseItem
|
||||
id: DrinkBottleBase
|
||||
components:
|
||||
- type: Sound
|
||||
- type: Sprite
|
||||
state: icon
|
||||
- type: Icon
|
||||
state: icon
|
||||
- type: Drink
|
||||
despawn_empty: false
|
||||
max_volume: 10
|
||||
contents:
|
||||
reagents:
|
||||
- ReagentId: chem.H2O
|
||||
Quantity: 0
|
||||
|
||||
# Containers
|
||||
- type: entity
|
||||
name: Jailbreaker Verte bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottleAbsinthe
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/absinthebottle_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/absinthebottle_empty.rsi
|
||||
|
||||
- type: entity
|
||||
name: Alcohol bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottleAlcoClear
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/alco-clear.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/alco-clear.rsi
|
||||
|
||||
- type: entity
|
||||
name: Ale bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottleAle
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/alebottle_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/alebottle_empty.rsi
|
||||
|
||||
- type: entity
|
||||
name: Beer bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottleBeer
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/beer_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/beer_empty.rsi
|
||||
|
||||
- type: entity
|
||||
name: Broken bottle
|
||||
parent: DrinkBottleBase # Can't hold liquids
|
||||
id: DrinkBrokenBottle
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/broken_bottle.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/broken_bottle.rsi
|
||||
|
||||
- type: entity
|
||||
name: Cognac bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottleCognac
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/cognacbottle_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/cognacbottle_empty.rsi
|
||||
|
||||
- type: entity
|
||||
name: Griffeater gin bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottleGin
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/ginbottle_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/ginbottle_empty.rsi
|
||||
|
||||
# Couldn't think of a nice place to put this
|
||||
- type: entity
|
||||
name: Empty glass
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkEmptyGlass
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/alebottle_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/alebottle_empty.rsi
|
||||
- type: Solution
|
||||
max_volume: 4
|
||||
|
||||
- type: entity
|
||||
name: Goldschlager bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottleGoldschlager
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/goldschlagerbottle_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/goldschlagerbottle_empty.rsi
|
||||
|
||||
- type: entity
|
||||
name: Kahlua bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottleKahlua
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/kahluabottle_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/kahluabottle_empty.rsi
|
||||
|
||||
- type: entity
|
||||
name: NT Cahors bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottleNTCahors
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/ntcahors_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/ntcahors_empty.rsi
|
||||
|
||||
- type: entity
|
||||
name: Patron bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottlePatron
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/patronbottle_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/patronbottle_empty.rsi
|
||||
|
||||
- type: entity
|
||||
name: Poison wine bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottlePoisonWine
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/pwinebottle_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/pwinebottle_empty.rsi
|
||||
|
||||
- type: entity
|
||||
name: Rum bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottleRum
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/rumbottle_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/rumbottle_empty.rsi
|
||||
|
||||
- type: entity
|
||||
name: Tequila bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottleTequila
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/tequillabottle_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/tequillabottle_empty.rsi
|
||||
|
||||
- type: entity
|
||||
name: Vermouth bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottleVermouth
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/vermouthbottle_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/vermouthbottle_empty.rsi
|
||||
|
||||
- type: entity
|
||||
name: Vodka bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottleVodka
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/vodkabottle_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/vodkabottle_empty.rsi
|
||||
|
||||
- type: entity
|
||||
name: Whiskey bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottleWhiskey
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/whiskeybottle_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/whiskeybottle_empty.rsi
|
||||
|
||||
- type: entity
|
||||
name: Wine bottle
|
||||
parent: DrinkBottleBase
|
||||
id: DrinkBottleWine
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/TrashDrinks/winebottle_empty.rsi
|
||||
- type: Icon
|
||||
sprite: Objects/TrashDrinks/winebottle_empty.rsi
|
||||
@@ -8,6 +8,11 @@
|
||||
hands:
|
||||
- left
|
||||
- right
|
||||
- type: Hunger
|
||||
- type: Thirst
|
||||
# Organs
|
||||
- type: Stomach
|
||||
|
||||
- type: Inventory
|
||||
- type: Constructor
|
||||
- type: Clickable
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
- type: reagent
|
||||
id: chem.Nutriment
|
||||
name: Nutriment
|
||||
desc: Generic nutrition
|
||||
|
||||
- type: reagent
|
||||
id: chem.H2SO4
|
||||
name: Sulfuric Acid
|
||||
|
||||
BIN
Resources/Textures/Mob/UI/Hunger/Dead.png
Normal file
|
After Width: | Height: | Size: 97 B |
BIN
Resources/Textures/Mob/UI/Hunger/Okay.png
Normal file
|
After Width: | Height: | Size: 97 B |
BIN
Resources/Textures/Mob/UI/Hunger/Overfed.png
Normal file
|
After Width: | Height: | Size: 271 B |
BIN
Resources/Textures/Mob/UI/Hunger/Peckish.png
Normal file
|
After Width: | Height: | Size: 271 B |
BIN
Resources/Textures/Mob/UI/Hunger/Starving.png
Normal file
|
After Width: | Height: | Size: 271 B |
BIN
Resources/Textures/Mob/UI/Thirst/Dead.png
Normal file
|
After Width: | Height: | Size: 97 B |
BIN
Resources/Textures/Mob/UI/Thirst/Okay.png
Normal file
|
After Width: | Height: | Size: 97 B |
BIN
Resources/Textures/Mob/UI/Thirst/OverHydrated.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
Resources/Textures/Mob/UI/Thirst/Parched.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
Resources/Textures/Mob/UI/Thirst/Thirsty.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 945 B |
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"version": 1,
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 32
|
||||
},
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi",
|
||||
"states": [
|
||||
{
|
||||
"name": "icon",
|
||||
"directions": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 767 B |
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi", "states": [{"name": "icon", "directions": 1}]}
|
||||
|
After Width: | Height: | Size: 668 B |
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi", "states": [{"name": "icon", "directions": 1}]}
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi", "states": [{"name": "icon", "directions": 1}]}
|
||||
|
After Width: | Height: | Size: 736 B |
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi", "states": [{"name": "icon", "directions": 1}]}
|
||||
|
After Width: | Height: | Size: 919 B |
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi", "states": [{"name": "icon", "directions": 1}]}
|
||||
|
After Width: | Height: | Size: 904 B |
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi", "states": [{"name": "icon", "directions": 1}]}
|
||||
|
After Width: | Height: | Size: 646 B |
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi", "states": [{"name": "icon", "directions": 1}]}
|
||||
|
After Width: | Height: | Size: 755 B |
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi", "states": [{"name": "icon", "directions": 1}]}
|
||||
|
After Width: | Height: | Size: 917 B |
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi", "states": [{"name": "icon", "directions": 1}]}
|
||||
|
After Width: | Height: | Size: 356 B |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 356 B |
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"version": 1,
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 32
|
||||
},
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi",
|
||||
"states": [
|
||||
{
|
||||
"name": "icon",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "donutbox-0",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "donutbox-1",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "donutbox-2",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "donutbox-3",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "donutbox-4",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "donutbox-5",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "donutbox-6",
|
||||
"directions": 1
|
||||
},
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 352 B |
|
After Width: | Height: | Size: 408 B |
|
After Width: | Height: | Size: 452 B |
|
After Width: | Height: | Size: 444 B |
|
After Width: | Height: | Size: 435 B |
|
After Width: | Height: | Size: 410 B |
|
After Width: | Height: | Size: 413 B |
|
After Width: | Height: | Size: 442 B |
|
After Width: | Height: | Size: 437 B |
|
After Width: | Height: | Size: 429 B |
|
After Width: | Height: | Size: 461 B |
|
After Width: | Height: | Size: 462 B |
|
After Width: | Height: | Size: 461 B |
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"version": 1,
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 32
|
||||
},
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi",
|
||||
"states": [
|
||||
{
|
||||
"name": "eggbox-0",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "eggbox-1",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "eggbox-2",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "eggbox-3",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "eggbox-4",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "eggbox-5",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "eggbox-6",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "eggbox-7",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "eggbox-8",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "eggbox-9",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "eggbox-10",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "eggbox-11",
|
||||
"directions": 1
|
||||
},
|
||||
{
|
||||
"name": "eggbox-12",
|
||||
"directions": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 368 B |
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"version": 1,
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 32
|
||||
},
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi",
|
||||
"states": [
|
||||
{
|
||||
"name": "icon",
|
||||
"directions": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 923 B |
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi", "states": [{"name": "icon", "directions": 1}]}
|
||||
|
After Width: | Height: | Size: 947 B |
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi", "states": [{"name": "icon", "directions": 1}]}
|
||||
|
After Width: | Height: | Size: 1009 B |
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi", "states": [{"name": "icon", "directions": 1}]}
|
||||
|
After Width: | Height: | Size: 906 B |
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi", "states": [{"name": "icon", "directions": 1}]}
|
||||
|
After Width: | Height: | Size: 433 B |
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi", "states": [{"name": "icon", "directions": 1}]}
|
||||
|
After Width: | Height: | Size: 225 B |
@@ -0,0 +1 @@
|
||||
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi", "states": [{"name": "icon", "directions": 1}]}
|
||||