Fixes bad taste description logic for fruit wine (#63421)

OpenDream sussed out a bug with switch cases and wixoa confirmed that it's actually a BYOND compiler bug:
BYOND isn't handling it properly at all (it should throw a "expected constant expression" error), but converting the var to a const fixes it. Since, y'know, switch cases need to be consts.
This commit is contained in:
ike709
2021-12-17 05:44:38 -06:00
committed by GitHub
parent d005d76f0b
commit faa672ea12
@@ -2152,7 +2152,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
generate_data_info(data)
/datum/reagent/consumable/ethanol/fruit_wine/proc/generate_data_info(list/data)
var/minimum_percent = 0.15 //Percentages measured between 0 and 1.
// BYOND's compiler fails to catch non-consts in a ranged switch case, and it causes incorrect behavior. So this needs to explicitly be a constant.
var/const/minimum_percent = 0.15 //Percentages measured between 0 and 1.
var/list/primary_tastes = list()
var/list/secondary_tastes = list()
glass_name = "glass of [name]"