mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-18 06:01:56 +00:00
Added wallrot event.
Also some updates to changelog.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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) || \
|
||||
|
||||
@@ -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 << "<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
|
||||
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, 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)
|
||||
if(mineral == "diamond")
|
||||
return
|
||||
@@ -307,10 +348,18 @@
|
||||
return
|
||||
|
||||
/turf/simulated/wall/meteorhit(obj/M as obj)
|
||||
if (prob(15))
|
||||
if (prob(15) && !rotting)
|
||||
dismantle_wall()
|
||||
else if(prob(70))
|
||||
else if(prob(70) && !rotting)
|
||||
ChangeTurf(/turf/simulated/floor/plating)
|
||||
else
|
||||
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)
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/turf/simulated/wall/r_wall/attack_hand(mob/user as mob)
|
||||
if (HULK in user.mutations)
|
||||
if (prob(10))
|
||||
if (prob(10) || rotting)
|
||||
usr << text("\blue You smash through the wall.")
|
||||
usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
dismantle_wall(1)
|
||||
@@ -20,6 +20,10 @@
|
||||
usr << text("\blue You punch the wall.")
|
||||
return
|
||||
|
||||
if(rotting)
|
||||
user << "\blue This wall feels rather unstable."
|
||||
return
|
||||
|
||||
user << "\blue You push the wall but nothing happens!"
|
||||
playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1)
|
||||
src.add_fingerprint(user)
|
||||
@@ -35,6 +39,20 @@
|
||||
//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 << "<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
|
||||
if( thermite )
|
||||
|
||||
@@ -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
|
||||
|
||||
37
code/modules/events/wallrot.dm
Normal file
37
code/modules/events/wallrot.dm
Normal 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
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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. -->
|
||||
|
||||
<!-- 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>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="rscadd">Added 5 new drinks (Kira Special, Lemonade, Brown Star, Milkshakes, Rewriter)</li>
|
||||
|
||||
Reference in New Issue
Block a user