Skip to content

Commit

Permalink
[PORT] Lets Lizards Customize Hiss Length (#2380)
Browse files Browse the repository at this point in the history
* hisssss

* marks non modular shit (i forgor lol)

* makes it look better

---------

Co-authored-by: KnighTheThrasher <[email protected]>
  • Loading branch information
KnigTheThrasher and KnigTheThrasher authored Jun 24, 2024
1 parent 36771e8 commit 2ba2ca9
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 6 deletions.
25 changes: 19 additions & 6 deletions code/modules/surgery/organs/tongue.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,17 @@
modifies_speech = TRUE
languages_native = list(/datum/language/draconic, /datum/language/ashtongue)

//MONKESTATION EDIT START

/// 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,14 +148,16 @@
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

//MONKESTATION EDIT END

/obj/item/organ/internal/tongue/lizard/silver
name = "silver tongue"
desc = "A genetic branch of the high society Silver Scales that gives them their silverizing properties. To them, it is everything, and society traitors have their tongue forcibly revoked. Oddly enough, it itself is just blue."
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 @@ -6559,6 +6559,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 2ba2ca9

Please sign in to comment.