Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
ba94bd9
piper
ynot01 Nov 30, 2023
5ae46a4
fix rand runtime
ynot01 Nov 30, 2023
80f4d72
preview button in prefs - pitch max - polys
ynot01 Nov 30, 2023
0574b7d
unlocks the tts url -LOCK THIS BEFORE MERGE-
ynot01 Nov 30, 2023
8d9992d
relock url, comment out config entry
ynot01 Dec 1, 2023
52871ea
the subsystem update woohoo
ynot01 Dec 1, 2023
57512f4
remove debug print
ynot01 Dec 1, 2023
d929c07
Update tts.dm
ynot01 Dec 1, 2023
bc0df40
Update config.txt
ynot01 Dec 1, 2023
0e2e633
copy filters on radio
ynot01 Dec 1, 2023
17b0d8f
colossus LOUTER
ynot01 Dec 1, 2023
0679cf0
colossus joe
ynot01 Dec 1, 2023
6e2b43e
TALL
ynot01 Dec 1, 2023
af0a35c
dont hear voices in lobby or hardcrit
ynot01 Dec 2, 2023
52aa633
tape recorder now is visible_message
ynot01 Dec 2, 2023
19cf64d
research console now is visible_message
ynot01 Dec 2, 2023
c318f54
Update rdconsole.dm
ynot01 Dec 2, 2023
dfde358
clown high pitch
ynot01 Dec 2, 2023
224b418
observers can now once again hear tts
ynot01 Dec 2, 2023
8e4794f
Merge branch 'master' into piper-tts-uncursed
ynot01 Dec 3, 2023
1b7f951
the filter patch
ynot01 Dec 3, 2023
3834929
ai & borg voices
ynot01 Dec 3, 2023
0ba6fb6
Merge branch 'piper-tts-uncursed' of https://github.com/ynot01/Yogsta…
ynot01 Dec 3, 2023
7cb6b04
Update prettyfilter.dm
ynot01 Dec 3, 2023
e23c5de
remove ai echo
ynot01 Dec 3, 2023
b9f61be
state laws even slower
ynot01 Dec 3, 2023
c88e596
lint
ynot01 Dec 3, 2023
dd78db3
oops
ynot01 Dec 3, 2023
9ba9d44
remove & filter
ynot01 Dec 3, 2023
315cda7
fix tts showing as available before it is
ynot01 Dec 3, 2023
8840a70
Update tts_filter.txt
ynot01 Dec 3, 2023
1a7a86c
add hmm
ynot01 Dec 3, 2023
9fb7cd3
fix a runtime
ynot01 Dec 3, 2023
e3bbba1
sanitize again bc i fucked up bad
ynot01 Dec 3, 2023
da2da18
us pronounced correctly
ynot01 Dec 4, 2023
e877f20
remove asterisk spam on radio
ynot01 Dec 6, 2023
dcd4585
chameleon mask voice change
ynot01 Dec 6, 2023
6c31275
remove debug msgs
ynot01 Dec 6, 2023
6602caf
fix config broken
ynot01 Dec 7, 2023
4949061
Merge branch 'master' into piper-tts-uncursed
ynot01 Jan 5, 2024
50036a8
unset a change that causes corn flakes
ynot01 Jan 6, 2024
97f3334
moves this to hopefully fix conflicts
ynot01 Jan 6, 2024
e322bb2
commits a cardinal sin to avoid conflicts
ynot01 Jan 6, 2024
bf47f1d
Update atoms_movable.dm
ynot01 Jan 6, 2024
0945f4f
clear cache after confirmed connection
ynot01 Jan 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__DEFINES/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
#define SPAN_SINGING "singing"
#define SPAN_CULTLARGE "cultlarge"
#define SPAN_HELIUM "small"
#define SPAN_COLOSSUS "colossus"

