mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Chemistry on child reagents and in mobs
Ethanol childs (most drinks in general) are treated as ethanol in reactions Reactions are going inside mobs, but not make bubbling effect
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
density = 1
|
||||
layer = 4.0
|
||||
animate_movement = 2
|
||||
flags = NOREACT
|
||||
// flags = NOREACT
|
||||
var/datum/mind/mind
|
||||
|
||||
var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak
|
||||
|
||||
@@ -251,8 +251,9 @@ datum
|
||||
multiplier = max(multiplier, 1) //this shouldnt happen ...
|
||||
add_reagent(C.result, C.result_amount*multiplier)
|
||||
|
||||
for(var/mob/M in viewers(4, get_turf(my_atom)) )
|
||||
M << "\blue \icon[my_atom] The solution begins to bubble."
|
||||
if(!isliving(my_atom))
|
||||
for(var/mob/M in viewers(4, get_turf(my_atom)) )
|
||||
M << "\blue \icon[my_atom] The solution begins to bubble."
|
||||
|
||||
if(istype(my_atom, /obj/item/metroid_core))
|
||||
var/obj/item/metroid_core/ME = my_atom
|
||||
@@ -396,13 +397,17 @@ datum
|
||||
|
||||
for(var/A in reagent_list)
|
||||
var/datum/reagent/R = A
|
||||
if (R.id == reagent)
|
||||
R.volume -= amount
|
||||
update_total()
|
||||
if(!safety)//So it does not handle reactions when it need not to
|
||||
handle_reactions()
|
||||
my_atom.on_reagent_change()
|
||||
return 0
|
||||
var/datum/compare = chemical_reagents_list[reagent]
|
||||
if(istype(R,compare))
|
||||
var/amt = max(0,min(R.volume,amount))
|
||||
R.volume -= amt
|
||||
amount -= amt
|
||||
if(amount<=0)
|
||||
update_total()
|
||||
if(!safety)//So it does not handle reactions when it need not to
|
||||
handle_reactions()
|
||||
my_atom.on_reagent_change()
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
@@ -410,7 +415,8 @@ datum
|
||||
|
||||
for(var/A in reagent_list)
|
||||
var/datum/reagent/R = A
|
||||
if (R.id == reagent)
|
||||
var/datum/compare = chemical_reagents_list[reagent]
|
||||
if(istype(R,compare))
|
||||
if(!amount) return R
|
||||
else
|
||||
if(R.volume >= amount) return R
|
||||
@@ -419,12 +425,14 @@ datum
|
||||
return 0
|
||||
|
||||
get_reagent_amount(var/reagent)
|
||||
var/amnt = 0
|
||||
for(var/A in reagent_list)
|
||||
var/datum/reagent/R = A
|
||||
if (R.id == reagent)
|
||||
return R.volume
|
||||
var/datum/compare = chemical_reagents_list[reagent]
|
||||
if(istype(R,compare))
|
||||
amnt += R.volume
|
||||
|
||||
return 0
|
||||
return amnt
|
||||
|
||||
get_reagents()
|
||||
var/res = ""
|
||||
|
||||
Reference in New Issue
Block a user