Skip to content

Commit

Permalink
hisssss
Browse files Browse the repository at this point in the history
  • Loading branch information
KnigTheThrasher committed Jun 23, 2024
1 parent 1fa4cb6 commit f436e7e
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 6 deletions.
21 changes: 15 additions & 6 deletions code/modules/surgery/organs/tongue.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,15 @@
modifies_speech = TRUE
languages_native = list(/datum/language/draconic)

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

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

/obj/item/organ/internal/tongue/lizard/modify_speech(datum/source, list/speech_args)
var/static/regex/lizard_hiss = new("s+", "g")
var/static/regex/lizard_hiSS = new("S+", "g")
Expand All @@ -137,12 +146,12 @@
var/static/regex/lizard_eckS = new(@"\bX([\-|r|R]|\b)", "g")
var/message = speech_args[SPEECH_MESSAGE]
if(message[1] != "*")
message = lizard_hiss.Replace(message, "sss")
message = lizard_hiSS.Replace(message, "SSS")
message = lizard_kss.Replace(message, "$1kss")
message = lizard_kSS.Replace(message, "$1KSS")
message = lizard_ecks.Replace(message, "ecks$1")
message = lizard_eckS.Replace(message, "ECKS$1")
message = lizard_hiss.Replace(message, repeat_string(draw_length, "s"))
message = lizard_hiSS.Replace(message, repeat_string(draw_length, "S"))
message = lizard_kss.Replace(message, "$1k[repeat_string(max(draw_length - 1, 1), "s")]")
message = lizard_kSS.Replace(message, "$1K[repeat_string(max(draw_length - 1, 1), "S")]")
message = lizard_ecks.Replace(message, "eck[repeat_string(max(draw_length - 2, 1), "s")]$1")
message = lizard_eckS.Replace(message, "ECK[repeat_string(max(draw_length - 2, 1), "S")]$1")
speech_args[SPEECH_MESSAGE] = message

/obj/item/organ/internal/tongue/lizard/silver
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/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/lizard)

/datum/preference/numeric/hiss_length/apply_to_human(mob/living/carbon/human/target, value)
var/obj/item/organ/internal/tongue/lizard/tongue = target.get_organ_slot(ORGAN_SLOT_TONGUE)
if(!istype(tongue))
return
tongue.draw_length = value
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6332,6 +6332,7 @@
#include "monkestation\code\modules\client\preferences\species_features\floran.dm"
#include "monkestation\code\modules\client\preferences\species_features\goblin.dm"
#include "monkestation\code\modules\client\preferences\species_features\ipc.dm"
#include "monkestation\code\modules\client\preferences\species_features\lizard.dm"
#include "monkestation\code\modules\client\preferences\species_features\secondary_mut_color.dm"
#include "monkestation\code\modules\client\preferences\species_features\simians.dm"
#include "monkestation\code\modules\client\verbs\looc.dm"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { FeatureNumberInput, FeatureNumeric } from './base';

export const hiss_length: FeatureNumeric = {
name: 'Hiss Length',
description: 'How long do you hissssss for?',
component: FeatureNumberInput,
};

0 comments on commit f436e7e

Please sign in to comment.