Skip to content

Commit

Permalink
Made pet carriers able to pick up small or smaller mobs instantly.
Browse files Browse the repository at this point in the history
  • Loading branch information
XeonMations committed Aug 22, 2024
1 parent 912e769 commit 3128a97
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions code/game/objects/items/pet_carrier.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
container_resist(user)

/obj/item/pet_carrier/container_resist(mob/living/user)
if(world.time < user.last_special)
return
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
if(user.mob_size <= MOB_SIZE_SMALL)
Expand Down Expand Up @@ -170,13 +172,14 @@
user.visible_message("<span class='notice'>[user] starts loading [target] into [src].</span>", \
"<span class='notice'>You start loading [target] into [src]...</span>", null, null, target)
to_chat(target, "<span class='userdanger'>[user] starts loading you into [user.p_their()] [name]!</span>")
if(!do_after(user, 3 SECONDS, target))
return
if(target in occupants)
return
if(pet_carrier_full(src)) //Run the checks again, just in case
to_chat(user, "<span class='warning'>[src] is already carrying too much!</span>")
return
if(target.mob_size >= MOB_SIZE_HUMAN) // If the mob is small or smaller, no need for a do_after.
if(!do_after(user, 3 SECONDS, target)) // If the mob is small or smaller, no need for a do_after.
return
user.visible_message("<span class='notice'>[user] loads [target] into [src]!</span>", \
"<span class='notice'>You load [target] into [src].</span>", null, null, target)
to_chat(target, "<span class='userdanger'>[user] loads you into [user.p_their()] [name]!</span>")
Expand Down

0 comments on commit 3128a97

Please sign in to comment.