- simple_animals can't open doors by default

- alien larvae, mice can hide under mobs
- roaches, mice can hide under various objects
- various tweaks, including flavour and existing mechanics
- fix for ghosts not being able to spawn as mice
- added move delay of half a second to simple_animals (about the same as human walkspeed?)
- simple_animals, when talking, can only understand each other (and mobs with universal_speak)

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2012-08-04 15:47:56 +10:00
parent 0b14f97af0
commit 46a450069e
8 changed files with 64 additions and 25 deletions

View File

@@ -2,6 +2,7 @@
name = "alien larva" name = "alien larva"
icon_state = "larva" icon_state = "larva"
pass_flags = PASSTABLE pass_flags = PASSTABLE
swap_on_mobbump = 0
health = 25 health = 25

View File

@@ -81,6 +81,13 @@
Bumped(atom/AM) Bumped(atom/AM)
if(p_open || operating) return if(p_open || operating) return
if(issimpleanimal(AM))
var/mob/living/simple_animal/S = AM
if(S.can_open_doors)
bumpopen(AM)
return
if(ismob(AM)) if(ismob(AM))
var/mob/M = AM var/mob/M = AM
if(world.time - AM.last_bumped <= 60) return //NOTE do we really need that? if(world.time - AM.last_bumped <= 60) return //NOTE do we really need that?

View File

@@ -164,7 +164,7 @@
atkcarbon = 1 atkcarbon = 1
atksilicon = 0 atksilicon = 0
attacktext = "bites" attacktext = "bites"
layer = 2.1 //so they can hide under objects layer = 2.5 //so they can hide under objects
Bump(var/mob/M) Bump(var/mob/M)
if(ishuman(M)) if(ishuman(M))

View File

@@ -4,6 +4,7 @@
see_invisible = 15 see_invisible = 15
see_in_dark = 100 see_in_dark = 100
verbs += /mob/dead/observer/proc/dead_tele verbs += /mob/dead/observer/proc/dead_tele
verbs += /mob/dead/observer/proc/become_mouse
taj_talk_understand = 1 taj_talk_understand = 1
if(body) if(body)
@@ -76,6 +77,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
verbs -= /mob/proc/ghost verbs -= /mob/proc/ghost
if (ghost.client) if (ghost.client)
ghost.client.eye = ghost ghost.client.eye = ghost
if(issimpleanimal(src))
ghost.name = ghost.name + " ([src.real_name])"
ghost.real_name = ghost.real_name + " ([src.real_name])"
return return
/mob/proc/adminghostize() /mob/proc/adminghostize()
@@ -156,13 +160,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/proc/become_mouse() /mob/dead/observer/proc/become_mouse()
set category = "Ghost" set category = "Ghost"
set name = "Become mouse" set name = "Become mouse"
//locate an empty mouse
if(client && client.holder && client.holder.state == 2)
var/rank = client.holder.rank
client.clear_admin_verbs()
client.holder.state = 1
client.update_admins(rank)
//locate an empty mouse
var/list/eligible_targets = new() var/list/eligible_targets = new()
for(var/mob/living/simple_animal/mouse/M in world) for(var/mob/living/simple_animal/mouse/M in world)
if(!M.ckey) if(!M.ckey)
@@ -178,12 +177,27 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
target_mouse = new(pick(ticker.vermin_spawn_turfs)) target_mouse = new(pick(ticker.vermin_spawn_turfs))
if(target_mouse) if(target_mouse)
//move player into mouse
//the mouse ai will deactivate itself
client.mob = target_mouse client.mob = target_mouse
verbs += /mob/proc/ghost target_mouse.real_name = src.name
target_mouse.real_name = src.name + " (as mouse)"
//reset admin verbs
if(client && client.holder && client.holder.state == 2)
var/rank = client.holder.rank
client.clear_admin_verbs()
client.holder.state = 1
client.update_admins(rank)
//update allowed verbs
target_mouse.verbs += /mob/proc/ghost
target_mouse.verbs -= /client/verb/toggle_ghost_ears
target_mouse.verbs -= /client/verb/toggle_ghost_sight
del(src)
else else
client << "\red Unable to become a mouse!" client << "\red Unable to become a mouse!"
del(src)
/mob/dead/observer/proc/dead_tele() /mob/dead/observer/proc/dead_tele()
set category = "Ghost" set category = "Ghost"

View File

