some tweaks to mice and roaches, tried to get the gameticker to periodically spawn them but failed (will come back to)

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2012-08-02 04:56:48 +10:00
parent 469a8bb601
commit 7ae269f38f
4 changed files with 55 additions and 7 deletions

View File

@@ -32,11 +32,17 @@ var/datum/roundinfo/roundinfo = new()
var/pregame_timeleft = 0 var/pregame_timeleft = 0
//automated spawning of mice and roaches
var/global/spawn_vermin = 1
var/spawning_vermin = 0
var/list/vermin_spawn_areas
/datum/controller/gameticker/proc/pregame() /datum/controller/gameticker/proc/pregame()
login_music = pick('title1.ogg', 'title2.ogg') // choose title music! login_music = pick('title1.ogg', 'title2.ogg') // choose title music!
do do
vermin_spawn_areas = new/list("/area/maintenance","/area/mine/maintenance","/area/crew_quarters/toilet","/area/crew_quarters/locker/locker_toilet")
pregame_timeleft = 180 pregame_timeleft = 180
world << "<B><FONT color='blue'>Welcome to the pre-game lobby!</FONT></B>" world << "<B><FONT color='blue'>Welcome to the pre-game lobby!</FONT></B>"
world << "Please, setup your character and select ready. Game will start in [pregame_timeleft] seconds" world << "Please, setup your character and select ready. Game will start in [pregame_timeleft] seconds"
@@ -303,6 +309,36 @@ var/datum/roundinfo/roundinfo = new()
while(!going) sleep(10) while(!going) sleep(10)
world.Reboot() world.Reboot()
//randomly spawn vermin in maintenance and other areas
//doesn't seem to be working
/*if(spawn_vermin && vermin_spawn_areas.len)
if(!spawning_vermin)
spawning_vermin = 1
spawn(rand(10,10)) //between 10 (6000) and 15 (9000) minutes interval
var/area_text = pick( text2path(vermin_spawn_areas) )
world << area_text
var/random_area = pick( typesof(area_text) )
world << random_area
var/list/turfs = get_area_turfs(random_area)
world << turfs.len
if(!turfs.len)
turfs = get_area_turfs(pick(typesof(pick(vermin_spawn_areas))))
world << turfs.len
else
world << "-----"
//
if(turfs && turfs.len)
var/turf/T = get_random_turf(turfs)
world << T
//
if(prob(100))
//spawn a mouse, any of the gray, brown or white varieties
new /mob/living/simple_animal/mouse(T)
else
//spawn a roach
new /obj/effect/critter/roach(T)
spawning_vermin = 0*/
return 1 return 1
proc/getfactionbyname(var/name) proc/getfactionbyname(var/name)

View File

@@ -148,6 +148,14 @@
affecting.take_damage(1, 0) affecting.take_damage(1, 0)
H.UpdateDamageIcon() H.UpdateDamageIcon()
H.updatehealth() H.updatehealth()
else if(ismouse(target))
var/mob/living/simple_animal/mouse/M = target
src.visible_message("\red \icon[src] <b>SPLAT!</b>")
M.splat()
else if(isroach(target))
var/obj/effect/critter/roach/R = target
src.visible_message("\red \icon[src] <b>CRUNCH!</b>")
R.Die()
playsound(target.loc, 'snap.ogg', 50, 1) playsound(target.loc, 'snap.ogg', 50, 1)
icon_state = "mousetrap" icon_state = "mousetrap"
armed = 0 armed = 0

View File

@@ -167,8 +167,12 @@
Die() Die()
..() ..()
new /obj/effect/decal/cleanable/mucus(src.loc)
del(src) del(src)
/proc/isroach(var/obj/O)
return istype(O,/obj/effect/critter/roach)
// We can maybe make these controllable via some console or something // We can maybe make these controllable via some console or something
/obj/effect/critter/manhack /obj/effect/critter/manhack
name = "viscerator" name = "viscerator"

View File

@@ -1,13 +1,13 @@
/mob/living/simple_animal/mouse /mob/living/simple_animal/mouse
name = "mouse" name = "mouse"
desc = "It's a nasty, ugly, evil, disease-ridden rodent." desc = "It's a small, disease-ridden rodent."
icon_state = "mouse_gray" icon_state = "mouse_gray"
icon_living = "mouse_gray" icon_living = "mouse_gray"
icon_dead = "mouse_gray_dead" icon_dead = "mouse_gray_dead"
speak = list("Squeek!","SQUEEK!","Squeek?") speak = list("Squeek!","SQUEEK!","Squeek?")
speak_emote = list("squeeks") speak_emote = list("squeeks")
emote_hear = list("squeeks") emote_hear = list("squeeks")
emote_see = list("runs in a circle", "shakes") emote_see = list("runs in a circle", "shakes", "scritches at something")
speak_chance = 1 speak_chance = 1
turns_per_move = 5 turns_per_move = 5
see_in_dark = 6 see_in_dark = 6
@@ -17,7 +17,7 @@
response_disarm = "gently pushes aside the" response_disarm = "gently pushes aside the"
response_harm = "splats the" response_harm = "splats the"
density = 0 density = 0
var/color //brown, gray and white, leave blank for random var/color = "gray" //brown, gray and white
/mob/living/simple_animal/mouse/Life() /mob/living/simple_animal/mouse/Life()
..() ..()
@@ -30,10 +30,6 @@
color = "white" color = "white"
icon_state = "mouse_white" icon_state = "mouse_white"
/mob/living/simple_animal/mouse/gray
color = "gray"
icon_state = "mouse_gray"
/mob/living/simple_animal/mouse/brown /mob/living/simple_animal/mouse/brown
color = "brown" color = "brown"
icon_state = "mouse_brown" icon_state = "mouse_brown"
@@ -44,9 +40,13 @@
icon_state = "mouse_[color]" icon_state = "mouse_[color]"
icon_living = "mouse_[color]" icon_living = "mouse_[color]"
icon_dead = "mouse_[color]_dead" icon_dead = "mouse_[color]_dead"
desc = "It's a small, [color], disease-ridden rodent."
/mob/living/simple_animal/mouse/proc/splat() /mob/living/simple_animal/mouse/proc/splat()
src.health = 0 src.health = 0
src.stat = DEAD src.stat = DEAD
src.icon_dead = "mouse_[color]_splat" src.icon_dead = "mouse_[color]_splat"
src.icon_state = "mouse_[color]_splat" src.icon_state = "mouse_[color]_splat"
/proc/ismouse(var/obj/O)
return istype(O,/mob/living/simple_animal/mouse)