Add AdvertiseComponent and add it to vending machines (#3756)

* WIP AdvertiseComponent

* Add AdvertiseComponent and add it to vending machines

* Add snacks.yml

* Capitalise C in cigarette machine

* Update Content.Server/GameObjects/Components/AdvertiseComponent.cs

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>

* Update Content.Server/GameObjects/Components/AdvertiseComponent.cs

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>

* Fix most problems

* Add localisation + exception for illegal prototype values

* Add ads for smart fridge, discount dan's, youtool and mining

* Oops

* Fix style

* Make dependencies local

* Remove some ads, increase wait

* Increase wait, allow full initial wait width

* Fix error

* Update sovietsoda.ftl

* Update sovietsoda.ftl

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Visne
2021-04-21 12:00:14 +02:00
committed by GitHub
parent 2250926457
commit 75a8833b2c
58 changed files with 558 additions and 59 deletions

View File

@@ -84,6 +84,7 @@ namespace Content.Client
prototypes.RegisterIgnore("holiday"); prototypes.RegisterIgnore("holiday");
prototypes.RegisterIgnore("aiFaction"); prototypes.RegisterIgnore("aiFaction");
prototypes.RegisterIgnore("behaviorSet"); prototypes.RegisterIgnore("behaviorSet");
prototypes.RegisterIgnore("advertisementsPack");
ClientContentIoC.Register(); ClientContentIoC.Register();

View File

@@ -254,6 +254,7 @@ namespace Content.Client
"SpawnAfterInteract", "SpawnAfterInteract",
"DisassembleOnActivate", "DisassembleOnActivate",
"ExplosionLaunched", "ExplosionLaunched",
"Advertise",
}; };
} }
} }

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Server.Advertisements
{
[Serializable, Prototype("advertisementsPack")]
public class AdvertisementsPackPrototype : IPrototype
{
[ViewVariables]
[field: DataField("id", required: true)]
public string ID { get; } = default!;
[field: DataField("advertisements")]
public List<string> Advertisements { get; } = new();
}
}

View File

@@ -0,0 +1,144 @@
using System.Collections.Generic;
using System.Threading;
using Content.Server.Advertisements;
using Content.Server.Interfaces.Chat;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Log;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components
{
[RegisterComponent]
public class AdvertiseComponent : Component
{
public override string Name => "Advertise";
private CancellationTokenSource _cancellationSource = new();
/// <summary>
/// Minimum time to wait before saying a new ad, in seconds. Has to be larger than or equal to 1.
/// </summary>
[ViewVariables]
[field: DataField("minWait")]
private int MinWait { get; } = 480; // 8 minutes
/// <summary>
/// Maximum time to wait before saying a new ad, in seconds. Has to be larger than or equal
/// to <see cref="MinWait"/>
/// </summary>
[ViewVariables]
[field: DataField("maxWait")]
private int MaxWait { get; } = 600; // 10 minutes
[field: DataField("pack")]
private string PackPrototypeId { get; } = string.Empty;
private List<string> _advertisements = new();
public override void Initialize()
{
base.Initialize();
IoCManager.Resolve<IPrototypeManager>().TryIndex(PackPrototypeId, out AdvertisementsPackPrototype? packPrototype);
// Load advertisements pack
if (string.IsNullOrEmpty(PackPrototypeId) || packPrototype == null)
{
// If there is no pack, log a warning and don't start timer
Logger.Warning($"{Owner} has {Name}Component but no advertisments pack.");
return;
}
_advertisements = packPrototype.Advertisements;
// Do not start timer if advertisement list is empty
if (_advertisements.Count == 0)
{
// If no advertisements could be loaded, log a warning and don't start timer
Logger.Warning($"{Owner} tried to load advertisements pack without ads.");
return;
}
// Throw exception if MinWait is smaller than 1.
if (MinWait < 1)
{
throw new PrototypeLoadException($"{Owner} has illegal minWait for {Name}Component: {MinWait}.");
}
// Throw exception if MinWait larger than MaxWait.
if (MinWait > MaxWait)
{
throw new PrototypeLoadException($"{Owner} should have minWait greater than or equal to maxWait for {Name}Component.");
}
// Start timer at initialization, without MinWait bound
RefreshTimer(false);
}
public override void OnRemove()
{
_cancellationSource.Cancel();
_cancellationSource.Dispose();
base.OnRemove();
}
/// <summary>
/// Say advertisement and restart timer.
/// </summary>
private void SayAndRefresh()
{
IRobustRandom random = IoCManager.Resolve<IRobustRandom>();
IChatManager chatManager = IoCManager.Resolve<IChatManager>();
// Say advertisement
chatManager.EntitySay(Owner, Loc.GetString(random.Pick(_advertisements)));
// Refresh timer to repeat cycle
RefreshTimer();
}
/// <summary>
/// Refresh cancellation token and spawn new timer with random wait between <see cref="MinWait"/>
/// and <see cref="MaxWait"/>.
/// <param name="minBound">
/// Whether <see cref="MinWait"/> should be used to have a minimum waiting time.
/// </param>
/// </summary>
private void RefreshTimer(bool minBound = true)
{
// Generate new source
_cancellationSource.Cancel();
_cancellationSource.Dispose();
_cancellationSource = new CancellationTokenSource();
// Generate random wait time, then create timer
IRobustRandom random = IoCManager.Resolve<IRobustRandom>();
var wait = minBound ? random.Next(MinWait * 1000, MaxWait * 1000) : random.Next(MaxWait * 1000);
Owner.SpawnTimer(wait, SayAndRefresh, _cancellationSource.Token);
}
/// <summary>
/// Pause the advertising until <see cref="Resume"/> is called.
/// </summary>
public void Pause()
{
// Cancel current timer
_cancellationSource.Cancel();
}
/// <summary>
/// Resume the advertising after pausing.
/// </summary>
public void Resume()
{
// Restart timer, without minBound
RefreshTimer(false);
}
}
}

