From 0385903ea0cdc8a2b6ba2cab29f20848718f4835 Mon Sep 17 00:00:00 2001 From: Wildkins Date: Thu, 14 Apr 2022 22:26:14 -0400 Subject: [PATCH] Fix TRAIT_CARNIVOROUS doing nothing (#13513) --- code/modules/hydroponics/spreading/spreading.dm | 1 + code/modules/hydroponics/spreading/spreading_response.dm | 6 +++++- html/changelogs/johnwildkins-plants.yml | 6 ++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/johnwildkins-plants.yml diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index 13f24550a3f..3484db30ad3 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -45,6 +45,7 @@ icon = 'icons/obj/hydroponics_growing.dmi' icon_state = "bush4-1" layer = 3 + flags = PROXMOVE pass_flags = PASSTABLE mouse_opacity = 2 diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm index ff4e81c167e..2db5cc8bfc9 100644 --- a/code/modules/hydroponics/spreading/spreading_response.dm +++ b/code/modules/hydroponics/spreading/spreading_response.dm @@ -1,12 +1,16 @@ /obj/effect/plant/HasProximity(var/atom/movable/AM) - if(!is_mature() || seed.get_trait(TRAIT_SPREAD) != 2) + if(!is_mature() || (seed.get_trait(TRAIT_SPREAD) != 2 && seed.get_trait(TRAIT_CARNIVOROUS) == 0)) return var/mob/living/M = AM if(!istype(M)) return + if(!issmall(M) && seed.get_trait(TRAIT_SPREAD) != 2 && seed.get_trait(TRAIT_CARNIVOROUS) != 2) + // let TRAIT_CARNIVOROUS = 1 plants eat small creatures without murdering every hydroponicist + return + if(!buckled && !M.buckled_to && !M.anchored && (issmall(M) || prob(round(seed.get_trait(TRAIT_POTENCY)/6)))) //wait a tick for the Entered() proc that called HasProximity() to finish (and thus the moving animation), //so we don't appear to teleport from two tiles away when moving into a turf adjacent to vines. diff --git a/html/changelogs/johnwildkins-plants.yml b/html/changelogs/johnwildkins-plants.yml new file mode 100644 index 00000000000..1a199a00a26 --- /dev/null +++ b/html/changelogs/johnwildkins-plants.yml @@ -0,0 +1,6 @@ +author: JohnWildkins + +delete-after: True + +changes: + - bugfix: "Carnivorous and weedy plants now properly check for nearby mobs to entangle and stab."