mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
- Added MICE! Sprites by our insanely talented Cheridan :)
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4212 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -328,7 +328,7 @@ About the new airlock wires panel:
|
||||
|
||||
|
||||
/obj/machinery/door/airlock/bumpopen(mob/living/user as mob) //Airlocks now zap you when you 'bump' them open when they're electrified. --NeoFite
|
||||
if(!istype(usr, /mob/living/silicon))
|
||||
if(!issilicon(usr))
|
||||
if(src.isElectrified())
|
||||
if(!src.justzap)
|
||||
if(src.shock(user, 100))
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(world.time - M.last_bumped <= 60) return
|
||||
if(M.client && !M:handcuffed)
|
||||
if(M.client && !M.restrained() && !isanimal(M))
|
||||
bumpopen(M)
|
||||
return
|
||||
|
||||
|
||||
@@ -186,15 +186,20 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/mousetrap/HasEntered(AM as mob|obj)
|
||||
if((ishuman(AM)) && (armed))
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.m_intent == "run")
|
||||
src.triggered(H)
|
||||
H << "\red <B>You accidentally step on the mousetrap!</B>"
|
||||
for(var/mob/O in viewers(H, null))
|
||||
if(O == H)
|
||||
continue
|
||||
O.show_message("\red <B>[H] accidentally steps on the mousetrap.</B>", 1)
|
||||
if(armed)
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.m_intent == "run")
|
||||
src.triggered(H)
|
||||
H << "\red <B>You accidentally step on the mousetrap!</B>"
|
||||
for(var/mob/O in viewers(H, null))
|
||||
if(O == H)
|
||||
continue
|
||||
O.show_message("\red <B>[H] accidentally steps on the mousetrap.</B>", 1)
|
||||
if(ismouse(AM))
|
||||
var/mob/living/simple_animal/mouse/M = AM
|
||||
src.visible_message("\red <b>SPLAT!</b>")
|
||||
M.splat()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/mousetrap/hitby(A as mob|obj)
|
||||
|
||||
@@ -1232,7 +1232,7 @@ turf/simulated/floor/proc/update_icon()
|
||||
if(!broken && !burnt)
|
||||
if( !(icon_state in wood_icons) )
|
||||
icon_state = "wood"
|
||||
//world << "[icon_state]ie's got [icon_state]"
|
||||
//world << "[icon_state]y's got [icon_state]"
|
||||
spawn(1)
|
||||
if(istype(src,/turf/simulated/floor)) //Was throwing runtime errors due to a chance of it changing to space halfway through.
|
||||
if(air)
|
||||
|
||||
@@ -24,4 +24,39 @@
|
||||
desc = ""
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "kicks"
|
||||
response_harm = "kicks"
|
||||
var/turns_since_scan = 0
|
||||
var/mob/living/simple_animal/mouse/movement_target
|
||||
|
||||
/mob/living/simple_animal/cat/Runtime/Life()
|
||||
//MICE!
|
||||
if((src.loc) && isturf(src.loc))
|
||||
if(!stat && !resting && !buckled)
|
||||
for(var/mob/living/simple_animal/mouse/M in view(1,src))
|
||||
if(!M.stat)
|
||||
M.splat()
|
||||
emote("\the [src] SPLATS \the [M]")
|
||||
movement_target = null
|
||||
stop_automated_movement = 0
|
||||
break
|
||||
|
||||
..()
|
||||
|
||||
if(!stat && !resting && !buckled)
|
||||
turns_since_scan++
|
||||
if(turns_since_scan > 5)
|
||||
walk_to(src,0)
|
||||
turns_since_scan = 0
|
||||
if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc) ))
|
||||
movement_target = null
|
||||
stop_automated_movement = 0
|
||||
if( !movement_target || !(movement_target.loc in oview(src, 3)) )
|
||||
movement_target = null
|
||||
stop_automated_movement = 0
|
||||
for(var/mob/living/simple_animal/mouse/snack in oview(src,3))
|
||||
if(isturf(snack.loc) && !snack.stat)
|
||||
movement_target = snack
|
||||
break
|
||||
if(movement_target)
|
||||
stop_automated_movement = 1
|
||||
walk_to(src,movement_target,0,3)
|
||||
65
code/modules/mob/living/simple_animal/mouse.dm
Normal file
65
code/modules/mob/living/simple_animal/mouse.dm
Normal file
@@ -0,0 +1,65 @@
|
||||
//Mouse
|
||||
/mob/living/simple_animal/mouse
|
||||
name = "mouse"
|
||||
desc = "It's a nasty, ugly, evil, disease-ridden rodent."
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
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")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
health = 5
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "splats the"
|
||||
density = 0
|
||||
var/color //brown, gray and white, leave blank for random
|
||||
|
||||
/mob/living/simple_animal/mouse/white
|
||||
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"
|
||||
|
||||
/mob/living/simple_animal/mouse/New()
|
||||
if(!color)
|
||||
color = pick( list("brown","gray","white") )
|
||||
icon_state = "mouse_[color]"
|
||||
icon_living = "mouse_[color]"
|
||||
icon_dead = "mouse_[color]_dead"
|
||||
|
||||
//TOM IS ALIVE! SQUEEEEEEEE~K :)
|
||||
/mob/living/simple_animal/mouse/brown/Tom
|
||||
name = "Tom"
|
||||
desc = "Jerry the cat is not amused."
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "splats"
|
||||
|
||||
|
||||
/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"
|
||||
|
||||
|
||||
/mob/living/simple_animal/mouse/HasEntered(AM as mob|obj)
|
||||
if( ishuman(AM) )
|
||||
if(!stat)
|
||||
var/mob/M = AM
|
||||
M << "\blue \icon[src] Squeek!"
|
||||
M << 'sound/effects/mousesqueek.ogg'
|
||||
..()
|
||||
@@ -60,6 +60,11 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/ismouse(A)
|
||||
if(istype(A, /mob/living/simple_animal/mouse))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/isbear(A)
|
||||
if(istype(A, /mob/living/simple_animal/bear))
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user