mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
Fixes experimentor doing many reactions with one event (#18180)
* Fix many reactions happening at once * Small fix
This commit is contained in:
@@ -232,16 +232,16 @@
|
||||
if(prob(EFFECT_PROB_LOW) && criticalReaction)
|
||||
visible_message("[exp_on] is gripped in just the right way, enhancing its focus.")
|
||||
badThingCoeff++
|
||||
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
|
||||
visible_message("<span class='danger'>[src] malfunctions and destroys [exp_on], lashing its arms out at nearby people!</span>")
|
||||
for(var/mob/living/m in oview(1, src))
|
||||
m.apply_damage(15,"brute",pick("head","chest","groin"))
|
||||
investigate_log("Experimentor dealt minor brute to [m].", "experimentor")
|
||||
ejectItem(TRUE)
|
||||
if(prob(EFFECT_PROB_LOW-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_LOW-badThingCoeff))
|
||||
visible_message("<span class='warning'>[src] malfunctions!</span>")
|
||||
exp = SCANTYPE_OBLITERATE
|
||||
if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
|
||||
visible_message("<span class='danger'>[src] malfunctions, throwing the [exp_on]!</span>")
|
||||
var/mob/living/target = locate(/mob/living) in oview(7,src)
|
||||
if(target)
|
||||
@@ -259,18 +259,18 @@
|
||||
cloneCount = badThingCoeff
|
||||
investigate_log("Experimentor has made a clone of [exp_on]", "experimentor")
|
||||
ejectItem()
|
||||
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
|
||||
visible_message("<span class='danger'>[src] malfunctions, melting [exp_on] and leaking radiation!</span>")
|
||||
radiation_pulse(get_turf(src), 1, 1, 25, 1)
|
||||
ejectItem(TRUE)
|
||||
if(prob(EFFECT_PROB_LOW-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_LOW-badThingCoeff))
|
||||
visible_message("<span class='warning'>[src] malfunctions, spewing toxic waste!</span>")
|
||||
for(var/turf/T in oview(1, src))
|
||||
if(!T.density)
|
||||
if(prob(EFFECT_PROB_VERYHIGH))
|
||||
var/obj/effect/decal/cleanable/reagentdecal = new/obj/effect/decal/cleanable/greenglow(T)
|
||||
reagentdecal.reagents.add_reagent("radium", 7)
|
||||
if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
|
||||
var/savedName = "[exp_on]"
|
||||
ejectItem(TRUE)
|
||||
var/newPath = pickWeighted(valid_items)
|
||||
@@ -287,7 +287,7 @@
|
||||
if(prob(EFFECT_PROB_LOW) && criticalReaction)
|
||||
visible_message("[exp_on] achieves the perfect mix!")
|
||||
new /obj/item/stack/sheet/mineral/plasma(get_turf(pick(oview(1,src))))
|
||||
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
|
||||
visible_message("<span class='danger'>[src] destroys [exp_on], leaking dangerous gas!</span>")
|
||||
chosenchem = pick("carbon","radium","toxin","condensedcapsaicin","mushroomhallucinogen","space_drugs","ethanol","beepskysmash")
|
||||
var/datum/reagents/R = new/datum/reagents(50)
|
||||
@@ -300,7 +300,7 @@
|
||||
smoke.start()
|
||||
qdel(R)
|
||||
ejectItem(TRUE)
|
||||
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
|
||||
visible_message("<span class='danger'>[src]'s chemical chamber has sprung a leak!</span>")
|
||||
chosenchem = pick("mutationtoxin","nanomachines","sacid")
|
||||
var/datum/reagents/R = new/datum/reagents(50)
|
||||
@@ -314,10 +314,10 @@
|
||||
ejectItem(TRUE)
|
||||
warn_admins(usr, "[chosenchem] smoke")
|
||||
investigate_log("Experimentor has released <font color='red'>[chosenchem]</font> smoke!", "experimentor")
|
||||
if(prob(EFFECT_PROB_LOW-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_LOW-badThingCoeff))
|
||||
visible_message("[src] malfunctions, spewing harmless gas.")
|
||||
throwSmoke(src.loc)
|
||||
if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
|
||||
visible_message("<span class='warning'>[src] melts [exp_on], ionizing the air around it!</span>")
|
||||
empulse(src.loc, 4, 6)
|
||||
investigate_log("Experimentor has generated an Electromagnetic Pulse.", "experimentor")
|
||||
@@ -335,7 +335,7 @@
|
||||
C.name = "Cup of Suspicious Liquid"
|
||||
C.desc = "It has a large hazard symbol printed on the side in fading ink."
|
||||
investigate_log("Experimentor has made a cup of [chosenchem] coffee.", "experimentor")
|
||||
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
|
||||
var/turf/start = get_turf(src)
|
||||
var/mob/M = locate(/mob/living) in view(src, 3)
|
||||
var/turf/MT = get_turf(M)
|
||||
@@ -348,12 +348,12 @@
|
||||
FB.yo = MT.y - start.y
|
||||
FB.xo = MT.x - start.x
|
||||
FB.fire()
|
||||
if(prob(EFFECT_PROB_LOW-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_LOW-badThingCoeff))
|
||||
visible_message("<span class='danger'>[src] malfunctions, melting [exp_on] and releasing a burst of flame!</span>")
|
||||
explosion(src.loc, -1, 0, 0, 0, 0, flame_range = 2)
|
||||
investigate_log("Experimentor started a fire.", "experimentor")
|
||||
ejectItem(TRUE)
|
||||
if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
|
||||
visible_message("<span class='warning'>[src] malfunctions, melting [exp_on] and leaking hot air!</span>")
|
||||
var/datum/gas_mixture/env = src.loc.return_air()
|
||||
var/transfer_moles = 0.25 * env.total_moles()
|
||||
@@ -367,7 +367,7 @@
|
||||
air_update_turf()
|
||||
investigate_log("Experimentor has released hot air.", "experimentor")
|
||||
ejectItem(TRUE)
|
||||
if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
|
||||
visible_message("<span class='warning'>[src] malfunctions, activating its emergency coolant systems!</span>")
|
||||
throwSmoke(src.loc)
|
||||
for(var/mob/living/m in oview(1, src))
|
||||
@@ -387,7 +387,7 @@
|
||||
C.name = "Cup of Suspicious Liquid"
|
||||
C.desc = "It has a large hazard symbol printed on the side in fading ink."
|
||||
investigate_log("Experimentor has made a cup of [chosenchem] coffee.", "experimentor")
|
||||
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
|
||||
visible_message("<span class='danger'>[src] malfunctions, shattering [exp_on] and releasing a dangerous cloud of coolant!</span>")
|
||||
var/datum/reagents/R = new/datum/reagents(50)
|
||||
R.my_atom = src
|
||||
@@ -399,7 +399,7 @@
|
||||
smoke.start()
|
||||
qdel(R)
|
||||
ejectItem(TRUE)
|
||||
if(prob(EFFECT_PROB_LOW-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_LOW-badThingCoeff))
|
||||
visible_message("<span class='warning'>[src] malfunctions, shattering [exp_on] and leaking cold air!</span>")
|
||||
var/datum/gas_mixture/env = src.loc.return_air()
|
||||
var/transfer_moles = 0.25 * env.total_moles()
|
||||
@@ -413,7 +413,7 @@
|
||||
air_update_turf()
|
||||
investigate_log("Experimentor has released cold air.", "experimentor")
|
||||
ejectItem(TRUE)
|
||||
if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
|
||||
visible_message("<span class='warning'>[src] malfunctions, releasing a flurry of chilly air as [exp_on] pops out!</span>")
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(0, src.loc)
|
||||
@@ -422,21 +422,20 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
if(exp == SCANTYPE_OBLITERATE)
|
||||
visible_message("<span class='warning'>[exp_on] activates the crushing mechanism, [exp_on] is destroyed!</span>")
|
||||
if(prob(EFFECT_PROB_LOW) && criticalReaction)
|
||||
visible_message("<span class='warning'>[src]'s crushing mechanism slowly and smoothly descends, flattening the [exp_on]!</span>")
|
||||
new /obj/item/stack/sheet/plasteel(get_turf(pick(oview(1,src))))
|
||||
if(linked_console.linked_lathe)
|
||||
for(var/material in exp_on.materials)
|
||||
linked_console.linked_lathe.materials.insert_amount( min((linked_console.linked_lathe.materials.max_amount - linked_console.linked_lathe.materials.total_amount), (exp_on.materials[material])), material)
|
||||
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
|
||||
if(prob(EFFECT_PROB_LOW) && criticalReaction)
|
||||
visible_message("<span class='warning'>[src]'s crushing mechanism slowly and smoothly descends, flattening the [exp_on]!</span>")
|
||||
new /obj/item/stack/sheet/plasteel(get_turf(pick(oview(1,src))))
|
||||
else if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
|
||||
visible_message("<span class='danger'>[src]'s crusher goes way too many levels too high, crushing right through space-time!</span>")
|
||||
playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 1, -3)
|
||||
investigate_log("Experimentor has triggered the 'throw things' reaction.", "experimentor")
|
||||
for(var/atom/movable/AM in oview(7,src))
|
||||
if(!AM.anchored)
|
||||
AM.throw_at_fast(src,10,1)
|
||||
|
||||
if(prob(EFFECT_PROB_LOW-badThingCoeff))
|
||||
else if(prob(EFFECT_PROB_LOW-badThingCoeff))
|
||||
visible_message("<span class='danger'>[src]'s crusher goes one level too high, crushing right into space-time!</span>")
|
||||
playsound(src.loc, 'sound/effects/supermatter.ogg', 50, 1, -3)
|
||||
investigate_log("Experimentor has triggered the 'minor throw things' reaction.", "experimentor")
|
||||
@@ -463,7 +462,7 @@
|
||||
ejectItem()
|
||||
|
||||
//Global reactions
|
||||
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
|
||||
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff) && loaded_item)
|
||||
var/globalMalf = rand(1,100)
|
||||
if(globalMalf < 15)
|
||||
visible_message("<span class='warning'>[src]'s onboard detection system has malfunctioned!</span>")
|
||||
|
||||
Reference in New Issue
Block a user