@@ -5,8 +5,8 @@
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","squeeks","squiks")
emote_hear = list("squeeks") emote_hear = list("squeeks","squeaks","squiks")
emote_see = list("runs in a circle", "shakes", "scritches at something") 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
@@ -18,15 +18,19 @@
response_harm = "splats the" response_harm = "splats the"
density = 0 density = 0
var/color //brown, gray and white var/color //brown, gray and white
layer = 2.1 //so they can hide under objects layer = 2.5 //so they can hide under objects
swap_on_mobbump = 0
/mob/living/simple_animal/mouse/Life() /mob/living/simple_animal/mouse/Life()
..() ..()
if(!stat && prob(speak_chance)) if(!stat && prob(speak_chance))
for(var/mob/M in view()) for(var/mob/M in view())
M << "\blue \icon[src] Squeek!"
M << 'sound/effects/mousesqueek.ogg' M << 'sound/effects/mousesqueek.ogg'
/mob/living/simple_animal/mouse/gray
color = "gray"
icon_state = "mouse_gray"
/mob/living/simple_animal/mouse/white /mob/living/simple_animal/mouse/white
color = "white" color = "white"
icon_state = "mouse_white" icon_state = "mouse_white"
@@ -41,7 +45,7 @@
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." desc = "It's a small [color] rodent, often seen hiding in maintenance areas."
/mob/living/simple_animal/mouse/proc/splat() /mob/living/simple_animal/mouse/proc/splat()
src.health = 0 src.health = 0

View File

@@ -51,6 +51,8 @@
var/friendly = "nuzzles" //If the mob does no damage with it's attack var/friendly = "nuzzles" //If the mob does no damage with it's attack
var/wall_smash = 0 //if they can smash walls var/wall_smash = 0 //if they can smash walls
var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster var/speed = 5
var/can_open_doors = 0 //door opening kind of guy
var/obj/item/device/radio/headset/l_ear = null var/obj/item/device/radio/headset/l_ear = null

View File

@@ -22,7 +22,7 @@
turns_since_move = 0 turns_since_move = 0
//Speaking //Speaking
if(prob(speak_chance)) if(!ckey && prob(speak_chance))
var/length = (speak ? speak.len : 0) + (emote_see ? emote_see.len : 0) + (emote_hear ? emote_hear.len : 0) var/length = (speak ? speak.len : 0) + (emote_see ? emote_see.len : 0) + (emote_hear ? emote_hear.len : 0)
if(speak && speak.len && prob((speak.len / length) * 100)) if(speak && speak.len && prob((speak.len / length) * 100))
say(pick(speak)) say(pick(speak))

View File

@@ -3,6 +3,7 @@
..() ..()
verbs -= /mob/verb/observe verbs -= /mob/verb/observe
real_name = src.name real_name = src.name
archived_speak_chance = speak_chance
/mob/living/simple_animal/Login() /mob/living/simple_animal/Login()
if(src && src.client) if(src && src.client)
@@ -29,9 +30,20 @@
if(speak_emote && speak_emote.len) if(speak_emote && speak_emote.len)
var/emote = pick(speak_emote) var/emote = pick(speak_emote)
if(emote) if(emote)
return "[emote], \"[text]\"" return "<b>[src]</b> [emote], \"[text]\""
return "says, \"[text]\""; return "says, \"[text]\"";
//swhen talking, simple_animals can only understand each other
/mob/living/simple_animal/say(var/message)
for(var/mob/M in view(src,7))
if(istype(M, src.type) || M.universal_speak)
M << say_quote(message)
else if(speak.len)
M << "<b>[src]</b> [pick(speak)]"
else
M << "<b>[src]</b> [pick("makes some strange noises.","makes some strange noises.","makes some strange noises.","makes a small commotion.","kicks up a fuss about something.")]"
return
/mob/living/simple_animal/emote(var/act,var/m_type=1,var/message = null) /mob/living/simple_animal/emote(var/act,var/m_type=1,var/message = null)
switch(act) switch(act)
if ("scream") if ("scream")
@@ -73,9 +85,9 @@
message = "<B>[src]</B> [message]" message = "<B>[src]</B> [message]"
if("auto") if("auto")
message = "<B>[src]</B> [message]" message = "<B>[src]</B> [message]"
else /*else
if(!message) if(!message)
src << text("Invalid Emote: []", act) src << "Invalid Emote: [act]"*/
if ((message && src.stat == 0)) if ((message && src.stat == 0))
if (m_type & 1) if (m_type & 1)
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
@@ -175,11 +187,7 @@
/mob/living/simple_animal/movement_delay() /mob/living/simple_animal/movement_delay()
var/tally = 0 //Incase I need to add stuff other than "speed" later return speed
tally = speed
return tally
/mob/living/simple_animal/Stat() /mob/living/simple_animal/Stat()
..() ..()
@@ -207,3 +215,6 @@
if(3.0) if(3.0)
health -= 30 health -= 30
/proc/issimpleanimal(var/mob/AM)
return istype(AM,/mob/living/simple_animal)