mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 04:22:39 +01:00
Fix TRAIT_CARNIVOROUS doing nothing (#13513)
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
icon = 'icons/obj/hydroponics_growing.dmi'
|
||||
icon_state = "bush4-1"
|
||||
layer = 3
|
||||
flags = PROXMOVE
|
||||
pass_flags = PASSTABLE
|
||||
mouse_opacity = 2
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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."
|
||||
Reference in New Issue
Block a user