mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
[COOL BUG READ FOR MORE INFO] Fix vaccines not working in chem masters by giving Fungal TB's vaccine (and others) a name + Add unit test for duplicate chem names + Rename fake beer + Ratio (#65241)
Reagents work based off their name. Vaccines and fungal TB's vaccine had the same name. Renames fake beer from "Beer" to "Beer...?", because it's been used 10 times this entire year and it's obvious it doesn't matter. Fixes some typos in some other chemical names, where typepaths were not correct.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
B.take_damage(damage, BURN, ENERGY)
|
||||
|
||||
/datum/reagent/blob/energized_jelly
|
||||
name = "Energized Jelly"
|
||||
name = "Energized Blob Jelly"
|
||||
taste_description = "gelatin"
|
||||
color = "#EFD65A"
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
|
||||
/// A single reagent
|
||||
/datum/reagent
|
||||
/// datums don't have names by default
|
||||
var/name = "Reagent"
|
||||
var/name = ""
|
||||
/// nor do they have descriptions
|
||||
var/description = ""
|
||||
///J/(K*mol)
|
||||
|
||||
@@ -431,7 +431,7 @@
|
||||
/datum/reagent/consumable/roy_rogers
|
||||
name = "Roy Rogers"
|
||||
description = "A sweet fizzy drink."
|
||||
color = "#53090B"
|
||||
color = "#53090B"
|
||||
quality = DRINK_GOOD
|
||||
taste_description = "fruity overlysweet cola"
|
||||
glass_icon_state = "royrogers"
|
||||
@@ -439,7 +439,7 @@
|
||||
glass_desc = "90% sugar in a glass."
|
||||
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
|
||||
|
||||
/datum/reagent/consumable/roy_roger/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
|
||||
/datum/reagent/consumable/roy_rogers/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
|
||||
M.Jitter(6 * REM * delta_time) //not as strong as coffe, still this is a lot of sugar
|
||||
M.adjust_drowsyness(-5 * REM * delta_time)
|
||||
M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
|
||||
@@ -805,7 +805,7 @@
|
||||
/datum/reagent/consumable/cinderella
|
||||
name = "Cinderella"
|
||||
description = "Most definitely a fruity alcohol cocktail to have while partying with your friends."
|
||||
color = "#FF6A50"
|
||||
color = "#FF6A50"
|
||||
quality = DRINK_VERYGOOD
|
||||
taste_description = "sweet tangy fruit"
|
||||
glass_icon_state = "cinderella"
|
||||
@@ -1171,7 +1171,7 @@
|
||||
/datum/reagent/consumable/agua_fresca
|
||||
name = "Agua Fresca"
|
||||
description = "A refreshing watermelon agua fresca. Perfect on a day at the holodeck."
|
||||
color = "#D25B66"
|
||||
color = "#D25B66"
|
||||
quality = DRINK_VERYGOOD
|
||||
taste_description = "cool refreshing watermelon"
|
||||
glass_icon_state = "aguafresca"
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
// where all the reagents related to medicine go.
|
||||
|
||||
/datum/reagent/medicine
|
||||
name = "Medicine"
|
||||
taste_description = "bitterness"
|
||||
failed_chem = /datum/reagent/impurity/healing/medicine_failure
|
||||
|
||||
|
||||
@@ -135,6 +135,7 @@
|
||||
src.data |= data.Copy()
|
||||
|
||||
/datum/reagent/vaccine/fungal_tb
|
||||
name = "Vaccine (Fungal Tuberculosis)"
|
||||
|
||||
/datum/reagent/vaccine/fungal_tb/New(data)
|
||||
. = ..()
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/fakebeer //disguised as normal beer for use by emagged brobots
|
||||
name = "Beer"
|
||||
name = "Beer...?"
|
||||
description = "A specially-engineered sedative disguised as beer. It induces instant sleep in its target."
|
||||
color = "#664300" // rgb: 102, 67, 0
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
@@ -790,11 +790,11 @@
|
||||
toxpwr = 0
|
||||
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
|
||||
|
||||
/datum/reagent/medicine/sodium_thiopental/on_mob_add(mob/living/L, amount)
|
||||
/datum/reagent/toxin/sodium_thiopental/on_mob_add(mob/living/L, amount)
|
||||
. = ..()
|
||||
ADD_TRAIT(L, TRAIT_ANTICONVULSANT, name)
|
||||
|
||||
/datum/reagent/medicine/sodium_thiopental/on_mob_delete(mob/living/L)
|
||||
/datum/reagent/toxin/sodium_thiopental/on_mob_delete(mob/living/L)
|
||||
. = ..()
|
||||
REMOVE_TRAIT(L, TRAIT_ANTICONVULSANT, name)
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
#include "reagent_id_typos.dm"
|
||||
#include "reagent_mod_expose.dm"
|
||||
#include "reagent_mod_procs.dm"
|
||||
#include "reagent_names.dm"
|
||||
#include "reagent_recipe_collisions.dm"
|
||||
#include "resist.dm"
|
||||
#include "say.dm"
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/// Test that all reagent names are different in order to prevent #65231
|
||||
/datum/unit_test/reagent_names
|
||||
|
||||
/datum/unit_test/reagent_names/Run()
|
||||
var/used_names = list()
|
||||
|
||||
for (var/datum/reagent/reagent as anything in subtypesof(/datum/reagent))
|
||||
var/name = initial(reagent.name)
|
||||
if (!name)
|
||||
continue
|
||||
|
||||
if (name in used_names)
|
||||
Fail("[used_names[name]] shares a name with [reagent] ([name])")
|
||||
else
|
||||
used_names[name] = reagent
|
||||
Reference in New Issue
Block a user