diff --git a/baystation12.dme b/baystation12.dme index cb8bdbd39b..087bc817fa 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1040,6 +1040,7 @@ #include "code\modules\events\spontaneous_appendicitis.dm" #include "code\modules\events\viral_infection.dm" #include "code\modules\events\viral_outbreak.dm" +#include "code\modules\events\wallrot.dm" #include "code\modules\flufftext\Dreaming.dm" #include "code\modules\flufftext\Hallucination.dm" #include "code\modules\flufftext\TextFilters.dm" diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 659948266e..9b2c323e3a 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1327,6 +1327,7 @@ proc/is_hot(obj/item/W as obj) //Is this even used for anything besides balloons? Yes I took out the W:lit stuff because : really shouldnt be used. /proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT? + if(W.sharp) return 1 return ( \ istype(W, /obj/item/weapon/screwdriver) || \ istype(W, /obj/item/weapon/pen) || \ diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 5d055f1a8c..f06eb81ba3 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -3,6 +3,7 @@ desc = "A huge chunk of metal used to seperate rooms." icon = 'icons/turf/walls.dmi' var/mineral = "metal" + var/rotting = 0 opacity = 1 density = 1 blocks_air = 1 @@ -59,9 +60,11 @@ P.roll_and_drop(src) else O.loc = src + ChangeTurf(/turf/simulated/floor/plating) /turf/simulated/wall/ex_act(severity) + if(rotting) severity = 1.0 switch(severity) if(1.0) //SN src = null @@ -84,7 +87,7 @@ return /turf/simulated/wall/blob_act() - if(prob(50)) + if(prob(50) || rotting) dismantle_wall() /turf/simulated/wall/attack_paw(mob/user as mob) @@ -103,11 +106,11 @@ /turf/simulated/wall/attack_animal(mob/living/simple_animal/M as mob) if(M.wall_smash) - if (istype(src, /turf/simulated/wall/r_wall)) + if (istype(src, /turf/simulated/wall/r_wall) && !rotting) M << text("\blue This wall is far too strong for you to destroy.") return else - if (prob(40)) + if (prob(40) || rotting) M << text("\blue You smash through the wall.") dismantle_wall(1) return @@ -120,7 +123,7 @@ /turf/simulated/wall/attack_hand(mob/user as mob) if (HULK in user.mutations) - if (prob(40)) + if (prob(40) || rotting) usr << text("\blue You smash through the wall.") usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) dismantle_wall(1) @@ -129,6 +132,11 @@ usr << text("\blue You punch the wall.") return + if(rotting) + user << "\blue The wall crumbles under your touch." + dismantle_wall() + return + user << "\blue You push the wall but nothing happens!" playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1) src.add_fingerprint(user) @@ -143,6 +151,21 @@ //get the user's location if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such + if(rotting) + if(istype(W, /obj/item/weapon/weldingtool) ) + var/obj/item/weapon/weldingtool/WT = W + if( WT.remove_fuel(0,user) ) + user << "You burn away the fungi with \the [WT]." + playsound(src.loc, 'sound/items/Welder.ogg', 10, 1) + for(var/obj/effect/E in src) if(E.name == "Wallrot") + del E + rotting = 0 + return + else if(!is_sharp(W) && W.force >= 10 || W.force >= 20) + user << "\The [src] crumbles away under the force of your [W.name]." + src.dismantle_wall(1) + return + //THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects if( thermite ) if( istype(W, /obj/item/weapon/weldingtool) ) @@ -284,6 +307,24 @@ return attack_hand(user) return +// Wall-rot effect, a nasty fungus that destroys walls. +/turf/simulated/wall/proc/rot() + if(!rotting) + rotting = 1 + + var/number_rots = rand(2,3) + for(var/i=0, iYou burn away the fungi with \the [WT]." + playsound(src.loc, 'sound/items/Welder.ogg', 10, 1) + for(var/obj/effect/E in src) if(E.name == "Wallrot") + del E + rotting = 0 + return + else if(!is_sharp(W) && W.force >= 10 || W.force >= 20) + user << "\The [src] crumbles away under the force of your [W.name]." + src.dismantle_wall() + return //THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects if( thermite ) diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm index 6af66ced1b..fa0a6c6efc 100644 --- a/code/modules/events/event_dynamic.dm +++ b/code/modules/events/event_dynamic.dm @@ -61,6 +61,7 @@ possibleEvents[/datum/event/ionstorm] = 25 + active_with_role["AI"] * 25 + active_with_role["Cyborg"] * 25 + active_with_role["Engineer"] * 10 + active_with_role["Scientist"] * 5 possibleEvents[/datum/event/grid_check] = 25 + 10 * active_with_role["Engineer"] possibleEvents[/datum/event/electrical_storm] = 75 + 25 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"] + possibleEvents[/datum/event/wallrot] = 50 * active_with_role["Engineer"] + 100 * active_with_role["Botanist"] if(!spacevines_spawned) possibleEvents[/datum/event/spacevine] = 5 + 10 * active_with_role["Engineer"] @@ -180,6 +181,7 @@ active_with_role["AI"] = 0 active_with_role["Cyborg"] = 0 active_with_role["Janitor"] = 0 + active_with_role["Botanist"] = 0 for(var/mob/M in player_list) if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive @@ -212,4 +214,7 @@ if(M.mind.assigned_role == "Janitor") active_with_role["Janitor"]++ + if(M.mind.assigned_role == "Botanist") + active_with_role["Botanist"]++ + return active_with_role diff --git a/code/modules/events/wallrot.dm b/code/modules/events/wallrot.dm new file mode 100644 index 0000000000..02e33c52d7 --- /dev/null +++ b/code/modules/events/wallrot.dm @@ -0,0 +1,37 @@ +/turf/simulated/wall + + +datum/event/wallrot + var/severity = 1 + +datum/event/wallrot/setup() + announceWhen = rand(0, 3000) + endWhen = announceWhen + 1 + severity = rand(5, 10) + +datum/event/wallrot/announce() + command_alert("Harmful fungi detected on station. Station structures may be contaminated.", "Biohazard Alert") + +datum/event/wallrot/start() + spawn() + var/turf/center = null + + // 100 attempts + for(var/i=0, i<100, i++) + var/turf/candidate = locate(rand(1, world.maxx), rand(1, world.maxy), 1) + if(istype(candidate, /turf/simulated/wall)) + center = candidate + + if(center) + // Make sure at least one piece of wall rots! + center:rot() + + // Have a chance to rot lots of other walls. + var/rotcount = 0 + for(var/turf/simulated/wall/W in range(5, center)) if(prob(50)) + W:rot() + rotcount++ + + // Only rot up to severity walls + if(rotcount >= severity) + break \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 0036ca2333..e839cf34a8 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -1214,6 +1214,17 @@ datum ..() return + // Clear off wallrot fungi + reaction_turf(var/turf/T, var/volume) + if(istype(T, /turf/simulated/wall)) + var/turf/simulated/wall/W = T + if(W.rotting) + W.rotting = 0 + for(var/obj/effect/E in W) if(E.name == "Wallrot") del E + + for(var/mob/O in viewers(W, null)) + O.show_message(text("\blue The fungi are completely dissolved by the solution!"), 1) + reaction_obj(var/obj/O, var/volume) if(istype(O,/obj/effect/alien/weeds/)) var/obj/effect/alien/weeds/alien_weeds = O diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index da78e252a3..5073564553 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -49,12 +49,20 @@ D.icon += mix_color_from_reagents(D.reagents.reagent_list) + var/A_turf = get_turf(A) + spawn(0) for(var/i=0, i<3, i++) step_towards(D,A) D.reagents.reaction(get_turf(D)) for(var/atom/T in get_turf(D)) D.reagents.reaction(T) + + // When spraying against the wall, also react with the wall, but + // not its contents. + if(get_dist(D, A_turf) == 1 && A_turf.density) + D.reagents.reaction(A_turf) + sleep(2) sleep(3) del(D) diff --git a/html/changelog.html b/html/changelog.html index b18d546282..5b6aa9e5a1 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -58,7 +58,16 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit though. Thanks. -->
-

April 24, 2013

+
+

May 18th, 2013

+

CIB updated:

+
    +
  • A new event type: Wallrot. Use welder or plantbgone on infected walls.
  • +
  • Newscasters now can deliver preset news stories over the course of a round. See http://baystation12.net/forums/viewtopic.php?f=14&t=7619 to add your own!
  • +
+
+
+

April 24, 2013

Jediluke69 updated:

  • Added 5 new drinks (Kira Special, Lemonade, Brown Star, Milkshakes, Rewriter)