From 2bf748fd6a0f45dae6fa0e7aa408e14174f9a092 Mon Sep 17 00:00:00 2001
From: swissloaf <39781787+swissloaf@users.noreply.github.com>
Date: Fri, 27 Mar 2020 16:21:23 -0500
Subject: [PATCH 01/10] Venus Human Trap Update
---
code/modules/events/spacevine.dm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm
index 4b598a55654c..c9e47ec88773 100644
--- a/code/modules/events/spacevine.dm
+++ b/code/modules/events/spacevine.dm
@@ -227,13 +227,13 @@
quality = NEGATIVE
/datum/spacevine_mutation/thorns/on_cross(obj/structure/spacevine/holder, mob/living/crosser)
- if(prob(severity) && istype(crosser) && !isvineimmune(holder))
+ if(prob(severity) && istype(crosser) && !isvineimmune(crosser))
var/mob/living/M = crosser
M.adjustBruteLoss(5)
to_chat(M, "You cut yourself on the thorny vines.")
/datum/spacevine_mutation/thorns/on_hit(obj/structure/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage)
- if(prob(severity) && istype(hitter) && !isvineimmune(holder))
+ if(prob(severity) && istype(hitter) && !isvineimmune(hitter))
var/mob/living/M = hitter
M.adjustBruteLoss(5)
to_chat(M, "You cut yourself on the thorny vines.")
@@ -251,7 +251,7 @@
holder.obj_integrity = holder.max_integrity
/datum/spacevine_mutation/woodening/on_hit(obj/structure/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage)
- if(I.is_sharp())
+ if(I?.get_sharpness())
. = expected_damage * 0.5
else
. = expected_damage
@@ -544,8 +544,8 @@
. = ..()
/proc/isvineimmune(atom/A)
- . = FALSE
if(isliving(A))
var/mob/living/M = A
if(("vines" in M.faction) || ("plants" in M.faction))
- . = TRUE
+ return TRUE
+ return FALSE
From 104171329381fa872b01c539a0db327caabe3854 Mon Sep 17 00:00:00 2001
From: swissloaf <39781787+swissloaf@users.noreply.github.com>
Date: Fri, 27 Mar 2020 16:23:21 -0500
Subject: [PATCH 02/10] Language
---
code/modules/language/language_holder.dm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/code/modules/language/language_holder.dm b/code/modules/language/language_holder.dm
index 0110b1f32559..b1bc328f7916 100644
--- a/code/modules/language/language_holder.dm
+++ b/code/modules/language/language_holder.dm
@@ -292,6 +292,11 @@ Key procs
understood_languages = list(/datum/language/common = list(LANGUAGE_ATOM),
/datum/language/slime = list(LANGUAGE_ATOM))
spoken_languages = list(/datum/language/slime = list(LANGUAGE_ATOM))
+
+/datum/language_holder/venus
+ understood_languages = list(/datum/language/sylvan = list(LANGUAGE_ATOM))
+ spoken_languages = list(/datum/language/sylvan = list(LANGUAGE_ATOM))
+ blocked_languages = list(/datum/language/common = list(LANGUAGE_ATOM))
/datum/language_holder/swarmer
understood_languages = list(/datum/language/swarmer = list(LANGUAGE_ATOM))
From cb5de0fdea8ce09342b95d2ba3f0ffa5ef37f93f Mon Sep 17 00:00:00 2001
From: swissloaf <39781787+swissloaf@users.noreply.github.com>
Date: Fri, 27 Mar 2020 16:25:31 -0500
Subject: [PATCH 03/10] VENUS
---
.../simple_animal/hostile/venus_human_trap.dm | 191 +++++++++++-------
1 file changed, 122 insertions(+), 69 deletions(-)
diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
index 497a0c3310f9..a8ee529e4947 100644
--- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
+++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
@@ -1,5 +1,13 @@
-
-
+/**
+ * Kudzu Flower Bud
+ *
+ * A flower created by flowering kudzu which spawns a venus human trap after a certain amount of time has passed.
+ *
+ * A flower created by kudzu with the flowering mutation. Spawns a venus human trap after 2 minutes under normal circumstances.
+ * Also spawns 4 vines going out in diagonal directions from the bud. Any living creature not aligned with plants is damaged by these vines.
+ * Once it grows a venus human trap, the bud itself will destroy itself.
+ *
+ */
/obj/structure/alien/resin/flower_bud_enemy //inheriting basic attack/damage stuff from alien structures
name = "flower bud"
desc = "A large pulsating plant..."
@@ -9,9 +17,9 @@
opacity = 0
canSmoothWith = list()
smooth = SMOOTH_FALSE
+ /// The amount of time it takes to create a venus human trap, in deciseconds
var/growth_time = 1200
-
/obj/structure/alien/resin/flower_bud_enemy/Initialize()
. = ..()
var/list/anchors = list()
@@ -25,35 +33,49 @@
B.sleep_time = 10 //these shouldn't move, so let's slow down updates to 1 second (any slower and the deletion of the vines would be too slow)
addtimer(CALLBACK(src, .proc/bear_fruit), growth_time)
+/**
+ * Spawns a venus human trap, then qdels itself.
+ *
+ * Displays a message, spawns a human venus trap, then qdels itself.
+ */
/obj/structure/alien/resin/flower_bud_enemy/proc/bear_fruit()
visible_message("the plant has borne fruit!")
new /mob/living/simple_animal/hostile/venus_human_trap(get_turf(src))
qdel(src)
-
/obj/effect/ebeam/vine
name = "thick vine"
mouse_opacity = MOUSE_OPACITY_ICON
desc = "A thick vine, painful to the touch."
-
/obj/effect/ebeam/vine/Crossed(atom/movable/AM)
if(isliving(AM))
var/mob/living/L = AM
- if(!("vines" in L.faction))
+ if(!isvineimmune(L))
L.adjustBruteLoss(5)
to_chat(L, "You cut yourself on the thorny vines.")
-
-
+/**
+ * Venus Human Trap
+ *
+ * The result of a kudzu flower bud, these enemies use vines to drag prey close to them for attack.
+ *
+ * A carnivorious plant which uses vines to catch and ensnare prey. Spawns from kudzu flower buds.
+ * Each one has a maximum of four vines, which can be attached to a variety of things. Carbons are stunned when a vine is attached to them, and movable entities are pulled closer over time.
+ * Attempting to attach a vine to something with a vine already attached to it will pull all movable targets closer on command.
+ * Once the prey is in melee range, melee attacks from the venus human trap heals itself for 10% of its max health, assuming the target is alive.
+ * Akin to certain spiders, venus human traps can also be possessed and controlled by ghosts.
+ *
+ */
/mob/living/simple_animal/hostile/venus_human_trap
name = "venus human trap"
desc = "Now you know how the fly feels."
icon_state = "venus_human_trap"
+ health_doll_icon = "venus_human_trap"
layer = SPACEVINE_MOB_LAYER
health = 50
maxHealth = 50
- ranged = 1
+ ranged = TRUE
harm_intent_damage = 5
obj_damage = 60
melee_damage_lower = 25
@@ -62,75 +84,106 @@
attack_sound = 'sound/weapons/bladeslice.ogg'
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
unsuitable_atmos_damage = 0
+ lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
faction = list("hostile","vines","plants")
- var/list/grasping = list()
- var/list/tethers = list()
- var/max_grasps = 4
- var/grasp_chance = 20
- var/grasp_pull_chance = 85
- var/grasp_range = 4
- del_on_death = 1
-
-/mob/living/simple_animal/hostile/venus_human_trap/Destroy()
- for(var/L in grasping)
- var/datum/beam/B = grasping[L]
- if(B)
- qdel(B)
- for(var/datum/component/tether in tethers)
- tether.RemoveComponent()
- grasping = null
- return ..()
-
-/mob/living/simple_animal/hostile/venus_human_trap/handle_automated_action()
- if(..())
- for(var/mob/living/L in grasping)
- if(L.stat == DEAD)
- var/datum/beam/B = grasping[L]
- if(B)
- B.End()
- grasping -= L
-
- //Can attack+pull multiple times per cycle
- if(L.Adjacent(src))
- L.attack_animal(src)
- else
- if(prob(grasp_pull_chance))
- setDir(get_dir(src,L) )//staaaare
- step(L,get_dir(L,src)) //reel them in
- L.Paralyze(60) //you can't get away now~
-
- if(length(grasping) < max_grasps)
- grasping:
- for(var/mob/living/L in view(grasp_range, src))
- if(L == src || faction_check_mob(L) || L in grasping || L == target)
- continue
- for(var/turf/T in getline(src,L))
- if (T.density)
- continue grasping
- for(var/obj/O in T)
- if(O.density)
- continue grasping
- if(prob(grasp_chance))
- to_chat(L, "\The [src] has you entangled!")
- grasping[L] = Beam(L, "vine", time=INFINITY, maxdistance=5, beam_type=/obj/effect/ebeam/vine)
- tethers += list(L.AddComponent(/datum/component/tether, src, grasp_range+1, /obj/effect/ebeam/vine), AddComponent(/datum/component/tether, L, grasp_range+1, /obj/effect/ebeam/vine))
- break //only take 1 new victim per cycle
-
+ initial_language_holder = /datum/language_holder/venus
+ del_on_death = TRUE
+ /// A list of all the plant's vines
+ var/list/vines = list()
+ /// The maximum amount of vines a plant can have at one time
+ var/max_vines = 4
+ /// How far away a plant can attach a vine to something
+ var/vine_grab_distance = 5
+ /// Whether or not this plant is ghost possessable
+ var/playable_plant = TRUE
+
+/mob/living/simple_animal/hostile/venus_human_trap/Life()
+ . = ..()
+ pull_vines()
+
+/mob/living/simple_animal/hostile/venus_human_trap/AttackingTarget()
+ . = ..()
+ if(isliving(target))
+ var/mob/living/L = target
+ if(L.stat != DEAD)
+ adjustHealth(-maxHealth * 0.1)
/mob/living/simple_animal/hostile/venus_human_trap/OpenFire(atom/the_target)
+ for(var/datum/beam/B in vines)
+ if(B.target == the_target)
+ pull_vines()
+ ranged_cooldown = world.time + (ranged_cooldown_time * 0.5)
+ return
+ if(get_dist(src,the_target) > vine_grab_distance || vines.len == max_vines)
+ return
for(var/turf/T in getline(src,target))
if (T.density)
return
for(var/obj/O in T)
if(O.density)
return
- var/dist = get_dist(src,the_target)
- Beam(the_target, "vine", time=dist*2, maxdistance=dist+2, beam_type=/obj/effect/ebeam/vine)
- the_target.attack_animal(src)
-
+
+ var/datum/beam/newVine = Beam(the_target, "vine", time=INFINITY, maxdistance = vine_grab_distance, beam_type=/obj/effect/ebeam/vine)
+ RegisterSignal(newVine, COMSIG_PARENT_QDELETING, .proc/remove_vine, newVine)
+ vines += newVine
+ if(isliving(the_target))
+ var/mob/living/L = the_target
+ L.Paralyze(20)
+ ranged_cooldown = world.time + ranged_cooldown_time
+
+/mob/living/simple_animal/hostile/venus_human_trap/Login()
+ . = ..()
+ to_chat(src, "You a venus human trap! Protect the kudzu at all costs, and feast on those who oppose you!")
-/mob/living/simple_animal/hostile/venus_human_trap/CanAttack(atom/the_target)
+/mob/living/simple_animal/hostile/venus_human_trap/attack_ghost(mob/user)
. = ..()
if(.)
- if(the_target in grasping)
- return 0
+ return
+ humanize_plant(user)
+
+/**
+ * Sets a ghost to control the plant if the plant is eligible
+ *
+ * Asks the interacting ghost if they would like to control the plant.
+ * If they answer yes, and another ghost hasn't taken control, sets the ghost to control the plant.
+ * Arguments:
+ * * mob/user - The ghost to possibly control the plant
+ */
+/mob/living/simple_animal/hostile/venus_human_trap/proc/humanize_plant(mob/user)
+ if(key || !playable_plant || stat)
+ return
+ var/plant_ask = alert("Become a venus human trap?", "Are you reverse vegan?", "Yes", "No")
+ if(plant_ask == "No" || QDELETED(src))
+ return
+ if(key)
+ to_chat(user, "Someone else already took this plant!")
+ return
+ key = user.key
+ log_game("[key_name(src)] took control of [name].")
+
+/**
+ * Manages how the vines should affect the things they're attached to.
+ *
+ * Pulls all movable targets of the vines closer to the plant
+ * If the target is on the same tile as the plant, destroy the vine
+ * Removes any QDELETED vines from the vines list.
+ */
+/mob/living/simple_animal/hostile/venus_human_trap/proc/pull_vines()
+ for(var/datum/beam/B in vines)
+ if(istype(B.target, /atom/movable))
+ var/atom/movable/AM = B.target
+ if(!AM.anchored)
+ step(AM,get_dir(AM,src))
+ if(get_dist(src,B.target) == 0)
+ B.End()
+
+/**
+ * Removes a vine from the list.
+ *
+ * Removes the vine from our list.
+ * Called specifically when the vine is about to be destroyed, so we don't have any null references.
+ * Arguments:
+ * * datum/beam/vine - The vine to be removed from the list.
+ */
+mob/living/simple_animal/hostile/venus_human_trap/proc/remove_vine(datum/beam/vine, force)
+ vines -= vine
From bf5c003c2a040184f9705081a5c85c503f5e1131 Mon Sep 17 00:00:00 2001
From: swissloaf <39781787+swissloaf@users.noreply.github.com>
Date: Fri, 27 Mar 2020 17:08:11 -0500
Subject: [PATCH 04/10] doll
---
.../modules/mob/living/simple_animal/hostile/venus_human_trap.dm | 1 -
1 file changed, 1 deletion(-)
diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
index a8ee529e4947..03f53527fe24 100644
--- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
+++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
@@ -71,7 +71,6 @@
name = "venus human trap"
desc = "Now you know how the fly feels."
icon_state = "venus_human_trap"
- health_doll_icon = "venus_human_trap"
layer = SPACEVINE_MOB_LAYER
health = 50
maxHealth = 50
From fa88770c11a790e5dca67c2b7414a1c3e43e227b Mon Sep 17 00:00:00 2001
From: swissloaf <39781787+swissloaf@users.noreply.github.com>
Date: Fri, 27 Mar 2020 17:12:59 -0500
Subject: [PATCH 05/10] Sylvan so travis can pass
---
code/modules/language/sylvan.dm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 code/modules/language/sylvan.dm
diff --git a/code/modules/language/sylvan.dm b/code/modules/language/sylvan.dm
new file mode 100644
index 000000000000..11e8866cfc3d
--- /dev/null
+++ b/code/modules/language/sylvan.dm
@@ -0,0 +1,18 @@
+// The language of the podpeople. Yes, it's a shameless ripoff of elvish.
+/datum/language/sylvan
+ name = "Sylvan"
+ desc = "A complicated, ancient language spoken by sentient plants."
+ speech_verb = "expresses"
+ ask_verb = "inquires"
+ exclaim_verb = "declares"
+ key = "h"
+ space_chance = 20
+ syllables = list(
+ "fii", "sii", "rii", "rel", "maa", "ala", "san", "tol", "tok", "dia", "eres",
+ "fal", "tis", "bis", "qel", "aras", "losk", "rasa", "eob", "hil", "tanl", "aere",
+ "fer", "bal", "pii", "dala", "ban", "foe", "doa", "cii", "uis", "mel", "wex",
+ "incas", "int", "elc", "ent", "aws", "qip", "nas", "vil", "jens", "dila", "fa",
+ "la", "re", "do", "ji", "ae", "so", "qe", "ce", "na", "mo", "ha", "yu"
+ )
+ icon_state = "plant"
+ default_priority = 90
From f23c8c65a29fceadb5d8f448b9cccde42b2ccff1 Mon Sep 17 00:00:00 2001
From: swissloaf <39781787+swissloaf@users.noreply.github.com>
Date: Fri, 27 Mar 2020 17:17:39 -0500
Subject: [PATCH 06/10] Sharp so travis can pass
---
code/modules/events/spacevine.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm
index c9e47ec88773..77ae92a120a8 100644
--- a/code/modules/events/spacevine.dm
+++ b/code/modules/events/spacevine.dm
@@ -251,7 +251,7 @@
holder.obj_integrity = holder.max_integrity
/datum/spacevine_mutation/woodening/on_hit(obj/structure/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage)
- if(I?.get_sharpness())
+ if(I.is_sharp())
. = expected_damage * 0.5
else
. = expected_damage
From bd0384726c0c494cbcb853ef70b4f16374ad7105 Mon Sep 17 00:00:00 2001
From: swissloaf <39781787+swissloaf@users.noreply.github.com>
Date: Fri, 27 Mar 2020 17:24:03 -0500
Subject: [PATCH 07/10] plant
---
code/modules/language/language_holder.dm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/code/modules/language/language_holder.dm b/code/modules/language/language_holder.dm
index b1bc328f7916..69fd0100e97f 100644
--- a/code/modules/language/language_holder.dm
+++ b/code/modules/language/language_holder.dm
@@ -310,6 +310,12 @@ Key procs
spoken_languages = list(/datum/language/common = list(LANGUAGE_ATOM),
/datum/language/machine = list(LANGUAGE_ATOM),
/datum/language/draconic = list(LANGUAGE_ATOM))
+
+/datum/language_holder/plant
+ understood_languages = list(/datum/language/common = list(LANGUAGE_ATOM),
+ /datum/language/sylvan = list(LANGUAGE_ATOM))
+ spoken_languages = list(/datum/language/common = list(LANGUAGE_ATOM),
+ /datum/language/sylvan = list(LANGUAGE_ATOM))
/datum/language_holder/preternis
understood_languages = list(/datum/language/common = list(LANGUAGE_ATOM),
From a85adcea56116511af29a3db35609a091117e90e Mon Sep 17 00:00:00 2001
From: swissloaf <39781787+swissloaf@users.noreply.github.com>
Date: Fri, 27 Mar 2020 17:24:44 -0500
Subject: [PATCH 08/10] tongue sylvan
---
code/modules/surgery/organs/tongue.dm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/code/modules/surgery/organs/tongue.dm b/code/modules/surgery/organs/tongue.dm
index 725ea19df683..45ea7d960325 100644
--- a/code/modules/surgery/organs/tongue.dm
+++ b/code/modules/surgery/organs/tongue.dm
@@ -19,6 +19,7 @@
/datum/language/ratvar,
/datum/language/aphasia,
/datum/language/piratespeak,
+ /datum/language/sylvan,
/datum/language/japanese,
/datum/language/machine, //yogs
/datum/language/darkspawn //also yogs
@@ -238,4 +239,4 @@
new_message += message[i] + message[i] + message[i] //aaalllsssooo ooopppeeennn tttooo sssuuuggggggeeessstttiiiooonsss
else
new_message += message[i]
- speech_args[SPEECH_MESSAGE] = new_message
\ No newline at end of file
+ speech_args[SPEECH_MESSAGE] = new_message
From b40fd8749c5b90814043d58356ff267f405c640a Mon Sep 17 00:00:00 2001
From: swissloaf <39781787+swissloaf@users.noreply.github.com>
Date: Fri, 27 Mar 2020 17:27:49 -0500
Subject: [PATCH 09/10] dme
---
yogstation.dme | 1 +
1 file changed, 1 insertion(+)
diff --git a/yogstation.dme b/yogstation.dme
index 1e2be9af0a16..8c1de2bb1d8d 100644
--- a/yogstation.dme
+++ b/yogstation.dme
@@ -1906,6 +1906,7 @@
#include "code\modules\language\ratvarian.dm"
#include "code\modules\language\slime.dm"
#include "code\modules\language\swarmer.dm"
+#include "code\modules\language\sylvan.dm"
#include "code\modules\language\xenocommon.dm"
#include "code\modules\library\lib_codex_gigas.dm"
#include "code\modules\library\lib_items.dm"
From 3ea97ae6f6e962858d2189401d6d514d087060cb Mon Sep 17 00:00:00 2001
From: swissloaf <39781787+swissloaf@users.noreply.github.com>
Date: Mon, 30 Mar 2020 11:33:13 -0500
Subject: [PATCH 10/10] gramm,ar
---
.../mob/living/simple_animal/hostile/venus_human_trap.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
index 03f53527fe24..9a764a28bbe3 100644
--- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
+++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
@@ -132,7 +132,7 @@
/mob/living/simple_animal/hostile/venus_human_trap/Login()
. = ..()
- to_chat(src, "You a venus human trap! Protect the kudzu at all costs, and feast on those who oppose you!")
+ to_chat(src, "You are a venus human trap! Protect the kudzu at all costs, and feast on those who oppose you!")
/mob/living/simple_animal/hostile/venus_human_trap/attack_ghost(mob/user)
. = ..()