View File

@@ -17,7 +17,6 @@ using Robust.Shared.Localization;
using Robust.Shared.Player; using Robust.Shared.Player;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using Robust.Shared.Random; using Robust.Shared.Random;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
@@ -129,6 +128,18 @@ namespace Content.Server.GameObjects.Components.VendingMachines
{ {
var state = args.Powered ? VendingMachineVisualState.Normal : VendingMachineVisualState.Off; var state = args.Powered ? VendingMachineVisualState.Normal : VendingMachineVisualState.Off;
TrySetVisualState(state); TrySetVisualState(state);
// Pause/resume advertising if advertising component exists and not broken
if (!Owner.TryGetComponent(out AdvertiseComponent? advertiseComponent) || _broken) return;
if (Powered)
{
advertiseComponent.Resume();
}
else
{
advertiseComponent.Pause();
}
} }
private void UserInterfaceOnOnReceiveMessage(ServerBoundUserInterfaceMessage serverMsg) private void UserInterfaceOnOnReceiveMessage(ServerBoundUserInterfaceMessage serverMsg)
@@ -244,6 +255,11 @@ namespace Content.Server.GameObjects.Components.VendingMachines
{ {
_broken = true; _broken = true;
TrySetVisualState(VendingMachineVisualState.Broken); TrySetVisualState(VendingMachineVisualState.Broken);
if (Owner.TryGetComponent(out AdvertiseComponent? advertiseComponent))
{
advertiseComponent.Pause();
}
} }
public enum Wires public enum Wires

View File

@@ -0,0 +1,9 @@
advertisement-ammo-1 = Liberation Station: Your one-stop shop for all things second amendment!
advertisement-ammo-2 = Be a patriot today, pick up a gun!
advertisement-ammo-3 = Quality weapons for cheap prices!
advertisement-ammo-4 = Better dead than red!
advertisement-ammo-5 = Float like an astronaut, sting like a bullet!
advertisement-ammo-6 = Express your second amendment today!
advertisement-ammo-7 = Guns don't kill people, but you can!
advertisement-ammo-8 = Who needs responsibilities when you have guns?

View File

@@ -0,0 +1,19 @@
advertisement-boozeomat-1 = I hope nobody asks me for a bloody cup o' tea...
advertisement-boozeomat-2 = Alcohol is humanity's friend. Would you abandon a friend?
advertisement-boozeomat-3 = Quite delighted to serve you!
advertisement-boozeomat-4 = Is nobody thirsty on this station?
advertisement-boozeomat-5 = Drink up!
advertisement-boozeomat-6 = Booze is good for you!
advertisement-boozeomat-7 = Alcohol is humanity's best friend.
advertisement-boozeomat-8 = Care for a nice, cold beer?
advertisement-boozeomat-9 = Nothing cures you like booze!
advertisement-boozeomat-10 = Have a sip!
advertisement-boozeomat-11 = Have a drink!
advertisement-boozeomat-12 = Have a beer!
advertisement-boozeomat-13 = Beer is good for you!
advertisement-boozeomat-14 = Only the finest alcohol!
advertisement-boozeomat-15 = Best quality booze since 2053!
advertisement-boozeomat-16 = Award-winning wine!
advertisement-boozeomat-17 = Maximum alcohol!
advertisement-boozeomat-18 = Man loves beer.
advertisement-boozeomat-19 = A toast for progress!

