Vending machine uplift (#1549)

* Let there be (vending machine) light

Cut up vending machines to have unshaded layers.
I scripted the cutting up so there might need to be minor tweaks to some of them.
Added the eris vending machine sound (I liked it more than tg's, fight me).

* Tweak sound reduction

* Mark vending as abstract

Appearance is done on each vending based on what sprite states they have (at the moment) and the vendingmachine shouldn't be spawned on its own anyway.

* Add screen layer back in

* Unstuff what was stuffed

* Removed the Soviet and USA vending machines

* Added proper licensing

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
Co-authored-by: Swept <jamesurquhartwebb@gmail.com>
This commit is contained in:
metalgearsloth
2020-08-13 22:39:23 +10:00
committed by GitHub
parent ca68fbe818
commit 05a76d55f7
160 changed files with 1962 additions and 71 deletions

View File

@@ -10,8 +10,11 @@ using Content.Shared.Interfaces.GameObjects.Components;
using Content.Shared.VendingMachines;
using Robust.Server.GameObjects;
using Robust.Server.GameObjects.Components.UserInterface;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Server.Interfaces.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.Random;
using Robust.Shared.IoC;
using Robust.Shared.Prototypes;
@@ -43,6 +46,8 @@ namespace Content.Server.GameObjects.Components.VendingMachines
private bool Powered => _powerReceiver.Powered;
private bool _broken = false;
private string _soundVend;
public void Activate(ActivateEventArgs eventArgs)
{
if(!eventArgs.User.TryGetComponent(out IActorComponent actor))
@@ -67,6 +72,8 @@ namespace Content.Server.GameObjects.Components.VendingMachines
base.ExposeData(serializer);
serializer.DataField(ref _packPrototypeId, "pack", string.Empty);
// Grabbed from: https://github.com/discordia-space/CEV-Eris/blob/f702afa271136d093ddeb415423240a2ceb212f0/sound/machines/vending_drop.ogg
serializer.DataField(ref _soundVend, "soundVend", "/Audio/Machines/machine_vend.ogg");
}
private void InitializeFromPrototype()
@@ -178,6 +185,8 @@ namespace Content.Server.GameObjects.Components.VendingMachines
TrySetVisualState(VendingMachineVisualState.Normal);
Owner.EntityManager.SpawnEntity(id, Owner.Transform.GridPosition);
});
EntitySystem.Get<AudioSystem>().PlayFromEntity(_soundVend, Owner, AudioParams.Default.WithVolume(-2f));
}
private void FlickDenyAnimation()