Vending Machine Abuse (#8863)

* piece of shit i'll abuse your vending ass

* placeholder

* Update types.yml

* threshold
This commit is contained in:
EmoGarbage404
2022-06-23 00:52:28 -04:00
committed by GitHub
parent 4269a4116c
commit f5e11102ba
7 changed files with 124 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
using Content.Server.UserInterface;
using Content.Shared.Actions.ActionTypes;
using Content.Shared.Sound;
using Content.Shared.VendingMachines;
using Robust.Server.GameObjects;
@@ -26,6 +27,16 @@ namespace Content.Server.VendingMachines
[DataField("speedLimiter")]
public bool CanShoot = false;
/// <summary>
/// The chance that a vending machine will randomly dispense an item on hit.
/// Chance is 0 if null.
/// </summary>
[DataField("dispenseOnHitChance")]
public float? DispenseOnHitChance;
[DataField("dispenseOnHitThreshold")]
public float? DispenseOnHitThreshold;
[DataField("soundVend")]
// Grabbed from: https://github.com/discordia-space/CEV-Eris/blob/f702afa271136d093ddeb415423240a2ceb212f0/sound/machines/vending_drop.ogg
public SoundSpecifier SoundVend = new SoundPathSpecifier("/Audio/Machines/machine_vend.ogg");
@@ -34,6 +45,9 @@ namespace Content.Server.VendingMachines
// Yoinked from: https://github.com/discordia-space/CEV-Eris/blob/35bbad6764b14e15c03a816e3e89aa1751660ba9/sound/machines/Custom_deny.ogg
public SoundSpecifier SoundDeny = new SoundPathSpecifier("/Audio/Machines/custom_deny.ogg");
[DataField("action", customTypeSerializer: typeof(PrototypeIdSerializer<InstantActionPrototype>))]
public string? Action = "VendingThrow";
[ViewVariables] public BoundUserInterface? UserInterface => Owner.GetUIOrNull(VendingMachineUiKey.Key);
public float NonLimitedEjectForce = 7.5f;