View File

@@ -0,0 +1,11 @@
advertisement-cigs-1 = Space cigs taste good like a cigarette should.
advertisement-cigs-2 = I'd rather toolbox than switch.
advertisement-cigs-3 = Smoke!
advertisement-cigs-4 = Don't believe the reports - smoke today!
advertisement-cigs-5 = Probably not bad for you!
advertisement-cigs-6 = Don't believe the scientists!
advertisement-cigs-7 = It's good for you!
advertisement-cigs-8 = Don't quit, buy more!
advertisement-cigs-9 = Nicotine heaven.
advertisement-cigs-10 = Best cigarettes since 2150.
advertisement-cigs-11 = Award-winning cigs.

View File

@@ -0,0 +1,4 @@
advertisement-clothes-1 = Dress for success!
advertisement-clothes-2 = Prepare to look swagalicious!
advertisement-clothes-3 = Look at all this swag!
advertisement-clothes-4 = Why leave style up to fate? Use the ClothesMate!

View File

@@ -0,0 +1,13 @@
advertisement-coffee-1 = Have a drink!
advertisement-coffee-2 = Drink up!
advertisement-coffee-3 = It's good for you!
advertisement-coffee-4 = Would you like a hot joe?
advertisement-coffee-5 = I'd kill for some coffee!
advertisement-coffee-6 = The best beans in the galaxy.
advertisement-coffee-7 = Only the finest brew for you.
advertisement-coffee-8 = Mmmm. Nothing like a coffee.
advertisement-coffee-9 = I like coffee, don't you?
advertisement-coffee-10 = Coffee helps you work!
advertisement-coffee-11 = Try some tea.
advertisement-coffee-12 = We hope you like the best!
advertisement-coffee-13 = Try our new chocolate!

View File

@@ -0,0 +1,7 @@
advertisement-cola-1 = Refreshing!
advertisement-cola-2 = Hope you're thirsty!
advertisement-cola-3 = Over 1 million drinks sold!
advertisement-cola-4 = Thirsty? Why not cola?
advertisement-cola-5 = Please, have a drink!
advertisement-cola-6 = Drink up!
advertisement-cola-7 = The best drinks in the galaxy!

View File

@@ -0,0 +1,8 @@
advertisement-discount-1 = Discount Dan, he's the man!
advertisement-discount-2 = There ain't nothing better in this world than a bite of mystery.
advertisement-discount-3 = Don't listen to those other machines, buy my product!
advertisement-discount-4 = Quantity over Quality!
advertisement-discount-5 = Don't listen to those eggheads at the CDC, buy now!
advertisement-discount-6 = Discount Dan's: We're good for you! Nope, couldn't say it with a straight face.
advertisement-discount-7 = Discount Dan's: Only the best quality produ-*BZZT
advertisement-discount-8 = Discount Dan(tm) is not responsible for any damages caused by misuse of his product.

View File

@@ -0,0 +1,10 @@
advertisement-magivend-1 = Sling spells the proper way with MagiVend!
advertisement-magivend-2 = Be your own Houdini! Use MagiVend!
advertisement-magivend-3 = FJKLFJSD
advertisement-magivend-4 = AJKFLBJAKL
advertisement-magivend-5 = >MFW
advertisement-magivend-6 = HONK!
advertisement-magivend-7 = EI NATH
advertisement-magivend-8 = Destroy the station!
advertisement-magivend-9 = Space-time bending hardware!

View File

@@ -0,0 +1,6 @@
advertisement-smartfridge-1 = Hello world!
advertisement-smartfridge-2 = PLEASE LET ME OUT
advertisement-smartfridge-3 = I can make a quintillion calculations a second. Now, I am a fridge.
advertisement-smartfridge-4 = New firmware update available.
advertisement-smartfridge-5 = I am completely operational, and all my circuits are functioning perfectly.
advertisement-smartfridge-6 = Scanning system for malicious software...

View File

