From b9be3e6ed724d18eeb3c747f71b0b0d2a9b76905 Mon Sep 17 00:00:00 2001 From: Hubblenaut Date: Wed, 2 Jul 2014 22:36:49 +0200 Subject: [PATCH] Stops buckled mobs from slipping (for now) Conflicts: code/game/turfs/simulated.dm --- code/game/objects/effects/effect_system.dm | 2 +- code/game/objects/items/weapons/clown_items.dm | 4 ++-- code/game/turfs/simulated.dm | 10 ++++++++-- .../reagents/reagent_containers/food/snacks/grown.dm | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 492b6968555..df987fe0f82 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -965,7 +965,7 @@ steam.start() -- spawns the effect if (istype(AM, /mob/living/carbon)) var/mob/M = AM - if (istype(M, /mob/living/carbon/human) && (istype(M:shoes, /obj/item/clothing/shoes) && M:shoes.flags&NOSLIP)) + if (istype(M, /mob/living/carbon/human) && (istype(M:shoes, /obj/item/clothing/shoes) && M:shoes.flags&NOSLIP) || M.buckled) return if (istype (M, /mob/living/carbon/human) && M:species.bodyflags & FEET_NOSLIP) return diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm index 0bdd2c485a9..61e9325969a 100644 --- a/code/game/objects/items/weapons/clown_items.dm +++ b/code/game/objects/items/weapons/clown_items.dm @@ -11,7 +11,7 @@ /obj/item/weapon/bananapeel/Crossed(AM as mob|obj) if (istype(AM, /mob/living/carbon)) var/mob/M = AM - if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP)) + if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP) || M.buckled) return if(istype(M, /mob/living/carbon/human) && M:species.bodyflags & FEET_NOSLIP) return @@ -28,7 +28,7 @@ /obj/item/weapon/soap/Crossed(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist if (istype(AM, /mob/living/carbon)) var/mob/M = AM - if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP)) + if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP) || M.buckled) return M.stop_pulling() diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 275261daba8..034a3ea1963 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -91,6 +91,12 @@ from.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints/green,H,bloodDNA,0,H.dir) // Going bloodDNA = null + var/noslip = 0 + for (var/obj/structure/stool/bed/chair/C in loc) + if (C.buckled_mob == M) + noslip = 1 + if (noslip) + return // no slipping while sitting in a chair, plz switch (src.wet) if(1) if(istype(M, /mob/living/carbon/human)) // Added check since monkeys don't have shoes @@ -116,8 +122,8 @@ M.inertia_dir = 0 return - if(2) //lube //can cause infinite loops - needs work - if(!istype(M, /mob/living/carbon/slime)) + if(2) //lube //can cause infinite loops - needs work + if(!istype(M, /mob/living/carbon/slime) && !M.buckled) M.stop_pulling() step(M, M.dir) spawn(1) step(M, M.dir) diff --git a/code/modules/reagents/reagent_containers/food/snacks/grown.dm b/code/modules/reagents/reagent_containers/food/snacks/grown.dm index 7f4360d3a43..4bebc27660b 100644 --- a/code/modules/reagents/reagent_containers/food/snacks/grown.dm +++ b/code/modules/reagents/reagent_containers/food/snacks/grown.dm @@ -792,7 +792,7 @@ /obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato/Crossed(AM as mob|obj) if (istype(AM, /mob/living/carbon)) var/mob/M = AM - if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP)) + if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP) || M.buckled) return M.stop_pulling()