Merge remote-tracking branch 'upstream/master' into TGUIs_Nexties
This commit is contained in:
@@ -126,8 +126,10 @@
|
||||
new /obj/item/clothing/mask/bandana/black(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/under/assistantformal(src)
|
||||
new /obj/item/clothing/suit/hooded/wintercoat/aformal(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/under/assistantformal(src)
|
||||
new /obj/item/clothing/suit/hooded/wintercoat/aformal(src)
|
||||
if(prob(30))
|
||||
new /obj/item/clothing/suit/hooded/wintercoat(src)
|
||||
new /obj/item/clothing/shoes/winterboots(src)
|
||||
@@ -169,4 +171,6 @@
|
||||
if(prob(30))
|
||||
new /obj/item/clothing/suit/hooded/wintercoat(src)
|
||||
new /obj/item/clothing/shoes/winterboots(src)
|
||||
if (prob(30))
|
||||
new /obj/item/clothing/suit/hooded/wintercoat/polychromic(src)
|
||||
return
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
climb_time = 10 //real fast, because let's be honest stepping into or onto a crate is easy
|
||||
climb_stun = 0 //climbing onto crates isn't hard, guys
|
||||
delivery_icon = "deliverycrate"
|
||||
material_drop = /obj/item/stack/sheet/plasteel
|
||||
material_drop_amount = 5
|
||||
var/obj/item/paper/fluff/jobs/cargo/manifest/manifest
|
||||
|
||||
/obj/structure/closet/crate/New()
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
switch(choice)
|
||||
if("name")
|
||||
var/newname = copytext(sanitize(input(H, "Who are we again?", "Name change", H.name) as null|text),1,MAX_NAME_LEN)
|
||||
var/newname = reject_bad_name(stripped_input(H, "Who are we again?", "Name change", H.name, MAX_NAME_LEN))
|
||||
|
||||
if(!newname)
|
||||
return
|
||||
|
||||
@@ -109,8 +109,10 @@
|
||||
var/cur_note = text2ascii(note) - 96
|
||||
if(cur_note < 1 || cur_note > 7)
|
||||
continue
|
||||
for(var/i=2 to length(note))
|
||||
var/ni = copytext(note,i,i+1)
|
||||
var/notelen = length(note)
|
||||
var/ni = ""
|
||||
for(var/i = length(note[1]) + 1, i <= notelen, i += length(ni))
|
||||
ni = note[i]
|
||||
if(!text2num(ni))
|
||||
if(ni == "#" || ni == "b" || ni == "n")
|
||||
cur_acc[cur_note] = ni
|
||||
@@ -199,9 +201,10 @@
|
||||
//split into lines
|
||||
lines = splittext(text, "\n")
|
||||
if(lines.len)
|
||||
if(copytext(lines[1],1,6) == "BPM: ")
|
||||
tempo = sanitize_tempo(600 / text2num(copytext(lines[1],6)))
|
||||
lines.Cut(1,2)
|
||||
var/bpm_string = "BPM: "
|
||||
if(findtext(lines[1], bpm_string, 1, length(bpm_string) + 1))
|
||||
tempo = sanitize_tempo(600 / text2num(copytext(lines[1], length(bpm_string) + 1)))
|
||||
lines.Cut(1, 2)
|
||||
else
|
||||
tempo = sanitize_tempo(5) // default 120 BPM
|
||||
if(lines.len > MUSIC_MAXLINES)
|
||||
@@ -209,7 +212,7 @@
|
||||
lines.Cut(MUSIC_MAXLINES + 1)
|
||||
var/linenum = 1
|
||||
for(var/l in lines)
|
||||
if(length(l) > MUSIC_MAXLINECHARS)
|
||||
if(length_char(l) > MUSIC_MAXLINECHARS)
|
||||
to_chat(usr, "Line [linenum] too long!")
|
||||
lines.Remove(l)
|
||||
else
|
||||
@@ -236,11 +239,11 @@
|
||||
if(!in_range(instrumentObj, usr))
|
||||
return
|
||||
|
||||
if(length(t) >= MUSIC_MAXLINES * MUSIC_MAXLINECHARS)
|
||||
if(length_char(t) >= MUSIC_MAXLINES * MUSIC_MAXLINECHARS)
|
||||
var/cont = input(usr, "Your message is too long! Would you like to continue editing it?", "", "yes") in list("yes", "no")
|
||||
if(cont == "no")
|
||||
break
|
||||
while(length(t) > MUSIC_MAXLINES * MUSIC_MAXLINECHARS)
|
||||
while(length_char(t) > MUSIC_MAXLINES * MUSIC_MAXLINECHARS)
|
||||
ParseSong(t)
|
||||
|
||||
else if(href_list["help"])
|
||||
@@ -284,11 +287,9 @@
|
||||
|
||||
else if(href_list["modifyline"])
|
||||
var/num = round(text2num(href_list["modifyline"]),1)
|
||||
var/content = html_encode(input("Enter your line: ", instrumentObj.name, lines[num]) as text|null)
|
||||
var/content = stripped_input(usr, "Enter your line: ", instrumentObj.name, lines[num], MUSIC_MAXLINECHARS)
|
||||
if(!content || !in_range(instrumentObj, usr))
|
||||
return
|
||||
if(length(content) > MUSIC_MAXLINECHARS)
|
||||
content = copytext(content, 1, MUSIC_MAXLINECHARS)
|
||||
if(num > lines.len || num < 1)
|
||||
return
|
||||
lines[num] = content
|
||||
|
||||
Reference in New Issue
Block a user