mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 03:59:59 +01:00
## About The Pull Request Venus Human Traps now have their own category in the orbit menu. It is a pleasant shade of green, just like vines are.  Venus Human Traps are also now given their antagonist datum upon spawning from a flower. The datum isn't really anything special but it's consistent with the other antag spawners. This also makes the spawner piece of the VHT flower bud invisible. It's an abstract object meant to handle the logic for spawning, and only the structure should be visible. This currently manifests as there being two, identical flower buds on the same tile when a flower bud spawns. I did not want to get into untangling the two objects in this PR. ## Why It's Good For The Game Venus human traps being lumped in with the humans in the "Alive" menu is WEIRD. Now ghosts can give a gigantic vine infestation the attention it truly deserves. Fixes a minor visual incongruity found while doing all this. ## Changelog 🆑 Rhials qol: Venus Human Traps are now visible in the orbit menu. Cool! fix: Spawning as a Venus Human Trap now properly gives you an antag datum/objective. fix: Venus human trap flowers no longer have a second, identical flower under themselves. /🆑
57 lines
2.1 KiB
Plaintext
57 lines
2.1 KiB
Plaintext
/// Handles logic for ghost spawning code, visible object in game is handled by /obj/structure/alien/resin/flower_bud
|
|
/obj/effect/mob_spawn/ghost_role/venus_human_trap
|
|
name = "flower bud"
|
|
desc = "A large pulsating plant..."
|
|
icon = 'icons/mob/spacevines.dmi'
|
|
icon_state = "bud0"
|
|
mob_type = /mob/living/basic/venus_human_trap
|
|
density = FALSE
|
|
prompt_name = "venus human trap"
|
|
you_are_text = "You are a venus human trap."
|
|
flavour_text = "You are a venus human trap! Protect the kudzu at all costs, and feast on those who oppose you!"
|
|
faction = list(FACTION_HOSTILE,FACTION_VINES,FACTION_PLANTS)
|
|
spawner_job_path = /datum/job/venus_human_trap
|
|
invisibility = INVISIBILITY_ABSTRACT //The flower bud structure is our visible component, we just handle logic.
|
|
/// Physical structure housing the spawner
|
|
var/obj/structure/alien/resin/flower_bud/flower_bud
|
|
/// Used to determine when to notify ghosts
|
|
var/ready = FALSE
|
|
|
|
/obj/effect/mob_spawn/ghost_role/venus_human_trap/Destroy()
|
|
if(flower_bud) // anti harddel checks
|
|
if(!QDELETED(flower_bud))
|
|
qdel(flower_bud)
|
|
flower_bud = null
|
|
return ..()
|
|
|
|
/obj/effect/mob_spawn/ghost_role/venus_human_trap/equip(mob/living/basic/venus_human_trap/spawned_human_trap)
|
|
if(spawned_human_trap && flower_bud)
|
|
if(flower_bud.trait_flags & SPACEVINE_HEAT_RESISTANT)
|
|
spawned_human_trap.unsuitable_heat_damage = 0
|
|
if(flower_bud.trait_flags & SPACEVINE_COLD_RESISTANT)
|
|
spawned_human_trap.unsuitable_cold_damage = 0
|
|
|
|
/obj/effect/mob_spawn/ghost_role/venus_human_trap/special(mob/living/spawned_mob, mob/mob_possessor)
|
|
. = ..()
|
|
spawned_mob.mind.add_antag_datum(/datum/antagonist/venus_human_trap)
|
|
|
|
/// Called when the attached flower bud has borne fruit (ie. is ready)
|
|
/obj/effect/mob_spawn/ghost_role/venus_human_trap/proc/bear_fruit()
|
|
ready = TRUE
|
|
notify_ghosts(
|
|
"[src] has borne fruit!",
|
|
source = src,
|
|
header = "Venus Human Trap",
|
|
click_interact = TRUE,
|
|
ignore_key = POLL_IGNORE_VENUSHUMANTRAP,
|
|
)
|
|
|
|
/obj/effect/mob_spawn/ghost_role/venus_human_trap/allow_spawn(mob/user, silent = FALSE)
|
|
. = ..()
|
|
if(!.)
|
|
return FALSE
|
|
if(!ready)
|
|
if(!silent)
|
|
to_chat(user, span_warning("\The [src] has not borne fruit yet!"))
|
|
return FALSE
|