diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm index 6c89c7d51c..75bffe479e 100644 --- a/code/game/objects/structures/musician.dm +++ b/code/game/objects/structures/musician.dm @@ -1,4 +1,5 @@ +#define MUSIC_MAXLINES 300 /datum/song var/name = "Untitled" @@ -172,7 +173,7 @@ Combined, an example is: E-E4/4,F#/2,G#/8,B/8,E3-E4/4
Lines may be up to 50 characters.
- A song may only contain up to 50 lines.
+ A song may only contain up to [MUSIC_MAXLINES] lines.
"} else dat += "Show Help
" @@ -192,9 +193,9 @@ lines.Cut(1,2) else tempo = sanitize_tempo(5) // default 120 BPM - if(lines.len > 50) + if(lines.len > MUSIC_MAXLINES) to_chat(usr, "Too many lines!") - lines.Cut(51) + lines.Cut(MUSIC_MAXLINES + 1) var/linenum = 1 for(var/l in lines) if(lentext(l) > 50) @@ -258,7 +259,7 @@ var/newline = html_encode(input("Enter your line: ", instrumentObj.name) as text|null) if(!newline || !in_range(instrumentObj, usr)) return - if(lines.len > 50) + if(lines.len > MUSIC_MAXLINES) return if(lentext(newline) > 50) newline = copytext(newline, 1, 50)