//bitflag #defines for return value of the radio() proc.
#define ITALICS (1<<0)
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
#define INIT_ORDER_QUIRKS 73
#define INIT_ORDER_EVENTS 70
#define INIT_ORDER_JOBS 65
#define INIT_ORDER_TTS 62
#define INIT_ORDER_MAPPING 60
#define INIT_ORDER_TICKER 50
#define INIT_ORDER_EARLY_ASSETS 48
Expand Down Expand Up @@ -202,6 +203,7 @@
#define FIRE_PRIORITY_TGUI 110
#define FIRE_PRIORITY_TICKER 200
#define FIRE_PRIORITY_ATMOS_ADJACENCY 300
#define FIRE_PRIORITY_TTS 390
#define FIRE_PRIORITY_CHAT 400
#define FIRE_PRIORITY_RUNECHAT 410
#define FIRE_PRIORITY_OVERLAYS 500
Expand Down
37 changes: 37 additions & 0 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,43 @@ GLOBAL_LIST_INIT(skin_tone_names, list(
"mixed4" = "Macadamia",
))

GLOBAL_LIST_INIT(tts_voices_names, sortList(list(
"GB-alba" = "Alba (Scottish Female)",
"GB-aru" = "Aru (North-East English Female)",
"GB-jenny_dioco" = "Jenny (Welsh Female)",
"GB-northern_english_male" = "Josh (Yorkshire Male)",
"GB-southern_english_female" = "Lucy (London Female)",
"GB-vctk" = "Vctk (Midlands Female)",
"US-amy" = "Amy (Northern American Female)",
"US-danny" = "Danny (British American Male)",
"US-joe" = "Joe (Hawaiian Male)",
"US-kathleen" = "Kathleen (Elder East Coast American Female)",
"US-kusal" = "Kusal (Asian American Male)",
"US-libritts_r" = "Libritts (Michigan Female)",
// Custom voices down here
"US-josef" = "Josef (Canadian Male)",
"US-andrew" = "Andrew (East Coast American Male)",
"US-cameron" = "Cameron (West Coast American Male)"
)))
GLOBAL_PROTECT(tts_voices_names)

// Don't list custom voices on this list, they will be fetched by the API
GLOBAL_LIST_INIT(tts_voices, sortList(list(
"GB-alba",
"GB-aru",
"GB-jenny_dioco",
"GB-northern_english_male",
"GB-southern_english_female",
"GB-vctk",
"US-amy",
"US-danny",
"US-joe",
"US-kathleen",
"US-kusal",
"US-libritts_r"
)))
GLOBAL_PROTECT(tts_voices)

GLOBAL_LIST_EMPTY(species_list)

/proc/age2agedescription(age)
Expand Down
5 changes: 5 additions & 0 deletions code/__HELPERS/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -849,3 +849,8 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
/proc/sanitize_css_class_name(name)
var/static/regex/regex = new(@"[^a-zA-Z0-9]","g")
return replacetext(name, regex, "")

