mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
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:
@@ -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]"
|
||||
|
||||
Reference in New Issue
Block a user