Merge pull request #1570 from caelaislinn/master

various simple_animal tweaks, fixes and improvements
This commit is contained in:
CIB
2012-08-04 02:48:55 -07:00
13 changed files with 88 additions and 46 deletions
@@ -2,6 +2,7 @@
name = "alien larva"
icon_state = "larva"
pass_flags = PASSTABLE
swap_on_mobbump = 0
health = 25
+5 -6
View File
@@ -121,7 +121,7 @@
/datum/supply_packs/charge/toxins
name = "Toxins Research Charge"
contains = list("/obj/item/weapon/vending_charge/toxins")
containername = "Toxins Reasearch charge crate"
containername = "Toxins Research charge crate"
/* removed these for now, as to not confuse people (the machines are in the tg map)
/datum/supply_packs/charge/genetics
@@ -551,7 +551,7 @@
"/obj/item/weapon/extinguisher",
"/obj/item/weapon/extinguisher")
cost = 20
containertype = "/obj/structure/closet/crate/firefighting"
containertype = "/obj/structure/closet/crate"
containername = "Firefighting equipment crate"
group = "Engineering"
access = ACCESS_ATMOSPHERICS
@@ -644,12 +644,11 @@
name = "Sterile equipment crate"
contains = list("/obj/item/clothing/under/rank/medical/green",
"/obj/item/clothing/under/rank/medical/green",
"/obj/item/store/stma_kit",
"/obj/item/store/lglo_kit")
"/obj/item/weapon/storage/stma_kit",
"/obj/item/weapon/storage/lglo_kit")
cost = 10
containertype = "/obj/structure/closet/crate/secure"
containertype = "/obj/structure/closet/crate"
containername = "Sterile equipment crate"
access = ACCESS_MEDICAL
group = "Medical / Science"
/datum/supply_packs/mecha_odysseus
+11 -10
View File
@@ -327,27 +327,28 @@ var/datum/roundinfo/roundinfo = new()
if(spawn_vermin && vermin_spawn_turfs && vermin_spawn_turfs.len)
if(!spawning_vermin)
spawning_vermin = 1
spawn(rand(vermin_min_spawntime, vermin_max_spawntime))
spawning_vermin = 0
var/cur_alive_vermin = 0
//check to see if there are too many already
for(var/obj/effect/critter/roach/R in world)
cur_alive_vermin++
for(var/mob/living/simple_animal/mouse/M in world)
if(!M.stat)
cur_alive_vermin++
if(cur_alive_vermin <= max_vermin)
return
var/turf/T = pick(vermin_spawn_turfs)
if(T)
if(prob(50))
new /mob/living/simple_animal/mouse(T)
if(cur_alive_vermin < max_vermin)
var/turf/T = pick(vermin_spawn_turfs)
if(T)
if(prob(50))
new /mob/living/simple_animal/mouse(T)
else
new /obj/effect/critter/roach(T)
else
new /obj/effect/critter/roach(T)
else
//no turf, skip this time
vermin_spawn_turfs.Remove(T)
//no turf, skip this time
vermin_spawn_turfs.Remove(T)
return 1
+7
View File
@@ -81,6 +81,13 @@
Bumped(atom/AM)
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))
var/mob/M = AM
if(world.time - AM.last_bumped <= 60) return //NOTE do we really need that?
+1 -1
View File
@@ -177,7 +177,7 @@ datum/controller/game_controller
var/success = air_master.tick() //Changed so that a runtime does not crash the ticker.
if(!success) //Runtimed.
air_master.failed_ticks++
if(air_master.failed_ticks > 5)
if(air_master.failed_ticks > 10)
world << "<font color='red'><b>RUNTIMES IN ATMOS TICKER. Killing air simulation!</font></b>"
kill_air = 1
air_master.failed_ticks = 0
+1 -1
View File
@@ -164,7 +164,7 @@
atkcarbon = 1
atksilicon = 0
attacktext = "bites"
layer = 2.1 //so they can hide under objects
layer = 2.5 //so they can hide under objects
Bump(var/mob/M)
if(ishuman(M))
+24 -10
View File
@@ -4,6 +4,7 @@
see_invisible = 15
see_in_dark = 100
verbs += /mob/dead/observer/proc/dead_tele
verbs += /mob/dead/observer/proc/become_mouse
taj_talk_understand = 1
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
if (ghost.client)
ghost.client.eye = ghost
if(issimpleanimal(src))
ghost.name = ghost.name + " ([src.real_name])"
ghost.real_name = ghost.real_name + " ([src.real_name])"
return
/mob/proc/adminghostize()
@@ -156,16 +160,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/proc/become_mouse()
set category = "Ghost"
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()
for(var/mob/living/simple_animal/mouse/M in world)
if(!M.ckey)
if(!M.ckey && !M.stat)
eligible_targets.Add(M)
var/mob/living/simple_animal/mouse/target_mouse
@@ -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))
if(target_mouse)
//move player into mouse
//the mouse ai will deactivate itself
client.mob = target_mouse
verbs += /mob/proc/ghost
target_mouse.real_name = src.name + " (as mouse)"
target_mouse.real_name = src.name
//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
client << "\red Unable to become a mouse!"
del(src)
/mob/dead/observer/proc/dead_tele()
set category = "Ghost"
@@ -220,9 +220,10 @@
//BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && canmove) // mutual brohugs all around!
var/turf/oldloc = loc
loc = tmob.loc
tmob.loc = oldloc
if(tmob.swap_on_mobbump)
var/turf/oldloc = loc
loc = tmob.loc
tmob.loc = oldloc
now_pushing = 0
for(var/mob/living/carbon/metroid/Metroid in view(1,tmob))
if(Metroid.Victim == tmob)
+2
View File
@@ -294,3 +294,5 @@ the mob is also allowed to move without any sort of restriction. For instance, i
var/list/radar_blips = list() // list of screen objects, radar blips
var/radar_open = 0 // nonzero is radar is open
var/swap_on_mobbump = 1 //by default, mob collisions will swap the two mobs (if allowed)
+9 -5
View File
@@ -5,8 +5,8 @@
icon_living = "mouse_gray"
icon_dead = "mouse_gray_dead"
speak = list("Squeek!","SQUEEK!","Squeek?")
speak_emote = list("squeeks")
emote_hear = list("squeeks")
speak_emote = list("squeeks","squeeks","squiks")
emote_hear = list("squeeks","squeaks","squiks")
emote_see = list("runs in a circle", "shakes", "scritches at something")
speak_chance = 1
turns_per_move = 5
@@ -18,15 +18,19 @@
response_harm = "splats the"
density = 0
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()
..()
if(!stat && prob(speak_chance))
for(var/mob/M in view())
M << "\blue \icon[src] Squeek!"
M << 'sound/effects/mousesqueek.ogg'
/mob/living/simple_animal/mouse/gray
color = "gray"
icon_state = "mouse_gray"
/mob/living/simple_animal/mouse/white
color = "white"
icon_state = "mouse_white"
@@ -41,7 +45,7 @@
icon_state = "mouse_[color]"
icon_living = "mouse_[color]"
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()
src.health = 0
@@ -51,6 +51,8 @@
var/friendly = "nuzzles" //If the mob does no damage with it's attack
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
@@ -22,7 +22,7 @@
turns_since_move = 0
//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)
if(speak && speak.len && prob((speak.len / length) * 100))
say(pick(speak))
@@ -29,9 +29,20 @@
if(speak_emote && speak_emote.len)
var/emote = pick(speak_emote)
if(emote)
return "[emote], \"[text]\""
return "<b>[src]</b> [emote], \"[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)
switch(act)
if ("scream")
@@ -73,9 +84,9 @@
message = "<B>[src]</B> [message]"
if("auto")
message = "<B>[src]</B> [message]"
else
/*else
if(!message)
src << text("Invalid Emote: []", act)
src << "Invalid Emote: [act]"*/
if ((message && src.stat == 0))
if (m_type & 1)
for(var/mob/O in viewers(src, null))
@@ -175,11 +186,7 @@
/mob/living/simple_animal/movement_delay()
var/tally = 0 //Incase I need to add stuff other than "speed" later
tally = speed
return tally
return speed
/mob/living/simple_animal/Stat()
..()
@@ -191,6 +198,7 @@
icon_state = icon_dead
stat = DEAD
density = 0
src << "\red You have died!"
return
/mob/living/simple_animal/ex_act(severity)
@@ -207,3 +215,6 @@
if(3.0)
health -= 30
/proc/issimpleanimal(var/mob/AM)
return istype(AM,/mob/living/simple_animal)