mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +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 = ""
|
||||
|
||||
@@ -61,6 +61,8 @@ should be listed in the changelog upon commit though. Thanks. -->
|
||||
<h3 class="author">AterIgnis updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="tweak">Chemistry explosions try to damage their holder first - potassium-water mixes and nitroglycerol tend to gib human if injected instead of creating crater around them</li>
|
||||
<li class="tweak">Reagents mix and react inside humans, but they don't bubble in that case (try not to give patient water and potassium at the same time)</li>
|
||||
<li class="tweak">Ethanol-based drinks (alcohol) is treated like ethanol now and can be used in reactions. Ethanol->water reaction now properly makes drunk people sober by removing alcohol, not just temporarily sobering them.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user