Update pyrotechnics.dm

This commit is contained in:
kevinz000
2020-01-19 13:31:11 -07:00
committed by GitHub
parent cf9c3a65fd
commit 0b0a6429ea

View File

@@ -5,7 +5,7 @@
var/modifier = 0
var/noexplosion = FALSE
/datum/chemical_reaction/reagent_explosion/on_reaction(datum/reagents/holder, created_volume, turf/override)
/datum/chemical_reaction/reagent_explosion/on_reaction(datum/reagents/holder, multiplier, turf/override)
if(!noexplosion)
var/turf/T = override || get_turf(holder.my_atom)
var/inside_msg
@@ -20,7 +20,7 @@
message_admins("Reagent explosion reaction occurred at [ADMIN_VERBOSEJMP(T)][inside_msg]. Last Fingerprint: [touch_msg].")
log_game("Reagent explosion reaction occurred at [AREACOORD(T)]. Last Fingerprint: [lastkey ? lastkey : "N/A"]." )
var/datum/effect_system/reagents_explosion/e = new()
e.set_up(modifier + round(created_volume/strengthdiv, 1), T, 0, 0)
e.set_up(modifier + round(multiplier/strengthdiv, 1), T, 0, 0)
e.start()
holder.clear_reagents()
@@ -32,10 +32,10 @@
required_reagents = list(/datum/reagent/glycerol = 1, /datum/reagent/toxin/acid/fluacid = 1, /datum/reagent/toxin/acid = 1)
strengthdiv = 2
/datum/chemical_reaction/reagent_explosion/nitroglycerin/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/reagent_explosion/nitroglycerin/on_reaction(datum/reagents/holder, multiplier)
if(holder.has_reagent(/datum/reagent/stabilizing_agent))
return
holder.remove_reagent(/datum/reagent/nitroglycerin, created_volume*2)
holder.remove_reagent(/datum/reagent/nitroglycerin, multiplier*2)
..()
/datum/chemical_reaction/reagent_explosion/nitroglycerin_explosion
@@ -57,10 +57,10 @@
id = "holyboom"
required_reagents = list(/datum/reagent/water/holywater = 1, /datum/reagent/potassium = 1)
/datum/chemical_reaction/reagent_explosion/potassium_explosion/holyboom/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/reagent_explosion/potassium_explosion/holyboom/on_reaction(datum/reagents/holder, multiplier)
var/turf/T = get_turf(holder.my_atom)
if(created_volume >= 150)
playsound(get_turf(holder.my_atom), 'sound/effects/pray.ogg', 80, 0, round(created_volume/48))
if(multiplier >= 150)
playsound(get_turf(holder.my_atom), 'sound/effects/pray.ogg', 80, 0, round(multiplier/48))
strengthdiv = 8
for(var/mob/living/simple_animal/revenant/R in get_hearers_in_view(7,get_turf(holder.my_atom)))
var/deity
@@ -73,13 +73,13 @@
R.reveal(100)
R.adjustHealth(50)
sleep(20)
for(var/mob/living/carbon/C in get_hearers_in_view(round(created_volume/48,1),get_turf(holder.my_atom)))
for(var/mob/living/carbon/C in get_hearers_in_view(round(multiplier/48,1),get_turf(holder.my_atom)))
if(iscultist(C))
to_chat(C, "<span class='userdanger'>The divine explosion sears you!</span>")
C.Knockdown(40)
C.adjust_fire_stacks(5)
C.IgniteMob()
..(holder, created_volume, T)
..(holder, multiplier, T)
/datum/chemical_reaction/blackpowder
@@ -97,9 +97,9 @@
modifier = 1
mix_message = "<span class='boldannounce'>Sparks start flying around the black powder!</span>"
/datum/chemical_reaction/reagent_explosion/blackpowder_explosion/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/reagent_explosion/blackpowder_explosion/on_reaction(datum/reagents/holder, multiplier)
var/turf/T = get_turf(holder.my_atom)
..(holder, created_volume, T)
..(holder, multiplier, T)
/datum/chemical_reaction/thermite
name = "Thermite"
@@ -112,11 +112,11 @@
id = "emp_pulse"
required_reagents = list(/datum/reagent/uranium = 1, /datum/reagent/iron = 1) // Yes, laugh, it's the best recipe I could think of that makes a little bit of sense
/datum/chemical_reaction/emp_pulse/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/emp_pulse/on_reaction(datum/reagents/holder, multiplier)
var/location = get_turf(holder.my_atom)
// 100 created volume = 4 heavy range & 7 light range. A few tiles smaller than traitor EMP grandes.
// 200 created volume = 8 heavy range & 14 light range. 4 tiles larger than traitor EMP grenades.
empulse(location, round(created_volume / 12), round(created_volume / 7), 1)
// 100 multiplier = 4 heavy range & 7 light range. A few tiles smaller than traitor EMP grandes.
// 200 multiplier = 8 heavy range & 14 light range. 4 tiles larger than traitor EMP grenades.
empulse(location, round(multiplier / 12), round(multiplier / 7), 1)
holder.clear_reagents()
@@ -125,9 +125,9 @@
id = "beesplosion"
required_reagents = list(/datum/reagent/consumable/honey = 1, /datum/reagent/medicine/strange_reagent = 1, /datum/reagent/radium = 1)
/datum/chemical_reaction/beesplosion/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/beesplosion/on_reaction(datum/reagents/holder, multiplier)
var/location = holder.my_atom.drop_location()
if(created_volume < 5)
if(multiplier < 5)
playsound(location,'sound/effects/sparks1.ogg', 100, TRUE)
else
playsound(location,'sound/creatures/bee.ogg', 100, TRUE)
@@ -137,7 +137,7 @@
if(required_reagents[R.type])
continue
beeagents += R
var/bee_amount = round(created_volume * 0.2)
var/bee_amount = round(multiplier * 0.2)
for(var/i in 1 to bee_amount)
var/mob/living/simple_animal/hostile/poison/bees/short/new_bee = new(location)
if(LAZYLEN(beeagents))
@@ -157,7 +157,7 @@
required_reagents = list(/datum/reagent/chlorine = 1, /datum/reagent/fluorine = 3)
required_temp = 424
/datum/chemical_reaction/clf3/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/clf3/on_reaction(datum/reagents/holder, multiplier)
var/turf/T = get_turf(holder.my_atom)
for(var/turf/turf in range(1,T))
new /obj/effect/hotspot(turf)
@@ -172,7 +172,7 @@
modifier = 1
mob_react = FALSE
/datum/chemical_reaction/reagent_explosion/methsplosion/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/reagent_explosion/methsplosion/on_reaction(datum/reagents/holder, multiplier)
var/turf/T = get_turf(holder.my_atom)
for(var/turf/turf in range(1,T))
new /obj/effect/hotspot(turf)
@@ -190,12 +190,12 @@
results = list(/datum/reagent/sorium = 4)
required_reagents = list(/datum/reagent/mercury = 1, /datum/reagent/oxygen = 1, /datum/reagent/nitrogen = 1, /datum/reagent/carbon = 1)
/datum/chemical_reaction/sorium/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/sorium/on_reaction(datum/reagents/holder, multiplier)
if(holder.has_reagent(/datum/reagent/stabilizing_agent))
return
holder.remove_reagent(/datum/reagent/sorium, created_volume*4)
holder.remove_reagent(/datum/reagent/sorium, multiplier*4)
var/turf/T = get_turf(holder.my_atom)
var/range = CLAMP(sqrt(created_volume*4), 1, 6)
var/range = CLAMP(sqrt(multiplier*4), 1, 6)
goonchem_vortex(T, 1, range)
/datum/chemical_reaction/sorium_vortex
@@ -204,9 +204,9 @@
required_reagents = list(/datum/reagent/sorium = 1)
required_temp = 474
/datum/chemical_reaction/sorium_vortex/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/sorium_vortex/on_reaction(datum/reagents/holder, multiplier)
var/turf/T = get_turf(holder.my_atom)
var/range = CLAMP(sqrt(created_volume), 1, 6)
var/range = CLAMP(sqrt(multiplier), 1, 6)
goonchem_vortex(T, 1, range)
/datum/chemical_reaction/liquid_dark_matter
@@ -215,12 +215,12 @@
results = list(/datum/reagent/liquid_dark_matter = 3)
required_reagents = list(/datum/reagent/stable_plasma = 1, /datum/reagent/radium = 1, /datum/reagent/carbon = 1)
/datum/chemical_reaction/liquid_dark_matter/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/liquid_dark_matter/on_reaction(datum/reagents/holder, multiplier)
if(holder.has_reagent(/datum/reagent/stabilizing_agent))
return
holder.remove_reagent(/datum/reagent/liquid_dark_matter, created_volume*3)
holder.remove_reagent(/datum/reagent/liquid_dark_matter, multiplier*3)
var/turf/T = get_turf(holder.my_atom)
var/range = CLAMP(sqrt(created_volume*3), 1, 6)
var/range = CLAMP(sqrt(multiplier*3), 1, 6)
goonchem_vortex(T, 0, range)
/datum/chemical_reaction/ldm_vortex
@@ -229,9 +229,9 @@
required_reagents = list(/datum/reagent/liquid_dark_matter = 1)
required_temp = 474
/datum/chemical_reaction/ldm_vortex/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/ldm_vortex/on_reaction(datum/reagents/holder, multiplier)
var/turf/T = get_turf(holder.my_atom)
var/range = CLAMP(sqrt(created_volume/2), 1, 6)
var/range = CLAMP(sqrt(multiplier/2), 1, 6)
goonchem_vortex(T, 0, range)
/datum/chemical_reaction/flash_powder
@@ -240,12 +240,12 @@
results = list(/datum/reagent/flash_powder = 3)
required_reagents = list(/datum/reagent/aluminium = 1, /datum/reagent/potassium = 1, /datum/reagent/sulfur = 1 )
/datum/chemical_reaction/flash_powder/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/flash_powder/on_reaction(datum/reagents/holder, multiplier)
if(holder.has_reagent(/datum/reagent/stabilizing_agent))
return
var/location = get_turf(holder.my_atom)
do_sparks(2, TRUE, location)
var/range = created_volume/3
var/range = multiplier/3
if(isatom(holder.my_atom))
var/atom/A = holder.my_atom
A.flash_lighting_fx(_range = (range + 2), _reset_lighting = FALSE)
@@ -255,7 +255,7 @@
C.Knockdown(60)
else
C.Stun(100)
holder.remove_reagent(/datum/reagent/flash_powder, created_volume*3)
holder.remove_reagent(/datum/reagent/flash_powder, multiplier*3)
/datum/chemical_reaction/flash_powder_flash
name = "Flash powder activation"
@@ -263,10 +263,10 @@
required_reagents = list(/datum/reagent/flash_powder = 1)
required_temp = 374
/datum/chemical_reaction/flash_powder_flash/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/flash_powder_flash/on_reaction(datum/reagents/holder, multiplier)
var/location = get_turf(holder.my_atom)
do_sparks(2, TRUE, location)
var/range = created_volume/10
var/range = multiplier/10
if(isatom(holder.my_atom))
var/atom/A = holder.my_atom
A.flash_lighting_fx(_range = (range + 2), _reset_lighting = FALSE)
@@ -283,11 +283,11 @@
results = list(/datum/reagent/smoke_powder = 3)
required_reagents = list(/datum/reagent/potassium = 1, /datum/reagent/consumable/sugar = 1, /datum/reagent/phosphorus = 1)
/datum/chemical_reaction/smoke_powder/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/smoke_powder/on_reaction(datum/reagents/holder, multiplier)
if(holder.has_reagent(/datum/reagent/stabilizing_agent))
return
holder.remove_reagent(/datum/reagent/smoke_powder, created_volume*3)
var/smoke_radius = round(sqrt(created_volume * 1.5), 1)
holder.remove_reagent(/datum/reagent/smoke_powder, multiplier*3)
var/smoke_radius = round(sqrt(multiplier * 1.5), 1)
var/location = get_turf(holder.my_atom)
var/datum/effect_system/smoke_spread/chem/S = new
S.attach(location)
@@ -305,9 +305,9 @@
required_temp = 374
mob_react = FALSE
/datum/chemical_reaction/smoke_powder_smoke/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/smoke_powder_smoke/on_reaction(datum/reagents/holder, multiplier)
var/location = get_turf(holder.my_atom)
var/smoke_radius = round(sqrt(created_volume / 2), 1)
var/smoke_radius = round(sqrt(multiplier / 2), 1)
var/datum/effect_system/smoke_spread/chem/S = new
S.attach(location)
playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3)
@@ -323,13 +323,13 @@
results = list(/datum/reagent/sonic_powder = 3)
required_reagents = list(/datum/reagent/oxygen = 1, /datum/reagent/consumable/space_cola = 1, /datum/reagent/phosphorus = 1)
/datum/chemical_reaction/sonic_powder/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/sonic_powder/on_reaction(datum/reagents/holder, multiplier)
if(holder.has_reagent(/datum/reagent/stabilizing_agent))
return
holder.remove_reagent(/datum/reagent/sonic_powder, created_volume*3)
holder.remove_reagent(/datum/reagent/sonic_powder, multiplier*3)
var/location = get_turf(holder.my_atom)
playsound(location, 'sound/effects/bang.ogg', 25, 1)
for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/3, location))
for(var/mob/living/carbon/C in get_hearers_in_view(multiplier/3, location))
C.soundbang_act(1, 100, rand(0, 5))
/datum/chemical_reaction/sonic_powder_deafen
@@ -338,10 +338,10 @@
required_reagents = list(/datum/reagent/sonic_powder = 1)
required_temp = 374
/datum/chemical_reaction/sonic_powder_deafen/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/sonic_powder_deafen/on_reaction(datum/reagents/holder, multiplier)
var/location = get_turf(holder.my_atom)
playsound(location, 'sound/effects/bang.ogg', 25, 1)
for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/10, location))
for(var/mob/living/carbon/C in get_hearers_in_view(multiplier/10, location))
C.soundbang_act(1, 100, rand(0, 5))
/datum/chemical_reaction/phlogiston
@@ -350,12 +350,12 @@
results = list(/datum/reagent/phlogiston = 3)
required_reagents = list(/datum/reagent/phosphorus = 1, /datum/reagent/toxin/acid = 1, /datum/reagent/stable_plasma = 1)
/datum/chemical_reaction/phlogiston/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/phlogiston/on_reaction(datum/reagents/holder, multiplier)
if(holder.has_reagent(/datum/reagent/stabilizing_agent))
return
var/turf/open/T = get_turf(holder.my_atom)
if(istype(T))
T.atmos_spawn_air("plasma=[created_volume];TEMP=1000")
T.atmos_spawn_air("plasma=[multiplier];TEMP=1000")
holder.clear_reagents()
return
@@ -371,7 +371,7 @@
results = list(/datum/reagent/cryostylane = 3)
required_reagents = list(/datum/reagent/water = 1, /datum/reagent/stable_plasma = 1, /datum/reagent/nitrogen = 1)
/datum/chemical_reaction/cryostylane/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/cryostylane/on_reaction(datum/reagents/holder, multiplier)
holder.chem_temp = 20 // cools the fuck down
return
@@ -382,8 +382,8 @@
required_reagents = list(/datum/reagent/cryostylane = 1, /datum/reagent/oxygen = 1)
mob_react = FALSE
/datum/chemical_reaction/cryostylane_oxygen/on_reaction(datum/reagents/holder, created_volume)
holder.chem_temp = max(holder.chem_temp - 10*created_volume,0)
/datum/chemical_reaction/cryostylane_oxygen/on_reaction(datum/reagents/holder, multiplier)
holder.chem_temp = max(holder.chem_temp - 10*multiplier,0)
/datum/chemical_reaction/pyrosium_oxygen
name = "ephemeral pyrosium reaction"
@@ -392,8 +392,8 @@
required_reagents = list(/datum/reagent/pyrosium = 1, /datum/reagent/oxygen = 1)
mob_react = FALSE
/datum/chemical_reaction/pyrosium_oxygen/on_reaction(datum/reagents/holder, created_volume)
holder.chem_temp += 10*created_volume
/datum/chemical_reaction/pyrosium_oxygen/on_reaction(datum/reagents/holder, multiplier)
holder.chem_temp += 10*multiplier
/datum/chemical_reaction/pyrosium
name = "pyrosium"
@@ -401,7 +401,7 @@
results = list(/datum/reagent/pyrosium = 3)
required_reagents = list(/datum/reagent/stable_plasma = 1, /datum/reagent/radium = 1, /datum/reagent/phosphorus = 1)
/datum/chemical_reaction/pyrosium/on_reaction(datum/reagents/holder, created_volume)
/datum/chemical_reaction/pyrosium/on_reaction(datum/reagents/holder, multiplier)
holder.chem_temp = 20 // also cools the fuck down
return
@@ -431,20 +431,20 @@
mix_sound = 'sound/machines/defib_zap.ogg'
var/tesla_flags = TESLA_MOB_DAMAGE | TESLA_OBJ_DAMAGE | TESLA_MOB_STUN
/datum/chemical_reaction/reagent_explosion/teslium_lightning/on_reaction(datum/reagents/holder, created_volume)
var/T1 = created_volume * 20 //100 units : Zap 3 times, with powers 2000/5000/12000. Tesla revolvers have a power of 10000 for comparison.
var/T2 = created_volume * 50
var/T3 = created_volume * 120
/datum/chemical_reaction/reagent_explosion/teslium_lightning/on_reaction(datum/reagents/holder, multiplier)
var/T1 = multiplier * 20 //100 units : Zap 3 times, with powers 2000/5000/12000. Tesla revolvers have a power of 10000 for comparison.
var/T2 = multiplier * 50
var/T3 = multiplier * 120
sleep(5)
if(created_volume >= 75)
if(multiplier >= 75)
tesla_zap(holder.my_atom, 7, T1, tesla_flags)
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
sleep(15)
if(created_volume >= 40)
if(multiplier >= 40)
tesla_zap(holder.my_atom, 7, T2, tesla_flags)
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
sleep(15)
if(created_volume >= 10) //10 units minimum for lightning, 40 units for secondary blast, 75 units for tertiary blast.
if(multiplier >= 10) //10 units minimum for lightning, 40 units for secondary blast, 75 units for tertiary blast.
tesla_zap(holder.my_atom, 7, T3, tesla_flags)
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
..()
@@ -490,7 +490,7 @@
else
return FALSE
/datum/chemical_reaction/reagent_explosion/lingblood/on_reaction(datum/reagents/holder, created_volume, specialreact)
/datum/chemical_reaction/reagent_explosion/lingblood/on_reaction(datum/reagents/holder, multiplier, specialreact)
if(specialreact >= 10)
return ..()
else