diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm
index 535b943a060..1fb959a7fc6 100644
--- a/code/game/turfs/simulated/floor.dm
+++ b/code/game/turfs/simulated/floor.dm
@@ -48,7 +48,7 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
if(builtin_tile)
qdel(builtin_tile)
builtin_tile = null
- return ..()
+ . = ..()
/turf/open/floor/ex_act(severity, target)
var/shielded = is_shielded()
@@ -58,8 +58,7 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
if(target == src)
src.ChangeTurf(src.baseturf)
if(target != null)
- ex_act(3)
- return
+ severity = 3
switch(severity)
if(1)
@@ -186,4 +185,4 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
/turf/open/floor/initialize()
..()
- MakeDirty()
\ No newline at end of file
+ MakeDirty()
diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm
index d6bf374fd6f..624feef72f2 100644
--- a/code/modules/events/spacevine.dm
+++ b/code/modules/events/spacevine.dm
@@ -109,23 +109,36 @@
/turf/open/floor/vines/ChangeTurf(turf/open/floor/T)
for(var/obj/effect/spacevine/SV in src)
qdel(SV)
- ..()
+ . = ..()
UpdateAffectingLights()
+/datum/spacevine_mutation/space_covering
+ var/static/list/coverable_turfs
+
+/datum/spacevine_mutation/space_covering/New()
+ . = ..()
+ if(!coverable_turfs)
+ coverable_turfs = typecacheof(list(
+ /turf/open/space
+ ))
+ coverable_turfs -= typecacheof(list(
+ /turf/open/space/transit
+ ))
+
/datum/spacevine_mutation/space_covering/on_grow(obj/effect/spacevine/holder)
- if(istype(holder.loc, /turf/open/space))
- var/turf/open/spaceturf = holder.loc
- spaceturf.ChangeTurf(/turf/open/floor/vines)
+ process_mutation(holder)
/datum/spacevine_mutation/space_covering/process_mutation(obj/effect/spacevine/holder)
- if(istype(holder.loc, /turf/open/space))
- var/turf/open/spaceturf = holder.loc
- spaceturf.ChangeTurf(/turf/open/floor/vines)
+ var/turf/T = get_turf(holder)
+ if(is_type_in_typecache(T, coverable_turfs))
+ var/currtype = T.type
+ T.ChangeTurf(/turf/open/floor/vines)
+ T.baseturf = currtype
/datum/spacevine_mutation/space_covering/on_death(obj/effect/spacevine/holder)
- if(istype(holder.loc, /turf/open/floor/vines))
- var/turf/open/spaceturf = holder.loc
- spaceturf.ChangeTurf(/turf/open/space)
+ var/turf/T = get_turf(holder)
+ if(istype(T, /turf/open/floor/vines))
+ T.ChangeTurf(T.baseturf)
/datum/spacevine_mutation/bluespace
name = "bluespace"
@@ -155,12 +168,13 @@
/datum/spacevine_mutation/toxicity/on_cross(obj/effect/spacevine/holder, mob/living/crosser)
if(issilicon(crosser))
return
- if(prob(severity) && istype(crosser))
+ if(prob(severity) && istype(crosser) && !isvineimmune(crosser))
crosser << "You accidently touch the vine and feel a strange sensation."
crosser.adjustToxLoss(5)
/datum/spacevine_mutation/toxicity/on_eat(obj/effect/spacevine/holder, mob/living/eater)
- eater.adjustToxLoss(5)
+ if(!isvineimmune(eater))
+ eater.adjustToxLoss(5)
/datum/spacevine_mutation/explosive //OH SHIT IT CAN CHAINREACT RUN!!!
name = "explosive"
@@ -173,8 +187,7 @@
qdel(src)
else
. = 1
- spawn(5)
- qdel(src)
+ QDEL_IN(src, 5)
/datum/spacevine_mutation/explosive/on_death(obj/effect/spacevine/holder, mob/hitter, obj/item/I)
explosion(holder.loc, 0, 0, severity, 0, 0)
@@ -210,10 +223,10 @@
quality = NEGATIVE
/datum/spacevine_mutation/aggressive_spread/on_spread(obj/effect/spacevine/holder, turf/target)
- target.ex_act(severity, src)
+ target.ex_act(severity, src) // vine immunity handled at /mob/ex_act
/datum/spacevine_mutation/aggressive_spread/on_buckle(obj/effect/spacevine/holder, mob/living/buckled)
- buckled.ex_act(severity)
+ buckled.ex_act(severity, src)
/datum/spacevine_mutation/transparency
name = "transparent"
@@ -291,13 +304,13 @@
quality = NEGATIVE
/datum/spacevine_mutation/thorns/on_cross(obj/effect/spacevine/holder, mob/living/crosser)
- if(prob(severity) && istype(crosser))
+ if(prob(severity) && istype(crosser) && !isvineimmune(holder))
var/mob/living/M = crosser
M.adjustBruteLoss(5)
M << "You cut yourself on the thorny vines."
/datum/spacevine_mutation/thorns/on_hit(obj/effect/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage)
- if(prob(severity) && istype(hitter))
+ if(prob(severity) && istype(hitter) && !isvineimmune(holder))
var/mob/living/M = hitter
M.adjustBruteLoss(5)
M << "You cut yourself on the thorny vines."
@@ -497,7 +510,7 @@
/obj/effect/spacevine_controller/process()
if(!vines)
- qdel(src) //space vines exterminated. Remove the controller
+ qdel(src) //space vines exterminated. Remove the controller
return
if(!growth_queue)
qdel(src) //Sanity check
@@ -509,7 +522,7 @@
var/i = 0
var/list/obj/effect/spacevine/queue_end = list()
- for( var/obj/effect/spacevine/SV in growth_queue )
+ for(var/obj/effect/spacevine/SV in growth_queue)
if(qdeleted(SV))
continue
i++
@@ -546,12 +559,12 @@
if(!has_buckled_mobs() && prob(25))
for(var/mob/living/V in src.loc)
entangle(V)
- if(buckled_mobs.len)
+ if(buckled_mobs && buckled_mobs.len)
break //only capture one mob at a time
/obj/effect/spacevine/proc/entangle(mob/living/V)
- if(!V)
+ if(!V || isvineimmune(V))
return
for(var/datum/spacevine_mutation/SM in mutations)
SM.on_buckle(src, V)
@@ -585,3 +598,16 @@
override += SM.process_temperature(src, temp, volume)
if(!override)
qdel(src)
+
+/obj/effect/spacevine/CanPass(atom/movable/mover, turf/target, height=0)
+ if(isvineimmune(mover))
+ . = TRUE
+ else
+ . = ..()
+
+/proc/isvineimmune(atom/A)
+ . = FALSE
+ if(isliving(A))
+ var/mob/living/M = A
+ if(("vines" in M.faction) || ("plants" in M.faction))
+ . = TRUE
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index a8068b92f49..f11a76d0fc9 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -120,6 +120,8 @@
var/b_loss = null
var/f_loss = null
var/bomb_armor = getarmor(null, "bomb")
+ if(istype(ex_target, /datum/spacevine_mutation) && isvineimmune(src))
+ return
switch (severity)
if (1)
diff --git a/code/modules/mob/living/carbon/human/species_types.dm b/code/modules/mob/living/carbon/human/species_types.dm
index ac36d4c28cc..d19b8589db8 100644
--- a/code/modules/mob/living/carbon/human/species_types.dm
+++ b/code/modules/mob/living/carbon/human/species_types.dm
@@ -104,6 +104,15 @@
heatmod = 1.5
meat = /obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/plant
+/datum/species/pod/on_species_gain(mob/living/carbon/C, datum/species/old_species)
+ . = ..()
+ C.faction |= "plants"
+ C.faction |= "vines"
+
+/datum/species/pod/on_species_loss(mob/living/carbon/C)
+ . = ..()
+ C.faction -= "plants"
+ C.faction -= "vines"
/datum/species/pod/spec_life(mob/living/carbon/human/H)
if(H.stat == DEAD)
@@ -146,8 +155,6 @@
H.show_message("The radiation beam singes you!")
if(/obj/item/projectile/energy/florayield)
H.nutrition = min(H.nutrition+30, NUTRITION_LEVEL_FULL)
- return
-
/*
SHADOWPEOPLE
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index f6a9200c49b..dc93198a8a1 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -225,7 +225,9 @@ Sorry Giacom. Please don't be mad :(
/mob/living/proc/InCritical()
return (src.health < 0 && src.health > -95 && stat == UNCONSCIOUS)
-/mob/living/ex_act(severity, target)
+/mob/living/ex_act(severity, origin)
+ if(istype(origin, /datum/spacevine_mutation) && isvineimmune(src))
+ return
..()
flash_eyes()
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index bce40f6b5a2..53187f4e7ec 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -423,16 +423,25 @@
/mob/living/simple_animal/ex_act(severity, target)
..()
+ var/bomb_armor = getarmor(null, "bomb")
switch (severity)
if (1)
- gib()
- return
-
+ if(prob(bomb_armor))
+ adjustBruteLoss(500)
+ else
+ gib()
+ return
if (2)
- adjustBruteLoss(60)
+ var/bloss = 60
+ if(prob(bomb_armor))
+ bloss = bloss / 1.5
+ adjustBruteLoss(bloss)
if(3)
- adjustBruteLoss(30)
+ var/bloss = 30
+ if(prob(bomb_armor))
+ bloss = bloss / 1.5
+ adjustBruteLoss(bloss)
/mob/living/simple_animal/proc/CanAttack(atom/the_target)
if(see_invisible < the_target.invisibility)