Rework Drink/Food/FoodContainer entirely (#1009)

Co-authored-by: FL-OZ <anotherscuffed@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
FL-OZ
2020-05-29 15:50:23 -05:00
committed by GitHub
parent 7222b6d8e2
commit aa26bdfcae
107 changed files with 946 additions and 1099 deletions

View File

@@ -123,7 +123,7 @@ namespace Content.Client
"Species", "Species",
"Drink", "Drink",
"Food", "Food",
"DrinkFoodContainer", "FoodContainer",
"Stomach", "Stomach",
"Hunger", "Hunger",
"Thirst", "Thirst",

View File

@@ -11,11 +11,11 @@ using YamlDotNet.RepresentationModel;
namespace Content.Client.GameObjects.Components.Nutrition namespace Content.Client.GameObjects.Components.Nutrition
{ {
[UsedImplicitly] [UsedImplicitly]
public sealed class DrinkFoodContainerVisualizer2D : AppearanceVisualizer public sealed class FoodContainerVisualizer2D : AppearanceVisualizer
{ {
private string _baseState; private string _baseState;
private int _steps; private int _steps;
private DrinkFoodContainerVisualMode _mode; private FoodContainerVisualMode _mode;
public override void LoadData(YamlMappingNode node) public override void LoadData(YamlMappingNode node)
{ {
@@ -25,11 +25,11 @@ namespace Content.Client.GameObjects.Components.Nutrition
_steps = node.GetNode("steps").AsInt(); _steps = node.GetNode("steps").AsInt();
try try
{ {
_mode = node.GetNode("mode").AsEnum<DrinkFoodContainerVisualMode>(); _mode = node.GetNode("mode").AsEnum<FoodContainerVisualMode>();
} }
catch (KeyNotFoundException) catch (KeyNotFoundException)
{ {
_mode = DrinkFoodContainerVisualMode.Rounded; _mode = FoodContainerVisualMode.Rounded;
} }
} }
@@ -37,12 +37,12 @@ namespace Content.Client.GameObjects.Components.Nutrition
{ {
var sprite = component.Owner.GetComponent<ISpriteComponent>(); var sprite = component.Owner.GetComponent<ISpriteComponent>();
if (!component.TryGetData<int>(DrinkFoodContainerVisuals.Current, out var current)) if (!component.TryGetData<int>(FoodContainerVisuals.Current, out var current))
{ {
return; return;
} }
if (!component.TryGetData<int>(DrinkFoodContainerVisuals.Capacity, out var capacity)) if (!component.TryGetData<int>(FoodContainerVisuals.Capacity, out var capacity))
{ {
return; return;
} }
@@ -51,10 +51,10 @@ namespace Content.Client.GameObjects.Components.Nutrition
switch (_mode) switch (_mode)
{ {
case DrinkFoodContainerVisualMode.Discrete: case FoodContainerVisualMode.Discrete:
step = Math.Min(_steps - 1, current); step = Math.Min(_steps - 1, current);
break; break;
case DrinkFoodContainerVisualMode.Rounded: case FoodContainerVisualMode.Rounded:
step = ContentHelpers.RoundToLevels(current, capacity, _steps); step = ContentHelpers.RoundToLevels(current, capacity, _steps);
break; break;
default: default:

View File

@@ -241,7 +241,13 @@ namespace Content.Server.GameObjects.Components.Kitchen
return true; return true;
} }
itemEntity.TryGetComponent(typeof(ItemComponent), out var food); if (!itemEntity.TryGetComponent(typeof(ItemComponent), out var food))
{
_notifyManager.PopupMessage(Owner, eventArgs.User, "That won't work!");
return false;
}
var ent = food.Owner; //Get the entity of the ItemComponent. var ent = food.Owner; //Get the entity of the ItemComponent.
_storage.Insert(ent); _storage.Insert(ent);
_uiDirty = true; _uiDirty = true;

View File

@@ -1,148 +1,163 @@
using System; using System;
using System.Linq;
using Content.Server.GameObjects.Components.Chemistry; using Content.Server.GameObjects.Components.Chemistry;
using Content.Server.GameObjects.Components.Sound;
using Content.Server.GameObjects.EntitySystems; using Content.Server.GameObjects.EntitySystems;
using Content.Server.Utility; using Content.Shared.Audio;
using Content.Shared.Chemistry; using Content.Shared.Chemistry;
using Content.Shared.GameObjects.Components.Nutrition; using Content.Shared.GameObjects.Components.Nutrition;
using Content.Shared.Interfaces; using Content.Shared.Interfaces;
using Content.Shared.Maths;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
using Robust.Server.GameObjects.EntitySystems; using Robust.Server.GameObjects.EntitySystems;
using Robust.Shared.Audio; using Robust.Shared.Audio;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Random;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Nutrition namespace Content.Server.GameObjects.Components.Nutrition
{ {
[RegisterComponent] [RegisterComponent]
public class DrinkComponent : Component, IAfterInteract, IUse [ComponentReference(typeof(IAfterInteract))]
public class DrinkComponent : Component, IUse, IAfterInteract, ISolutionChange,IExamine
{ {
#pragma warning disable 649 #pragma warning disable 649
[Dependency] private readonly ILocalizationManager _localizationManager; [Dependency] private readonly IPrototypeManager _prototypeManager;
[Dependency] private readonly IRobustRandom _random;
[Dependency] private readonly IEntitySystemManager _entitySystem;
#pragma warning restore 649 #pragma warning restore 649
private AudioSystem _audioSystem;
public override string Name => "Drink"; public override string Name => "Drink";
[ViewVariables] [ViewVariables]
private SolutionComponent _contents; private SolutionComponent _contents;
private AppearanceComponent _appearanceComponent;
[ViewVariables] [ViewVariables]
private string _useSound; private string _useSound;
[ViewVariables] [ViewVariables]
private string _finishPrototype; private bool _defaultToOpened;
public ReagentUnit TransferAmount => _transferAmount;
[ViewVariables] [ViewVariables]
private ReagentUnit _transferAmount = ReagentUnit.New(2); public ReagentUnit TransferAmount { get; private set; } = ReagentUnit.New(2);
public ReagentUnit MaxVolume [ViewVariables]
{ public bool Opened => _opened;
get => _contents.MaxVolume;
set => _contents.MaxVolume = value;
}
private bool _despawnOnFinish; [ViewVariables]
public bool Empty => _contents.CurrentVolume.Float() <= 0;
private bool _drinking;
public int UsesLeft()
{
// In case transfer amount exceeds volume left
if (_contents.CurrentVolume == 0)
{
return 0;
}
return Math.Max(1, (int)Math.Ceiling((_contents.CurrentVolume / _transferAmount).Float()));
}
private AppearanceComponent _appearanceComponent;
private bool _opened = false;
private string _soundCollection;
public override void ExposeData(ObjectSerializer serializer) public override void ExposeData(ObjectSerializer serializer)
{ {
base.ExposeData(serializer); base.ExposeData(serializer);
serializer.DataField(ref _useSound, "use_sound", "/Audio/items/drink.ogg"); serializer.DataField(ref _useSound, "useSound", "/Audio/items/drink.ogg");
// E.g. cola can when done or clear bottle, whatever serializer.DataField(ref _defaultToOpened, "isOpen", false); //For things like cups of coffee.
// Currently this will enforce it has the same volume but this may change. - TODO: this should be implemented in a separate component serializer.DataField(ref _soundCollection, "openSounds","canOpenSounds");
serializer.DataField(ref _despawnOnFinish, "despawn_empty", false);
serializer.DataField(ref _finishPrototype, "spawn_on_finish", null);
} }
protected override void Startup() public override void Initialize()
{ {
base.Startup(); base.Initialize();
_contents = Owner.GetComponent<SolutionComponent>(); Owner.TryGetComponent(out _appearanceComponent);
if(!Owner.TryGetComponent(out _contents))
{
_contents = Owner.AddComponent<SolutionComponent>();
}
_contents.Capabilities = SolutionCaps.PourIn _contents.Capabilities = SolutionCaps.PourIn
| SolutionCaps.PourOut | SolutionCaps.PourOut
| SolutionCaps.Injectable; | SolutionCaps.Injectable;
_drinking = false; _opened = _defaultToOpened;
Owner.TryGetComponent(out AppearanceComponent appearance); UpdateAppearance();
_appearanceComponent = appearance;
_appearanceComponent?.SetData(SharedFoodComponent.FoodVisuals.MaxUses, MaxVolume.Float());
_updateAppearance();
} }
private void _updateAppearance() void ISolutionChange.SolutionChanged(SolutionChangeEventArgs eventArgs)
{
UpdateAppearance();
}
private void UpdateAppearance()
{ {
_appearanceComponent?.SetData(SharedFoodComponent.FoodVisuals.Visual, _contents.CurrentVolume.Float()); _appearanceComponent?.SetData(SharedFoodComponent.FoodVisuals.Visual, _contents.CurrentVolume.Float());
} }
bool IUse.UseEntity(UseEntityEventArgs args)
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{ {
UseDrink(eventArgs.User); if (!_opened)
{
return true; //Do the opening stuff like playing the sounds.
var soundCollection = _prototypeManager.Index<SoundCollectionPrototype>(_soundCollection);
var file = _random.Pick(soundCollection.PickFiles);
_audioSystem = _entitySystem.GetEntitySystem<AudioSystem>();
_audioSystem.Play(file, Owner, AudioParams.Default);
_opened = true;
return false;
}
return TryUseDrink(args.User);
} }
//Force feeding a drink to someone.
void IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs) void IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
{ {
if (!InteractionChecks.InRangeUnobstructed(eventArgs)) return; TryUseDrink(eventArgs.Target);
UseDrink(eventArgs.Target);
} }
private void UseDrink(IEntity targetEntity) public void Examine(FormattedMessage message)
{ {
if (targetEntity == null) if (!Opened)
{ {
return; return;
} }
var color = Empty ? "gray" : "yellow";
var openedText = Loc.GetString(Empty ? "Empty" : "Opened");
message.AddMarkup(Loc.GetString("[color={0}]{1}[/color]", color, openedText));
if (UsesLeft() == 0 && !_despawnOnFinish) }
private bool TryUseDrink(IEntity target)
{
if (target == null)
{ {
targetEntity.PopupMessage(targetEntity, _localizationManager.GetString("Empty")); return false;
return;
} }
if (targetEntity.TryGetComponent(out StomachComponent stomachComponent)) if (!_opened)
{ {
_drinking = true; target.PopupMessage(target, Loc.GetString("Open it first!"));
var transferAmount = ReagentUnit.Min(_transferAmount, _contents.CurrentVolume);
var split = _contents.SplitSolution(transferAmount);
if (stomachComponent.TryTransferSolution(split))
{
// When we split Finish gets called which may delete the can so need to use the entity system for sound
if (_useSound != null)
{
var audioSystem = EntitySystem.Get<AudioSystem>();
audioSystem.Play(_useSound, Owner, AudioParams.Default.WithVolume(-2f));
targetEntity.PopupMessage(targetEntity, _localizationManager.GetString("Slurp"));
}
}
else
{
// Add it back in
_contents.TryAddSolution(split);
targetEntity.PopupMessage(targetEntity, _localizationManager.GetString("Can't drink"));
}
_drinking = false;
} }
if (_contents.CurrentVolume.Float() <= 0)
{
target.PopupMessage(target, Loc.GetString("It's empty!"));
return false;
}
if (!target.TryGetComponent(out StomachComponent stomachComponent))
{
return false;
}
var transferAmount = ReagentUnit.Min(TransferAmount, _contents.CurrentVolume);
var split = _contents.SplitSolution(transferAmount);
if (stomachComponent.TryTransferSolution(split))
{
if (_useSound == null) return false;
_audioSystem.Play(_useSound, Owner, AudioParams.Default.WithVolume(-2f));
target.PopupMessage(target, Loc.GetString("Slurp"));
UpdateAppearance();
return true;
}
//Stomach was full or can't handle whatever solution we have.
_contents.TryAddSolution(split);
target.PopupMessage(target, Loc.GetString("You've had enough {0}!", Owner.Name));
return false;
} }
} }
} }

View File

@@ -1,191 +0,0 @@
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, Owner.Transform.GridPosition);
_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, Owner.Transform.GridPosition);
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);
}
}
}

