From 839d4cb6c8a8fa058030767f31c31a3b85aa8d5b Mon Sep 17 00:00:00 2001 From: RavingManiac Date: Tue, 19 Feb 2013 22:10:27 +0800 Subject: [PATCH] Added var/small to mobs, which currently only handles if they can open airlocks. This replaces the use of ismouse(). --- code/game/machinery/doors/airlock.dm | 2 +- code/game/machinery/doors/door.dm | 2 +- code/modules/mob/living/simple_animal/friendly/crab.dm | 1 + code/modules/mob/living/simple_animal/friendly/farm_animals.dm | 2 ++ code/modules/mob/living/simple_animal/friendly/lizard.dm | 1 + code/modules/mob/living/simple_animal/friendly/mouse.dm | 1 + code/modules/mob/living/simple_animal/friendly/mushroom.dm | 1 + code/modules/mob/living/simple_animal/parrot.dm | 1 + code/modules/mob/mob_defines.dm | 1 + 9 files changed, 10 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index f945a1576be..8db6aa50b73 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -910,7 +910,7 @@ About the new airlock wires panel: /obj/machinery/door/airlock/Topic(href, href_list, var/nowindow = 0) if(!nowindow) ..() - if(usr.stat || usr.restrained()|| ismouse(usr)) + if(usr.stat || usr.restrained()|| usr.small) return add_fingerprint(usr) if(href_list["close"]) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 4aafbe667fa..f8c71f4decf 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -47,7 +47,7 @@ var/mob/M = AM if(world.time - M.last_bumped <= 10) return //Can bump-open one airlock per second. This is to prevent shock spam. M.last_bumped = world.time - if(!M.restrained() && !ismouse(M)) + if(!M.restrained() && !M.small) bumpopen(M) return diff --git a/code/modules/mob/living/simple_animal/friendly/crab.dm b/code/modules/mob/living/simple_animal/friendly/crab.dm index 418e4b68582..98ab4560a3a 100644 --- a/code/modules/mob/living/simple_animal/friendly/crab.dm +++ b/code/modules/mob/living/simple_animal/friendly/crab.dm @@ -5,6 +5,7 @@ icon_state = "crab" icon_living = "crab" icon_dead = "crab_dead" + small = 1 speak_emote = list("clicks") emote_hear = list("clicks") emote_see = list("clacks") diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index 4db364cb5a6..52f241c8681 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -167,6 +167,7 @@ health = 1 var/amount_grown = 0 pass_flags = PASSTABLE | PASSGRILLE + small = 1 /mob/living/simple_animal/chick/New() ..() @@ -208,6 +209,7 @@ var/global/chicken_count = 0 var/eggsleft = 0 var/color pass_flags = PASSTABLE + small = 1 /mob/living/simple_animal/chicken/New() ..() diff --git a/code/modules/mob/living/simple_animal/friendly/lizard.dm b/code/modules/mob/living/simple_animal/friendly/lizard.dm index 4a235c30fa7..171e96fc62b 100644 --- a/code/modules/mob/living/simple_animal/friendly/lizard.dm +++ b/code/modules/mob/living/simple_animal/friendly/lizard.dm @@ -5,6 +5,7 @@ icon_state = "lizard" icon_living = "lizard" icon_dead = "lizard-dead" + small = 1 speak_emote = list("hisses") health = 5 maxHealth = 5 diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index 9e201f2cb34..379ab571347 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -10,6 +10,7 @@ emote_hear = list("squeeks","squeaks","squiks") emote_see = list("runs in a circle", "shakes", "scritches at something") pass_flags = PASSTABLE + small = 1 speak_chance = 1 turns_per_move = 5 see_in_dark = 6 diff --git a/code/modules/mob/living/simple_animal/friendly/mushroom.dm b/code/modules/mob/living/simple_animal/friendly/mushroom.dm index 736aeeed6be..ef2eb6cd61e 100644 --- a/code/modules/mob/living/simple_animal/friendly/mushroom.dm +++ b/code/modules/mob/living/simple_animal/friendly/mushroom.dm @@ -4,6 +4,7 @@ icon_state = "mushroom" icon_living = "mushroom" icon_dead = "mushroom_dead" + small = 1 speak_chance = 0 turns_per_move = 1 maxHealth = 5 diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 931c88587fd..756d49bbf21 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -33,6 +33,7 @@ icon_living = "parrot_fly" icon_dead = "parrot_dead" pass_flags = PASSTABLE + small = 1 speak = list("Hi","Hello!","Cracker?","BAWWWWK george mellons griffing me") speak_emote = list("squawks","says","yells") diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index f85f989a9e3..f8960a586db 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -79,6 +79,7 @@ var/eye_stat = null//Living, potentially Carbon var/lastpuke = 0 var/unacidable = 0 + var/small = 0 var/name_archive //For admin things like possession