mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
Virology - NanoUI, gameplay tweaks, bugfixes
Conflicts: .gitignore code/game/machinery/kitchen/smartfridge.dm code/game/machinery/machinery.dm code/modules/food/recipes_microwave.dm code/modules/reagents/Chemistry-Holder.dm code/modules/reagents/Chemistry-Reagents.dm code/modules/virus2/isolator.dm nano/js/nano_base_helpers.js
This commit is contained in:
committed by
ZomgPonies
parent
f93c7d320a
commit
f43ef06431
@@ -110,7 +110,7 @@ datum
|
||||
continue
|
||||
var/current_reagent_transfer = current_reagent.volume * part
|
||||
if(preserve_data)
|
||||
trans_data = current_reagent.data
|
||||
trans_data = copy_data(current_reagent)
|
||||
|
||||
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data)
|
||||
src.remove_reagent(current_reagent.id, current_reagent_transfer)
|
||||
@@ -181,8 +181,8 @@ datum
|
||||
for (var/datum/reagent/current_reagent in src.reagent_list)
|
||||
var/current_reagent_transfer = current_reagent.volume * part
|
||||
if(preserve_data)
|
||||
trans_data = current_reagent.data
|
||||
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data)
|
||||
trans_data = copy_data(current_reagent)
|
||||
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, safety = 1) //safety check so all chemicals are transferred before reacting
|
||||
|
||||
src.update_total()
|
||||
R.update_total()
|
||||
@@ -204,7 +204,7 @@ datum
|
||||
for (var/datum/reagent/current_reagent in src.reagent_list)
|
||||
if(current_reagent.id == reagent)
|
||||
if(preserve_data)
|
||||
trans_data = current_reagent.data
|
||||
trans_data = copy_data(current_reagent)
|
||||
R.add_reagent(current_reagent.id, amount, trans_data)
|
||||
src.remove_reagent(current_reagent.id, amount, 1)
|
||||
break
|
||||
@@ -604,6 +604,24 @@ datum
|
||||
if(my_atom)
|
||||
my_atom.reagents = null
|
||||
|
||||
copy_data(var/datum/reagent/current_reagent)
|
||||
if (!current_reagent || !current_reagent.data) return null
|
||||
if (!istype(current_reagent.data, /list)) return current_reagent.data
|
||||
|
||||
var/list/trans_data = current_reagent.data.Copy()
|
||||
|
||||
// We do this so that introducing a virus to a blood sample
|
||||
// doesn't automagically infect all other blood samples from
|
||||
// the same donor.
|
||||
//
|
||||
// Technically we should probably copy all data lists, but
|
||||
// that could possibly eat up a lot of memory needlessly
|
||||
// if most data lists are read-only.
|
||||
if (trans_data["virus2"])
|
||||
var/list/v = trans_data["virus2"]
|
||||
trans_data["virus2"] = v.Copy()
|
||||
|
||||
return trans_data
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -2236,7 +2236,6 @@ datum
|
||||
return
|
||||
|
||||
|
||||
|
||||
/////////////////////////Food Reagents////////////////////////////
|
||||
// Part of the food code. Nutriment is used instead of the old "heal_amt" code. Also is where all the food
|
||||
// condiments, additives, and such go.
|
||||
@@ -3869,4 +3868,7 @@ datum
|
||||
M.adjustBrainLoss(10*REM)
|
||||
return
|
||||
|
||||
|
||||
*/
|
||||
// Undefine the alias for REAGENTS_EFFECT_MULTIPLER
|
||||
#undef REM
|
||||
|
||||
Reference in New Issue
Block a user