Obsolete the PROXMOVE flag and uses

This commit is contained in:
Aronai Sieyes
2020-05-18 13:01:25 -04:00
parent 0adea12715
commit e3b5d24c8b
20 changed files with 125 additions and 78 deletions

View File

@@ -72,8 +72,9 @@
var/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/plant
/obj/effect/plant/Destroy()
if(plant_controller)
plant_controller.remove_plant(src)
if(seed.get_trait(TRAIT_SPREAD)==2)
unsense_proximity(callback = .HasProximity, center = get_turf(src))
plant_controller.remove_plant(src)
for(var/obj/effect/plant/neighbor in range(1,src))
plant_controller.add_plant(neighbor)
return ..()
@@ -106,6 +107,7 @@
name = seed.display_name
max_health = round(seed.get_trait(TRAIT_ENDURANCE)/2)
if(seed.get_trait(TRAIT_SPREAD)==2)
sense_proximity(callback = .HasProximity) // Grabby
max_growth = VINE_GROWTH_STAGES
growth_threshold = max_health/VINE_GROWTH_STAGES
icon = 'icons/obj/hydroponics_vines.dmi'

View File

@@ -1,4 +1,4 @@
/obj/effect/plant/HasProximity(var/atom/movable/AM)
/obj/effect/plant/HasProximity(turf/T, atom/movable/AM, old_loc)
if(!is_mature() || seed.get_trait(TRAIT_SPREAD) != 2)
return
@@ -13,6 +13,14 @@
spawn(1)
entangle(M)
/obj/effect/plant/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
if(seed.get_trait(TRAIT_SPREAD)==2)
if(isturf(old_loc))
unsense_proximity(callback = .HasProximity, center = old_loc)
if(isturf(loc))
sense_proximity(callback = .HasProximity)
/obj/effect/plant/attack_hand(var/mob/user)
manual_unbuckle(user)