[REFACTOR] Helper proc for unbuckling a mob (#26918)

* Helper proc from unbuckling a mob

* Rename to unbuckle

* Minor fixes

* Move buckled up /mob/living

---------

Co-authored-by: Adrer <adrermail@gmail.com>
This commit is contained in:
Chap
2024-10-10 12:54:09 +00:00
committed by GitHub
co-authored by Adrer
parent 7ed4ef4f76
commit a060093b59
18 changed files with 41 additions and 38 deletions
+2 -2
View File
@@ -21,7 +21,7 @@
. += "<span class='notice'>Number of uses: [uses]. This scroll will vanish after the final use.</span>"
. += "<span class='notice'>P.S. Don't forget to bring your gear, you'll need it to cast most spells.</span>"
/obj/item/teleportation_scroll/attack_self(mob/user)
/obj/item/teleportation_scroll/attack_self(mob/living/user)
if(!uses) //somehow?
to_chat(user, "<span class='warning'>You attempt to read the scroll but it disintegrates in your hand, it appears that is has run out of charges!</span>")
qdel(src)
@@ -59,7 +59,7 @@
return
if(user && user.buckled)
user.buckled.unbuckle_mob(user, force = TRUE)
user.unbuckle(force = TRUE)
if(user?.has_buckled_mobs())
user.unbuckle_all_mobs(force = TRUE)