powder that makes you say yes

This commit is contained in:
Nadyr
2021-12-05 09:49:55 -05:00
committed by GitHub
parent e31c38a372
commit ca9b296d14
@@ -12,41 +12,50 @@
movement_cooldown = 5
universal_understand = 1
/mob/living/simple_mob/animal/passive/mouse/attack_hand(mob/living/L)
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.checkClickCooldown()) //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("<span class='notice'>[U] [M.response_help] \the [M].</span>")
//Jank grabber that uses the 'attack_hand' insead of 'MouseDrop'
/mob/living/simple_mob/animal/passive/mouse/attack_hand(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))
if(!issmall(H) || !istype(src, /mob/living/carbon/human))
get_scooped(H, (usr == src))
return
return ..()
/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
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),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))
visible_message("<b>\The [src]</b> squeezes into \the [S].")
H.forceMove(S)
return 1
/mob/living/proc/mouse_scooped(var/mob/living/carbon/grabber, var/self_grab)
if(!holder_type || buckled || pinned.len)
return
if(self_grab)
if(src.incapacitated()) return
else
qdel(H) //this deletes the empty holder if it doesnt work
to_chat(usr,"<span class='notice'>You can't fit inside \the [S]!</span>")
return 0
else
..()
if(grabber.incapacitated()) return
var/obj/item/weapon/holder/H = new holder_type(get_turf(src), src)
grabber.put_in_hands(H)
if(self_grab)
to_chat(grabber, "<span class='notice'>\The [src] clambers onto you!</span>")
to_chat(src, "<span class='notice'>You climb up onto \the [grabber]!</span>")
grabber.equip_to_slot_if_possible(H, slot_back, 0, 1)
else
to_chat(grabber, "<span class='notice'>You scoop up \the [src]!</span>")
to_chat(src, "<span class='notice'>\The [grabber] scoops you up!</span>")
add_attack_logs(grabber, H.held_mob, "Scooped up", FALSE) // Not important enough to notify admins, but still helpful.
return H
/mob/living/simple_mob/animal/passive/mouse/white/apple
name = "Apple"
desc = "Dainty, well groomed and cared for, her eyes glitter with untold knowledge..."
@@ -56,4 +65,12 @@
..()
// Change my name back, don't want to be named Apple (666)
name = initial(name)
desc = initial(desc)
desc = initial(desc)
/obj/item/weapon/holder/mouse/attack_self(mob/living/carbon/user)
user.setClickCooldown(user.get_attack_speed())
for(var/L in contents)
if(isanimal(L))
var/mob/living/simple_mob/S = L
user.visible_message("<span class='notice'>[user] [S.response_help] \the [S].</span>")