Merge pull request #52 from SuperSayu/master

Dirty Stations
This commit is contained in:
Cael Aislinn
2013-03-22 10:10:09 -07:00
4 changed files with 155 additions and 3 deletions
+8 -3
View File
@@ -74,17 +74,17 @@ datum/controller/game_controller/proc/setup()
ticker.pregame()
datum/controller/game_controller/proc/setup_objects()
world << "\red \b Initializing objects"
world << "\red \b Initializing objects..."
sleep(-1)
for(var/atom/movable/object in world)
object.initialize()
world << "\red \b Initializing pipe networks"
world << "\red \b Initializing pipe networks..."
sleep(-1)
for(var/obj/machinery/atmospherics/machine in world)
machine.build_network()
world << "\red \b Initializing atmos machinery."
world << "\red \b Initializing atmos machinery..."
sleep(-1)
for(var/obj/machinery/atmospherics/unary/U in world)
if(istype(U, /obj/machinery/atmospherics/unary/vent_pump))
@@ -94,6 +94,11 @@ datum/controller/game_controller/proc/setup_objects()
var/obj/machinery/atmospherics/unary/vent_scrubber/T = U
T.broadcast_status()
world << "\ref \b Making a mess..."
sleep(-1)
for(var/turf/simulated/floor/F in world)
F.MakeDirty()
world << "\red \b Initializations complete."
sleep(-1)
+146
View File
@@ -0,0 +1,146 @@
//Janitors! Janitors, janitors, janitors! -Sayu
// Conspicuously not-recent versions of suspicious cleanables
/obj/effect/decal/cleanable/blood/old
name = "dried blood"
desc = "Looks like it's been here a while. Eew."
New()
..()
icon_state += "-old"
/obj/effect/decal/cleanable/blood/gibs/old
name = "old rotting gibs"
desc = "Oh god, why didn't anyone clean this up? It smells terrible."
New()
..()
icon_state += "-old"
dir = pick(1,2,4,8)
/obj/effect/decal/cleanable/vomit/old
name = "crusty dried vomit"
desc = "You try not to look at the chunks, and fail."
New()
..()
icon_state += "-old"
/obj/effect/decal/cleanable/robot_debris/old
name = "dusty robot debris"
desc = "Looks like nobody has touched this in a while."
// Making the station dirty, one tile at a time. Called by master controller's setup_objects
/turf/simulated/floor/proc/MakeDirty()
if(prob(66) // fastest possible exit 2/3 of the time
return
// These look weird if you make them dirty
if(istype(src,/turf/simulated/floor/carpet) || istype(src,/turf/simulated/floor/grass) || istype(src,/turf/simulated/floor/beach) || istype(src,/turf/simulated/floor/holofloor) || istype(src,/turf/simulated/floor/plating/snow) || istype(src,/turf/simulated/floor/plating/ironsand))
return
var/area/A = loc
// zero dirt
if(!istype(A) || istype(A,/area/centcom) || istype(A,/area/holodeck) || istype(A,/area/library) || istype(A,/area/janitor) || istype(A,/area/chapel) || istype(A,/area/mine/explored) || istype(A,/area/mine/unexplored) || istype(A,/area/solar) || istype(A,/area/atmos))
return
// high dirt - 1/3
if(istype(A,/area/toxins/test_area) || istype(A,/area/mine/production) || istype(A,/area/mine/living_quarters) || istype(A,/area/mine/north_outpost) || istype(A,/area/mine/west_outpost) || istype(A,/area/wreck) || istype(A,/area/derelict) || istype(A,/area/djstation))
new/obj/effect/decal/cleanable/dirt(src) // vanilla, but it works
return
if(prob(80))// mid dirt - 1/15
return
if(istype(A,/area/engine) || istype(A,/area/assembly) || istype(A,/area/maintenance) || istype(A,/area/construction))
// Blood, sweat, and oil. Oh, and dirt.
if(prob(5))
new/obj/effect/decal/cleanable/blood/old(src)
else
if(prob(55))
if(prob(5))
new/obj/effect/decal/cleanable/robot_debris/old(src)
else
new/obj/effect/decal/cleanable/oil(src)
else
new/obj/effect/decal/cleanable/dirt(src)
return
if(istype(A,/area/crew_quarters/toilet) || istype(A,/area/crew_quarters/locker/locker_toilet) || istype(A,/area/crew_quarters/bar))
if(prob(60))
if(prob(70))
new/obj/effect/decal/cleanable/vomit/old(src)
else
new/obj/effect/decal/cleanable/blood/old(src)
else
new/obj/effect/decal/cleanable/dirt(src)
return
if(istype(A,/area/quartermaster))
if(prob(75))
new/obj/effect/decal/cleanable/dirt(src)
else
new/obj/effect/decal/cleanable/oil(src)
return
if(prob(75))// low dirt - 1/60
return
if(istype(A,/area/turret_protected) || istype(A,/area/security)) // chance of incident
if(prob(25))
if(prob(10))
new/obj/effect/decal/cleanable/blood/gibs/old(src)
else
new/obj/effect/decal/cleanable/blood/old(src)
else
new/obj/effect/decal/cleanable/dirt(src)
return
if(istype(A,/area/crew_quarters/kitchen)) // Kitchen messes
if(prob(60))
if(prob(50))
new/obj/effect/decal/cleanable/egg_smudge(src)
else
new/obj/effect/decal/cleanable/flour(src)
else
if(prob(33))
new/obj/effect/decal/cleanable/dirt(src)
else
new/obj/effect/decal/cleanable/blood/old(src)
return
if(istype(A,/area/medical)) // Kept clean, but chance of blood
if(prob(66))
if(prob(10))
new/obj/effect/decal/cleanable/blood/gibs/old(src)
else
new/obj/effect/decal/cleanable/blood/old(src)
else
if(prob(40))
if(istype(A,/area/medical/morgue))
new/obj/item/weapon/ectoplasm(src)
else
new/obj/effect/decal/cleanable/vomit/old(src)
else
new/obj/effect/decal/cleanable/dirt(src)
return
if(istype(A,/area/toxins))
if(prob(80))
new/obj/effect/decal/cleanable/dirt(src)
else
new/obj/effect/decal/cleanable/greenglow(src) // this cleans itself up but it might startle you when you see it.
return
//default
new/obj/effect/decal/cleanable/dirt(src)
return
Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 78 KiB

+1
View File
@@ -587,6 +587,7 @@
#include "code\game\turfs\simulated.dm"
#include "code\game\turfs\turf.dm"
#include "code\game\turfs\unsimulated.dm"
#include "code\game\turfs\simulated\dirtystation.dm"
#include "code\game\turfs\simulated\floor.dm"
#include "code\game\turfs\simulated\floor_types.dm"
#include "code\game\turfs\simulated\walls.dm"