Added wallrot event.

Also some updates to changelog.
This commit is contained in:
cib
2013-05-18 21:55:02 +02:00
parent 38cdb4d4f5
commit d7cc42e588
9 changed files with 148 additions and 9 deletions

View File

@@ -1040,6 +1040,7 @@
#include "code\modules\events\spontaneous_appendicitis.dm" #include "code\modules\events\spontaneous_appendicitis.dm"
#include "code\modules\events\viral_infection.dm" #include "code\modules\events\viral_infection.dm"
#include "code\modules\events\viral_outbreak.dm" #include "code\modules\events\viral_outbreak.dm"
#include "code\modules\events\wallrot.dm"
#include "code\modules\flufftext\Dreaming.dm" #include "code\modules\flufftext\Dreaming.dm"
#include "code\modules\flufftext\Hallucination.dm" #include "code\modules\flufftext\Hallucination.dm"
#include "code\modules\flufftext\TextFilters.dm" #include "code\modules\flufftext\TextFilters.dm"

View File

@@ -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. //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? /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 ( \ return ( \
istype(W, /obj/item/weapon/screwdriver) || \ istype(W, /obj/item/weapon/screwdriver) || \
istype(W, /obj/item/weapon/pen) || \ istype(W, /obj/item/weapon/pen) || \

View File

@@ -3,6 +3,7 @@
desc = "A huge chunk of metal used to seperate rooms." desc = "A huge chunk of metal used to seperate rooms."
icon = 'icons/turf/walls.dmi' icon = 'icons/turf/walls.dmi'
var/mineral = "metal" var/mineral = "metal"
var/rotting = 0
opacity = 1 opacity = 1
density = 1 density = 1
blocks_air = 1 blocks_air = 1
@@ -59,9 +60,11 @@
P.roll_and_drop(src) P.roll_and_drop(src)
else else
O.loc = src O.loc = src
ChangeTurf(/turf/simulated/floor/plating) ChangeTurf(/turf/simulated/floor/plating)
/turf/simulated/wall/ex_act(severity) /turf/simulated/wall/ex_act(severity)
if(rotting) severity = 1.0
switch(severity) switch(severity)
if(1.0) if(1.0)
//SN src = null //SN src = null
@@ -84,7 +87,7 @@
return return
/turf/simulated/wall/blob_act() /turf/simulated/wall/blob_act()
if(prob(50)) if(prob(50) || rotting)
dismantle_wall() dismantle_wall()
/turf/simulated/wall/attack_paw(mob/user as mob) /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) /turf/simulated/wall/attack_animal(mob/living/simple_animal/M as mob)
if(M.wall_smash) 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.") M << text("\blue This wall is far too strong for you to destroy.")
return return
else else
if (prob(40)) if (prob(40) || rotting)
M << text("\blue You smash through the wall.") M << text("\blue You smash through the wall.")
dismantle_wall(1) dismantle_wall(1)
return return
@@ -120,7 +123,7 @@
/turf/simulated/wall/attack_hand(mob/user as mob) /turf/simulated/wall/attack_hand(mob/user as mob)
if (HULK in user.mutations) if (HULK in user.mutations)
if (prob(40)) if (prob(40) || rotting)
usr << text("\blue You smash through the wall.") usr << text("\blue You smash through the wall.")
usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
dismantle_wall(1) dismantle_wall(1)
@@ -129,6 +132,11 @@
usr << text("\blue You punch the wall.") usr << text("\blue You punch the wall.")
return return
if(rotting)
user << "\blue The wall crumbles under your touch."
dismantle_wall()
return
user << "\blue You push the wall but nothing happens!" user << "\blue You push the wall but nothing happens!"
playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1) playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1)
src.add_fingerprint(user) src.add_fingerprint(user)
@@ -143,6 +151,21 @@
//get the user's location //get the user's location
if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such 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 << "<span class='notice'>You burn away the fungi with \the [WT].</span>"
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 << "<span class='notice'>\The [src] crumbles away under the force of your [W.name].</span>"
src.dismantle_wall(1)
return
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects //THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
if( thermite ) if( thermite )
if( istype(W, /obj/item/weapon/weldingtool) ) if( istype(W, /obj/item/weapon/weldingtool) )
@@ -284,6 +307,24 @@
return attack_hand(user) return attack_hand(user)
return 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, i<number_rots, i++)
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Wallrot"
O.desc = "Ick..."
O.icon = 'icons/effects/wallrot.dmi'
O.pixel_x += rand(-10, 10)
O.pixel_y += rand(-10, 10)
O.anchored = 1
O.density = 1
O.layer = 5
O.mouse_opacity = 0
/turf/simulated/wall/proc/thermitemelt(mob/user as mob) /turf/simulated/wall/proc/thermitemelt(mob/user as mob)
if(mineral == "diamond") if(mineral == "diamond")
return return
@@ -307,10 +348,18 @@
return return
/turf/simulated/wall/meteorhit(obj/M as obj) /turf/simulated/wall/meteorhit(obj/M as obj)
if (prob(15)) if (prob(15) && !rotting)
dismantle_wall() dismantle_wall()
else if(prob(70)) else if(prob(70) && !rotting)
ChangeTurf(/turf/simulated/floor/plating) ChangeTurf(/turf/simulated/floor/plating)
else else
ReplaceWithLattice() ReplaceWithLattice()
return 0 return 0
/turf/simulated/wall/Del()
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
..()
/turf/simulated/wall/ChangeTurf(var/newtype)
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
..(newtype)

