Fix reagent data (#16010)

* Fix reagent data

* walter augh sound effect (bass boosted)
This commit is contained in:
Wildkins
2023-03-12 07:01:50 -04:00
committed by GitHub
parent 040d2bdc68
commit b663e93c0e
3 changed files with 10 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ calculate text size per text.
var/singleton/reagent/R = GET_SINGLETON(_R)
if(!R.taste_mult)
continue
if(_R == /singleton/reagent/nutriment)
if(istype(R, /singleton/reagent/nutriment) && (_R in reagent_data))
var/list/taste_data = REAGENT_DATA(src, _R)
for(var/taste in taste_data)
if(taste in tastes)

View File

@@ -253,7 +253,8 @@
var/singleton/reagent/current = GET_SINGLETON(_current)
var/amount_to_transfer = reagent_volumes[_current] * part
var/energy_to_transfer = current.get_thermal_energy(src) * part
target.add_reagent(_current, amount_to_transfer * multiplier, REAGENT_DATA(src, _current), TRUE, new_thermal_energy = energy_to_transfer * multiplier) // We don't react until everything is in place
var/list/data_to_transfer = REAGENT_DATA(src, _current)
target.add_reagent(_current, amount_to_transfer * multiplier, data_to_transfer?.Copy(), TRUE, new_thermal_energy = energy_to_transfer * multiplier) // We don't react until everything is in place
if(!copy)
remove_reagent(_current, amount_to_transfer, TRUE)

View File

@@ -0,0 +1,7 @@
author: JohnWildkins
delete-after: True
changes:
- bugfix: "Fixed reagent data not being copied correctly, leading to chips transferring their dip to the entire chip basket."
- bugfix: "Fixed taste descriptions for nutriment subtypes not showing properly when set in reagent data."