mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 17:43:35 +01:00
Smoke changes
- Changes smoke so that it immediately affects all mobs in its area of effect, smoke clouds are purely visual. - Any mobs in the area of effect of a smoke reaction will be affected by the smoke's touch reaction, and have all reagents in the smoke container transferred into them. - Smoke clouds are no longer opaque. - Mixing 10u potassium, 10u sugar, and 10u phosphorus or higher will cause an area of effect with a radius of 3 from the point of reaction. Any less will have a radius of 2. - Same with heating 10u smoke powder. - Smoke powder reaction now only yields 1 powder instead of 3. - Vent clog event has a radius 3 area of effect. Fixes and uncommenting - Uncomments honey turf reaction. - Uncomments synthflesh turf reaction. - Adds list for reagents to not copy via smoke (or more specifically, delete when a smoke reaction happens without copying). This includes sugar, phosphorus, potassium, and the smoke "reagent" produced in a smoke reaction.
This commit is contained in:
@@ -32,5 +32,5 @@
|
||||
var/datum/effect/effect/system/chem_smoke_spread/smoke = new
|
||||
smoke.set_up(R, rand(1, 2), 0, vent, 0, silent = 1)
|
||||
playsound(vent.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
smoke.start()
|
||||
smoke.start(3)
|
||||
R.delete() //GC the reagents
|
||||
|
||||
@@ -54,15 +54,6 @@
|
||||
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
// Handle chem smoke effect -- Doohl
|
||||
for(var/obj/effect/effect/chem_smoke/smoke in view(1, 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/))
|
||||
|
||||
@@ -369,28 +369,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
if(prob(5))
|
||||
rupture_lung()
|
||||
|
||||
// Handle chem smoke effect -- Doohl
|
||||
var/block = 0
|
||||
if(wear_mask)
|
||||
if(wear_mask.flags & BLOCK_GAS_SMOKE_EFFECT)
|
||||
block = 1
|
||||
if(glasses)
|
||||
if(glasses.flags & BLOCK_GAS_SMOKE_EFFECT)
|
||||
block = 1
|
||||
if(head)
|
||||
if(head.flags & BLOCK_GAS_SMOKE_EFFECT)
|
||||
block = 1
|
||||
|
||||
if(!block)
|
||||
|
||||
for(var/obj/effect/effect/chem_smoke/smoke in view(1, 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
|
||||
|
||||
@@ -250,21 +250,6 @@
|
||||
var/breath_moles = environment.total_moles()*BREATH_PERCENTAGE
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
// Handle chem smoke effect -- Doohl
|
||||
var/block = 0
|
||||
if(wear_mask)
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/gas))
|
||||
block = 1
|
||||
|
||||
if(!block)
|
||||
|
||||
for(var/obj/effect/effect/chem_smoke/smoke in view(1, 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
|
||||
|
||||
@@ -119,12 +119,12 @@ datum/reagent/honey/on_mob_life(var/mob/living/M as mob)
|
||||
M.reagents.add_reagent("sugar", 0.8)
|
||||
..()
|
||||
return
|
||||
/* //Commenting this out until smoke is rewritten, otherwise, this spam so much honeycomb it's not funny
|
||||
|
||||
datum/reagent/honey/reaction_turf(var/turf/T, var/volume)
|
||||
src = null
|
||||
if(volume >= 5)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/honeycomb(T)
|
||||
return */
|
||||
return
|
||||
|
||||
/datum/reagent/mugwort
|
||||
name = "Mugwort"
|
||||
|
||||
@@ -94,13 +94,12 @@ datum/reagent/synthflesh/reaction_mob(var/mob/living/M, var/method=TOUCH, var/vo
|
||||
..()
|
||||
return
|
||||
|
||||
/* //again, not until smoke rewrite--so many gibs,aghh!
|
||||
datum/reagent/synthflesh/reaction_turf(var/turf/T, var/volume) //let's make a mess!
|
||||
src = null
|
||||
if(volume >= 5)
|
||||
new /obj/effect/decal/cleanable/blood/gibs(T)
|
||||
playsound(T, 'sound/effects/splat.ogg', 50, 1, -3)
|
||||
return */
|
||||
return
|
||||
|
||||
datum/reagent/charcoal
|
||||
name = "Charcoal"
|
||||
|
||||
@@ -260,50 +260,40 @@
|
||||
name = "smoke_powder"
|
||||
id = "smoke_powder"
|
||||
result = "smoke_powder"
|
||||
required_reagents = list("stabilizing_agent" = 1, "potassium" = 1, "sugar" = 1, "phosphorus" = 1)
|
||||
result_amount = 1
|
||||
|
||||
/datum/chemical_reaction/smoke
|
||||
name = "smoke"
|
||||
id = "smoke"
|
||||
result = null
|
||||
required_reagents = list("potassium" = 1, "sugar" = 1, "phosphorus" = 1)
|
||||
result_amount = 3
|
||||
result_amount = 1
|
||||
|
||||
/datum/chemical_reaction/smoke/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/forbidden_reagents = list(id, "sugar", "phosphorus", "potassium") //Do not transfer this stuff through smoke.
|
||||
for(var/f_reagent in forbidden_reagents)
|
||||
if(holder.has_reagent(f_reagent))
|
||||
holder.remove_reagent(f_reagent, holder.get_reagent_amount(f_reagent))
|
||||
var/location = get_turf(holder.my_atom)
|
||||
var/datum/effect/effect/system/chem_smoke_spread/S = new /datum/effect/effect/system/chem_smoke_spread
|
||||
S.attach(location)
|
||||
playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
spawn(0)
|
||||
if(S)
|
||||
S.set_up(holder, 10, 0, location)
|
||||
S.start(created_volume >= 10 ? 3 : 2)
|
||||
if(holder && holder.my_atom)
|
||||
holder.clear_reagents()
|
||||
return
|
||||
|
||||
/datum/chemical_reaction/smoke_powder_smoke
|
||||
/datum/chemical_reaction/smoke/smoke_powder
|
||||
name = "smoke_powder_smoke"
|
||||
id = "smoke_powder_smoke"
|
||||
result = null
|
||||
required_reagents = list("smoke_powder" = 1)
|
||||
required_temp = 374
|
||||
secondary = 1
|
||||
|
||||
/datum/chemical_reaction/smoke_powder_smoke/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
var/datum/effect/effect/system/chem_smoke_spread/S = new /datum/effect/effect/system/chem_smoke_spread
|
||||
S.attach(location)
|
||||
playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
spawn(0)
|
||||
if(S)
|
||||
S.set_up(holder, 10, 0, location)
|
||||
S.start()
|
||||
sleep(10)
|
||||
S.start()
|
||||
if(holder && holder.my_atom)
|
||||
holder.clear_reagents()
|
||||
return
|
||||
|
||||
/datum/chemical_reaction/smoke_powder/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
if(holder.has_reagent("stabilizing_agent"))
|
||||
return
|
||||
holder.remove_reagent("smoke_powder", created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
var/datum/effect/effect/system/chem_smoke_spread/S = new /datum/effect/effect/system/chem_smoke_spread
|
||||
S.attach(location)
|
||||
playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
spawn(0)
|
||||
if(S)
|
||||
S.set_up(holder, 10, 0, location)
|
||||
S.start()
|
||||
sleep(10)
|
||||
S.start()
|
||||
if(holder && holder.my_atom)
|
||||
holder.clear_reagents()
|
||||
return
|
||||
result_amount = 1
|
||||
|
||||
/datum/reagent/sonic_powder
|
||||
name = "Sonic Powder"
|
||||
|
||||
Reference in New Issue
Block a user