basic code cleanup and limits
This commit is contained in:
@@ -51,8 +51,8 @@
|
||||
H.dna.features["body_model"] = H.gender
|
||||
|
||||
H.set_bark(pick(GLOB.bark_random_list))
|
||||
H.vocal_pitch = ((H.gender == MALE ? rand(60, 120) : (H.gender == FEMALE ? rand(80, 140) : rand(60,140))) / 100)
|
||||
H.vocal_pitch_range = rand(10, 40) / 100
|
||||
H.vocal_pitch = BARK_PITCH_RAND(H.gender)
|
||||
H.vocal_pitch_range = BARK_VARIANCE_RAND
|
||||
|
||||
SEND_SIGNAL(H, COMSIG_HUMAN_ON_RANDOMIZE)
|
||||
|
||||
|
||||
@@ -1033,8 +1033,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
bark_id = sanitize_inlist(bark_id, GLOB.bark_list, pick(GLOB.bark_random_list))
|
||||
var/datum/bark/bark_path = GLOB.bark_list[bark_id]
|
||||
bark_speed = sanitize_num_clamp(bark_speed, initial(bark_path.minspeed), initial(bark_path.maxspeed), initial(bark_speed))
|
||||
bark_pitch = sanitize_num_clamp(bark_pitch, initial(bark_path.minpitch), initial(bark_path.maxpitch), ((gender == MALE ? rand(60, 120) : (gender == FEMALE ? rand(80, 140) : rand(60,140))) / 100))
|
||||
bark_variance = sanitize_num_clamp(bark_variance, initial(bark_path.minvariance), initial(bark_path.maxvariance), (rand(10, 40) / 100))
|
||||
bark_pitch = sanitize_num_clamp(bark_pitch, initial(bark_path.minpitch), initial(bark_path.maxpitch), BARK_PITCH_RAND(gender))
|
||||
bark_variance = sanitize_num_clamp(bark_variance, initial(bark_path.minvariance), initial(bark_path.maxvariance), BARK_VARIANCE_RAND)
|
||||
|
||||
joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole))
|
||||
//Validate job prefs
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
pref_species = new rando_race()
|
||||
features = random_features(pref_species?.id, gender)
|
||||
bark_id = pick(GLOB.bark_random_list)
|
||||
bark_pitch = ((gender == MALE ? rand(60, 120) : (gender == FEMALE ? rand(80, 140) : rand(60,140))) / 100)
|
||||
bark_variance = rand(10, 40) / 100
|
||||
bark_pitch = BARK_PITCH_RAND(gender)
|
||||
bark_variance = BARK_VARIANCE_RAND
|
||||
age = rand(AGE_MIN,AGE_MAX)
|
||||
|
||||
/datum/preferences/proc/update_preview_icon(current_tab)
|
||||
|
||||
@@ -317,11 +317,13 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
continue
|
||||
if(!(M.client.prefs.toggles & SOUND_BARK))
|
||||
listening -= M
|
||||
var/barks = round((LAZYLEN(message) / vocal_speed)) + 1
|
||||
var/barks = min(round((LAZYLEN(message) / vocal_speed)) + 1, BARK_MAX_BARKS)
|
||||
var/total_delay
|
||||
for(var/i in 1 to barks)
|
||||
if(total_delay > BARK_MAX_TIME)
|
||||
break
|
||||
addtimer(CALLBACK(src, /atom/movable/proc/bark, listening, (message_range * (is_yell ? 4 : 1)), (vocal_volume * (is_yell ? 1.5 : 1)), rand(vocal_pitch * 100, ((vocal_pitch*100) + (vocal_pitch_range*100))) / 100), total_delay)
|
||||
total_delay += rand(DS2TICKS((vocal_speed/4) * (is_yell ? 0.5 : 1)), DS2TICKS(vocal_speed/4) + DS2TICKS((vocal_speed/4) * (is_yell ? 0.5 : 1))) TICKS
|
||||
total_delay += rand(DS2TICKS((vocal_speed / BARK_SPEED_BASELINE) * (is_yell ? 0.5 : 1)), DS2TICKS(vocal_speed / BARK_SPEED_BASELINE) + DS2TICKS((vocal_speed / BARK_SPEED_BASELINE) * (is_yell ? 0.5 : 1))) TICKS
|
||||
|
||||
|
||||
/atom/movable/proc/process_yelling(list/already_heard, rendered, atom/movable/speaker, datum/language/message_language, message, list/spans, message_mode, obj/source)
|
||||
|
||||
Reference in New Issue
Block a user