View File

@@ -1,12 +1,11 @@
using System; using System;
using Content.Server.GameObjects.Components.Chemistry; using Content.Server.GameObjects.Components.Chemistry;
using Content.Server.GameObjects.Components.Sound; using Content.Server.GameObjects.Components.Sound;
using Content.Server.GameObjects.EntitySystems; using Content.Server.GameObjects.EntitySystems;
using Content.Server.Utility;
using Content.Shared.Chemistry; using Content.Shared.Chemistry;
using Content.Shared.GameObjects.Components.Nutrition;
using Content.Shared.Interfaces; using Content.Shared.Interfaces;
using Robust.Server.GameObjects; using Robust.Server.GameObjects.EntitySystems;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
@@ -17,165 +16,105 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Nutrition namespace Content.Server.GameObjects.Components.Nutrition
{ {
[RegisterComponent] [RegisterComponent]
public class FoodComponent : Component, IAfterInteract, IUse [ComponentReference(typeof(IAfterInteract))]
public class FoodComponent : Component, IUse, IAfterInteract
{ {
#pragma warning disable 649 #pragma warning disable 649
[Dependency] private readonly ILocalizationManager _localizationManager; [Dependency] private readonly IEntitySystemManager _entitySystem;
#pragma warning restore 649 #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"; public override string Name => "Food";
private AppearanceComponent _appearanceComponent;
[ViewVariables] [ViewVariables]
private string _useSound; private string _useSound;
[ViewVariables] [ViewVariables]
private string _finishPrototype; private string _trashPrototype;
[ViewVariables] [ViewVariables]
private SolutionComponent _contents; private SolutionComponent _contents;
[ViewVariables] [ViewVariables]
private ReagentUnit _transferAmount; private ReagentUnit _transferAmount;
private Solution _initialContents; // This is just for loading from yaml public int UsesRemaining => _contents.CurrentVolume == 0
?
0 : Math.Max(1, (int)Math.Ceiling((_contents.CurrentVolume / _transferAmount).Float()));
public override void ExposeData(ObjectSerializer serializer) public override void ExposeData(ObjectSerializer serializer)
{ {
base.ExposeData(serializer); base.ExposeData(serializer);
// Default is 1 use restoring 30 serializer.DataField(ref _useSound, "useSound", "/Audio/items/eatfood.ogg");
serializer.DataField(ref _initialContents, "contents", null); serializer.DataField(ref _transferAmount, "transferAmount", ReagentUnit.New(5));
serializer.DataField(ref _useSound, "use_sound", "/Audio/items/eatfood.ogg"); serializer.DataField(ref _trashPrototype, "trash", "TrashPlate");
// Default is transfer 30 units
serializer.DataField(ref _transferAmount, "transfer_amount", ReagentUnit.New(5));
// E.g. empty chip packet when done
serializer.DataField(ref _finishPrototype, "spawn_on_finish", null);
} }
public override void Initialize() public override void Initialize()
{ {
base.Initialize(); base.Initialize();
if (_contents == null) _contents = Owner.GetComponent<SolutionComponent>();
{
if (Owner.TryGetComponent(out SolutionComponent solutionComponent))
{
_contents = solutionComponent;
}
else
{
_contents = Owner.AddComponent<SolutionComponent>();
}
}
_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", ReagentUnit.New(5), 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, (int)Math.Ceiling((_contents.CurrentVolume / _transferAmount).Float()));
} }
bool IUse.UseEntity(UseEntityEventArgs eventArgs) bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{ {
UseFood(eventArgs.User); return TryUseFood(eventArgs.User, null);
return true;
} }
void IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs) void IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
{ {
if (!InteractionChecks.InRangeUnobstructed(eventArgs)) return; TryUseFood(eventArgs.User, eventArgs.Target);
UseFood(eventArgs.Target);
} }
void UseFood(IEntity user) private bool TryUseFood(IEntity user, IEntity target)
{ {
if (user == null) if (user == null)
{ {
return; return false;
} }
if (UsesLeft() == 0) if (UsesRemaining <= 0)
{ {
user.PopupMessage(user, _localizationManager.GetString("Empty")); user.PopupMessage(user, Loc.GetString($"The {Owner.Name} is empty!"));
return false;
} }
else
var trueTarget = target ?? user;
if (trueTarget.TryGetComponent(out StomachComponent stomachComponent))
{ {
// TODO: Add putting food back in boxes here? var transferAmount = ReagentUnit.Min(_transferAmount, _contents.CurrentVolume);
if (user.TryGetComponent(out StomachComponent stomachComponent)) var split = _contents.SplitSolution(transferAmount);
if (stomachComponent.TryTransferSolution(split))
{ {
var transferAmount = ReagentUnit.Min(_transferAmount, _contents.CurrentVolume); _entitySystem.GetEntitySystem<AudioSystem>()
var split = _contents.SplitSolution(transferAmount); .Play(_useSound, trueTarget, AudioParams.Default.WithVolume(-1f));
if (stomachComponent.TryTransferSolution(split)) trueTarget.PopupMessage(user, Loc.GetString("Nom"));
{ }
if (_useSound != null) else
{ {
Owner.GetComponent<SoundComponent>()?.Play(_useSound); _contents.TryAddSolution(split);
user.PopupMessage(user, _localizationManager.GetString("Nom")); trueTarget.PopupMessage(user, Loc.GetString("You can't eat any more!"));
}
}
else
{
// Add it back in
_contents.TryAddSolution(split);
user.PopupMessage(user, _localizationManager.GetString("Can't eat"));
}
} }
} }
if (UsesLeft() > 0) if (UsesRemaining > 0)
{ {
return; return true;
} }
//We're empty. Become trash.
var position = Owner.Transform.GridPosition; var position = Owner.Transform.GridPosition;
Owner.Delete(); Owner.Delete();
var finisher = Owner.EntityManager.SpawnEntity(_trashPrototype, position);
if (_finishPrototype != null) if (user.TryGetComponent(out HandsComponent handsComponent) && finisher.TryGetComponent(out ItemComponent itemComponent))
{ {
var finisher = Owner.EntityManager.SpawnEntity(_finishPrototype, position); if (handsComponent.CanPutInHand(itemComponent))
if (user.TryGetComponent(out HandsComponent handsComponent) && finisher.TryGetComponent(out ItemComponent itemComponent))
{ {
if (handsComponent.CanPutInHand(itemComponent)) handsComponent.PutInHand(itemComponent);
{ return true;
handsComponent.PutInHand(itemComponent);
return;
}
} }
finisher.Transform.GridPosition = user.Transform.GridPosition;
return;
} }
finisher.Transform.GridPosition = user.Transform.GridPosition;
return true;
} }
} }
} }