View File

@@ -11,7 +11,7 @@
/turf/simulated/wall/r_wall/attack_hand(mob/user as mob) /turf/simulated/wall/r_wall/attack_hand(mob/user as mob)
if (HULK in user.mutations) if (HULK in user.mutations)
if (prob(10)) if (prob(10) || rotting)
usr << text("\blue You smash through the wall.") usr << text("\blue You smash through the wall.")
usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
dismantle_wall(1) dismantle_wall(1)
@@ -20,6 +20,10 @@
usr << text("\blue You punch the wall.") usr << text("\blue You punch the wall.")
return return
if(rotting)
user << "\blue This wall feels rather unstable."
return
user << "\blue You push the wall but nothing happens!" user << "\blue You push the wall but nothing happens!"
playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1) playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1)
src.add_fingerprint(user) src.add_fingerprint(user)
@@ -35,6 +39,20 @@
//get the user's location //get the user's location
if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such 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 << "<span class='notice'>You burn away the fungi with \the [WT].</span>"
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 << "<span class='notice'>\The [src] crumbles away under the force of your [W.name].</span>"
src.dismantle_wall()
return
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects //THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
if( thermite ) if( thermite )

View File

@@ -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/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/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/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) if(!spacevines_spawned)
possibleEvents[/datum/event/spacevine] = 5 + 10 * active_with_role["Engineer"] possibleEvents[/datum/event/spacevine] = 5 + 10 * active_with_role["Engineer"]
@@ -180,6 +181,7 @@
active_with_role["AI"] = 0 active_with_role["AI"] = 0
active_with_role["Cyborg"] = 0 active_with_role["Cyborg"] = 0
active_with_role["Janitor"] = 0 active_with_role["Janitor"] = 0
active_with_role["Botanist"] = 0
for(var/mob/M in player_list) 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 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") if(M.mind.assigned_role == "Janitor")
active_with_role["Janitor"]++ active_with_role["Janitor"]++
if(M.mind.assigned_role == "Botanist")
active_with_role["Botanist"]++
return active_with_role return active_with_role

View File

@@ -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

View File

@@ -1214,6 +1214,17 @@ datum
..() ..()
return 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) reaction_obj(var/obj/O, var/volume)
if(istype(O,/obj/effect/alien/weeds/)) if(istype(O,/obj/effect/alien/weeds/))
var/obj/effect/alien/weeds/alien_weeds = O var/obj/effect/alien/weeds/alien_weeds = O

View File

@@ -49,12 +49,20 @@
D.icon += mix_color_from_reagents(D.reagents.reagent_list) D.icon += mix_color_from_reagents(D.reagents.reagent_list)
var/A_turf = get_turf(A)
spawn(0) spawn(0)
for(var/i=0, i<3, i++) for(var/i=0, i<3, i++)
step_towards(D,A) step_towards(D,A)
D.reagents.reaction(get_turf(D)) D.reagents.reaction(get_turf(D))
for(var/atom/T in get_turf(D)) for(var/atom/T in get_turf(D))
D.reagents.reaction(T) 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) sleep(3)
del(D) del(D)

View File

@@ -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. --> should be listed in the changelog upon commit though. Thanks. -->
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here --><div class="commit sansserif"> <!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here --><div class="commit sansserif">
<h2 class="date">April 24, 2013</h2> <div>
<h2 class="date">May 18th, 2013</h2>
<h3 class="author">CIB updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">A new event type: Wallrot. Use welder or plantbgone on infected walls.</li>
<li class="tweak">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!</li>
</ul>
</div>
<div>
<h2 class="date">April 24, 2013</h2>
<h3 class="author">Jediluke69 updated:</h3> <h3 class="author">Jediluke69 updated:</h3>
<ul class="changes bgimages16"> <ul class="changes bgimages16">
<li class="rscadd">Added 5 new drinks (Kira Special, Lemonade, Brown Star, Milkshakes, Rewriter)</li> <li class="rscadd">Added 5 new drinks (Kira Special, Lemonade, Brown Star, Milkshakes, Rewriter)</li>