Merge upstream

This commit is contained in:
Cyberboss
2017-04-01 23:33:23 -04:00
121 changed files with 2258 additions and 4320 deletions
@@ -37,11 +37,7 @@
/obj/structure/closet/Initialize(mapload)
if(mapload && !opened) // if closed, any item at the crate's loc is put in the contents
. = TRUE //late initialize so we come back here
else if(initialized)
//we were late initialized, so now it's time to...
take_contents()
return
addtimer(CALLBACK(src, .proc/take_contents), 0)
..()
update_icon()
@@ -122,7 +118,7 @@
/obj/structure/closet/proc/take_contents()
var/turf/T = get_turf(src)
for(var/atom/movable/AM in T)
if(insert(AM) == -1) // limit reached
if(AM != src && insert(AM) == -1) // limit reached
break
/obj/structure/closet/proc/open(mob/living/user)
@@ -82,9 +82,7 @@
var/obj/structure/statue/petrified/S = new(loc, src, statue_timer)
S.name = "statue of [name]"
bleedsuppress = 1
S.icon = icon
S.icon_state = icon_state
S.copy_overlays(overlays)
S.copy_overlays(src)
var/newcolor = list(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
S.add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)
return 1
+1 -1
View File
@@ -21,7 +21,7 @@
..()
for(var/obj/structure/lattice/LAT in loc)
if(LAT != src)
qdel(LAT)
QDEL_IN(LAT, 0)
/obj/structure/lattice/blob_act(obj/structure/blob/B)
return
+22 -20
View File
@@ -182,6 +182,27 @@
popup.set_title_image(user.browse_rsc_icon(instrumentObj.icon, instrumentObj.icon_state))
popup.open()
/datum/song/proc/ParseSong(text)
set waitfor = FALSE
//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)
else
tempo = sanitize_tempo(5) // default 120 BPM
if(lines.len > 50)
to_chat(usr, "Too many lines!")
lines.Cut(51)
var/linenum = 1
for(var/l in lines)
if(lentext(l) > 50)
to_chat(usr, "Line [linenum] too long!")
lines.Remove(l)
else
linenum++
updateDialog(usr) // make sure updates when complete
/datum/song/Topic(href, href_list)
if(!usr.canUseTopic(instrumentObj))
@@ -208,26 +229,7 @@
if(cont == "no")
break
while(lentext(t) > 3072)
//split into lines
spawn()
lines = splittext(t, "\n")
if(copytext(lines[1],1,6) == "BPM: ")
tempo = sanitize_tempo(600 / text2num(copytext(lines[1],6)))
lines.Cut(1,2)
else
tempo = sanitize_tempo(5) // default 120 BPM
if(lines.len > 50)
to_chat(usr, "Too many lines!")
lines.Cut(51)
var/linenum = 1
for(var/l in lines)
if(lentext(l) > 50)
to_chat(usr, "Line [linenum] too long!")
lines.Remove(l)
else
linenum++
updateDialog(usr) // make sure updates when complete
ParseSong(t)
else if(href_list["help"])
help = text2num(href_list["help"]) - 1