View File

@@ -0,0 +1,99 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects.Components.Nutrition;
using Robust.Server.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
{
/// <summary>
/// This container acts as a master object for things like Pizza, which holds slices.
/// </summary>
/// TODO: Perhaps implement putting food back (pizza boxes) but that really isn't mandatory.
/// This doesn't even need to have an actual Container for right now.
[RegisterComponent]
public sealed class FoodContainer : SharedFoodContainerComponent, IUse
{
#pragma warning disable 649
[Dependency] private readonly IRobustRandom _random;
[Dependency] private readonly IEntityManager _entityManager;
#pragma warning restore 649
public override string Name => "FoodContainer";
private AppearanceComponent _appearance;
private Dictionary<string, int> _prototypes;
private uint _capacity;
public int Capacity => (int)_capacity;
[ViewVariables]
public int Count => _count;
private int _count = 0;
public override void ExposeData(ObjectSerializer serializer)
{
base.ExposeData(serializer);
serializer.DataField(ref _prototypes, "prototypes", null);
serializer.DataField<uint>(ref _capacity, "capacity", 5);
}
public override void Initialize()
{
base.Initialize();
Owner.TryGetComponent(out _appearance);
_count = Capacity;
UpdateAppearance();
}
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{
var hands = eventArgs.User.TryGetComponent(out HandsComponent handsComponent);
var itemToSpawn = _entityManager.SpawnEntity(GetRandomPrototype(), Owner.Transform.GridPosition);
handsComponent.PutInHandOrDrop(itemToSpawn.GetComponent<ItemComponent>());
_count--;
if (_count < 1)
{
Owner.Delete();
return false;
}
return true;
}
private string GetRandomPrototype()
{
var defaultProto = _prototypes.Keys.FirstOrDefault();
if (_prototypes.Count == 1)
{
return defaultProto;
}
var probResult = _random.Next(0, 100);
var total = 0;
foreach (var item in _prototypes)
{
total += item.Value;
if (probResult < total)
{
return item.Key;
}
}
return defaultProto;
}
private void UpdateAppearance()
{
_appearance?.SetData(FoodContainerVisuals.Current, Count);
}
}
}

View File