/// Removes all unsafe cmd/shell text
/proc/sanitize_tts_input(txt)
var/static/regex/regex = new(@"[^a-zA-Z0-9,._+:@%/\- ]","g")
return replacetext(txt, regex, "")
116 changes: 116 additions & 0 deletions code/__HELPERS/tts_filters.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
// shamelessly copied from traits.dm
// filter accessor defines
#define ADD_FILTER(target, filter, source) \
do { \
var/list/_L; \
if (!target.tts_filters) { \
target.tts_filters = list(); \
_L = target.tts_filters; \
_L[filter] = list(source); \
} else { \
_L = target.tts_filters; \
if (_L[filter]) { \
_L[filter] |= list(source); \
} else { \
_L[filter] = list(source); \
} \
} \
} while (0)
#define REMOVE_FILTER(target, filter, sources) \
do { \
var/list/_L = target.tts_filters; \
var/list/_S; \
if (sources && !islist(sources)) { \
_S = list(sources); \
} else { \
_S = sources\
}; \
if (_L && _L[filter]) { \
for (var/_T in _L[filter]) { \
if ((!_S && (_T != ROUNDSTART_FILTER)) || (_T in _S)) { \
_L[filter] -= _T \
} \
};\
if (!length(_L[filter])) { \
_L -= filter; \
}; \
if (!length(_L)) { \
target.tts_filters = null \
}; \
} \
} while (0)
#define REMOVE_FILTER_NOT_FROM(target, filter, sources) \
do { \
var/list/_filters_list = target.tts_filters; \
var/list/_sources_list; \
if (sources && !islist(sources)) { \
_sources_list = list(sources); \
} else { \
_sources_list = sources\
}; \
if (_filters_list && _filters_list[filter]) { \
for (var/_filter_source in _filters_list[filter]) { \
if (!(_filter_source in _sources_list)) { \
_filters_list[filter] -= _filter_source \
} \
};\
if (!length(_filters_list[filter])) { \
_filters_list -= filter; \
}; \
if (!length(_filters_list)) { \
target.tts_filters = null \
}; \
} \
} while (0)
#define REMOVE_FILTERS_NOT_IN(target, sources) \
do { \
var/list/_L = target.tts_filters; \
var/list/_S = sources; \
if (_L) { \
for (var/_T in _L) { \
_L[_T] &= _S;\
if (!length(_L[_T])) { \
_L -= _T; \
}; \
};\
if (!length(_L)) { \
target.tts_filters = null\
};\
}\
} while (0)
#define REMOVE_FILTERS_IN(target, sources) \
do { \
var/list/_L = target.tts_filters; \
var/list/_S = sources; \
if (sources && !islist(sources)) { \
_S = list(sources); \
} else { \
_S = sources\
}; \
if (_L) { \
for (var/_T in _L) { \
_L[_T] -= _S;\
if (!length(_L[_T])) { \
_L -= _T; \
}; \
};\
if (!length(_L)) { \
target.tts_filters = null\
};\
}\
} while (0)
#define HAS_FILTER(target, filter) (target.tts_filters ? (target.tts_filters[filter] ? TRUE : FALSE) : FALSE)
#define HAS_FILTER_FROM(target, filter, source) (target.tts_filters ? (target.tts_filters[filter] ? (source in target.tts_filters[filter]) : FALSE) : FALSE)

// common filter sources
#define ROUNDSTART_FILTER "roundstart" // quirks, mob types, cannot be removed
#define RADIO_PROCESSING_FILTER "radio_processing"

// tts filters
#define TTS_FILTER_LIZARD "lizard"
#define TTS_FILTER_ALIEN "alien"
#define TTS_FILTER_ETHEREAL "ethereal"
#define TTS_FILTER_ROBOTIC "robotic"
#define TTS_FILTER_MASKED "masked"
#define TTS_FILTER_ROBOCOP "robocop"
#define TTS_FILTER_RADIO "radio"
4 changes: 2 additions & 2 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1260,11 +1260,11 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
return FALSE
return TRUE

#define UNTIL(X) while(!(X)) stoplag()

/proc/pass(...)
return

#define UNTIL(X) while(!(X)) stoplag()

/proc/get_mob_or_brainmob(occupant)
var/mob/living/mob_occupant

Expand Down
16 changes: 16 additions & 0 deletions code/controllers/configuration/entries/game_options.dm
Original file line number Diff line number Diff line change
Expand Up @@ -446,3 +446,19 @@

/datum/config_entry/number/max_shuttle_size
config_entry_value = 250

/datum/config_entry/string/tts_http_url
protection = CONFIG_ENTRY_LOCKED

/datum/config_entry/string/tts_http_token
protection = CONFIG_ENTRY_LOCKED|CONFIG_ENTRY_HIDDEN

/datum/config_entry/flag/tts_enable

/datum/config_entry/number/tts_cap_shutoff
config_entry_value = 75
protection = CONFIG_ENTRY_LOCKED

/datum/config_entry/number/tts_uncap_reboot
config_entry_value = 60
protection = CONFIG_ENTRY_LOCKED
Loading