Backward 512 compatibility removal.

This commit is contained in:
Ghommie
2020-04-23 00:59:23 +02:00
parent 7f271157c3
commit 42201343a9
248 changed files with 478 additions and 544 deletions
+5 -5
View File
@@ -213,7 +213,7 @@
/datum/song/proc/sanitize_tempo(new_tempo)
new_tempo = abs(new_tempo)
return CLAMP(round(new_tempo, world.tick_lag), world.tick_lag, 5 SECONDS)
return clamp(round(new_tempo, world.tick_lag), world.tick_lag, 5 SECONDS)
/datum/song/proc/get_bpm()
return 600 / tempo
@@ -242,22 +242,22 @@
cached_linear_dropoff = volume_decrease_per_decisecond
/datum/song/proc/set_volume(volume)
src.volume = CLAMP(volume, max(0, min_volume), min(100, max_volume))
src.volume = clamp(volume, max(0, min_volume), min(100, max_volume))
update_sustain()
updateDialog()
/datum/song/proc/set_dropoff_volume(volume)
sustain_dropoff_volume = CLAMP(volume, INSTRUMENT_MIN_SUSTAIN_DROPOFF, 100)
sustain_dropoff_volume = clamp(volume, INSTRUMENT_MIN_SUSTAIN_DROPOFF, 100)
update_sustain()
updateDialog()
/datum/song/proc/set_exponential_drop_rate(drop)
sustain_exponential_dropoff = CLAMP(drop, INSTRUMENT_EXP_FALLOFF_MIN, INSTRUMENT_EXP_FALLOFF_MAX)
sustain_exponential_dropoff = clamp(drop, INSTRUMENT_EXP_FALLOFF_MIN, INSTRUMENT_EXP_FALLOFF_MAX)
update_sustain()
updateDialog()
/datum/song/proc/set_linear_falloff_duration(duration)
sustain_linear_duration = CLAMP(duration, 0.1, INSTRUMENT_MAX_TOTAL_SUSTAIN)
sustain_linear_duration = clamp(duration, 0.1, INSTRUMENT_MAX_TOTAL_SUSTAIN)
update_sustain()
updateDialog()
+1 -1
View File
@@ -230,7 +230,7 @@
else if(href_list["setnoteshift"])
var/amount = input(usr, "Set note shift", "Note Shift") as null|num
if(!isnull(amount))
note_shift = CLAMP(amount, note_shift_min, note_shift_max)
note_shift = clamp(amount, note_shift_min, note_shift_max)
else if(href_list["setsustainmode"])
var/choice = input(usr, "Choose a sustain mode", "Sustain Mode") as null|anything in list("Linear", "Exponential")
@@ -52,8 +52,8 @@
if(!num) //it's an accidental
accents[key] = oct_acc //if they misspelled it/fucked up that's on them lmao, no safety checks.
else //octave
octaves[key] = CLAMP(num, octave_min, octave_max)
compiled_chord += CLAMP((note_offset_lookup[key] + octaves[key] * 12 + accent_lookup[accents[key]]), key_min, key_max)
octaves[key] = clamp(num, octave_min, octave_max)
compiled_chord += clamp((note_offset_lookup[key] + octaves[key] * 12 + accent_lookup[accents[key]]), key_min, key_max)
compiled_chord += tempodiv //this goes last
if(length(compiled_chord))
compiled_chords[++compiled_chords.len] = compiled_chord