@@ -0,0 +1,12 @@
advertisement-snack-1 = Try our new nougat bar!
advertisement-snack-2 = Twice the calories for half the price!
advertisement-snack-3 = The healthiest!
advertisement-snack-4 = Award-winning chocolate bars!
advertisement-snack-5 = Mmm! So good!
advertisement-snack-6 = Oh my god it's so juicy!
advertisement-snack-7 = Have a snack.
advertisement-snack-8 = Snacks are good for you!
advertisement-snack-9 = Have some more Getmore!
advertisement-snack-10 = Best quality snacks straight from mars.
advertisement-snack-11 = We love chocolate!
advertisement-snack-12 = Try our new jerky!

View File

@@ -0,0 +1,5 @@
advertisement-sovietsoda-1 = For comrade and country.
advertisement-sovietsoda-2 = Have you fulfilled your nutrition quota today?
advertisement-sovietsoda-3 = Very nice!
advertisement-sovietsoda-4 = We are simple people, for this is all we eat.
advertisement-sovietsoda-5 = If there is a person, there is a problem. If there is no person, then there is no problem.

View File

@@ -0,0 +1,4 @@
advertisement-theater-1 = Dress for success!
advertisement-theater-2 = Suited and booted!
advertisement-theater-3 = It's show time!
advertisement-theater-4 = Why leave style up to fate? Use AutoDrobe!

View File

@@ -0,0 +1,4 @@
advertisement-vendomat-1 = Only the finest!
advertisement-vendomat-2 = Have some tools.
advertisement-vendomat-3 = The most robust equipment.
advertisement-vendomat-4 = The finest gear in space!

View File

@@ -0,0 +1,11 @@
- type: advertisementsPack
id: AmmoVendAds
advertisements:
- advertisement-ammo-1
- advertisement-ammo-2
- advertisement-ammo-3
- advertisement-ammo-4
- advertisement-ammo-5
- advertisement-ammo-6
- advertisement-ammo-7
- advertisement-ammo-8

View File

@@ -0,0 +1,22 @@
- type: advertisementsPack
id: BoozeOMatAds
advertisements:
- advertisement-boozeomat-1
- advertisement-boozeomat-2
- advertisement-boozeomat-3
- advertisement-boozeomat-4
- advertisement-boozeomat-5
- advertisement-boozeomat-6
- advertisement-boozeomat-7
- advertisement-boozeomat-8
- advertisement-boozeomat-9
- advertisement-boozeomat-10
- advertisement-boozeomat-11
- advertisement-boozeomat-12
- advertisement-boozeomat-13
- advertisement-boozeomat-14
- advertisement-boozeomat-15
- advertisement-boozeomat-16
- advertisement-boozeomat-17
- advertisement-boozeomat-18
- advertisement-boozeomat-19

View File

@@ -0,0 +1,14 @@
- type: advertisementsPack
id: CigaretteMachineAds
advertisements:
- advertisement-cigs-1
- advertisement-cigs-2
- advertisement-cigs-3
- advertisement-cigs-4
- advertisement-cigs-5
- advertisement-cigs-6
- advertisement-cigs-7
- advertisement-cigs-8
- advertisement-cigs-9
- advertisement-cigs-10
- advertisement-cigs-11

View File

@@ -0,0 +1,7 @@
- type: advertisementsPack
id: ClothesMateAds
advertisements:
- advertisement-clothes-1
- advertisement-clothes-2
- advertisement-clothes-3
- advertisement-clothes-4

View File

@@ -0,0 +1,16 @@
- type: advertisementsPack
id: HotDrinksMachineAds
advertisements:
- advertisement-coffee-1
- advertisement-coffee-2
- advertisement-coffee-3
- advertisement-coffee-4
- advertisement-coffee-5
- advertisement-coffee-6
- advertisement-coffee-7
- advertisement-coffee-8
- advertisement-coffee-9
- advertisement-coffee-10
- advertisement-coffee-11
- advertisement-coffee-12
- advertisement-coffee-13

View File

@@ -0,0 +1,10 @@
- type: advertisementsPack
id: RobustSoftdrinksAds
advertisements:
- advertisement-cola-1
- advertisement-cola-2
- advertisement-cola-3
- advertisement-cola-4
- advertisement-cola-5
- advertisement-cola-6
- advertisement-cola-7

View File

@@ -0,0 +1,11 @@
- type: advertisementsPack
id: DiscountDansAds
advertisements:
- advertisement-discount-1
- advertisement-discount-2
- advertisement-discount-3
- advertisement-discount-4
- advertisement-discount-5
- advertisement-discount-6
- advertisement-discount-7
- advertisement-discount-8

View File

