Merge pull request #14981 from neersighted/510

BYOND 510
This commit is contained in:
tkdrg
2016-02-05 00:04:59 -03:00
90 changed files with 708 additions and 1231 deletions
@@ -61,8 +61,7 @@
return
if(M == user) //they're using it on themselves
if(!M.eye_blind)
flick("flash", M.flash)
if(M.flash_eyes(visual = 1))
M.visible_message("[M] directs [src] to \his eyes.", \
"<span class='notice'>You wave the light in front of your eyes! Trippy!</span>")
else
@@ -80,8 +79,7 @@
else if(M.dna.check_mutation(XRAY)) //mob has X-RAY vision
user << "<span class='danger'>[M] pupils give an eerie glow!</span>"
else //they're okay!
if(!M.eye_blind)
flick("flash", M.flash) //flash the affected mob
if(M.flash_eyes(visual = 1))
user << "<span class='notice'>[M]'s pupils narrow.</span>"
else
return ..()
@@ -313,7 +311,7 @@ obj/item/device/flashlight/lamp/bananalamp
/obj/item/device/flashlight/emp/afterattack(atom/A as mob|obj, mob/user, proximity)
if(!proximity) return
if(istype(A, /obj/item/weapon/storage/) && A.loc == user)
if(istype(A, /obj/item/weapon/storage/) && A.loc == user)
return
if (emp_cur_charges > 0)
emp_cur_charges -= 1
@@ -119,7 +119,7 @@
var/mob/living/silicon/S = target
//20% chance to actually hit the sensors
if(prob(effectchance * diode.rating))
flick("e_flash", S.flash)
S.flash_eyes(affect_silicon = 1)
S.Weaken(rand(5,10))
S << "<span class='danger'>Your sensors were overloaded by a laser!</span>"
outmsg = "<span class='notice'>You overload [S] by shining [src] at their sensors.</span>"
+2 -2
View File
@@ -384,12 +384,12 @@
dat = ""
/obj/item/toy/crayon/proc/crayon_text_strip(text)
var/list/base = text2list(lowertext(text),"")
var/list/base = splittext(lowertext(text),"")
var/list/out = list()
for(var/a in base)
if(a in (letters|numerals))
out += a
return list2text(out)
return jointext(out, null)
/obj/item/toy/crayon/Topic(href, href_list, hsrc)
var/temp = "a"
+4 -4
View File
@@ -84,10 +84,10 @@
for(var/line in lines)
//world << line
for(var/beat in text2list(lowertext(line), ","))
for(var/beat in splittext(lowertext(line), ","))
//world << "beat: [beat]"
var/list/notes = text2list(beat, "/")
for(var/note in text2list(notes[1], "-"))
var/list/notes = splittext(beat, "/")
for(var/note in splittext(notes[1], "-"))
//world << "note: [note]"
if(!playing || shouldStopPlaying(user))//If the instrument is playing, or special case
playing = 0
@@ -204,7 +204,7 @@
//split into lines
spawn()
lines = text2list(t, "\n")
lines = splittext(t, "\n")
if(copytext(lines[1],1,6) == "BPM: ")
tempo = sanitize_tempo(600 / text2num(copytext(lines[1],6)))
lines.Cut(1,2)
@@ -262,7 +262,7 @@ obj/structure/transit_tube/ex_act(severity, target)
if(text in direction_table)
return direction_table[text]
var/list/split_text = text2list(text, "-")
var/list/split_text = splittext(text, "-")
// If the first token is D, the icon_state represents
// a purely decorative tube, and doesn't actually
@@ -16,19 +16,19 @@
//wrapper for turn that changes the transit tube formatted icon_state instead of the dir
/obj/structure/c_transit_tube/proc/tube_turn(angle)
var/list/badtubes = list("W-E", "W-E-Pass", "S-N", "S-N-Pass", "SW-NE", "SE-NW")
var/list/split_text = text2list(icon_state, "-")
var/list/split_text = splittext(icon_state, "-")
for(var/i=1; i<=split_text.len; i++)
var/curdir = text2dir_extended(split_text[i]) //0 if not a valid direction (e.g. Pass, Block)
if(curdir)
split_text[i] = dir2text_short(turn(curdir, angle))
var/newdir = list2text(split_text, "-")
var/newdir = jointext(split_text, "-")
if(badtubes.Find(newdir))
split_text.Swap(1,2)
newdir = list2text(split_text, "-")
newdir = jointext(split_text, "-")
icon_state = newdir
/obj/structure/c_transit_tube/proc/tube_flip()
var/list/split_text = text2list(icon_state, "-")
var/list/split_text = splittext(icon_state, "-")
//skip straight pipes
if(length(split_text[2]) < 2)
return
@@ -44,7 +44,7 @@
split_text[2] = copytext(split_text[2],1,2) + ((copytext(split_text[2],2,3) == "E") ? "W" : "E")
else
split_text[2] = ((copytext(split_text[2],1,2) == "N") ? "S" : "N") + copytext(split_text[2],2,3)
icon_state = list2text(split_text, "-")
icon_state = jointext(split_text, "-")
// disposals-style flip and rotate verbs
/obj/structure/c_transit_tube/verb/rotate()