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

@@ -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
id: AmmoVend
id: AmmoVendInventory
name: Ammovend
description: A generic ammunition vending machine.
spriteName: ammo

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,7 +1,7 @@
- type: vendingMachineInventory
id: BODA
id: BodaInventory
name: BODA
description: An old vending machine containing sweet water.
spriteName: sovietsoda
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
id: AutoDrobe
id: AutoDrobeInventory
name: AutoDrobe
description: A vending machine containing costumes.
spriteName: theater

View File

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

View File

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

View File

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

View File

@@ -2,7 +2,7 @@
- type: entity
id: VendingMachine
parent: BaseConstructible
name: vending machine
name: Vending machine
abstract: true
components:
- type: InteractionOutline
@@ -49,12 +49,14 @@
id: VendingMachineAmmo
name: Liberation Station
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:
- type: VendingMachine
pack: AmmoVend
pack: AmmoVendInventory
- type: Advertise
pack: AmmoVendAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite
sprite: Constructible/Power/VendingMachines/ammo.rsi
layers:
@@ -78,7 +80,12 @@
name: Booze-O-Mat
components:
- type: VendingMachine
pack: Booze-O-Mat
pack: BoozeOMatInventory
- type: Advertise
pack: BoozeOMatAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite
sprite: Constructible/Power/VendingMachines/boozeomat.rsi
layers:
@@ -130,7 +137,7 @@
name: PTech
components:
- type: VendingMachine
pack: PTech
pack: PTechInventory
- type: Sprite
sprite: Constructible/Power/VendingMachines/cart.rsi
layers:
@@ -153,10 +160,15 @@
- type: entity
parent: VendingMachine
id: VendingMachineCigs
name: cigarette machine
name: Cigarette machine
components:
- type: VendingMachine
pack: Cigarette machine
pack: CigaretteMachineInventory
- type: Advertise
pack: CigaretteMachineAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite
sprite: Constructible/Power/VendingMachines/cigs.rsi
layers:
@@ -182,7 +194,12 @@
name: ClothesMate
components:
- type: VendingMachine
pack: ClothesMate
pack: ClothesMateInventory
- type: Advertise
pack: ClothesMateAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite
sprite: Constructible/Power/VendingMachines/clothing.rsi
layers:
@@ -200,15 +217,19 @@
denyUnshaded: true
broken: true
- 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
parent: VendingMachine
id: VendingMachineCoffee
name: hot drinks machine
name: Hot drinks machine
components:
- type: VendingMachine
pack: Hot Drinks machine
pack: HotDrinksMachineInventory
- type: Advertise
pack: HotDrinksMachineAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite
sprite: Constructible/Power/VendingMachines/coffee.rsi
layers:
@@ -238,7 +259,12 @@
name: Robust Softdrinks
components:
- type: VendingMachine
pack: Robust Softdrinks
pack: RobustSoftdrinksInventory
- type: Advertise
pack: RobustSoftdrinksAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite
sprite: Constructible/Power/VendingMachines/cola.rsi
layers:
@@ -264,7 +290,7 @@
name: Dinnerware
components:
- type: VendingMachine
pack: Dinnerware
pack: DinnerwareInventory
- type: Sprite
sprite: Constructible/Power/VendingMachines/dinnerware.rsi
layers:
@@ -291,7 +317,12 @@
name: Discount Dan's
components:
- type: VendingMachine
pack: Discount Dan's
pack: DiscountDansInventory
- type: Advertise
pack: DiscountDansAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite
sprite: Constructible/Power/VendingMachines/discount.rsi
layers:
@@ -315,7 +346,7 @@
name: Engi-Vend
components:
- type: VendingMachine
pack: Engi-Vend
pack: EngiVendInventory
- type: Sprite
sprite: Constructible/Power/VendingMachines/engivend.rsi
layers:
@@ -343,7 +374,7 @@
name: NanoMed Plus
components:
- type: VendingMachine
pack: NanoMed Plus
pack: NanoMedPlusInventory
- type: Sprite
sprite: Constructible/Power/VendingMachines/medical.rsi
layers:
@@ -371,7 +402,7 @@
name: NutriMax
components:
- type: VendingMachine
pack: NutriMax
pack: NutriMaxInventory
- type: Sprite
sprite: Constructible/Power/VendingMachines/nutri.rsi
layers:
@@ -399,7 +430,7 @@
name: SecTech
components:
- type: VendingMachine
pack: SecTech
pack: SecTechInventory
- type: Sprite
sprite: Constructible/Power/VendingMachines/sec.rsi
layers:
@@ -426,7 +457,7 @@
name: MegaSeed Servitor
components:
- type: VendingMachine
pack: MegaSeed Servitor
pack: MegaSeedServitorInventory
- type: Sprite
sprite: Constructible/Power/VendingMachines/seeds.rsi
layers:
@@ -453,7 +484,12 @@
name: SmartFridge
components:
- type: VendingMachine
pack: SmartFridge
pack: SmartFridgeInventory
- type: Advertise
pack: SmartFridgeAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite
sprite: Constructible/Power/VendingMachines/smartfridge.rsi
layers:
@@ -477,7 +513,12 @@
name: Getmore Chocolate Corp
components:
- type: VendingMachine
pack: Getmore Chocolate Corp
pack: GetmoreChocolateCorpInventory
- type: Advertise
pack: GetmoreChocolateCorpAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite
sprite: Constructible/Power/VendingMachines/snack.rsi
layers:
@@ -503,7 +544,12 @@
name: BODA
components:
- type: VendingMachine
pack: BODA
pack: BodaInventory
- type: Advertise
pack: BodaAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite
sprite: Constructible/Power/VendingMachines/sovietsoda.rsi
layers:
@@ -529,7 +575,12 @@
name: AutoDrobe
components:
- type: VendingMachine
pack: AutoDrobe
pack: AutoDrobeInventory
- type: Advertise
pack: AutoDrobeAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite
sprite: Constructible/Power/VendingMachines/theater.rsi
layers:
@@ -559,7 +610,12 @@
name: Vendomat
components:
- type: VendingMachine
pack: Vendomat
pack: VendomatInventory
- type: Advertise
pack: VendomatAds
minWait: 480 # 8 minutes
maxWait: 600 # 10 minutes
- type: Speech
- type: Sprite
sprite: Constructible/Power/VendingMachines/vendomat.rsi
layers:
@@ -586,7 +642,7 @@
name: NanoMed
components:
- type: VendingMachine
pack: NanoMed
pack: NanoMedInventory
- type: Sprite
sprite: Constructible/Power/VendingMachines/wallmed.rsi
layers:
@@ -613,7 +669,7 @@
name: YouTool
components:
- type: VendingMachine
pack: YouTool
pack: YouToolInventory
- type: Sprite
sprite: Constructible/Power/VendingMachines/youtool.rsi
layers: