From f6d60b49f4451990fa5ee51ee7e4f6716c2b2341 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 27 Nov 2020 08:45:11 +0100 Subject: [PATCH] [MIRROR] Removes a source of ian harddels, restores soul (#1871) * 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 * Removes a source of ian harddels, restores soul Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> --- 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 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()