Many botany QoL changes. (#25031)

* Many botany QoL changes.

* Give observers a plant analyzer.

* Hooks should be executable.

* Upgraded Seed Extractor GUI.

* Left-align seed extractor, more efficient icon sending.

* tgui rebuild

* Apply suggestions from code review

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>

* 's' properly

---------

Co-authored-by: FunnyMan3595 (Charlie Nolan) <funnyman@google.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
Charlie Nolan
2024-04-15 19:58:09 +00:00
committed by GitHub
co-authored by Burzah FunnyMan3595
parent 0b838dc3c4
commit a881e11c86
28 changed files with 756 additions and 304 deletions
@@ -36,6 +36,8 @@ GLOBAL_DATUM_INIT(ghost_crew_monitor, /datum/ui_module/crew_monitor/ghost, new)
var/health_scan = FALSE //does the ghost have health scanner mode on? by default it should be off
///toggle for ghost gas analyzer
var/gas_analyzer = FALSE
///toggle for ghost plant analyzer
var/plant_analyzer = FALSE
var/datum/orbit_menu/orbit_menu
/// The "color" their runechat would have had
var/alive_runechat_color = "#FFFFFF"
@@ -585,6 +587,18 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
to_chat(src, "<span class='notice'>Gas Analyzer enabled. Click on a pipe to analyze.</span>")
gas_analyzer = TRUE
/mob/dead/observer/verb/toggle_plant_anaylzer()
set name = "Toggle Plant Analyzer"
set desc = "Toggles wether you can anaylze plants and seeds on click"
set category = "Ghost"
if(plant_analyzer)
to_chat(src, "<span class='notice'>Plant Analyzer disabled.</span>")
plant_analyzer = FALSE
else
to_chat(src, "<span class='notice'>Plant Analyzer enabled. Click on a plant or seed to analyze.</span>")
plant_analyzer = TRUE
/mob/dead/observer/verb/analyze_air()
set name = "Analyze Air"
set category = "Ghost"
@@ -9,7 +9,7 @@ emp_act
/mob/living/carbon/human/bullet_act(obj/item/projectile/P, def_zone)
if(!dna.species.bullet_act(P, src))
if(!dna.species.bullet_act(P, src, def_zone))
add_attack_logs(P.firer, src, "hit by [P.type] but got deflected by species '[dna.species]'")
P.reflect_back(src) //It has to be here, not on species. Why? Who knows. Testing showed me no reason why it doesn't work on species, and neither did tracing. It has to be here, or it gets qdel'd by bump.
return -1
@@ -111,24 +111,22 @@
H.adjustBruteLoss(2)
..()
/datum/species/diona/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H)
switch(P.type)
if(/obj/item/projectile/energy/floramut)
if(prob(15))
H.rad_act(rand(30, 80))
H.Weaken(10 SECONDS)
H.visible_message("<span class='warning'>[H] writhes in pain as [H.p_their()] vacuoles boil.</span>", "<span class='userdanger'>You writhe in pain as your vacuoles boil!</span>", "<span class='italics'>You hear the crunching of leaves.</span>")
if(prob(80))
randmutb(H)
domutcheck(H)
else
randmutg(H)
domutcheck(H)
else
H.adjustFireLoss(rand(5, 15))
H.show_message("<span class='warning'>The radiation beam singes you!</span>")
if(/obj/item/projectile/energy/florayield)
H.set_nutrition(min(H.nutrition + 30, NUTRITION_LEVEL_FULL))
/datum/species/diona/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H, def_zone)
if(istype(P, /obj/item/projectile/energy/floramut))
P.nodamage = TRUE
H.Weaken(1 SECONDS)
if(prob(80))
randmutb(H)
else
randmutg(H)
H.visible_message("[H] writhes for a moment as [H.p_their()] nymphs squirm and mutate.", "All of you squirm uncomfortably for a moment as you feel your genes changing.")
else if(istype(P, /obj/item/projectile/energy/florayield))
P.nodamage = TRUE
var/obj/item/organ/external/organ = H.get_organ(check_zone(def_zone))
if(!organ)
organ = H.get_organ("chest")
organ.heal_damage(5, 5)
H.visible_message("[H] seems invogorated as [P] hits [H.p_their()] [organ.name].", "Your [organ.name] greedily absorbs [P].")
return TRUE
/// Same name and everything; we want the same limitations on them; we just want their regeneration to kick in at all times and them to have special factions