@@ -4,12 +4,12 @@ using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Nutrition namespace Content.Shared.GameObjects.Components.Nutrition
{ {
public abstract class SharedDrinkFoodContainerComponent : Component public abstract class SharedFoodContainerComponent : Component
{ {
} }
[NetSerializable, Serializable] [NetSerializable, Serializable]
public enum DrinkFoodContainerVisualMode public enum FoodContainerVisualMode
{ {
/// <summary> /// <summary>
/// Discrete: 50 eggs in a carton -> down to 25, will show 12/12 until it gets below max /// Discrete: 50 eggs in a carton -> down to 25, will show 12/12 until it gets below max
@@ -20,7 +20,7 @@ namespace Content.Shared.GameObjects.Components.Nutrition
} }
[NetSerializable, Serializable] [NetSerializable, Serializable]
public enum DrinkFoodContainerVisuals public enum FoodContainerVisuals
{ {
Capacity, Capacity,
Current, Current,

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -1,29 +1,42 @@
- type: entity - type: entity
parent: DrinkBase parent: BaseItem
id: DrinkBottleBaseFull
abstract: true
components:
- type: Drink
openSounds: bottleOpenSounds
- type: Solution
- type: Sprite
state: icon
- type: Icon
state: icon
- type: entity
parent: DrinkBottleBaseFull
id: DrinkAbsintheBottleFull id: DrinkAbsintheBottleFull
name: Jailbreaker Verte name: Jailbreaker Verte
description: One sip of this and you just know you're gonna have a good time. description: One sip of this and you just know you're gonna have a good time.
components: components:
- type: Drink - type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/absinthebottle.rsi sprite: Objects/Drinks/absinthebottle.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/absinthebottle.rsi sprite: Objects/Drinks/absinthebottle.rsi
- type: entity - type: entity
parent: DrinkBase parent: DrinkBottleBaseFull
id: DrinkAlcoGreenFull id: DrinkAlcoGreenFull
name: Emeraldine Melon Liquor name: Emeraldine Melon Liquor
description: A bottle of 46 proof Emeraldine Melon Liquor. Sweet and light. description: A bottle of 46 proof Emeraldine Melon Liquor. Sweet and light.
components: components:
- type: Drink - type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/alco-green.rsi sprite: Objects/Drinks/alco-green.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/alco-green.rsi sprite: Objects/Drinks/alco-green.rsi
- type: entity - type: entity
parent: DrinkBase parent: DrinkBottleBaseFull
id: DrinkAleBottleFull id: DrinkAleBottleFull
name: Magm-Ale name: Magm-Ale
description: A true dorf's drink of choice. description: A true dorf's drink of choice.
@@ -33,26 +46,26 @@
contents: contents:
reagents: reagents:
- ReagentId: chem.Ale - ReagentId: chem.Ale
Quantity: 80 Quantity: 80
- type: Sprite - type: Sprite
sprite: Objects/Drinks/alebottle.rsi sprite: Objects/Drinks/alebottle.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/alebottle.rsi sprite: Objects/Drinks/alebottle.rsi
- type: entity - type: entity
parent: DrinkBase parent: DrinkBottleBaseFull
id: DrinkBottleOfNothingFull id: DrinkBottleOfNothingFull
name: Bottle of nothing name: Bottle of nothing
description: A bottle filled with nothing description: A bottle filled with nothing
components: components:
- type: Drink - type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/bottleofnothing.rsi sprite: Objects/Drinks/bottleofnothing.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/bottleofnothing.rsi sprite: Objects/Drinks/bottleofnothing.rsi
- type: entity - type: entity
parent: DrinkBase parent: DrinkBottleBaseFull
id: DrinkCognacBottleFull id: DrinkCognacBottleFull
name: Cognac bottle 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. description: A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. You might as well not scream 'SHITCURITY' this time.
@@ -62,38 +75,38 @@
contents: contents:
reagents: reagents:
- ReagentId: chem.Cognac - ReagentId: chem.Cognac
Quantity: 80 Quantity: 80
- type: Sprite - type: Sprite
sprite: Objects/Drinks/cognacbottle.rsi sprite: Objects/Drinks/cognacbottle.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/cognacbottle.rsi sprite: Objects/Drinks/cognacbottle.rsi
- type: entity - type: entity
parent: DrinkBase parent: DrinkBottleBaseFull
id: DrinkGinBottleFull id: DrinkGinBottleFull
name: Griffeater gin bottle name: Griffeater gin bottle
description: A bottle of high quality gin, produced in the New London Space Station. description: A bottle of high quality gin, produced in the New London Space Station.
components: components:
- type: Drink - type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/ginbottle.rsi sprite: Objects/Drinks/ginbottle.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/ginbottle.rsi sprite: Objects/Drinks/ginbottle.rsi
- type: entity - type: entity
parent: DrinkBase parent: DrinkBottleBaseFull
id: DrinkGoldschlagerBottleFull id: DrinkGoldschlagerBottleFull
name: Goldschlager bottle name: Goldschlager bottle
description: 100 proof cinnamon schnapps, made for alcoholic teen girls on spring break. description: 100 proof cinnamon schnapps, made for alcoholic teen girls on spring break.
components: components:
- type: Drink - type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/goldschlagerbottle.rsi sprite: Objects/Drinks/goldschlagerbottle.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/goldschlagerbottle.rsi sprite: Objects/Drinks/goldschlagerbottle.rsi
- type: entity - type: entity
parent: DrinkBase parent: DrinkBottleBaseFull
id: DrinkKahluaBottleFull id: DrinkKahluaBottleFull
name: Kahlua bottle name: Kahlua bottle
description: A widely known, Mexican coffee-flavoured liqueur. In production since 1936, HONK description: A widely known, Mexican coffee-flavoured liqueur. In production since 1936, HONK
@@ -103,74 +116,74 @@
contents: contents:
reagents: reagents:
- ReagentId: chem.H2O - ReagentId: chem.H2O
Quantity: 80 Quantity: 80
- type: Sprite - type: Sprite
sprite: Objects/Drinks/kahluabottle.rsi sprite: Objects/Drinks/kahluabottle.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/kahluabottle.rsi sprite: Objects/Drinks/kahluabottle.rsi
- type: entity - type: entity
parent: DrinkBase parent: DrinkBottleBaseFull
id: DrinkPatronBottleFull id: DrinkPatronBottleFull
name: Wrapp artiste patron bottle name: Wrapp artiste patron bottle
description: Silver laced tequilla, served in space night clubs across the galaxy. description: Silver laced tequilla, served in space night clubs across the galaxy.
components: components:
- type: Drink - type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/patronbottle.rsi sprite: Objects/Drinks/patronbottle.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/patronbottle.rsi sprite: Objects/Drinks/patronbottle.rsi
- type: entity - type: entity
parent: DrinkBase parent: DrinkBottleBaseFull
id: DrinkPoisonWinebottleFull id: DrinkPoisonWinebottleFull
name: Warlock's velvet bottle name: Warlock's velvet bottle
description: What a delightful packaging for a surely high quality wine! The vintage must be amazing! description: What a delightful packaging for a surely high quality wine! The vintage must be amazing!
components: components:
- type: Drink - type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/pwinebottle.rsi sprite: Objects/Drinks/pwinebottle.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/pwinebottle.rsi sprite: Objects/Drinks/pwinebottle.rsi
- type: entity - type: entity
parent: DrinkBase parent: DrinkBottleBaseFull
id: DrinkRumbottleFull id: DrinkRumbottleFull
name: Captain Pete's cuban spiced rum name: Captain Pete's cuban spiced rum
description: This isn't just rum, oh no. It's practically GRIFF in a bottle. description: This isn't just rum, oh no. It's practically GRIFF in a bottle.
components: components:
- type: Drink - type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/rumbottle.rsi sprite: Objects/Drinks/rumbottle.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/rumbottle.rsi sprite: Objects/Drinks/rumbottle.rsi
- type: entity - type: entity
parent: DrinkBase parent: DrinkBottleBaseFull
id: DrinkTequilabottleFull id: DrinkTequilabottleFull
name: Caccavo guaranteed quality tequila bottle name: Caccavo guaranteed quality tequila bottle
description: Made from premium petroleum distillates, pure thalidomide and other fine quality ingredients! description: Made from premium petroleum distillates, pure thalidomide and other fine quality ingredients!
components: components:
- type: Drink - type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/tequillabottle.rsi sprite: Objects/Drinks/tequillabottle.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/tequillabottle.rsi sprite: Objects/Drinks/tequillabottle.rsi
- type: entity - type: entity
parent: DrinkBase parent: DrinkBottleBaseFull
id: DrinkVermouthBottleFull id: DrinkVermouthBottleFull
name: Goldeneye vermouth bottle name: Goldeneye vermouth bottle
description: Sweet, sweet dryness~ description: Sweet, sweet dryness~
components: components:
- type: Drink - type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/vermouthbottle.rsi sprite: Objects/Drinks/vermouthbottle.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/vermouthbottle.rsi sprite: Objects/Drinks/vermouthbottle.rsi
- type: entity - type: entity
parent: DrinkBase parent: DrinkBottleBaseFull
id: DrinkVodkaBottleFull id: DrinkVodkaBottleFull
name: Vodka bottle name: Vodka bottle
description: Aah, vodka. Prime choice of drink AND fuel by Russians worldwide. description: Aah, vodka. Prime choice of drink AND fuel by Russians worldwide.
@@ -187,7 +200,7 @@
sprite: Objects/Drinks/vodkabottle.rsi sprite: Objects/Drinks/vodkabottle.rsi
- type: entity - type: entity
parent: DrinkBase parent: DrinkBottleBaseFull
id: DrinkWhiskeyBottleFull id: DrinkWhiskeyBottleFull
name: Uncle Git's special reserve name: Uncle Git's special reserve
description: A premium single-malt whiskey, gently matured inside the tunnels of a nuclear shelter. TUNNEL WHISKEY RULES. description: A premium single-malt whiskey, gently matured inside the tunnels of a nuclear shelter. TUNNEL WHISKEY RULES.
@@ -204,7 +217,7 @@
sprite: Objects/Drinks/whiskeybottle.rsi sprite: Objects/Drinks/whiskeybottle.rsi
- type: entity - type: entity
parent: DrinkBase parent: DrinkBottleBaseFull
id: DrinkWineBottleFull id: DrinkWineBottleFull
name: Doublebearded bearded special wine bottle name: Doublebearded bearded special wine bottle
description: A faint aura of unease and asspainery surrounds the bottle. description: A faint aura of unease and asspainery surrounds the bottle.

View File

@@ -1,230 +1,103 @@
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: BaseItem
name: Base can id: DrinkCanBaseFull
id: DrinkFoodContainerBaseCan
abstract: true abstract: true
components: components:
- type: Sound - type: Drink
- type: DrinkFoodContainer openSounds: canOpenSounds
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: Solution - type: Solution
maxVol: 20 maxVol: 20
contents: contents:
reagents: reagents:
- ReagentId: chem.Cola - ReagentId: chem.Cola
Quantity: 20 Quantity: 20
- type: Sprite - type: Pourable
sprite: Objects/Drinks/cola.rsi transferAmount: 5
- type: Icon
sprite: Objects/Drinks/cola.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBaseCan parent: DrinkCanBaseFull
name: Ice tea can (unopened) id: DrinkColaCan
id: DrinkFoodContainerIceTeaCanUnopened name: Space cola
description: A refreshing beverage.
components: components:
- type: Sound - type: Solution
- type: DrinkFoodContainer
prototypes:
DrinkIceTeaCan: 100
- type: Sprite - type: Sprite
sprite: Objects/Drinks/ice_tea_can.rsi sprite: Objects/Drinks/cola.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/ice_tea_can.rsi sprite: Objects/Drinks/cola.rsi
- type: entity - type: entity
parent: DrinkBase parent: DrinkCanBaseFull
id: DrinkIceTeaCan id: DrinkIceTeaCan
name: Ice tea can name: Ice tea can
description: '' description: ''
components: components:
- type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/ice_tea_can.rsi sprite: Objects/Drinks/ice_tea_can.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/ice_tea_can.rsi sprite: Objects/Drinks/ice_tea_can.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBaseCan parent: DrinkCanBaseFull
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 id: DrinkLemonLimeCan
name: Lemon-lime can name: Lemon-lime can
description: You wanted ORANGE. It gave you Lemon Lime. description: You wanted ORANGE. It gave you Lemon Lime.
components: components:
- type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/lemon-lime.rsi sprite: Objects/Drinks/lemon-lime.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/lemon-lime.rsi sprite: Objects/Drinks/lemon-lime.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBaseCan parent: DrinkCanBaseFull
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 id: DrinkPurpleCan
name: Purple Can name: Purple Can
description: '' description: ''
components: components:
- type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/purple_can.rsi sprite: Objects/Drinks/purple_can.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/purple_can.rsi sprite: Objects/Drinks/purple_can.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBaseCan parent: DrinkCanBaseFull
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 id: DrinkSpaceMountainWindCan
name: Space mountain wind can name: Space mountain wind can
description: Blows right through you like a space wind. description: Blows right through you like a space wind.
components: components:
- type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/space_mountain_wind.rsi sprite: Objects/Drinks/space_mountain_wind.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/space_mountain_wind.rsi sprite: Objects/Drinks/space_mountain_wind.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBaseCan parent: DrinkCanBaseFull
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 id: DrinkSpaceUpCan
name: Space-up can name: Space-up can
description: Tastes like a hull breach in your mouth. description: Tastes like a hull breach in your mouth.
components: components:
- type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/space-up.rsi sprite: Objects/Drinks/space-up.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/space-up.rsi sprite: Objects/Drinks/space-up.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBaseCan parent: DrinkCanBaseFull
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 id: DrinkStarkistCan
name: Starkist can name: Starkist can
description: The taste of a star in liquid form. And, a bit of tuna...? description: The taste of a star in liquid form. And, a bit of tuna...?
components: components:
- type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/starkist.rsi sprite: Objects/Drinks/starkist.rsi
- type: Icon - type: Icon
sprite: Objects/Drinks/starkist.rsi sprite: Objects/Drinks/starkist.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBaseCan parent: DrinkCanBaseFull
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 id: DrinkThirteenLokoCan
name: Thirteen loko can 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. 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: components:
- type: Drink
- type: Sprite - type: Sprite
sprite: Objects/Drinks/thirteen_loko.rsi sprite: Objects/Drinks/thirteen_loko.rsi
- type: Icon - type: Icon

View File

@@ -10,7 +10,6 @@
- type: Pourable - type: Pourable
transferAmount: 5 transferAmount: 5
- type: Drink - type: Drink
despawn_empty: false
- type: Sound - type: Sound
- type: Sprite - type: Sprite
state: icon state: icon

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,9 @@
- type: entity - type: entity
parent: BaseItem parent: BaseItem
id: DrinkFoodContainerBase id: FoodContainerBase
abstract: true abstract: true
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
- type: Sprite - type: Sprite
state: icon state: icon
netsync: false netsync: false
@@ -13,435 +12,414 @@
# Containers # Containers
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Apple cake name: Apple cake
id: DrinkFoodContainerAppleCake id: FoodContainerAppleCake
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5 prototypes:
prototypes:
FoodAppleCakeSlice: 100 FoodAppleCakeSlice: 100
spawn_on_finish: TrashTray trash: TrashTray
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/apple_cake.rsi sprite: Objects/FoodContainers/apple_cake.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/apple_cake.rsi sprite: Objects/FoodContainers/apple_cake.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Banana bread name: Banana bread
id: DrinkFoodContainerBananaBread id: FoodContainerBananaBread
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodBananaBreadSlice: 100 FoodBananaBreadSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/bananabread.rsi sprite: Objects/FoodContainers/bananabread.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/bananabread.rsi sprite: Objects/FoodContainers/bananabread.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Birthday cake name: Birthday cake
id: DrinkFoodContainerBirthdayCake id: FoodContainerBirthdayCake
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5 prototypes:
prototypes:
FoodBirthdayCakeSlice: 100 FoodBirthdayCakeSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/birthdaycake.rsi sprite: Objects/FoodContainers/birthdaycake.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/birthdaycake.rsi sprite: Objects/FoodContainers/birthdaycake.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Brain cake name: Brain cake
id: DrinkFoodContainerBrainCake id: FoodContainerBrainCake
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodBrainCakeSlice: 100 FoodBrainCakeSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/braincake.rsi sprite: Objects/FoodContainers/braincake.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/braincake.rsi sprite: Objects/FoodContainers/braincake.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Bread name: Bread
id: DrinkFoodContainerBread id: FoodContainerBread
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodBreadSlice: 100 FoodBreadSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/bread.rsi sprite: Objects/FoodContainers/bread.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/bread.rsi sprite: Objects/FoodContainers/bread.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Carrot cake name: Carrot cake
id: DrinkFoodContainerCarrotCake id: FoodContainerCarrotCake
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodCarrotCakeSlice: 100 FoodCarrotCakeSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/carrotcake.rsi sprite: Objects/FoodContainers/carrotcake.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/carrotcake.rsi sprite: Objects/FoodContainers/carrotcake.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Cheesecake name: Cheesecake
id: DrinkFoodContainerCheeseCake id: FoodContainerCheeseCake
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodCheeseCakeSlice: 100 FoodCheeseCakeSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/cheesecake.rsi sprite: Objects/FoodContainers/cheesecake.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/cheesecake.rsi sprite: Objects/FoodContainers/cheesecake.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Cheese wheel name: Cheese wheel
id: DrinkFoodContainerCheeseWheel id: FoodContainerCheeseWheel
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodCheeseWedge: 100 FoodCheeseWedge: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/apple_cake.rsi sprite: Objects/FoodContainers/apple_cake.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/apple_cake.rsi sprite: Objects/FoodContainers/apple_cake.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Chocolate cake name: Chocolate cake
id: DrinkFoodContainerChocolateCake id: FoodContainerChocolateCake
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodChocolateCakeSlice: 100 FoodChocolateCakeSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/chocolatecake.rsi sprite: Objects/FoodContainers/chocolatecake.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/chocolatecake.rsi sprite: Objects/FoodContainers/chocolatecake.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Cream cheese bread name: Cream cheese bread
id: DrinkFoodContainerCreamCheeseBread id: FoodContainerCreamCheeseBread
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodCreamCheeseBreadSlice: 100 FoodCreamCheeseBreadSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/creamcheesebread.rsi sprite: Objects/FoodContainers/creamcheesebread.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/creamcheesebread.rsi sprite: Objects/FoodContainers/creamcheesebread.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Donut box name: Donut box
id: DrinkFoodContainerDonutBox id: FoodContainerDonutBox
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 6 capacity: 6
prototypes: prototypes:
FoodDonut: 70 FoodDonut: 70
FoodFrostedDonut: 30 FoodFrostedDonut: 30
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/donutbox.rsi sprite: Objects/FoodContainers/donutbox.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/donutbox.rsi sprite: Objects/FoodContainers/donutbox.rsi
- type: Appearance - type: Appearance
visuals: visuals:
- type: DrinkFoodContainerVisualizer2D - type: FoodContainerVisualizer2D
mode: Discrete mode: Discrete
base_state: donutbox base_state: donutbox
steps: 7 steps: 7
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Egg box (shut) name: Egg box (shut)
id: DrinkFoodContainerEggBoxShut id: FoodContainerEggBoxShut
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 1 capacity: 1
prototypes: prototypes:
DrinkFoodContainerEggBox: 100 FoodContainerEggBox: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/eggbox_shut.rsi sprite: Objects/FoodContainers/eggbox_shut.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/eggbox_shut.rsi sprite: Objects/FoodContainers/eggbox_shut.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Egg box name: Egg box
id: DrinkFoodContainerEggBox id: FoodContainerEggBox
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 12 capacity: 12
prototypes: prototypes:
FoodEgg: 100 FoodEgg: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/eggbox.rsi sprite: Objects/FoodContainers/eggbox.rsi
state: eggbox-12 state: eggbox-12
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/eggbox.rsi sprite: Objects/FoodContainers/eggbox.rsi
state: eggbox-12 state: eggbox-12
- type: Appearance - type: Appearance
visuals: visuals:
- type: DrinkFoodContainerVisualizer2D - type: FoodContainerVisualizer2D
mode: Discrete mode: Discrete
base_state: eggbox base_state: eggbox
steps: 13 steps: 13
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Lemon cake name: Lemon cake
id: DrinkFoodContainerLemonCake id: FoodContainerLemonCake
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodLemonCakeSlice: 100 FoodLemonCakeSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/lemoncake.rsi sprite: Objects/FoodContainers/lemoncake.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/lemoncake.rsi sprite: Objects/FoodContainers/lemoncake.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Lime cake name: Lime cake
id: DrinkFoodContainerLimeCake id: FoodContainerLimeCake
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodLimeCakeSlice: 100 FoodLimeCakeSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/limecake.rsi sprite: Objects/FoodContainers/limecake.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/limecake.rsi sprite: Objects/FoodContainers/limecake.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Meat bread name: Meat bread
id: DrinkFoodContainerMeatBread id: FoodContainerMeatBread
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodMeatBreadSlice: 100 FoodMeatBreadSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/meatbread.rsi sprite: Objects/FoodContainers/meatbread.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/meatbread.rsi sprite: Objects/FoodContainers/meatbread.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Meat pizza name: Meat pizza
id: DrinkFoodContainerMeatPizza id: FoodContainerMeatPizza
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 6 capacity: 6
prototypes: prototypes:
FoodMeatPizzaSlice: 100 FoodMeatPizzaSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/meatpizza.rsi sprite: Objects/FoodContainers/meatpizza.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/meatpizza.rsi sprite: Objects/FoodContainers/meatpizza.rsi
# These two will probably get moved one day # These two will probably get moved one day
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Monkey cube box name: Monkey cube box
id: DrinkFoodContainerMonkeyCubeBox id: FoodContainerMonkeyCubeBox
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
DrinkFoodContainerMonkeyCubeWrap: 100 FoodContainerMonkeyCubeWrap: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/monkeycubebox.rsi sprite: Objects/FoodContainers/monkeycubebox.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/monkeycubebox.rsi sprite: Objects/FoodContainers/monkeycubebox.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Monkey cube wrap name: Monkey cube wrap
id: DrinkFoodContainerMonkeyCubeWrap id: FoodContainerMonkeyCubeWrap
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodMonkeyCube: 100 FoodMonkeyCube: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/monkeycubewrap.rsi sprite: Objects/FoodContainers/monkeycubewrap.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/monkeycubewrap.rsi sprite: Objects/FoodContainers/monkeycubewrap.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Mushroom pizza name: Mushroom pizza
id: DrinkFoodContainerMushroomPizza id: FoodContainerMushroomPizza
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 6 capacity: 6
prototypes: prototypes:
FoodMushroomPizzaSlice: 100 FoodMushroomPizzaSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/mushroompizza.rsi sprite: Objects/FoodContainers/mushroompizza.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/mushroompizza.rsi sprite: Objects/FoodContainers/mushroompizza.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Orange cake name: Orange cake
id: DrinkFoodContainerOrangeCake id: FoodContainerOrangeCake
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodOrangeCakeSlice: 100 FoodOrangeCakeSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/orangecake.rsi sprite: Objects/FoodContainers/orangecake.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/orangecake.rsi sprite: Objects/FoodContainers/orangecake.rsi
# TODO: Probably replace it with a stacking thing # TODO: Probably replace it with a stacking thing
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Pizza box stack name: Pizza box stack
id: DrinkFoodContainerPizzaBoxStack id: FoodContainerPizzaBoxStack
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
DrinkFoodContainerPizzaBox: 100 FoodContainerPizzaBox: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/pizzaboxstack.rsi sprite: Objects/FoodContainers/pizzaboxstack.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/pizzaboxstack.rsi sprite: Objects/FoodContainers/pizzaboxstack.rsi
- type: Appearance - type: Appearance
visuals: visuals:
- type: DrinkFoodContainerVisualizer2D - type: FoodContainerVisualizer2D
mode: Discrete mode: Discrete
base_state: pizzaboxstack base_state: pizzaboxstack
steps: 5 steps: 5
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Pizza box name: Pizza box
id: DrinkFoodContainerPizzaBox id: FoodContainerPizzaBox
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 1 capacity: 1
prototypes: prototypes:
DrinkFoodContainerMeatPizza: 25 FoodContainerMeatPizza: 25
DrinkFoodContainerMargheritaPizza: 25 FoodContainerMargheritaPizza: 25
DrinkFoodContainerMushroomPizza: 25 FoodContainerMushroomPizza: 25
DrinkFoodContainerVegetablePizza: 25 FoodContainerVegetablePizza: 25
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/pizzabox_open.rsi sprite: Objects/FoodContainers/pizzabox_open.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/pizzabox_open.rsi sprite: Objects/FoodContainers/pizzabox_open.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Margherita pizza name: Margherita pizza
id: DrinkFoodContainerMargheritaPizza id: FoodContainerMargheritaPizza
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 6 capacity: 6
prototypes: prototypes:
FoodMargheritaPizzaSlice: 100 FoodMargheritaPizzaSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/pizzamargherita.rsi sprite: Objects/FoodContainers/pizzamargherita.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/pizzamargherita.rsi sprite: Objects/FoodContainers/pizzamargherita.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Plain cake name: Plain cake
id: DrinkFoodContainerPlainCake id: FoodContainerPlainCake
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodPlainCakeSlice: 100 FoodPlainCakeSlice: 100
spawn_on_finish: TrashTray trash: TrashTray
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/plaincake.rsi sprite: Objects/FoodContainers/plaincake.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/plaincake.rsi sprite: Objects/FoodContainers/plaincake.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Pumpkin pie name: Pumpkin pie
id: DrinkFoodContainerPumpkinPie id: FoodContainerPumpkinPie
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodPumpkinPieSlice: 100 FoodPumpkinPieSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/pumpkinpie.rsi sprite: Objects/FoodContainers/pumpkinpie.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/pumpkinpie.rsi sprite: Objects/FoodContainers/pumpkinpie.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Tofu bread name: Tofu bread
id: DrinkFoodContainerTofuBread id: FoodContainerTofuBread
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodTofuBreadSlice: 100 FoodTofuBreadSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/tofubread.rsi sprite: Objects/FoodContainers/tofubread.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/tofubread.rsi sprite: Objects/FoodContainers/tofubread.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Vegetable pizza name: Vegetable pizza
id: DrinkFoodContainerVegetablePizza id: FoodContainerVegetablePizza
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 6 capacity: 6
prototypes: prototypes:
FoodVegetablePizzaSlice: 100 FoodVegetablePizzaSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/vegetablepizza.rsi sprite: Objects/FoodContainers/vegetablepizza.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/vegetablepizza.rsi sprite: Objects/FoodContainers/vegetablepizza.rsi
- type: entity - type: entity
parent: DrinkFoodContainerBase parent: FoodContainerBase
name: Xenomeat bread name: Xenomeat bread
id: DrinkFoodContainerXenomeatBread id: FoodContainerXenomeatBread
components: components:
- type: DrinkFoodContainer - type: FoodContainer
capacity: 5
prototypes: prototypes:
FoodXenomeatBreadSlice: 100 FoodXenomeatBreadSlice: 100
- type: Sprite - type: Sprite
sprite: Objects/DrinkFoodContainers/xenomeatbread.rsi sprite: Objects/FoodContainers/xenomeatbread.rsi
- type: Icon - type: Icon
sprite: Objects/DrinkFoodContainers/xenomeatbread.rsi sprite: Objects/FoodContainers/xenomeatbread.rsi

View File

@@ -13,7 +13,6 @@
- type: Pourable - type: Pourable
transferAmount: 5 transferAmount: 5
- type: Drink - type: Drink
despawn_empty: true
- type: Sprite - type: Sprite
sprite: Objects/Food/flour.rsi sprite: Objects/Food/flour.rsi
state: icon state: icon

View File

@@ -3,7 +3,7 @@
name: Base empty bottle name: Base empty bottle
parent: BaseItem parent: BaseItem
abstract: true abstract: true
id: DrinkBottleBase id: DrinkBottleBaseEmpty
components: components:
- type: Sound - type: Sound
- type: Sprite - type: Sprite
@@ -15,12 +15,13 @@
- type: Pourable - type: Pourable
transferAmount: 5 transferAmount: 5
- type: Drink - type: Drink
despawn_empty: false isOpen: true
# Containers # Containers
- type: entity - type: entity
name: Jailbreaker Verte bottle name: Jailbreaker Verte bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottleAbsinthe id: DrinkBottleAbsinthe
components: components:
- type: Sprite - type: Sprite
@@ -30,7 +31,7 @@
- type: entity - type: entity
name: Alcohol bottle name: Alcohol bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottleAlcoClear id: DrinkBottleAlcoClear
components: components:
- type: Sprite - type: Sprite
@@ -40,7 +41,7 @@
- type: entity - type: entity
name: Ale bottle name: Ale bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottleAle id: DrinkBottleAle
components: components:
- type: Sprite - type: Sprite
@@ -50,7 +51,7 @@
- type: entity - type: entity
name: Beer bottle name: Beer bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottleBeer id: DrinkBottleBeer
components: components:
- type: Sprite - type: Sprite
@@ -60,7 +61,7 @@
- type: entity - type: entity
name: Broken bottle name: Broken bottle
parent: DrinkBottleBase # Can't hold liquids parent: DrinkBottleBaseEmpty # Can't hold liquids
id: DrinkBrokenBottle id: DrinkBrokenBottle
components: components:
- type: Sprite - type: Sprite
@@ -70,7 +71,7 @@
- type: entity - type: entity
name: Cognac bottle name: Cognac bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottleCognac id: DrinkBottleCognac
components: components:
- type: Sprite - type: Sprite
@@ -80,7 +81,7 @@
- type: entity - type: entity
name: Griffeater gin bottle name: Griffeater gin bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottleGin id: DrinkBottleGin
components: components:
- type: Sprite - type: Sprite
@@ -90,7 +91,7 @@
- type: entity - type: entity
name: Goldschlager bottle name: Goldschlager bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottleGoldschlager id: DrinkBottleGoldschlager
components: components:
- type: Sprite - type: Sprite
@@ -100,7 +101,7 @@
- type: entity - type: entity
name: Kahlua bottle name: Kahlua bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottleKahlua id: DrinkBottleKahlua
components: components:
- type: Sprite - type: Sprite
@@ -110,7 +111,7 @@
- type: entity - type: entity
name: NT Cahors bottle name: NT Cahors bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottleNTCahors id: DrinkBottleNTCahors
components: components:
- type: Sprite - type: Sprite
@@ -120,7 +121,7 @@
- type: entity - type: entity
name: Patron bottle name: Patron bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottlePatron id: DrinkBottlePatron
components: components:
- type: Sprite - type: Sprite
@@ -130,7 +131,7 @@
- type: entity - type: entity
name: Poison wine bottle name: Poison wine bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottlePoisonWine id: DrinkBottlePoisonWine
components: components:
- type: Sprite - type: Sprite
@@ -140,7 +141,7 @@
- type: entity - type: entity
name: Rum bottle name: Rum bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottleRum id: DrinkBottleRum
components: components:
- type: Sprite - type: Sprite
@@ -150,7 +151,7 @@
- type: entity - type: entity
name: Tequila bottle name: Tequila bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottleTequila id: DrinkBottleTequila
components: components:
- type: Sprite - type: Sprite
@@ -160,7 +161,7 @@
- type: entity - type: entity
name: Vermouth bottle name: Vermouth bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottleVermouth id: DrinkBottleVermouth
components: components:
- type: Sprite - type: Sprite
@@ -170,7 +171,7 @@
- type: entity - type: entity
name: Vodka bottle name: Vodka bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottleVodka id: DrinkBottleVodka
components: components:
- type: Sprite - type: Sprite
@@ -180,7 +181,7 @@
- type: entity - type: entity
name: Whiskey bottle name: Whiskey bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottleWhiskey id: DrinkBottleWhiskey
components: components:
- type: Sprite - type: Sprite
@@ -190,7 +191,7 @@
- type: entity - type: entity
name: Wine bottle name: Wine bottle
parent: DrinkBottleBase parent: DrinkBottleBaseEmpty
id: DrinkBottleWine id: DrinkBottleWine
components: components:
- type: Sprite - type: Sprite

View File

@@ -59,7 +59,7 @@
- type: microwaveMealRecipe - type: microwaveMealRecipe
id: RecipeBread id: RecipeBread
name: Bread Recipe name: Bread Recipe
result: DrinkFoodContainerBread result: FoodContainerBread
time: 15 time: 15
reagents: reagents:
chem.Flour: 15 chem.Flour: 15
@@ -104,7 +104,7 @@
- type: microwaveMealRecipe - type: microwaveMealRecipe
id: RecipeCreamCheeseBread id: RecipeCreamCheeseBread
name: Cream Cheese Bread Recipe name: Cream Cheese Bread Recipe
result: DrinkFoodContainerCreamCheeseBread result: FoodContainerCreamCheeseBread
time: 20 time: 20
reagents: reagents:
chem.Flour: 15 chem.Flour: 15
@@ -114,7 +114,7 @@
- type: microwaveMealRecipe - type: microwaveMealRecipe
id: RecipeBananaBread id: RecipeBananaBread
name: Banana Bread Recipe name: Banana Bread Recipe
result: DrinkFoodContainerBananaBread result: FoodContainerBananaBread
time: 25 time: 25
reagents: reagents:
chem.Flour: 15 chem.Flour: 15
@@ -129,7 +129,7 @@
- type: microwaveMealRecipe - type: microwaveMealRecipe
id: RecipeMargheritaPizza id: RecipeMargheritaPizza
name: Margherita Pizza Recipe name: Margherita Pizza Recipe
result: DrinkFoodContainerMargheritaPizza result: FoodContainerMargheritaPizza
time: 30 time: 30
reagents: reagents:
chem.Flour: 10 chem.Flour: 10
@@ -140,7 +140,7 @@
- type: microwaveMealRecipe - type: microwaveMealRecipe
id: RecipeMushroomPizza id: RecipeMushroomPizza
name: Mushroom Pizza Recipe name: Mushroom Pizza Recipe
result: DrinkFoodContainerMushroomPizza result: FoodContainerMushroomPizza
time: 25 time: 25
reagents: reagents:
chem.Flour: 10 chem.Flour: 10
@@ -150,7 +150,7 @@
- type: microwaveMealRecipe - type: microwaveMealRecipe
id: RecipeMeatPizza id: RecipeMeatPizza
name: Meat Pizza Recipe name: Meat Pizza Recipe
result: DrinkFoodContainerMeatPizza result: FoodContainerMeatPizza
time: 30 time: 30
reagents: reagents:
chem.Flour: 10 chem.Flour: 10
@@ -162,7 +162,7 @@
- type: microwaveMealRecipe - type: microwaveMealRecipe
id: RecipeVegetablePizza id: RecipeVegetablePizza
name: Vegetable Pizza Recipe name: Vegetable Pizza Recipe
result: DrinkFoodContainerVegetablePizza result: FoodContainerVegetablePizza
time: 30 time: 30
reagents: reagents:
chem.Flour: 10 chem.Flour: 10

View File

@@ -0,0 +1,11 @@
- type: soundCollection
id: canOpenSounds
files:
- /Audio/items/can_open1.ogg
- /Audio/items/can_open2.ogg
- /Audio/items/can_open3.ogg
- type: soundCollection
id: bottleOpenSounds
files:
- /Audio/items/bottle_open1.ogg

View File

@@ -5,11 +5,11 @@
animationDuration: 1.1 animationDuration: 1.1
spriteName: cola spriteName: cola
startingInventory: startingInventory:
DrinkFoodContainerColaCanUnopened: 10 DrinkColaCan: 10
DrinkFoodContainerIceTeaCanUnopened: 10 DrinkIceTeaCan: 10
DrinkFoodContainerLemonLimeCanUnopened: 10 DrinkLemonLimeCan: 10
DrinkFoodContainerPurpleCanUnopened: 10 DrinkPurpleCan: 10
DrinkFoodContainerSpaceMountainWindCanUnopened: 10 DrinkSpaceMountainWindCan: 10
DrinkFoodContainerSpaceUpCanUnopened: 10 DrinkSpaceUpCan: 10
DrinkFoodContaineStarkistCanUnopened: 10 DrinkDrinkFoodContaineStarkistCan: 10
DrinkFoodContaineThirteenLokoCanUnopened: 10 DrinkFoodContaineThirteenLokoCan: 10

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 736 B

After

Width:  |  Height:  |  Size: 736 B

View File

Before

Width:  |  Height:  |  Size: 356 B

After

Width:  |  Height:  |  Size: 356 B

View File

Before

Width:  |  Height:  |  Size: 923 B

After

Width:  |  Height:  |  Size: 923 B

View File

Before

Width:  |  Height:  |  Size: 947 B

After

Width:  |  Height:  |  Size: 947 B

View File

Before

Width:  |  Height:  |  Size: 1009 B

After

Width:  |  Height:  |  Size: 1009 B

View File

Before

Width:  |  Height:  |  Size: 906 B

After

Width:  |  Height:  |  Size: 906 B

View File

Before

Width:  |  Height:  |  Size: 974 B

After

Width:  |  Height:  |  Size: 974 B

Some files were not shown because too many files have changed in this diff Show More