Drink fixes part 2 eclectic boogaloo (#1052)
* Drink fixes part 2 eclectic boogaloo * NOT THE NNEWLINES * oops Co-authored-by: FL-OZ <anotherscuffed@gmail.com>
This commit is contained in:
@@ -9,6 +9,7 @@ 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.Interfaces.Random;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
@@ -28,10 +29,7 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
|||||||
#pragma warning disable 649
|
#pragma warning disable 649
|
||||||
[Dependency] private readonly IPrototypeManager _prototypeManager;
|
[Dependency] private readonly IPrototypeManager _prototypeManager;
|
||||||
[Dependency] private readonly IRobustRandom _random;
|
[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]
|
||||||
@@ -94,8 +92,8 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
|||||||
//Do the opening stuff like playing the sounds.
|
//Do the opening stuff like playing the sounds.
|
||||||
var soundCollection = _prototypeManager.Index<SoundCollectionPrototype>(_soundCollection);
|
var soundCollection = _prototypeManager.Index<SoundCollectionPrototype>(_soundCollection);
|
||||||
var file = _random.Pick(soundCollection.PickFiles);
|
var file = _random.Pick(soundCollection.PickFiles);
|
||||||
_audioSystem = _entitySystem.GetEntitySystem<AudioSystem>();
|
|
||||||
_audioSystem.Play(file, Owner, AudioParams.Default);
|
EntitySystem.Get<AudioSystem>().Play(file, args.User, AudioParams.Default);
|
||||||
_opened = true;
|
_opened = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -148,7 +146,7 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
|||||||
if (stomachComponent.TryTransferSolution(split))
|
if (stomachComponent.TryTransferSolution(split))
|
||||||
{
|
{
|
||||||
if (_useSound == null) return false;
|
if (_useSound == null) return false;
|
||||||
_audioSystem.Play(_useSound, Owner, AudioParams.Default.WithVolume(-2f));
|
EntitySystem.Get<AudioSystem>().Play(_useSound, target, AudioParams.Default.WithVolume(-2f));
|
||||||
target.PopupMessage(target, Loc.GetString("Slurp"));
|
target.PopupMessage(target, Loc.GetString("Slurp"));
|
||||||
UpdateAppearance();
|
UpdateAppearance();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -106,3 +106,56 @@
|
|||||||
sprite: Objects/Drinks/thirteen_loko.rsi
|
sprite: Objects/Drinks/thirteen_loko.rsi
|
||||||
- type: Icon
|
- type: Icon
|
||||||
sprite: Objects/Drinks/thirteen_loko.rsi
|
sprite: Objects/Drinks/thirteen_loko.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: DrinkCanBaseFull
|
||||||
|
id: DrinkChangelingSting
|
||||||
|
name: Changeling sting
|
||||||
|
description: You take a tiny sip and feel a burning sensation...
|
||||||
|
components:
|
||||||
|
- type: Drink
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Objects/Drinks/changelingsting.rsi
|
||||||
|
- type: Icon
|
||||||
|
sprite: Objects/Drinks/changelingsting.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: DrinkCanBaseFull
|
||||||
|
id: DrinkDrGibb
|
||||||
|
name: Dr. Gibb
|
||||||
|
description: A delicious blend of 42 different flavours
|
||||||
|
components:
|
||||||
|
- type: Drink
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Objects/Drinks/dr_gibb.rsi
|
||||||
|
- type: Icon
|
||||||
|
sprite: Objects/Drinks/dr_gibb.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: DrinkCanBaseFull
|
||||||
|
id: DrinkEnergyDrink
|
||||||
|
name: Energy drink
|
||||||
|
description: ''
|
||||||
|
components:
|
||||||
|
- type: Drink
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Objects/Drinks/energy_drink.rsi
|
||||||
|
- type: Icon
|
||||||
|
sprite: Objects/Drinks/energy_drink.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: DrinkCanBaseFull
|
||||||
|
id: DrinkGrapeSoda
|
||||||
|
name: Grape soda
|
||||||
|
description: Sweetened drink with a grape flavor and a deep purple color.
|
||||||
|
components:
|
||||||
|
- type: Drink
|
||||||
|
- type: Solution
|
||||||
|
contents:
|
||||||
|
reagents:
|
||||||
|
- ReagentId: chem.Cola
|
||||||
|
Quantity: 20
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Objects/Drinks/grapesoda.rsi
|
||||||
|
- type: Icon
|
||||||
|
sprite: Objects/Drinks/grapesoda.rsi
|
||||||
|
|||||||
@@ -238,21 +238,54 @@
|
|||||||
- type: DrinkFoodVisualizer2D
|
- type: DrinkFoodVisualizer2D
|
||||||
steps: 4
|
steps: 4
|
||||||
|
|
||||||
# Transformable container - normal glass
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: Drinking glass
|
|
||||||
parent: DrinkBaseCup
|
parent: DrinkBaseCup
|
||||||
id: DrinkGlass
|
id: DrinkHotCoco
|
||||||
|
name: Hot chocolate
|
||||||
|
description: A heated drink consisting melted chocolate and heated milk.
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
|
||||||
sprite: Objects/Drinks/glass_clear.rsi
|
|
||||||
- type: Icon
|
|
||||||
sprite: Objects/Drinks/glass_clear.rsi
|
|
||||||
- type: Solution
|
|
||||||
fillingState: glass
|
|
||||||
maxVol: 50
|
|
||||||
caps: 16
|
|
||||||
- type: Drink
|
- type: Drink
|
||||||
- type: Pourable
|
- type: Sprite
|
||||||
transferAmount: 5
|
sprite: Objects/Drinks/hot_coco.rsi
|
||||||
- type: TransformableContainer
|
- type: Icon
|
||||||
|
sprite: Objects/Drinks/hot_coco.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: DrinkBaseCup
|
||||||
|
id: DrinkHotCoffee
|
||||||
|
name: Coffee
|
||||||
|
description: Coffee is a brewed drink prepared from roasted seeds, commonly called coffee beans, of the coffee plant.
|
||||||
|
components:
|
||||||
|
- type: Solution
|
||||||
|
maxVol: 20
|
||||||
|
contents:
|
||||||
|
reagents:
|
||||||
|
- ReagentId: chem.Coffee
|
||||||
|
Quantity: 20
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Objects/Drinks/hot_coffee.rsi
|
||||||
|
- type: Icon
|
||||||
|
sprite: Objects/Drinks/hot_coffee.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: DrinkBaseCup
|
||||||
|
id: DrinkTeacup
|
||||||
|
name: Teacup
|
||||||
|
description: A plain white porcelain teacup.
|
||||||
|
components:
|
||||||
|
- type: Solution
|
||||||
|
maxVol: 20
|
||||||
|
contents:
|
||||||
|
reagents:
|
||||||
|
- ReagentId: chem.Tea
|
||||||
|
Quantity: 20
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Objects/Drinks/teacup.rsi
|
||||||
|
state: icon-1
|
||||||
|
- type: Icon
|
||||||
|
sprite: Objects/Drinks/teacup.rsi
|
||||||
|
state: icon-1
|
||||||
|
- type: Appearance
|
||||||
|
visuals:
|
||||||
|
- type: DrinkFoodVisualizer2D
|
||||||
|
steps: 2
|
||||||
|
|||||||
Reference in New Issue
Block a user