Files
CHOMPStation2/code/modules/client/preference_setup/vore/03_egg.dm
Rykka Stormheart 7d2027bbde Preferred Language + Autohiss Default Options
Autohiss can now be set to Full from the character menu, and by default, it is assumed Full. It will respect save/load and client connect/disconnect, meaning you no longer have to constantly toggle autohiss.

Preferred Language can now be set. This allows a default spoken language other than Common to be set from spawn, allowing characters to simply join with the language they'd prefer speaking, rather than having to fiddle with "Set Default Language" every time they spawn.
Server rules do still apply, ofc. You must be able to speak Common or at least +understand+ it capably enough to do your job.

See Preferred Language Setting here;
![](https://i.imgur.com/NnGw3hx.png)
Menu for it here:
![](https://i.imgur.com/PSS3PPf.png)

See Autohiss Settings here:
![](https://i.imgur.com/L36Hw5N.png)

Yes, Autohiss is set underneath Egg Type. I wanted to use some of the space there. I can move it up under the Size/etc panels and speech verbs if requested.
2023-03-04 01:56:08 -08:00

77 lines
2.9 KiB
Plaintext

// Define a place to save appearance in character setup
// CHOMPStation Add Start: Doing this here bc AUTOHISS_FULL is more readable than #
#define AUTOHISS_OFF 0
#define AUTOHISS_BASIC 1
#define AUTOHISS_FULL 2
// CHOMPStation Add End
/datum/preferences
var/vore_egg_type = "Egg" //The egg type they have.
var/autohiss = "Full" // CHOMPStation Add: Whether we have Autohiss on. I'm hijacking the egg panel bc this one has a shitton of unused space.
// Definition of the stuff for the egg type.
/datum/category_item/player_setup_item/vore/egg
name = "Egg appearance."
sort_order = 3
/datum/category_item/player_setup_item/vore/egg/load_character(var/savefile/S)
S["vore_egg_type"] >> pref.vore_egg_type
S["autohiss"] >> pref.autohiss // CHOMPStation Add
/datum/category_item/player_setup_item/vore/egg/save_character(var/savefile/S)
S["vore_egg_type"] << pref.vore_egg_type
S["autohiss"] << pref.autohiss // CHOMPStation Add
/datum/category_item/player_setup_item/vore/egg/sanitize_character()
pref.vore_egg_type = sanitize_inlist(pref.vore_egg_type, global_vore_egg_types, initial(pref.vore_egg_type))
/datum/category_item/player_setup_item/vore/egg/copy_to_mob(var/mob/living/carbon/human/character)
character.vore_egg_type = pref.vore_egg_type
// CHOMPStation Add
if(pref.client) // Safety, just in case so we don't runtime.
if(!pref.autohiss)
pref.client.autohiss_mode = AUTOHISS_FULL
else
switch(pref.autohiss)
if("Full")
pref.client.autohiss_mode = AUTOHISS_FULL
if("Basic")
pref.client.autohiss_mode = AUTOHISS_BASIC
if("Off")
pref.client.autohiss_mode = AUTOHISS_OFF
// CHOMPStation Add
/datum/category_item/player_setup_item/vore/egg/content(var/mob/user)
. += "<br>"
. += " Egg Type: <a href='?src=\ref[src];vore_egg_type=1'>[pref.vore_egg_type]</a><br>"
. += "<b>Autohiss Default Setting:</b> <a href='?src=\ref[src];autohiss=1'>[pref.autohiss]</a><br>" // CHOMPStation Add
/datum/category_item/player_setup_item/vore/egg/OnTopic(var/href, var/list/href_list, var/mob/user)
if(!CanUseTopic(user))
return TOPIC_NOACTION
else if(href_list["vore_egg_type"])
var/list/vore_egg_types = global_vore_egg_types
var/selection = tgui_input_list(user, "Choose your character's egg type:", "Character Preference", vore_egg_types, pref.vore_egg_type)
if(selection)
pref.vore_egg_type = selection
return TOPIC_REFRESH
// CHOMPStation Add Start
else if(href_list["autohiss"])
var/list/autohiss_selection = list("Full", "Basic", "Off")
var/selection = tgui_input_list(user, "Choose your default autohiss setting:", "Character Preference", autohiss_selection, pref.autohiss)
if(selection)
pref.autohiss = selection
else if(!selection)
pref.autohiss = "Full"
return TOPIC_REFRESH
// CHOMPStation Add End
else
return
// CHOMPStation Add Start: Doing this here bc AUTOHISS_FULL is more readable than #
#undef AUTOHISS_OFF
#undef AUTOHISS_BASIC
#undef AUTOHISS_FULL
// CHOMPStation Add End