From e39c2c4f48e060c3241932ef0d627b7ae58e3041 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Fri, 24 Aug 2012 00:00:02 +0100 Subject: [PATCH] Reorganized and updated Simple Animals. --- code/modules/mob/living/simple_animal/bear.dm | 3 + code/modules/mob/living/simple_animal/cat.dm | 31 +++-- .../modules/mob/living/simple_animal/corgi.dm | 6 + code/modules/mob/living/simple_animal/crab.dm | 2 +- code/modules/mob/living/simple_animal/life.dm | 5 +- .../modules/mob/living/simple_animal/mouse.dm | 114 +++++++++++++++++- .../mob/living/simple_animal/parrot.dm | 15 ++- code/modules/mob/simple_animal/kobold.dm | 33 ----- 8 files changed, 154 insertions(+), 55 deletions(-) delete mode 100644 code/modules/mob/simple_animal/kobold.dm diff --git a/code/modules/mob/living/simple_animal/bear.dm b/code/modules/mob/living/simple_animal/bear.dm index 3a479474b5c..1c7fc06e866 100644 --- a/code/modules/mob/living/simple_animal/bear.dm +++ b/code/modules/mob/living/simple_animal/bear.dm @@ -42,6 +42,9 @@ var/stance_step = 0 //Used to delay checks depending on what stance the bear is in var/mob/living/target_mob //Once the bear enters attack stance, it will try to chase this mob. This it to prevent it changing it's mind between multiple mobs. +/proc/isbear(var/mob/M) + return istype(M, /mob/living/simple_animal/bear) + //SPACE BEARS! SQUEEEEEEEE~ OW! FUCK! IT BIT MY HAND OFF!! /mob/living/simple_animal/bear/Hudson name = "Hudson" diff --git a/code/modules/mob/living/simple_animal/cat.dm b/code/modules/mob/living/simple_animal/cat.dm index db4d6f96f78..d858a200e17 100644 --- a/code/modules/mob/living/simple_animal/cat.dm +++ b/code/modules/mob/living/simple_animal/cat.dm @@ -1,7 +1,7 @@ //Cat /mob/living/simple_animal/cat name = "cat" - desc = "Kitty!!" + desc = "A domesticated, feline pet. Has a tendency to adopt crewmembers." icon_state = "cat" icon_living = "cat" icon_dead = "cat_dead" @@ -16,31 +16,31 @@ response_help = "pets the" response_disarm = "gently pushes aside the" response_harm = "kicks the" - -//RUNTIME IS ALIVE! SQUEEEEEEEE~ -/mob/living/simple_animal/cat/Runtime - name = "Runtime" - desc = "" - response_help = "pets" - response_disarm = "gently pushes aside" - response_harm = "kicks" var/turns_since_scan = 0 var/mob/living/simple_animal/mouse/movement_target + min_oxy = 16 //Require atleast 16kPA oxygen + minbodytemp = 223 //Below -50 Degrees Celcius + maxbodytemp = 323 //Above 50 Degrees Celcius -/mob/living/simple_animal/cat/Runtime/Life() +/mob/living/simple_animal/cat/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("splats \the [M]") + emote(pick("\red splats the [M]!","\red toys with the [M]","worries the [M]")) movement_target = null stop_automated_movement = 0 break ..() + for(var/mob/living/simple_animal/mouse/snack in oview(src, 3)) + if(prob(15)) + emote(pick("hisses and spits!","mrowls fiercely!","eyes [snack] hungrily.")) + break + if(!stat && !resting && !buckled) turns_since_scan++ if(turns_since_scan > 5) @@ -58,4 +58,11 @@ break if(movement_target) stop_automated_movement = 1 - walk_to(src,movement_target,0,3) \ No newline at end of file + walk_to(src,movement_target,0,3) + +//RUNTIME IS ALIVE! SQUEEEEEEEE~ +/mob/living/simple_animal/cat/Runtime + name = "Runtime" + desc = "Its fur has the look and feel of velvet, and it's tail quivers occasionally." + + diff --git a/code/modules/mob/living/simple_animal/corgi.dm b/code/modules/mob/living/simple_animal/corgi.dm index c073a5f5ece..2edd2a8a526 100644 --- a/code/modules/mob/living/simple_animal/corgi.dm +++ b/code/modules/mob/living/simple_animal/corgi.dm @@ -26,6 +26,7 @@ regenerate_icons() /mob/living/simple_animal/corgi/show_inv(mob/user as mob) + /* user.machine = src if(user.stat) return @@ -41,6 +42,7 @@ user << browse(dat, text("window=mob[];size=325x500", name)) onclose(user, "mob[real_name]") + */ return /mob/living/simple_animal/corgi/attackby(var/obj/item/O as obj, var/mob/user as mob) @@ -313,6 +315,10 @@ dir = i sleep(1) +/obj/item/weapon/reagent_containers/food/snacks/meat/corgi + name = "Corgi meat" + desc = "Tastes like... well you know..." + /mob/living/simple_animal/corgi/Ian/Bump(atom/movable/AM as mob|obj, yes) spawn( 0 ) diff --git a/code/modules/mob/living/simple_animal/crab.dm b/code/modules/mob/living/simple_animal/crab.dm index c242ca03f02..418e4b68582 100644 --- a/code/modules/mob/living/simple_animal/crab.dm +++ b/code/modules/mob/living/simple_animal/crab.dm @@ -1,7 +1,7 @@ //Look Sir, free crabs! /mob/living/simple_animal/crab name = "crab" - desc = "Free crabs!" + desc = "A hard-shelled crustacean. Seems quite content to lounge around all the time." icon_state = "crab" icon_living = "crab" icon_dead = "crab_dead" diff --git a/code/modules/mob/living/simple_animal/life.dm b/code/modules/mob/living/simple_animal/life.dm index 5e9d549691f..d4694514fe3 100644 --- a/code/modules/mob/living/simple_animal/life.dm +++ b/code/modules/mob/living/simple_animal/life.dm @@ -389,4 +389,7 @@ health -= 30 /mob/living/simple_animal/adjustBruteLoss(damage) - health -= damage \ No newline at end of file + health -= damage + +/proc/issimpleanimal(var/mob/AM) + return istype(AM,/mob/living/simple_animal) \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/mouse.dm b/code/modules/mob/living/simple_animal/mouse.dm index 8d00fe8ca3e..49ba51ef33f 100644 --- a/code/modules/mob/living/simple_animal/mouse.dm +++ b/code/modules/mob/living/simple_animal/mouse.dm @@ -1,13 +1,14 @@ /mob/living/simple_animal/mouse name = "mouse" - desc = "It's a nasty, ugly, evil, disease-ridden rodent." + real_name = "mouse" + 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") + 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 see_in_dark = 6 @@ -19,6 +20,17 @@ response_harm = "splats the" density = 0 var/color //brown, gray and white, leave blank for random + layer = 2.5 //so they can hide under objects + swap_on_mobbump = 0 + min_oxy = 16 //Require atleast 16kPA oxygen + minbodytemp = 223 //Below -50 Degrees Celcius + maxbodytemp = 323 //Above 50 Degrees Celcius + +/mob/living/simple_animal/mouse/Life() + ..() + if(!stat && prob(speak_chance)) + for(var/mob/M in view()) + M << 'sound/effects/mousesqueek.ogg' /mob/living/simple_animal/mouse/white color = "white" @@ -38,6 +50,7 @@ icon_state = "mouse_[color]" icon_living = "mouse_[color]" icon_dead = "mouse_[color]_dead" + desc = "It's a small [color] rodent, often seen hiding in maintenance areas and making a nuisance of itself." //TOM IS ALIVE! SQUEEEEEEEE~K :) /mob/living/simple_animal/mouse/brown/Tom @@ -54,6 +67,99 @@ 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) + +//copy paste from alien/larva, if that func is updated please update this one also +/mob/living/simple_animal/mouse/verb/ventcrawl() + set name = "Crawl through Vent" + set desc = "Enter an air vent and crawl through the pipe system." + set category = "Mouse" + +// if(!istype(V,/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent)) +// return + var/obj/machinery/atmospherics/unary/vent_pump/vent_found + var/welded = 0 + for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src)) + if(!v.welded) + vent_found = v + break + else + welded = 1 + if(vent_found) + if(vent_found.network&&vent_found.network.normal_members.len) + var/list/vents = list() + for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members) + if(temp_vent.loc == loc) + continue + vents.Add(temp_vent) + var/list/choices = list() + for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents) + if(vent.loc.z != loc.z) + continue + var/atom/a = get_turf(vent) + choices.Add(a.loc) + var/turf/startloc = loc + var/obj/selection = input("Select a destination.", "Duct System") in choices + var/selection_position = choices.Find(selection) + if(loc==startloc) + var/obj/target_vent = vents[selection_position] + if(target_vent) + for(var/mob/O in oviewers(src, null)) + if ((O.client && !( O.blinded ))) + O.show_message(text("[src] scrambles into the ventillation ducts!"), 1) + loc = target_vent.loc + else + src << "\blue You need to remain still while entering a vent." + else + src << "\blue This vent is not connected to anything." + else if(welded) + src << "\red That vent is welded." + else + src << "\blue You must be standing on or beside an air vent to enter it." + return + +//copy paste from alien/larva, if that func is updated please update this one alsoghost +/mob/living/simple_animal/mouse/verb/hide() + set name = "Hide" + set desc = "Allows to hide beneath tables or certain items. Toggled on or off." + set category = "Mouse" + + if (layer != TURF_LAYER+0.2) + layer = TURF_LAYER+0.2 + src << text("\blue You are now hiding.") + for(var/mob/O in oviewers(src, null)) + if ((O.client && !( O.blinded ))) + O << text("[] scurries to the ground!", src) + else + layer = MOB_LAYER + src << text("\blue You have stopped hiding.") + for(var/mob/O in oviewers(src, null)) + if ((O.client && !( O.blinded ))) + O << text("[] slowly peaks up from the ground...", src) + +//make mice fit under tables etc? this was hacky, and not working +/* +/mob/living/simple_animal/mouse/Move(var/dir) + + var/turf/target_turf = get_step(src,dir) + //CanReachThrough(src.loc, target_turf, src) + var/can_fit_under = 0 + if(target_turf.ZCanPass(get_turf(src),1)) + can_fit_under = 1 + + ..(dir) + if(can_fit_under) + src.loc = target_turf + for(var/d in cardinal) + var/turf/O = get_step(T,d) + //Simple pass check. + if(O.ZCanPass(T, 1) && !(O in open) && !(O in closed) && O in possibles) + open += O + */ + +mob/living/simple_animal/mouse/restrained() //Hotfix to stop mice from doing things with MouseDrop + return 1 /mob/living/simple_animal/mouse/HasEntered(AM as mob|obj) if( ishuman(AM) ) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 2a8e6d22090..872d0071ba7 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -2,9 +2,9 @@ name = "\improper Parrot" desc = "It's a parrot! No dirty words!" icon = 'icons/mob/mob.dmi' - icon_state = "cat" - icon_living = "cat" - icon_dead = "cat_dead" + icon_state = "parrot" + icon_living = "parrot" + icon_dead = "parrot_dead" speak = list("Hi","Hello!","Cracker?","BAWWWWK george mellons griffing me") speak_emote = list("squawks","says","yells") emote_hear = list("squawks","bawks") @@ -15,15 +15,22 @@ response_help = "pets the" response_disarm = "gently moves aside the" response_harm = "swats the" + min_oxy = 16 //Require atleast 16kPA oxygen + minbodytemp = 223 //Below -50 Degrees Celcius + maxbodytemp = 323 //Above 50 Degrees Celcius ears = new /obj/item/device/radio/headset/heads/ce() /mob/living/simple_animal/parrot/DrProfessor name = "Doctor Professor Parrot, PhD" desc = "That's the Doctor Professor. He has more degrees than all of the engineering team put together, and has several published papers on quantum cracker theory." - speak = list(":e Check the singlo, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN RIG SUIT?",":e OH GOD ITS FREE CALL THE SHUTTLE") + speak = list(":e Check the singlo, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN RIG SUIT?",":e OH GOD ITS FREE CALL THE SHUTTLE",":e Open secure storage please.",":e I think something happened to the containment field...") response_harm = "is attacked in the face by" +/obj/item/weapon/reagent_containers/food/snacks/cracker/ + name = "Cracker" + desc = "It's a salted cracker." + /mob/living/simple_animal/parrot/show_inv(mob/user as mob) user.machine = src if(user.stat) return diff --git a/code/modules/mob/simple_animal/kobold.dm b/code/modules/mob/simple_animal/kobold.dm deleted file mode 100644 index 3a8aace7ca2..00000000000 --- a/code/modules/mob/simple_animal/kobold.dm +++ /dev/null @@ -1,33 +0,0 @@ -//kobold -/mob/living/simple_animal/kobold - name = "kobold" - desc = "A small, rat-like creature." - icon = 'mob.dmi' - icon_state = "kobold_idle" - icon_living = "kobold_idle" - icon_dead = "kobold_dead" - //speak = list("You no take candle!","Ooh, pretty shiny.","Me take?","Where gold here...","Me likey.") - speak_emote = list("mutters","hisses","grumbles") - emote_hear = list("mutters under it's breath.","grumbles.", "yips!") - emote_see = list("looks around suspiciously.", "scratches it's arm.","putters around a bit.") - speak_chance = 15 - turns_per_move = 5 - see_in_dark = 6 - meat_type = /obj/item/weapon/reagent_containers/food/snacks/sliceable/meat - response_help = "pets the" - response_disarm = "gently pushes aside the" - response_harm = "kicks the" - minbodytemp = 250 - min_oxy = 16 //Require atleast 16kPA oxygen - minbodytemp = 223 //Below -50 Degrees Celcius - maxbodytemp = 323 //Above 50 Degrees Celcius - -/mob/living/simple_animal/kobold/Life() - ..() - if(prob(15) && turns_since_move && !stat) - flick("kobold_act",src) - -/mob/living/simple_animal/kobold/Move(var/dir) - ..() - if(!stat) - flick("kobold_walk",src)