From aef7adfc3b90c635fadfddf6e8e8ca2493fec24b Mon Sep 17 00:00:00 2001 From: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Date: Thu, 26 Nov 2020 18:10:01 -0800 Subject: [PATCH] Removes a source of ian harddels, keeps mcgruffs bed discription from getting overwritten at roundstart, moves the bed claiming feature to just the dogbed typepath, none of the subtypes, this applies to buckling too (#55158) Removes a source of ian harddels, keeps mcgruff's bed description from getting overwritten at roundstart, moves the bed claiming feature to just the dogbed typepath, blacklisting subtypes. This applies to buckling too. This means that a dogbed can only ever belong to one dog. Fuck you. Remake of #54892, github doesn't like force pushes, not sure why --- code/game/objects/structures/beds_chairs/bed.dm | 8 ++++++-- code/modules/mob/living/simple_animal/friendly/dog.dm | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/code/game/objects/structures/beds_chairs/bed.dm b/code/game/objects/structures/beds_chairs/bed.dm index 9ab6056b1ae..b57f7e73e85 100644 --- a/code/game/objects/structures/beds_chairs/bed.dm +++ b/code/game/objects/structures/beds_chairs/bed.dm @@ -171,7 +171,7 @@ anchored = FALSE buildstacktype = /obj/item/stack/sheet/mineral/wood buildstackamount = 10 - var/mob/living/owner = null + var/owned = FALSE /obj/structure/bed/dogbed/ian desc = "Ian's bed! Looks comfy." @@ -202,10 +202,14 @@ name = "Runtime's bed" anchored = TRUE +///Used to set the owner of a dogbed, returns FALSE if called on an owned bed or an invalid one, TRUE if the possesion succeeds /obj/structure/bed/dogbed/proc/update_owner(mob/living/M) - owner = M + if(owned || type != /obj/structure/bed/dogbed) //Only marked beds work, this is hacky but I'm a hacky man + return FALSE //Failed + owned = TRUE name = "[M]'s bed" desc = "[M]'s bed! Looks comfy." + return TRUE //Let any callers know that this bed is ours now /obj/structure/bed/dogbed/buckle_mob(mob/living/M, force, check_loc) . = ..() diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index 9db932a6677..06541df2f7b 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -169,8 +169,7 @@ . = ..() var/dog_area = get_area(src) for(var/obj/structure/bed/dogbed/D in dog_area) - if(!D.owner) - D.update_owner(src) + if(D.update_owner(src)) //No muscling in on my turf you fucking parrot break /mob/living/simple_animal/pet/dog/corgi/Initialize()