From 6731722bff8413bc77669aa55e064224c1b0be4d Mon Sep 17 00:00:00 2001 From: Giacomand Date: Fri, 27 Sep 2013 10:24:58 +0100 Subject: [PATCH] Made blob spores a bit more useful! On death they will release a spore cloud which will slightly (0.5 per tick) damage people and cloud your vision until the effect wears off. --- code/game/gamemodes/blob/blobs/factory.dm | 13 +++++++ code/game/objects/effects/effect_system.dm | 39 +++++++++++---------- code/modules/reagents/Chemistry-Reagents.dm | 15 ++++++++ 3 files changed, 48 insertions(+), 19 deletions(-) diff --git a/code/game/gamemodes/blob/blobs/factory.dm b/code/game/gamemodes/blob/blobs/factory.dm index 02c3fc2fb3d..b4061ec0543 100644 --- a/code/game/gamemodes/blob/blobs/factory.dm +++ b/code/game/gamemodes/blob/blobs/factory.dm @@ -71,6 +71,19 @@ ..() Die() + // On death, create a small smoke of harmful gas (s-Acid) + var/datum/effect/effect/system/chem_smoke_spread/S = new + var/turf/location = get_turf(src) + + // Create the reagents to put into the air, s-acid is yellow and stings a little + create_reagents(25) + reagents.add_reagent("spore", 25) + + // Attach the smoke spreader and setup/start it. + S.attach(location) + S.set_up(reagents, 1, 1, location, 15, 0) // only 1-2 smoke cloud + S.start() + del(src) Del() diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 7206919d1a0..0feac1d1966 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -483,7 +483,7 @@ steam.start() -- spawns the effect chemholder.reagents = R R.my_atom = chemholder - set_up(var/datum/reagents/carry = null, n = 5, c = 0, loca, direct) + set_up(var/datum/reagents/carry = null, n = 5, c = 0, loca, direct, admin_log = 1) if(n > 20) n = 20 number = n @@ -498,26 +498,27 @@ steam.start() -- spawns the effect if(direct) direction = direct - var/contained = "" - for(var/reagent in carry.reagent_list) - contained += " [reagent] " - if(contained) - contained = "\[[contained]\]" - var/area/A = get_area(location) + if(admin_log) + var/contained = "" + for(var/reagent in carry.reagent_list) + contained += " [reagent] " + if(contained) + contained = "\[[contained]\]" + var/area/A = get_area(location) - var/where = "[A.name] | [location.x], [location.y]" - var/whereLink = "[where]" + var/where = "[A.name] | [location.x], [location.y]" + var/whereLink = "[where]" - if(carry.my_atom.fingerprintslast) - var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast) - var/more = "" - if(M) - more = "(?)" - message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1) - log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].") - else - message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1) - log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.") + if(carry.my_atom.fingerprintslast) + var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast) + var/more = "" + if(M) + more = "(?)" + message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1) + log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].") + else + message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1) + log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.") start() var/i = 0 diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 90e14363791..9c1115308e5 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -1513,6 +1513,21 @@ datum ..() return + + toxin/spore + name = "Spore Toxin" + id = "spore" + description = "A toxic spore cloud which blocks vision when ingested." + reagent_state = LIQUID + color = "#9ACD32" + toxpwr = 0.5 + + on_mob_life(var/mob/living/M as mob) + ..() + M.damageoverlaytemp = 60 + M.eye_blurry = max(M.eye_blurry, 3) + return + toxin/chloralhydrate name = "Chloral Hydrate" id = "chloralhydrate"