diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index 00fe76086a..dfa6182b5b 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -134,6 +134,8 @@ var/list/holder_mob_icon_cache = list() /mob/living/MouseDrop(var/atom/over_object) var/mob/living/carbon/human/H = over_object if(holder_type && issmall(src) && istype(H) && !H.lying && Adjacent(H) && (src.a_intent == I_HELP && H.a_intent == I_HELP)) //VOREStation Edit + if(istype(src, /mob/living/simple_mob/animal/passive/mouse)) //vorestation edit + return ..() //vorestation edit if(!issmall(H) || !istype(src, /mob/living/carbon/human)) get_scooped(H, (usr == src)) return 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 e86cfd3934..92bddd4f79 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 @@ -9,9 +9,14 @@ 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" -/mob/living/simple_mob/animal/passive/mouse/attack_hand(mob/living/hander) - if(hander.a_intent == I_HELP) //if lime intent - get_scooped(hander) //get scooped + size_multiplier = 0.25 + movement_cooldown = 1 //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(!src.attempt_to_scoop(L)) //the superior way to handle scooping, checks size + ..() //mouse too big to grab? pet the large mouse instead else ..() @@ -20,3 +25,33 @@ if((I_HELP) && U.canClick()) //a little snowflakey, but makes it use the same cooldown as interacting with non-inventory objects U.setClickCooldown(U.get_attack_speed()) //if there's a cleaner way in baycode, I'll change this 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 + if(!(usr == src || O)) + return ..() + if(istype(O, /mob/living) && O.Adjacent(src)) //controls scooping by mobs + var/mob/living/L = O + if(!src.attempt_to_scoop(L, (src == usr))) + return //this way it doesnt default to the generic animal pickup which isnt size restricted + if(istype(O, /obj/item/weapon/storage) && O.Adjacent(src)) //controls diving into storage + var/obj/item/weapon/storage/S = O + var/obj/item/weapon/holder/H = new holder_type(get_turf(src)) //this works weird, but it creates an empty holder, to see if that holder can fit + if(S.can_be_inserted(H) && (src.size_multiplier <= 0.75)) + H.held_mob = src + src.forceMove(H) + visible_message("\the [src] squeezes into \the [S].") + H.forceMove(S) + H.sync(src) + return 1 + else + qdel(H) //this deletes the empty holder if it doesnt work + to_chat(usr,"You can't fit inside \the [S]!") + return 0 + else + ..() + +/mob/living/simple_mob/animal/passive/mouse/resize(var/new_size, var/animate = TRUE) + size_multiplier = max(size_multiplier + 0.75, 1) //keeps sprite sizes consistent, keeps multiplier values low + ..() + size_multiplier = max(size_multiplier - 0.75, 0.25) //the limits here ensure no negative values or infinite shrinkage \ No newline at end of file diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm index 2073f499c1..8fc76eeb30 100644 --- a/code/modules/vore/resizing/resize_vr.dm +++ b/code/modules/vore/resizing/resize_vr.dm @@ -125,7 +125,7 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2 * Attempt to scoop up this mob up into H's hands, if the size difference is large enough. * @return false if normal code should continue, 1 to prevent normal code. */ -/mob/living/proc/attempt_to_scoop(var/mob/living/M) +/mob/living/proc/attempt_to_scoop(var/mob/living/M, var/mob/living/G) //second one is for the Grabber, only exists for animals to self-grab var/size_diff = M.get_effective_size() - get_effective_size() if(!holder_default && holder_type) holder_default = holder_type @@ -140,7 +140,7 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2 return 0 if(size_diff >= 0.50) holder_type = /obj/item/weapon/holder/micro - var/obj/item/weapon/holder/m_holder = get_scooped(M) + var/obj/item/weapon/holder/m_holder = get_scooped(M, G) holder_type = holder_default if (m_holder) return 1