diff --git a/code/game/objects/structures/beds_chairs/bed.dm b/code/game/objects/structures/beds_chairs/bed.dm index 924a0602c46..c5f6ad51edd 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()