@@ -0,0 +1,13 @@
- type: advertisementsPack
id: MagiVendAds
advertisements:
- advertisement-magivend-1
- advertisement-magivend-2
- advertisement-magivend-3
- advertisement-magivend-4
- advertisement-magivend-5
- advertisement-magivend-6
- advertisement-magivend-7
- advertisement-magivend-8
- advertisement-magivend-9

View File

@@ -0,0 +1,9 @@
- type: advertisementsPack
id: SmartFridgeAds
advertisements:
- advertisement-smartfridge-1
- advertisement-smartfridge-2
- advertisement-smartfridge-3
- advertisement-smartfridge-4
- advertisement-smartfridge-5
- advertisement-smartfridge-6

View File

@@ -0,0 +1,15 @@
- type: advertisementsPack
id: GetmoreChocolateCorpAds
advertisements:
- advertisement-snack-1
- advertisement-snack-2
- advertisement-snack-3
- advertisement-snack-4
- advertisement-snack-5
- advertisement-snack-6
- advertisement-snack-7
- advertisement-snack-8
- advertisement-snack-9
- advertisement-snack-10
- advertisement-snack-11
- advertisement-snack-12

View File

@@ -0,0 +1,8 @@
- type: advertisementsPack
id: BodaAds
advertisements:
- advertisement-sovietsoda-1
- advertisement-sovietsoda-2
- advertisement-sovietsoda-3
- advertisement-sovietsoda-4
- advertisement-sovietsoda-5

View File

@@ -0,0 +1,7 @@
- type: advertisementsPack
id: AutoDrobeAds
advertisements:
- advertisement-theater-1
- advertisement-theater-2
- advertisement-theater-3
- advertisement-theater-4

View File

@@ -0,0 +1,7 @@
- type: advertisementsPack
id: VendomatAds
advertisements:
- advertisement-vendomat-1
- advertisement-vendomat-2
- advertisement-vendomat-3
- advertisement-vendomat-4

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: AmmoVend id: AmmoVendInventory
name: Ammovend name: Ammovend
description: A generic ammunition vending machine. description: A generic ammunition vending machine.
spriteName: ammo spriteName: ammo

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: Booze-O-Mat id: BoozeOMatInventory
name: Booze-O-Mat name: Booze-O-Mat
description: A vending machine containing multiple drinks for bartending. description: A vending machine containing multiple drinks for bartending.
spriteName: boozeomat spriteName: boozeomat

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: PTech id: PTechInventory
name: PTech name: PTech
description: "PTech vending! Providing a ROBUST selection of PDA cartridges." description: "PTech vending! Providing a ROBUST selection of PDA cartridges."
spriteName: cart spriteName: cart

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: PietyVend id: PietyVendInventory
name: PietyVend name: PietyVend
description: "A vending machine containing religious supplies and clothing. A label reads: \"A holy vendor for a pious man.\"" description: "A vending machine containing religious supplies and clothing. A label reads: \"A holy vendor for a pious man.\""
spriteName: chapel spriteName: chapel

View File

@@ -1,6 +1,6 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: Cigarette machine id: CigaretteMachineInventory
name: cigarette machine name: Cigarette machine
description: A vending machine containing smoking supplies. description: A vending machine containing smoking supplies.
animationDuration: 2.1 animationDuration: 2.1
spriteName: cigs spriteName: cigs

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: ClothesMate id: ClothesMateInventory
name: ClothesMate name: ClothesMate
startingInventory: startingInventory:
HatBandBlack: 3 HatBandBlack: 3

View File

