[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
+1 -1
View File
@@ -82,7 +82,7 @@
zomboid.suiciding = 0
zomboid.set_nutrition(max(zomboid.nutrition, NUTRITION_LEVEL_HUNGRY))
if(zomboid.buckled) //Unbuckle the mob and clear the alerts.
zomboid.buckled.unbuckle_mob(src, force = TRUE)
zomboid.unbuckle(force = TRUE)
var/datum/organ/heart/heart = zomboid.get_int_organ_datum(ORGAN_DATUM_HEART)
var/heart_type = zomboid.dna?.species?.has_organ["heart"]
+2 -2
View File
@@ -140,7 +140,7 @@
destturf = safepick(posturfs)
else
destturf = get_turf(destination)
// Make sure the target tile does not contain a teleporter on it
for(var/teleporter_type in blacklisted)
var/teleporters = destturf.search_contents_for(teleporter_type)
@@ -167,7 +167,7 @@
if(isliving(teleatom))
var/mob/living/target_mob = teleatom
if(target_mob.buckled)
target_mob.buckled.unbuckle_mob(target_mob, force = TRUE)
target_mob.unbuckle(force = TRUE)
if(target_mob.has_buckled_mobs())
target_mob.unbuckle_all_mobs(force = TRUE)
if(ismachinery(target_mob.loc) || istype(target_mob.loc, /obj/item/mecha_parts/mecha_equipment/medical/sleeper))
+1 -1
View File
@@ -54,7 +54,7 @@
return
if(target && target.buckled)
target.buckled.unbuckle_mob(target, force = TRUE)
target.unbuckle(force = TRUE)
if(target && target.has_buckled_mobs())
target.unbuckle_all_mobs(force = TRUE)