mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
Merge pull request #6455 from Crazylemon64/smart_kudzu
Kudzu is now more intelligent about where it tries to grow
This commit is contained in:
@@ -66,6 +66,9 @@
|
||||
/datum/spacevine_mutation/proc/on_explosion(severity, obj/effect/spacevine/holder)
|
||||
return
|
||||
|
||||
/datum/spacevine_mutation/proc/on_search(severity, obj/effect/spacevine/holder)
|
||||
return
|
||||
|
||||
|
||||
/datum/spacevine_mutation/space_covering
|
||||
name = "space protective"
|
||||
@@ -150,6 +153,7 @@
|
||||
/datum/spacevine_mutation/bluespace/on_spread(obj/effect/spacevine/holder, turf/target)
|
||||
if(holder.energy > 1 && !locate(/obj/effect/spacevine) in target)
|
||||
holder.master.spawn_spacevine_piece(target, holder)
|
||||
. = TRUE
|
||||
|
||||
/datum/spacevine_mutation/light
|
||||
name = "light"
|
||||
@@ -218,6 +222,7 @@
|
||||
var/obj/effect/spacevine/prey = locate() in target
|
||||
if(prey && !prey.mutations.Find(src)) //Eat all vines that are not of the same origin
|
||||
qdel(prey)
|
||||
. = TRUE
|
||||
|
||||
/datum/spacevine_mutation/aggressive_spread //very OP, but im out of other ideas currently
|
||||
name = "aggressive spreading"
|
||||
@@ -227,6 +232,7 @@
|
||||
|
||||
/datum/spacevine_mutation/aggressive_spread/on_spread(obj/effect/spacevine/holder, turf/target)
|
||||
target.ex_act(severity) // vine immunity handled at /mob/ex_act
|
||||
. = TRUE
|
||||
|
||||
/datum/spacevine_mutation/aggressive_spread/on_buckle(obj/effect/spacevine/holder, mob/living/buckled)
|
||||
buckled.ex_act(severity)
|
||||
@@ -291,6 +297,14 @@
|
||||
holder.entangle(crosser)
|
||||
|
||||
|
||||
/datum/spacevine_mutation/virulent_spread
|
||||
name = "virulently spreading"
|
||||
hue = "#FF8080"
|
||||
quality = MINOR_NEGATIVE
|
||||
|
||||
/datum/spacevine_mutation/virulent_spread/on_search(obj/effect/spacevine/holder)
|
||||
return 1
|
||||
|
||||
// SPACE VINES (Note that this code is very similar to Biomass code)
|
||||
/obj/effect/spacevine
|
||||
name = "space vines"
|
||||
@@ -532,15 +546,24 @@
|
||||
buckle_mob(V, 1)
|
||||
|
||||
/obj/effect/spacevine/proc/spread()
|
||||
var/direction = pick(cardinal)
|
||||
var/turf/stepturf = get_step(src,direction)
|
||||
var/list/dir_list = cardinal.Copy()
|
||||
var/spread_search = FALSE // Whether to exhaustive search all 4 cardinal dirs for an open direction
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
SM.on_spread(src, stepturf)
|
||||
stepturf = get_step(src,direction) //in case turf changes, to make sure no runtimes happen
|
||||
if(!locate(/obj/effect/spacevine, stepturf))
|
||||
if(stepturf.Enter(src))
|
||||
if(master)
|
||||
master.spawn_spacevine_piece(stepturf, src)
|
||||
spread_search |= SM.on_search(src)
|
||||
while(dir_list.len)
|
||||
var/direction = pick(dir_list)
|
||||
dir_list -= direction
|
||||
var/turf/stepturf = get_step(src,direction)
|
||||
var/spread_success = FALSE
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
spread_success |= SM.on_spread(src, stepturf) // If this returns 1, spreading succeeded
|
||||
if(!locate(/obj/effect/spacevine, stepturf))
|
||||
if(stepturf.Enter(src))
|
||||
if(master)
|
||||
master.spawn_spacevine_piece(stepturf, src)
|
||||
spread_success = TRUE
|
||||
if(spread_success || !spread_search)
|
||||
break
|
||||
|
||||
/obj/effect/spacevine/ex_act(severity)
|
||||
var/i
|
||||
|
||||
Reference in New Issue
Block a user