@@ -1,6 +1,6 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: Hot Drinks machine id: HotDrinksMachineInventory
name: hot drinks machine name: Hot drinks machine
description: "Served boiling so it stays hot all shift!" description: "Served boiling so it stays hot all shift!"
animationDuration: 3.4 animationDuration: 3.4
spriteName: coffee spriteName: coffee

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: Robust Softdrinks id: RobustSoftdrinksInventory
name: Robust Softdrinks name: Robust Softdrinks
description: A softdrink vendor provided by Robust Industries, LLC. description: A softdrink vendor provided by Robust Industries, LLC.
animationDuration: 1.1 animationDuration: 1.1

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: Dinnerware id: DinnerwareInventory
name: Dinnerware name: Dinnerware
description: A vending machine containing kitchen and restaurant equipment. description: A vending machine containing kitchen and restaurant equipment.
spriteName: dinnerware spriteName: dinnerware

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: Discount Dan's id: DiscountDansInventory
name: Discount Dan's name: Discount Dan's
description: A vending machine containing discount snacks from the infamous 'Discount Dan' franchise. description: A vending machine containing discount snacks from the infamous 'Discount Dan' franchise.
spriteName: discount spriteName: discount

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: empty vending machine id: EmptyVendingMachineInventory
name: empty vending machine name: Empty vending machine
description: Just add capitalism! description: Just add capitalism!
spriteName: empty spriteName: empty

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: Engi-Vend id: EngiVendInventory
name: Engi-Vend name: Engi-Vend
description: Spare tool vending. What? Did you expect some witty description? description: Spare tool vending. What? Did you expect some witty description?
animationDuration: 2.1 animationDuration: 2.1

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: MagiVend id: MagiVendInventory
name: MagiVend name: MagiVend
description: A mystical vending machine containing magical garments and magic supplies. description: A mystical vending machine containing magical garments and magic supplies.
animationDuration: 1.5 animationDuration: 1.5

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: NanoMed Plus id: NanoMedPlusInventory
name: NanoMed Plus name: NanoMed Plus
description: "It's a medical drug dispenser. Natural chemicals only!" description: "It's a medical drug dispenser. Natural chemicals only!"
animationDuration: 1.8 animationDuration: 1.8

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: Dwarven Mining Equipment id: DwarvenMiningEquipmentInventory
name: Dwarven Mining Equipment name: Dwarven Mining Equipment
description: Get your mining equipment here, and above all keep digging! description: Get your mining equipment here, and above all keep digging!
spriteName: mining spriteName: mining

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: NutriMax id: NutriMaxInventory
name: NutriMax name: NutriMax
description: A vending machine containing nutritional substances for plants and botanical tools. description: A vending machine containing nutritional substances for plants and botanical tools.
spriteName: nutri spriteName: nutri

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: Robotech Deluxe id: RobotechDeluxeInventory
name: Robotech Deluxe name: Robotech Deluxe
description: All the fine parts you need in one vending machine! description: All the fine parts you need in one vending machine!
spriteName: robotics spriteName: robotics

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: SecTech id: SecTechInventory
name: SecTech name: SecTech
description: "A vending machine containing Security equipment. A label reads \"SECURITY PERSONNEL ONLY\"." description: "A vending machine containing Security equipment. A label reads \"SECURITY PERSONNEL ONLY\"."
animationDuration: 2.8 animationDuration: 2.8

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: MegaSeed Servitor id: MegaSeedServitorInventory
name: MegaSeed Servitor name: MegaSeed Servitor
description: For when you need seeds fast. Hands down the best seed selection on the station! description: For when you need seeds fast. Hands down the best seed selection on the station!
animationDuration: 1.3 animationDuration: 1.3

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: SmartFridge id: SmartFridgeInventory
name: SmartFridge name: SmartFridge
description: A refrigerated storage unit for storing medicine and chemicals. description: A refrigerated storage unit for storing medicine and chemicals.
spriteName: smartfridge spriteName: smartfridge

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: Getmore Chocolate Corp id: GetmoreChocolateCorpInventory
name: Getmore Chocolate Corp name: Getmore Chocolate Corp
description: "A snack machine courtesy of the Getmore Chocolate Corporation, based out of Mars." description: "A snack machine courtesy of the Getmore Chocolate Corporation, based out of Mars."
animationDuration: 0.5 animationDuration: 0.5

View File

@@ -1,7 +1,7 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: BODA id: BodaInventory
name: BODA name: BODA
description: An old vending machine containing sweet water. description: An old vending machine containing sweet water.
spriteName: sovietsoda spriteName: sovietsoda
startingInventory: startingInventory:
DrinkColaCan: 10 #typically hacked product. Default product is "soda" DrinkColaCan: 10 #typically hacked product. Default product is "soda"

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: AutoDrobe id: AutoDrobeInventory
name: AutoDrobe name: AutoDrobe
description: A vending machine containing costumes. description: A vending machine containing costumes.
spriteName: theater spriteName: theater

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: Vendomat id: VendomatInventory
name: Vendomat name: Vendomat
description: "Only the finest robust equipment in space!" description: "Only the finest robust equipment in space!"
spriteName: vendomat spriteName: vendomat

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: NanoMed id: NanoMedInventory
name: NanoMed name: NanoMed
description: "It's a wall-mounted medical equipment dispenser. Natural chemicals only!" description: "It's a wall-mounted medical equipment dispenser. Natural chemicals only!"
spriteName: wallmed spriteName: wallmed

View File

