Files
Bubberstation/code/modules/vending/cola.dm
T
MrMelbert 8c1e35e1c0 Refactors mind language holders into non-existent, fixes new languages being deleted on species swap + tests (#76612)
## About The Pull Request

This PR refactors mind language holders into non-existence

As a result, `update_atom_languages` is no longer necessary

Mind-bound languages are transferred via `/mind/proc/transfer_to`

Species changing no longer deletes and re-creates the mob's language
holder, allowing them to keep any languages they have.

Species languages are sourced from `LANGUAGE_SPECIES` now, meaning they
are removed when they change species. If the mob is not a human with a
species datum, these are effectively just atom level languages.

Makes a bunch of unit tests to ensure language transfer over certain
events works as intended

## Why It's Good For The Game

Mobs with minds having two independent language holders results in a
good few bugs, and simply doesn't make sense when we have sources
(`LANGUAGE_MIND`).

Instead of tracking two language holders, we can simply use sources
better and only track one.

This means that the language holder you start with is your language
holder, period. It doesn't get deleted or re-instantiated or whatever.

## Changelog

🆑 Melbert
refactor: Refactored language holders, making species changes not delete
all of your known languages
/🆑
2023-07-10 18:34:57 +00:00

117 lines
4.5 KiB
Plaintext

/obj/machinery/vending/cola
name = "\improper Robust Softdrinks"
desc = "A softdrink vendor provided by Robust Industries, LLC."
icon_state = "Cola_Machine"
panel_type = "panel2"
product_slogans = "Robust Softdrinks: More robust than a toolbox to the head!"
product_ads = "Refreshing!;Hope you're thirsty!;Over 1 million drinks sold!;Thirsty? Why not cola?;Please, have a drink!;Drink up!;The best drinks in space."
products = list(
/obj/item/reagent_containers/cup/soda_cans/cola = 10,
/obj/item/reagent_containers/cup/soda_cans/space_mountain_wind = 10,
/obj/item/reagent_containers/cup/soda_cans/dr_gibb = 10,
/obj/item/reagent_containers/cup/soda_cans/starkist = 10,
/obj/item/reagent_containers/cup/soda_cans/space_up = 10,
/obj/item/reagent_containers/cup/soda_cans/pwr_game = 10,
/obj/item/reagent_containers/cup/soda_cans/lemon_lime = 10,
/obj/item/reagent_containers/cup/soda_cans/sol_dry = 10,
/obj/item/reagent_containers/cup/glass/waterbottle = 10,
/obj/item/reagent_containers/cup/glass/bottle/mushi_kombucha = 3,
)
contraband = list(
/obj/item/reagent_containers/cup/soda_cans/thirteenloko = 6,
/obj/item/reagent_containers/cup/soda_cans/shamblers = 6,
)
premium = list(
/obj/item/reagent_containers/cup/glass/drinkingglass/filled/nuka_cola = 1,
/obj/item/reagent_containers/cup/soda_cans/air = 1,
/obj/item/reagent_containers/cup/soda_cans/monkey_energy = 1,
/obj/item/reagent_containers/cup/soda_cans/grey_bull = 1,
/obj/item/reagent_containers/cup/glass/bottle/rootbeer = 1,
)
refill_canister = /obj/item/vending_refill/cola
default_price = PAYCHECK_CREW * 0.7
extra_price = PAYCHECK_CREW
payment_department = ACCOUNT_SRV
/obj/item/vending_refill/cola
machine_name = "Robust Softdrinks"
icon_state = "refill_cola"
/obj/machinery/vending/cola/blue
icon_state = "Cola_Machine"
light_mask = "cola-light-mask"
light_color = COLOR_MODERATE_BLUE
/obj/machinery/vending/cola/black
icon_state = "cola_black"
light_mask = "cola-light-mask"
/obj/machinery/vending/cola/red
icon_state = "red_cola"
name = "\improper Space Cola Vendor"
desc = "It vends cola, in space."
product_slogans = "Cola in space!"
light_mask = "red_cola-light-mask"
light_color = COLOR_DARK_RED
/obj/machinery/vending/cola/space_up
icon_state = "space_up"
name = "\improper Space-up! Vendor"
desc = "Indulge in an explosion of flavor."
product_slogans = "Space-up! Like a hull breach in your mouth."
light_mask = "space_up-light-mask"
light_color = COLOR_DARK_MODERATE_LIME_GREEN
/obj/machinery/vending/cola/starkist
icon_state = "starkist"
name = "\improper Star-kist Vendor"
desc = "The taste of a star in liquid form."
product_slogans = "Drink the stars! Star-kist!"
panel_type = "panel7"
light_mask = "starkist-light-mask"
light_color = COLOR_LIGHT_ORANGE
/obj/machinery/vending/cola/sodie
icon_state = "soda"
panel_type = "panel7"
light_mask = "soda-light-mask"
light_color = COLOR_WHITE
/obj/machinery/vending/cola/pwr_game
icon_state = "pwr_game"
name = "\improper Pwr Game Vendor"
desc = "You want it, we got it. Brought to you in partnership with Vlad's Salads."
product_slogans = "The POWER that gamers crave! PWR GAME!"
light_mask = "pwr_game-light-mask"
light_color = COLOR_STRONG_VIOLET
/obj/machinery/vending/cola/shamblers
name = "\improper Shambler's Vendor"
desc = "~Shake me up some of that Shambler's Juice!~"
icon_state = "shamblers_juice"
products = list(
/obj/item/reagent_containers/cup/soda_cans/cola = 10,
/obj/item/reagent_containers/cup/soda_cans/space_mountain_wind = 10,
/obj/item/reagent_containers/cup/soda_cans/dr_gibb = 10,
/obj/item/reagent_containers/cup/soda_cans/starkist = 10,
/obj/item/reagent_containers/cup/soda_cans/space_up = 10,
/obj/item/reagent_containers/cup/soda_cans/pwr_game = 10,
/obj/item/reagent_containers/cup/soda_cans/lemon_lime = 10,
/obj/item/reagent_containers/cup/soda_cans/sol_dry = 10,
/obj/item/reagent_containers/cup/soda_cans/shamblers = 10,
)
product_slogans = "~Shake me up some of that Shambler's Juice!~"
product_ads = "Refreshing!;Thirsty for DNA? Satiate your craving!;Over 1 trillion souls drank!;Made with real DNA!;The hivemind demands your thirst!;Drink up!;Absorb your thirst."
light_mask = "shamblers-light-mask"
light_color = COLOR_MOSTLY_PURE_PINK
/obj/machinery/vending/cola/shamblers/Initialize(mapload)
. = ..()
set_active_language(get_random_spoken_language())
/obj/machinery/vending/cola/shamblers/speak(message)
. = ..()
set_active_language(get_random_spoken_language())