diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index e9c5429dd2a..c41f9594b34 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -235,7 +235,7 @@ datum/hud/New(mob/owner) if(ishuman(mymob)) human_hud(ui_style, ui_color, ui_alpha, mymob) // Pass the player the UI style chosen in preferences - else if(ismonkey(mymob)) + else if(issmall(mymob)) monkey_hud(ui_style) else if(isbrain(mymob)) brain_hud(ui_style) @@ -259,11 +259,11 @@ datum/hud/New(mob/owner) if(!hud_used) usr << "\red This mob type does not use a HUD." return - + if(!ishuman(src)) usr << "\red Inventory hiding is currently only supported for human mobs, sorry." return - + if(!client) return if(client.view != world.view) return @@ -325,7 +325,7 @@ datum/hud/New(mob/owner) return if(client.view != world.view) return - + if(hud_used.hud_shown) hud_used.hud_shown = 0 if(src.hud_used.adding) diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 53086de2522..65f797658d2 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -102,7 +102,7 @@ if (usr.stat != 0) return - if (!ishuman(usr) && !ismonkey(usr)) //Make sure they're a mob that has dna + if (!ishuman(usr) && !issmall(usr)) //Make sure they're a mob that has dna usr << "\blue Try as you might, you can not climb up into the scanner." return if (src.occupant) diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index ab1b0cbfd5e..7e773224ba6 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -822,7 +822,7 @@ var/list/datum/dna/hivemind_bank = list() var/mob/living/carbon/T = changeling_sting(40,/mob/proc/changeling_transformation_sting) if(!T) return 0 - if((HUSK in T.mutations) || (!ishuman(T) && !ismonkey(T))) + if((HUSK in T.mutations) || (!ishuman(T) && !issmall(T))) src << "Our sting appears ineffective against its DNA." return 0 T.visible_message("[T] transforms!") diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 91c96fcfc99..20c16dcb9c6 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -408,7 +408,7 @@ set category = "Object" set src in oview(1) - if(usr.stat != 0 || !(ishuman(usr) || ismonkey(usr))) + if(usr.stat != 0 || !(ishuman(usr) || issmall(usr))) return if(src.occupant) diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index b7dc76287e8..74e7de99346 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -194,9 +194,9 @@ if(critter.meat_type) slab_type = critter.meat_type else if(istype(src.occupant,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = occupant slab_name = src.occupant.real_name - // /obj/item/weapon/reagent_containers/food/snacks/meat/monkey Move to species datum. - slab_type = /obj/item/weapon/reagent_containers/food/snacks/meat/human + slab_type = H.species.meat_type // Small mobs don't give as much nutrition. if(src.occupant.small) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index a5f7bf0be0c..3e08aad5856 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -488,7 +488,7 @@ if(iscuffed(L)) // If the target is handcuffed, leave it alone return TURRET_NOT_TARGET - if(isanimal(L) || ismonkey(L)) // Animals are not so dangerous + if(isanimal(L) || issmall(L)) // Animals are not so dangerous return check_anomalies ? TURRET_SECONDARY_TARGET : TURRET_NOT_TARGET if(isxenomorph(L) || isalien(L)) // Xenos are dangerous return check_anomalies ? TURRET_PRIORITY_TARGET : TURRET_NOT_TARGET diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm index 82a80822e64..6dd5586fd81 100644 --- a/code/game/machinery/telecomms/logbrowser.dm +++ b/code/game/machinery/telecomms/logbrowser.dm @@ -77,7 +77,7 @@ race = "[H.species.name]" - else if(ismonkey(M)) + else if(issmall(M)) race = "Monkey" language = race diff --git a/code/game/objects/items/weapons/storage/internal.dm b/code/game/objects/items/weapons/storage/internal.dm index 082002a5b9a..5dda9b89c25 100644 --- a/code/game/objects/items/weapons/storage/internal.dm +++ b/code/game/objects/items/weapons/storage/internal.dm @@ -26,7 +26,7 @@ //returns 1 if the master item's parent's MouseDrop() should be called, 0 otherwise. It's strange, but no other way of //doing it without the ability to call another proc's parent, really. /obj/item/weapon/storage/internal/proc/handle_mousedrop(mob/user as mob, obj/over_object as obj) - if (ishuman(user) || ismonkey(user)) //so monkeys can take off their backpacks -- Urist + if (ishuman(user) || issmall(user)) //so monkeys can take off their backpacks -- Urist if (istype(user.loc,/obj/mecha)) // stops inventory actions in a mech return 0 @@ -37,12 +37,12 @@ if (!( istype(over_object, /obj/screen) )) return 1 - + //makes sure master_item is equipped before putting it in hand, so that we can't drag it into our hand from miles away. //there's got to be a better way of doing this... - if (!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user)) + if (!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user)) return 0 - + if (!( user.restrained() ) && !( user.stat )) switch(over_object.name) if("r_hand") @@ -70,12 +70,12 @@ H.put_in_hands(master_item) H.r_store = null return 0 - + src.add_fingerprint(user) if (master_item.loc == user) src.open(user) return 0 - + for(var/mob/M in range(1, master_item.loc)) if (M.s_active == src) src.close(M) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 912ea4651b5..f24ff6bb2ca 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -28,7 +28,7 @@ if(!canremove) return - if (ishuman(usr) || ismonkey(usr)) //so monkeys can take off their backpacks -- Urist + if (ishuman(usr) || issmall(usr)) //so monkeys can take off their backpacks -- Urist if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech return diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index b02260e251f..8a1e35ca98c 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -66,6 +66,14 @@ ..() + if(istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + if(H.species.is_small) + user << "It's too heavy for you to wield fully." + return + else + return + if(wielded) //Trying to unwield it unwield() user << "You are now carrying the [name] with one hand." diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index c62758bf188..87c0dee578b 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -4,76 +4,57 @@ name = "a meat spike" icon = 'icons/obj/kitchen.dmi' icon_state = "spike" - desc = "A spike for collecting meat from animals" + desc = "A spike for collecting meat from animals." density = 1 anchored = 1 var/meat = 0 - var/occupied = 0 - var/meattype = 0 // 0 - Nothing, 1 - Monkey, 2 - Xeno + var/occupied + var/meat_type + var/victim_name = "corpse" -/obj/structure/kitchenspike - - attackby(obj/item/weapon/grab/G as obj, mob/user as mob) - if(!istype(G, /obj/item/weapon/grab)) - return - if(istype(G.affecting, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = G.affecting - if(H.species.is_small) - if(src.occupied == 0) - src.icon_state = "spikebloody" - src.occupied = 1 - src.meat = 5 - src.meattype = 1 - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!")) - del(G.affecting) - del(G) - else - user << "\red The spike already has something on it, finish collecting its meat first!" - else if(istype(G.affecting, /mob/living/carbon/alien)) - if(src.occupied == 0) - src.icon_state = "spikebloodygreen" - src.occupied = 1 - src.meat = 5 - src.meattype = 2 - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!")) - del(G.affecting) - del(G) - else - user << "\red The spike already has something on it, finish collecting its meat first!" +/obj/structure/kitchenspike/attackby(obj/item/weapon/grab/G as obj, mob/user as mob) + if(!istype(G, /obj/item/weapon/grab) || !G.affecting) + return + if(occupied) + user << "The spike already has something on it, finish collecting its meat first!" + else + if(spike(G.affecting)) + visible_message("[user] has forced [G.affecting] onto the spike, killing them instantly!") + del(G.affecting) + del(G) else - user << "\red They are too big for the spike, try something smaller!" - return + user << "They are too big for the spike, try something smaller!" -// MouseDrop_T(var/atom/movable/C, mob/user) -// if(istype(C, /obj/mob/carbon/monkey) -// else if(istype(C, /obj/mob/carbon/alien) && !istype(C, /mob/living/carbon/alien/larva/slime)) -// else if(istype(C, /obj/livestock/spesscarp +/obj/structure/kitchenspike/proc/spike(var/mob/living/victim) - attack_hand(mob/user as mob) - if(..()) - return - if(src.occupied) - if(src.meattype == 1) - if(src.meat > 1) - src.meat-- - new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey( src.loc ) - usr << "You remove some meat from the monkey." - else if(src.meat == 1) - src.meat-- - new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src.loc) - usr << "You remove the last piece of meat from the monkey!" - src.icon_state = "spike" - src.occupied = 0 - else if(src.meattype == 2) - if(src.meat > 1) - src.meat-- - new /obj/item/weapon/reagent_containers/food/snacks/xenomeat( src.loc ) - usr << "You remove some meat from the alien." - else if(src.meat == 1) - src.meat-- - new /obj/item/weapon/reagent_containers/food/snacks/xenomeat(src.loc) - usr << "You remove the last piece of meat from the alien!" - src.icon_state = "spike" - src.occupied = 0 + if(!istype(victim)) + return + + if(istype(victim, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = victim + if(!H.species.is_small) + return 0 + meat_type = H.species.meat_type + icon_state = "spikebloody" + else if(istype(victim, /mob/living/carbon/alien)) + meat_type = /obj/item/weapon/reagent_containers/food/snacks/xenomeat + icon_state = "spikebloodygreen" + else + return 0 + + victim_name = victim.name + occupied = 1 + meat = 5 + return 1 + +/obj/structure/kitchenspike/attack_hand(mob/user as mob) + if(..() || !occupied) + return + meat-- + new meattype(get_turf(src)) + if(src.meat > 1) + user << "You remove some meat from \the [victim_name]." + else if(src.meat == 1) + user << "You remove the last piece of meat from \the [victim_name]!" + icon_state = "spike" + occupied = 0 diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 485c1d4544c..2cc842c933d 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -49,6 +49,11 @@ var/list/mechtoys = list( anchored = 1 layer = 4 explosion_resistance = 5 + var/list/mobs_can_pass = list( + /mob/living/carbon/slime, + /mob/living/simple_animal/mouse, + /mob/living/silicon/robot/drone + ) /obj/structure/plasticflaps/CanPass(atom/A, turf/T) if(istype(A) && A.checkpass(PASSGLASS)) @@ -61,10 +66,19 @@ var/list/mechtoys = list( if(istype(A, /obj/vehicle)) //no vehicles return 0 - if(istype(A, /mob/living)) // You Shall Not Pass! - var/mob/living/M = A - if(!M.lying && !istype(M, /mob/living/carbon/slime) && !istype(M, /mob/living/simple_animal/mouse) && !istype(M, /mob/living/silicon/robot/drone)) //If your not laying down, or a small creature, no pass. - return 0 + var/mob/living/M = A + if(istype(M)) + if(M.lying) + return ..() + for(var/mob_type in mobs_can_pass) + if(istype(A, mob_type)) + return ..() + if(istype(A, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.is_small) + return ..() + return 0 + return ..() /obj/structure/plasticflaps/ex_act(severity) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 593ab5ec5fc..78524320a71 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -92,7 +92,7 @@ var/global/floorIsLava = 0 body += "
" //Monkey - if(ismonkey(M)) + if(issmall(M)) body += "Monkeyized | " else body += "Monkeyize | " diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 234f702a177..828667aa132 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -231,7 +231,7 @@ M_job = M.job else if(isslime(M)) M_job = "slime" - else if(ismonkey(M)) + else if(issmall(M)) M_job = "Monkey" else if(isalien(M)) M_job = "Alien" @@ -342,7 +342,7 @@ dat += "New Player" else if(isobserver(M)) dat += "Ghost" - else if(ismonkey(M)) + else if(issmall(M)) dat += "Monkey" else if(isalien(M)) dat += "Alien" diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 1ecec9ff9c7..164cae69605 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1609,7 +1609,7 @@ where = "onfloor" if ( where == "inhand" ) //Can only give when human or monkey - if ( !( ishuman(usr) || ismonkey(usr) ) ) + if ( !( ishuman(usr) || issmall(usr) ) ) usr << "Can only spawn in hand when you're a human or a monkey." where = "onfloor" else if ( usr.get_active_hand() ) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 673189ff79b..2cd1450a97b 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -453,13 +453,13 @@ BLIND // can't see anything A.attack_hand(user) return - if ((ishuman(usr) || ismonkey(usr)) && src.loc == user) //make it harder to accidentally undress yourself + if ((ishuman(usr) || issmall(usr)) && src.loc == user) //make it harder to accidentally undress yourself return ..() /obj/item/clothing/under/MouseDrop(obj/over_object as obj) - if (ishuman(usr) || ismonkey(usr)) + if (ishuman(usr) || issmall(usr)) //makes sure that the clothing is equipped so that we can't drag it into our hand from miles away. if (!(src.loc == usr)) return diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 4a17997457d..65ddf627789 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -41,6 +41,7 @@ var/vision_flags = 0 // Same flags as glasses. // Death vars. + var/meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/human var/gibber_type = /obj/effect/gibspawner/human var/remains_type = /obj/effect/decal/remains/xeno var/gibbed_anim = "gibbed-h" diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index 22b61291ef3..ce7bdad6f63 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -248,7 +248,7 @@ Target = C break - if(isalien(C) || ismonkey(C) || isanimal(C)) + if(isalien(C) || issmall(C) || isanimal(C)) Target = C break diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 8cce2342dff..89a824f61f7 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -69,7 +69,7 @@ //Removing from inventory if(href_list["remove_inv"]) - if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr))) + if(!Adjacent(usr) || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr))) return var/remove_from = href_list["remove_inv"] switch(remove_from) @@ -100,7 +100,7 @@ //Adding things to inventory else if(href_list["add_inv"]) - if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr))) + if(!Adjacent(usr) || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr))) return var/add_to = href_list["add_inv"] if(!usr.get_active_hand()) diff --git a/code/modules/mob/living/simple_animal/friendly/crab.dm b/code/modules/mob/living/simple_animal/friendly/crab.dm index bf59a7e5464..43b6c42ceed 100644 --- a/code/modules/mob/living/simple_animal/friendly/crab.dm +++ b/code/modules/mob/living/simple_animal/friendly/crab.dm @@ -82,7 +82,7 @@ //Removing from inventory if(href_list["remove_inv"]) - if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr))) + if(get_dist(src,usr) > 1 || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr))) return var/remove_from = href_list["remove_inv"] switch(remove_from) @@ -112,7 +112,7 @@ //Adding things to inventory else if(href_list["add_inv"]) - if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr))) + if(get_dist(src,usr) > 1 || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr))) return var/add_to = href_list["add_inv"] if(!usr.get_active_hand()) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 7790f9ecd83..9090ab6fe62 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -136,7 +136,7 @@ return //Is the usr's mob type able to do this? - if(ishuman(usr) || ismonkey(usr) || isrobot(usr)) + if(ishuman(usr) || issmall(usr) || isrobot(usr)) //Removing from inventory if(href_list["remove_inv"]) diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 2b47227dfee..39895f22b24 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -196,14 +196,14 @@ if(M == assailant && state >= GRAB_AGGRESSIVE) var/can_eat - if((FAT in user.mutations) && ismonkey(affecting)) + if((FAT in user.mutations) && issmall(affecting)) can_eat = 1 else var/mob/living/carbon/human/H = user if(istype(H) && H.species.gluttonous) if(H.species.gluttonous == 2) can_eat = 2 - else if(!ishuman(affecting) && !ismonkey(affecting) && (affecting.small || iscarbon(affecting))) + else if(!ishuman(affecting) && !issmall(affecting) && (affecting.small || iscarbon(affecting))) can_eat = 1 if(can_eat) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 7d42c243986..4deb43a3c21 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -15,10 +15,10 @@ return istype(H.species, /datum/species/xenos) return 0 -/proc/ismonkey(A) +/proc/issmall(A) if(A && istype(A, /mob/living/carbon/human)) var/mob/living/carbon/human/H = A - if(H.species && H.species.is_small) //todo + if(H.species && H.species.is_small) return 1 return 0 diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 388c1ff08ec..50273f2d8b9 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -1587,7 +1587,7 @@ else //someone is having a bad day E.createwound(CUT, 30) E.embed(surprise) - else if (ismonkey(M)) + else if (issmall(M)) M.visible_message("[M] suddenly tears in half!") var/mob/living/carbon/monkey/ook = new monkey_type(M.loc) ook.name = "malformed [ook.name]" diff --git a/code/modules/spells/inflict_handler.dm b/code/modules/spells/inflict_handler.dm index f9b809c674b..34b810d3093 100644 --- a/code/modules/spells/inflict_handler.dm +++ b/code/modules/spells/inflict_handler.dm @@ -24,7 +24,7 @@ if("gib") target.gib() if("gib_brain") - if(ishuman(target) || ismonkey(target)) + if(ishuman(target) || issmall(target)) var/mob/living/carbon/C = target if(!C.has_brain()) // Their brain is already taken out var/obj/item/organ/brain/B = new(C.loc) diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm index cfee510475d..2ae347ee4ae 100644 --- a/code/modules/spells/spell.dm +++ b/code/modules/spells/spell.dm @@ -80,7 +80,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin usr << "Not when you're incapacitated." return 0 - if(ishuman(usr) || ismonkey(usr)) + if(ishuman(usr) || issmall(usr)) if(istype(usr.wear_mask, /obj/item/clothing/mask/muzzle)) usr << "Mmmf mrrfff!" return 0