From 1e8a54b736391706c0ad3d296b753628ace9368c Mon Sep 17 00:00:00 2001 From: Mithrandalf Date: Wed, 8 Jan 2020 15:32:07 +0000 Subject: [PATCH] mouse --- code/modules/mob/language/monkey.dm | 2 +- .../subtypes/animal/passive/mouse_vr.dm | 7 ++++--- code/modules/vore/resizing/holder_micro_vr.dm | 17 ++++++++++++++--- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/language/monkey.dm b/code/modules/mob/language/monkey.dm index 782c5bcf24..bcd4bb1bc3 100644 --- a/code/modules/mob/language/monkey.dm +++ b/code/modules/mob/language/monkey.dm @@ -61,7 +61,7 @@ exclaim_verb = "squeaks" key = "m" flags = RESTRICTED - machine_understands = 0 + machine_understands = 1 //interns got to testing the tech on lab rats space_chance = 100 syllables = list("squeak") // , "gripes", "oi", "meow") diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse_vr.dm b/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse_vr.dm index 92bddd4f79..8fe4b53b06 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse_vr.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse_vr.dm @@ -10,16 +10,17 @@ desc = "A small rodent, often seen hiding in maintenance areas and making a nuisance of itself. And stealing cheese, or annoying the chef. SQUEAK! <3" size_multiplier = 0.25 - movement_cooldown = 1 //roughly half the speed of a person + movement_cooldown = 1.5 //roughly half the speed of a person universal_understand = 1 /mob/living/simple_mob/animal/passive/mouse/attack_hand(mob/living/L) - if(L.a_intent == I_HELP) //if lime intent + if(L.a_intent == I_HELP && !istype(loc, /obj/item/weapon/holder)) //if lime intent and not in a holder already if(!src.attempt_to_scoop(L)) //the superior way to handle scooping, checks size ..() //mouse too big to grab? pet the large mouse instead else ..() +//No longer in use, as mice create a holder/micro object instead /obj/item/weapon/holder/mouse/attack_self(var/mob/U) for(var/mob/living/simple_mob/M in src.contents) if((I_HELP) && U.canClick()) //a little snowflakey, but makes it use the same cooldown as interacting with non-inventory objects @@ -27,7 +28,7 @@ U.visible_message("[U] [M.response_help] \the [M].") -/mob/living/simple_mob/animal/passive/mouse/MouseDrop(var/obj/O) //this proc would be very easy to apply to all mobs with holders +/mob/living/simple_mob/animal/passive/mouse/MouseDrop(var/obj/O) //this proc would be very easy to apply to all mobs, holders generate dynamically if(!(usr == src || O)) return ..() if(istype(O, /mob/living) && O.Adjacent(src)) //controls scooping by mobs diff --git a/code/modules/vore/resizing/holder_micro_vr.dm b/code/modules/vore/resizing/holder_micro_vr.dm index d9db06118f..574be02e0f 100644 --- a/code/modules/vore/resizing/holder_micro_vr.dm +++ b/code/modules/vore/resizing/holder_micro_vr.dm @@ -23,9 +23,20 @@ for(var/mob/living/carbon/human/O in contents) O.show_inv(usr) -/obj/item/weapon/holder/micro/attack_self(var/mob/living/user) - for(var/mob/living/carbon/human/M in contents) - M.help_shake_act(user) +/obj/item/weapon/holder/micro/attack_self(mob/living/carbon/user) //reworked so it works w/ nonhumans + for(var/L in contents) + if(!isliving(L)) + continue + if(ishuman(L) && user.canClick()) + var/mob/living/carbon/human/H = L + H.help_shake_act(user) + user.setClickCooldown(user.get_attack_speed()) //uses the same cooldown as regular attack_hand + return + if(istype(L, /mob/living/simple_mob) && user.canClick()) + var/mob/living/simple_mob/S = L + user.visible_message("[user] [S.response_help] \the [S].") + user.setClickCooldown(user.get_attack_speed()) + /obj/item/weapon/holder/micro/update_state() if(istype(loc,/turf) || !(held_mob) || !(held_mob.loc == src))