mushroom local telepathy (#35223)

* lib comp filter/sort working on boxstation

* addressing UI issues

* public/remote gallery changes for compatibility

* local telepathy option

* small refactor

* target -> targets, more accurate with local/all

* include __DEFINES\living.dm

* change to minimize duplication

* making All target auto update

* bitwise operation

---------

Co-authored-by: gheritt <145183032+gheritt@users.noreply.github.com>
This commit is contained in:
toomykins
2023-11-18 23:50:12 +01:00
committed by GitHub
parent 9fa22ac446
commit 72817b4266
7 changed files with 39 additions and 3 deletions

View File

@@ -1360,9 +1360,10 @@ var/list/has_died_as_golem = list()
species_intro = "You are a Mushroom Person.<br>\
You are an odd creature. Your lack of a mouth prevents you from eating, but you can stand or lay on food to absorb it.<br>\
You have a resistance to burn and toxin, but you are vulnerable to brute attacks.<br>\
You are adept at seeing in the dark, moreso with your light inversion ability. When you speak, it will only go to the target chosen with your Fungal Telepathy.<br>\
You are adept at seeing in the dark, moreso with your light inversion ability. When you speak, it will only go to the targets chosen with your Fungal Telepathy.<br>\
You also have access to the Sporemind, which allows you to communicate with others on the Sporemind through :~"
var/mob/living/telepathic_target[] = list()
var/telepathy_type = LOCAL_TELEPATHY
/datum/species/mushroom/makeName()
return capitalize(pick(mush_first)) + " " + capitalize(pick(mush_last))
@@ -1381,6 +1382,16 @@ var/list/has_died_as_golem = list()
to_chat(M, "<span class='warning'>You must be conscious to do this!</span>")
return
if(telepathy_type & (LOCAL_TELEPATHY | GLOBAL_TELEPATHY))
telepathic_target.len = 0
var/list/possible_targets = M.mind.heard_before
var/datum/mind/temp_target
for(var/T in possible_targets)
temp_target = possible_targets[T]
if(!temp_target.current || ((telepathy_type & LOCAL_TELEPATHY) && !(get_dist(temp_target.current, M) <= SPEECH_RANGE)))
continue
telepathic_target += temp_target.current
if(!telepathic_target.len)
var/mob/living/L = M
telepathic_target += L