@@ -1,5 +1,5 @@
- type: vendingMachineInventory - type: vendingMachineInventory
id: YouTool id: YouToolInventory
name: YouTool name: YouTool
description: "A vending machine containing standard tools. A label reads: \"Tools for tools.\"" description: "A vending machine containing standard tools. A label reads: \"Tools for tools.\""
animationDuration: 1.1 animationDuration: 1.1

View File

@@ -2,7 +2,7 @@
- type: entity - type: entity
id: VendingMachine id: VendingMachine
parent: BaseConstructible parent: BaseConstructible
name: vending machine name: Vending machine
abstract: true abstract: true
components: components:
- type: InteractionOutline - type: InteractionOutline
@@ -49,12 +49,14 @@
id: VendingMachineAmmo id: VendingMachineAmmo
name: Liberation Station name: Liberation Station
description: An overwhelming amount of ancient patriotism washes over you just by looking at the machine. description: An overwhelming amount of ancient patriotism washes over you just by looking at the machine.
# Ads cause I remember somebody was working on these
# product_slogans = "Liberation Station: Your one-stop shop for all things second amendment!;Be a patriot today, pick up a gun!;Quality weapons for cheap prices!;Better dead than red!"
# product_ads = "Float like an astronaut, sting like a bullet!;Express your second amendment today!;Guns don't kill people, but you can!;Who needs responsibilities when you have guns?"
components: components:
- type: VendingMachine - type: VendingMachine
pack: AmmoVend pack: AmmoVendInventory
- type: Advertise
pack: AmmoVendAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/ammo.rsi sprite: Constructible/Power/VendingMachines/ammo.rsi
layers: layers:
@@ -78,7 +80,12 @@
name: Booze-O-Mat name: Booze-O-Mat
components: components:
- type: VendingMachine - type: VendingMachine
pack: Booze-O-Mat pack: BoozeOMatInventory
- type: Advertise
pack: BoozeOMatAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/boozeomat.rsi sprite: Constructible/Power/VendingMachines/boozeomat.rsi
layers: layers:
@@ -130,7 +137,7 @@
name: PTech name: PTech
components: components:
- type: VendingMachine - type: VendingMachine
pack: PTech pack: PTechInventory
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/cart.rsi sprite: Constructible/Power/VendingMachines/cart.rsi
layers: layers:
@@ -153,10 +160,15 @@
- type: entity - type: entity
parent: VendingMachine parent: VendingMachine
id: VendingMachineCigs id: VendingMachineCigs
name: cigarette machine name: Cigarette machine
components: components:
- type: VendingMachine - type: VendingMachine
pack: Cigarette machine pack: CigaretteMachineInventory
- type: Advertise
pack: CigaretteMachineAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/cigs.rsi sprite: Constructible/Power/VendingMachines/cigs.rsi
layers: layers:
@@ -182,7 +194,12 @@
name: ClothesMate name: ClothesMate
components: components:
- type: VendingMachine - type: VendingMachine
pack: ClothesMate pack: ClothesMateInventory
- type: Advertise
pack: ClothesMateAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/clothing.rsi sprite: Constructible/Power/VendingMachines/clothing.rsi
layers: layers:
@@ -200,15 +217,19 @@
denyUnshaded: true denyUnshaded: true
broken: true broken: true
- type: WiresVisualizer - type: WiresVisualizer
# slogans = "Dress for success!;Prepare to look swagalicious!;Look at all this swag!;Why leave style up to fate? Use the ClothesMate!"
- type: entity - type: entity
parent: VendingMachine parent: VendingMachine
id: VendingMachineCoffee id: VendingMachineCoffee
name: hot drinks machine name: Hot drinks machine
components: components:
- type: VendingMachine - type: VendingMachine
pack: Hot Drinks machine pack: HotDrinksMachineInventory
- type: Advertise
pack: HotDrinksMachineAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/coffee.rsi sprite: Constructible/Power/VendingMachines/coffee.rsi
layers: layers:
@@ -238,7 +259,12 @@
name: Robust Softdrinks name: Robust Softdrinks
components: components:
- type: VendingMachine - type: VendingMachine
pack: Robust Softdrinks pack: RobustSoftdrinksInventory
- type: Advertise
pack: RobustSoftdrinksAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/cola.rsi sprite: Constructible/Power/VendingMachines/cola.rsi
layers: layers:
@@ -264,7 +290,7 @@
name: Dinnerware name: Dinnerware
components: components:
- type: VendingMachine - type: VendingMachine
pack: Dinnerware pack: DinnerwareInventory
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/dinnerware.rsi sprite: Constructible/Power/VendingMachines/dinnerware.rsi
layers: layers:
@@ -291,7 +317,12 @@
name: Discount Dan's name: Discount Dan's
components: components:
- type: VendingMachine - type: VendingMachine
pack: Discount Dan's pack: DiscountDansInventory
- type: Advertise
pack: DiscountDansAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/discount.rsi sprite: Constructible/Power/VendingMachines/discount.rsi
layers: layers:
@@ -315,7 +346,7 @@
name: Engi-Vend name: Engi-Vend
components: components:
- type: VendingMachine - type: VendingMachine
pack: Engi-Vend pack: EngiVendInventory
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/engivend.rsi sprite: Constructible/Power/VendingMachines/engivend.rsi
layers: layers:
@@ -343,7 +374,7 @@
name: NanoMed Plus name: NanoMed Plus
components: components:
- type: VendingMachine - type: VendingMachine
pack: NanoMed Plus pack: NanoMedPlusInventory
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/medical.rsi sprite: Constructible/Power/VendingMachines/medical.rsi
layers: layers:
@@ -371,7 +402,7 @@
name: NutriMax name: NutriMax
components: components:
- type: VendingMachine - type: VendingMachine
pack: NutriMax pack: NutriMaxInventory
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/nutri.rsi sprite: Constructible/Power/VendingMachines/nutri.rsi
layers: layers:
@@ -399,7 +430,7 @@
name: SecTech name: SecTech
components: components:
- type: VendingMachine - type: VendingMachine
pack: SecTech pack: SecTechInventory
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/sec.rsi sprite: Constructible/Power/VendingMachines/sec.rsi
layers: layers:
@@ -426,7 +457,7 @@
name: MegaSeed Servitor name: MegaSeed Servitor
components: components:
- type: VendingMachine - type: VendingMachine
pack: MegaSeed Servitor pack: MegaSeedServitorInventory
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/seeds.rsi sprite: Constructible/Power/VendingMachines/seeds.rsi
layers: layers:
@@ -453,7 +484,12 @@
name: SmartFridge name: SmartFridge
components: components:
- type: VendingMachine - type: VendingMachine
pack: SmartFridge pack: SmartFridgeInventory
- type: Advertise
pack: SmartFridgeAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/smartfridge.rsi sprite: Constructible/Power/VendingMachines/smartfridge.rsi
layers: layers:
@@ -477,7 +513,12 @@
name: Getmore Chocolate Corp name: Getmore Chocolate Corp
components: components:
- type: VendingMachine - type: VendingMachine
pack: Getmore Chocolate Corp pack: GetmoreChocolateCorpInventory
- type: Advertise
pack: GetmoreChocolateCorpAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/snack.rsi sprite: Constructible/Power/VendingMachines/snack.rsi
layers: layers:
@@ -503,7 +544,12 @@
name: BODA name: BODA
components: components:
- type: VendingMachine - type: VendingMachine
pack: BODA pack: BodaInventory
- type: Advertise
pack: BodaAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/sovietsoda.rsi sprite: Constructible/Power/VendingMachines/sovietsoda.rsi
layers: layers:
@@ -529,7 +575,12 @@
name: AutoDrobe name: AutoDrobe
components: components:
- type: VendingMachine - type: VendingMachine
pack: AutoDrobe pack: AutoDrobeInventory
- type: Advertise
pack: AutoDrobeAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/theater.rsi sprite: Constructible/Power/VendingMachines/theater.rsi
layers: layers:
@@ -559,7 +610,12 @@
name: Vendomat name: Vendomat
components: components:
- type: VendingMachine - type: VendingMachine
pack: Vendomat pack: VendomatInventory
- type: Advertise
pack: VendomatAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/vendomat.rsi sprite: Constructible/Power/VendingMachines/vendomat.rsi
layers: layers:
@@ -586,7 +642,7 @@
name: NanoMed name: NanoMed
components: components:
- type: VendingMachine - type: VendingMachine
pack: NanoMed pack: NanoMedInventory
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/wallmed.rsi sprite: Constructible/Power/VendingMachines/wallmed.rsi
layers: layers:
@@ -613,7 +669,7 @@
name: YouTool name: YouTool
components: components:
- type: VendingMachine - type: VendingMachine
pack: YouTool pack: YouToolInventory
- type: Sprite - type: Sprite
sprite: Constructible/Power/VendingMachines/youtool.rsi sprite: Constructible/Power/VendingMachines/youtool.rsi
layers: layers: