Skip to content

Floran Speech Revert #6453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 2, 2025
29 changes: 28 additions & 1 deletion code/modules/surgery/organs/internal/tongue/_tongue.dm
Original file line number Diff line number Diff line change
Expand Up @@ -696,10 +696,14 @@ GLOBAL_LIST_INIT(english_to_zombie, list())
/obj/item/organ/internal/tongue/floran
name = "floran tongue"
desc = "A plant-like organ used for speaking and eating."
say_mod = "whistles"
say_mod = "hisses"
modifies_speech = TRUE
liked_foodtypes = GORE | MEAT | DAIRY | SEAFOOD | BUGS
disliked_foodtypes = VEGETABLES

/// How long is our hissssssss?
var/draw_length = 3

/obj/item/organ/internal/tongue/floran/get_scream_sound()
return pick(
'sound/voice/lizard/lizard_scream_1.ogg',
Expand All @@ -710,3 +714,26 @@ GLOBAL_LIST_INIT(english_to_zombie, list())

/obj/item/organ/internal/tongue/floran/get_laugh_sound()
return 'monkestation/sound/voice/laugh/lizard/lizard_laugh.ogg'

/obj/item/organ/internal/tongue/floran/Initialize(mapload)
. = ..()
draw_length = rand(2, 6)
if(prob(10))
draw_length += 2

/obj/item/organ/internal/tongue/floran/modify_speech(datum/source, list/speech_args)
var/static/regex/floran_hiss = new("s+", "g")
var/static/regex/floran_hiSS = new("S+", "g")
var/static/regex/floran_kss = new(@"(\w)x", "g")
var/static/regex/floran_kSS = new(@"(\w)X", "g")
var/static/regex/floran_ecks = new(@"\bx([\-|r|R]|\b)", "g")
var/static/regex/floran_eckS = new(@"\bX([\-|r|R]|\b)", "g")
var/message = speech_args[SPEECH_MESSAGE]
if(message[1] != "*")
message = floran_hiss.Replace(message, repeat_string(draw_length, "s"))
message = floran_hiSS.Replace(message, repeat_string(draw_length, "S"))
message = floran_kss.Replace(message, "$1k[repeat_string(max(draw_length - 1, 1), "s")]")
message = floran_kSS.Replace(message, "$1K[repeat_string(max(draw_length - 1, 1), "S")]")
message = floran_ecks.Replace(message, "eck[repeat_string(max(draw_length - 2, 1), "s")]$1")
message = floran_eckS.Replace(message, "ECK[repeat_string(max(draw_length - 2, 1), "S")]$1")
speech_args[SPEECH_MESSAGE] = message
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,26 @@
"floran_leaves",
list("ADJ"),
)
/datum/preference/numeric/hiss_length
savefile_key = "hiss_length"
savefile_identifier = PREFERENCE_CHARACTER
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
priority = PREFERENCE_PRIORITY_NAMES
can_randomize = FALSE
minimum = 2
maximum = 6

/datum/preference/numeric/hiss_length/create_default_value()
return 3

/datum/preference/numeric/hiss_length/is_accessible(datum/preferences/preferences)
return ..() && ispath(preferences.read_preference(/datum/preference/choiced/species), /datum/species/floran)

/datum/preference/numeric/hiss_length/apply_to_human(mob/living/carbon/human/target, value)
var/obj/item/organ/internal/tongue/floran/tongue = target.get_organ_slot(ORGAN_SLOT_TONGUE)
if(!istype(tongue))
return
tongue.draw_length = value

/datum/preference/choiced/floran_leaves/apply_to_human(mob/living/carbon/human/target, value)
target.dna.features["floran_leaves"] = value
Loading