mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
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:
@@ -32,11 +32,17 @@ var/datum/roundinfo/roundinfo = new()
|
||||
|
||||
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()
|
||||
login_music = pick('title1.ogg', 'title2.ogg') // choose title music!
|
||||
|
||||
do
|
||||
vermin_spawn_areas = new/list("/area/maintenance","/area/mine/maintenance","/area/crew_quarters/toilet","/area/crew_quarters/locker/locker_toilet")
|
||||
|
||||
pregame_timeleft = 180
|
||||
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"
|
||||
@@ -303,6 +309,36 @@ var/datum/roundinfo/roundinfo = new()
|
||||
while(!going) sleep(10)
|
||||
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
|
||||
|
||||
proc/getfactionbyname(var/name)
|
||||
|
||||
@@ -148,6 +148,14 @@
|
||||
affecting.take_damage(1, 0)
|
||||
H.UpdateDamageIcon()
|
||||
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)
|
||||
icon_state = "mousetrap"
|
||||
armed = 0
|
||||
|
||||
@@ -167,8 +167,12 @@
|
||||
|
||||
Die()
|
||||
..()
|
||||
new /obj/effect/decal/cleanable/mucus(src.loc)
|
||||
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
|
||||
/obj/effect/critter/manhack
|
||||
name = "viscerator"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/mob/living/simple_animal/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_living = "mouse_gray"
|
||||
icon_dead = "mouse_gray_dead"
|
||||
speak = list("Squeek!","SQUEEK!","Squeek?")
|
||||
speak_emote = 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
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
@@ -17,7 +17,7 @@
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "splats the"
|
||||
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()
|
||||
..()
|
||||
@@ -30,10 +30,6 @@
|
||||
color = "white"
|
||||
icon_state = "mouse_white"
|
||||
|
||||
/mob/living/simple_animal/mouse/gray
|
||||
color = "gray"
|
||||
icon_state = "mouse_gray"
|
||||
|
||||
/mob/living/simple_animal/mouse/brown
|
||||
color = "brown"
|
||||
icon_state = "mouse_brown"
|
||||
@@ -44,9 +40,13 @@
|
||||
icon_state = "mouse_[color]"
|
||||
icon_living = "mouse_[color]"
|
||||
icon_dead = "mouse_[color]_dead"
|
||||
desc = "It's a small, [color], disease-ridden rodent."
|
||||
|
||||
/mob/living/simple_animal/mouse/proc/splat()
|
||||
src.health = 0
|
||||
src.stat = DEAD
|
||||
src.icon_dead = "mouse_[color]_splat"
|
||||
src.icon_state = "mouse_[color]_splat"
|
||||
|
||||
/proc/ismouse(var/obj/O)
|
||||
return istype(O,/mob/living/simple_animal/mouse)
|
||||
|
||||
Reference in New Issue
Block a user