Files
CHOMPStation2/code/modules/mob/simple_animal/crab.dm
Erthilo f2777aa65f TG: Tonnes of stuff, please check the changelog.
In short: massive updates to security, the library, hydroponics, the kitchen and
the bar, by Flazeo and Ikarrus
Massive updates to the PA, with Invisty's new sprites, done by Sieve
New sprites for field gens too, also by Invisty
Borg and battery updates by Sieve
Fake gloves by Sieve
I messed around with some pressure_resistance stuff on Dumpdavidson's suggestion
(only in paperwork)

PROBABLY A BUNCH OF OTHER SHIT
Revision: r3505
Author: 	 petethegoat
2012-05-06 18:26:41 +01:00

69 lines
2.2 KiB
Plaintext

//Look Sir, free crabs!
/mob/living/simple_animal/crab
name = "crab"
desc = "Free crabs!"
icon = 'mob.dmi'
icon_state = "crab"
icon_living = "crab"
icon_dead = "crab_dead"
speak_emote = list("clicks")
emote_hear = list("clicks")
emote_see = list("clacks")
speak_chance = 1
turns_per_move = 5
meat_type = /obj/item/weapon/reagent_containers/food/snacks/sliceable/meat
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "stomps the"
stop_automated_movement = 1
friendly = "pinches"
/mob/living/simple_animal/crab/Life()
..()
//CRAB movement
if(!ckey && alive)
if(isturf(src.loc) && !resting && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc.
turns_since_move++
if(turns_since_move >= turns_per_move)
Move(get_step(src,pick(4,8)))
turns_since_move = 0
//COFFEE! SQUEEEEEEEEE!
/mob/living/simple_animal/crab/Coffee
name = "Coffee"
desc = "It's Coffee, the other pet!"
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "stomps"
//LOOK AT THIS - ..()??
/mob/living/simple_animal/crab/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/wirecutters))
user << "\red \b This kills the crab."
health -= 20
Die()
if(istype(O, /obj/item/stack/medical))
if(alive)
var/obj/item/stack/medical/MED = O
if(health < maxHealth)
if(MED.amount >= 1)
health = min(maxHealth, health + MED.heal_brute)
MED.amount -= 1
if(MED.amount <= 0)
del(MED)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\blue [user] applies the [MED] on [src]")
else
user << "\blue this [src] is dead, medical items won't bring it back to life."
else
if(O.force)
health -= O.force
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")