mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 03:57:48 +01:00
- Chemistry smoke now is laced with everything inside of the beaker/container. Using a new smoke icon, the smoke will exhibit a color combination of the reagents just like normal, so you can easily identify a cloud of pacid smoke from dexalin smoke. (space drugs smoke, anyone?)
- A new /datum/reagents proc called copy_to() works like trans_to() except that it "copies" reagents instead of transferring them. - Modified all breathing mobs to support inhaling chemical smoke reagents. If you are a-hatin', please leave all your hate in this revision page. This is a very significant game change, and to be honest I only briefly mentioned it over IRC a couple of times (however the idea was positively received). git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2033 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -79,6 +79,27 @@ datum
|
||||
src.handle_reactions()
|
||||
return amount
|
||||
|
||||
copy_to(var/obj/target, var/amount=1, var/multiplier=1, var/preserve_data=1)
|
||||
if(!target)
|
||||
return
|
||||
if(!target.reagents || src.total_volume<=0)
|
||||
return
|
||||
var/datum/reagents/R = target.reagents
|
||||
amount = min(min(amount, src.total_volume), R.maximum_volume-R.total_volume)
|
||||
var/part = amount / src.total_volume
|
||||
var/trans_data = null
|
||||
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)
|
||||
|
||||
src.update_total()
|
||||
R.update_total()
|
||||
R.handle_reactions()
|
||||
src.handle_reactions()
|
||||
return amount
|
||||
|
||||
trans_id_to(var/obj/target, var/reagent, var/amount=1, var/preserve_data=1)//Not sure why this proc didn't exist before. It does now! /N
|
||||
if (!target)
|
||||
return
|
||||
|
||||
@@ -342,6 +342,7 @@ datum
|
||||
holder.del_reagent("napalm")
|
||||
return
|
||||
|
||||
/*
|
||||
smoke
|
||||
name = "Smoke"
|
||||
id = "smoke"
|
||||
@@ -366,6 +367,26 @@ datum
|
||||
sleep(10)
|
||||
S.start()
|
||||
holder.clear_reagents()
|
||||
return */
|
||||
|
||||
chemsmoke
|
||||
name = "Chemsmoke"
|
||||
id = "chemsmoke"
|
||||
result = null
|
||||
required_reagents = list("potassium" = 1, "sugar" = 1, "phosphorus" = 1)
|
||||
result_amount = null
|
||||
secondary = 1
|
||||
on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
var/datum/effects/system/chem_smoke_spread/S = new /datum/effects/system/chem_smoke_spread
|
||||
S.attach(location)
|
||||
S.set_up(holder, 10, 0, location)
|
||||
playsound(location, 'smoke.ogg', 50, 1, -3)
|
||||
spawn(0)
|
||||
S.start()
|
||||
sleep(10)
|
||||
S.start()
|
||||
holder.clear_reagents()
|
||||
return
|
||||
|
||||
chloralhydrate
|
||||
|
||||
@@ -211,6 +211,16 @@
|
||||
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
// Handle chem smoke effects -- Doohl
|
||||
for(var/obj/effects/chem_smoke/smoke in view(2, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
|
||||
break // If they breathe in the nasty stuff once, no need to continue checking
|
||||
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
|
||||
@@ -192,6 +192,16 @@
|
||||
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
// Handle chem smoke effects -- Doohl
|
||||
for(var/obj/effects/chem_smoke/smoke in view(2, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
|
||||
break // If they breathe in the nasty stuff once, no need to continue checking
|
||||
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
|
||||
@@ -282,6 +282,15 @@
|
||||
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
// Handle chem smoke effects -- Doohl
|
||||
for(var/obj/effects/chem_smoke/smoke in view(2, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
|
||||
break // If they breathe in the nasty stuff once, no need to continue checking
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
@@ -407,6 +416,7 @@
|
||||
fire_alert = 0
|
||||
|
||||
|
||||
|
||||
//Temporary fixes to the alerts.
|
||||
|
||||
return 1
|
||||
|
||||
@@ -202,6 +202,16 @@
|
||||
var/breath_moles = environment.total_moles()*BREATH_PERCENTAGE
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
// Handle chem smoke effects -- Doohl
|
||||
for(var/obj/effects/chem_smoke/smoke in view(2, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
|
||||
break // If they breathe in the nasty stuff once, no need to continue checking
|
||||
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
|
||||
Reference in New Issue
Block a user