mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Does some code standardization/consistency
This commit is contained in:
@@ -308,7 +308,8 @@ world
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/proc/ReadRGB(rgb)
|
/proc/ReadRGB(rgb)
|
||||||
if(!rgb) return
|
if(!rgb)
|
||||||
|
return
|
||||||
|
|
||||||
// interpret the HSV or HSVA value
|
// interpret the HSV or HSVA value
|
||||||
var/i=1,start=1
|
var/i=1,start=1
|
||||||
@@ -317,19 +318,27 @@ world
|
|||||||
var/digits=0
|
var/digits=0
|
||||||
for(i=start, i<=length(rgb), ++i)
|
for(i=start, i<=length(rgb), ++i)
|
||||||
ch = text2ascii(rgb, i)
|
ch = text2ascii(rgb, i)
|
||||||
if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102) break
|
if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102)
|
||||||
|
break
|
||||||
++digits
|
++digits
|
||||||
if(digits == 8) break
|
if(digits == 8)
|
||||||
|
break
|
||||||
|
|
||||||
var/single = digits < 6
|
var/single = digits < 6
|
||||||
if(digits != 3 && digits != 4 && digits != 6 && digits != 8) return
|
if(digits != 3 && digits != 4 && digits != 6 && digits != 8)
|
||||||
if(digits == 4 || digits == 8) usealpha = 1
|
return
|
||||||
|
if(digits == 4 || digits == 8)
|
||||||
|
usealpha = 1
|
||||||
for(i=start, digits>0, ++i)
|
for(i=start, digits>0, ++i)
|
||||||
ch = text2ascii(rgb, i)
|
ch = text2ascii(rgb, i)
|
||||||
if(ch >= 48 && ch <= 57) ch -= 48
|
if(ch >= 48 && ch <= 57)
|
||||||
else if(ch >= 65 && ch <= 70) ch -= 55
|
ch -= 48
|
||||||
else if(ch >= 97 && ch <= 102) ch -= 87
|
else if(ch >= 65 && ch <= 70)
|
||||||
else break
|
ch -= 55
|
||||||
|
else if(ch >= 97 && ch <= 102)
|
||||||
|
ch -= 87
|
||||||
|
else
|
||||||
|
break
|
||||||
--digits
|
--digits
|
||||||
switch(which)
|
switch(which)
|
||||||
if(0)
|
if(0)
|
||||||
@@ -337,69 +346,91 @@ world
|
|||||||
if(single)
|
if(single)
|
||||||
r |= r << 4
|
r |= r << 4
|
||||||
++which
|
++which
|
||||||
else if(!(digits & 1)) ++which
|
else if(!(digits & 1))
|
||||||
|
++which
|
||||||
if(1)
|
if(1)
|
||||||
g = (g << 4) | ch
|
g = (g << 4) | ch
|
||||||
if(single)
|
if(single)
|
||||||
g |= g << 4
|
g |= g << 4
|
||||||
++which
|
++which
|
||||||
else if(!(digits & 1)) ++which
|
else if(!(digits & 1))
|
||||||
|
++which
|
||||||
if(2)
|
if(2)
|
||||||
b = (b << 4) | ch
|
b = (b << 4) | ch
|
||||||
if(single)
|
if(single)
|
||||||
b |= b << 4
|
b |= b << 4
|
||||||
++which
|
++which
|
||||||
else if(!(digits & 1)) ++which
|
else if(!(digits & 1))
|
||||||
|
++which
|
||||||
if(3)
|
if(3)
|
||||||
alpha = (alpha << 4) | ch
|
alpha = (alpha << 4) | ch
|
||||||
if(single) alpha |= alpha << 4
|
if(single)
|
||||||
|
alpha |= alpha << 4
|
||||||
|
|
||||||
. = list(r, g, b)
|
. = list(r, g, b)
|
||||||
if(usealpha) . += alpha
|
if(usealpha)
|
||||||
|
. += alpha
|
||||||
|
|
||||||
/proc/ReadHSV(hsv)
|
/proc/ReadHSV(hsv)
|
||||||
if(!hsv) return
|
if(!hsv)
|
||||||
|
return
|
||||||
|
|
||||||
// interpret the HSV or HSVA value
|
// interpret the HSV or HSVA value
|
||||||
var/i=1,start=1
|
var/i=1,start=1
|
||||||
if(text2ascii(hsv) == 35) ++start // skip opening #
|
if(text2ascii(hsv) == 35)
|
||||||
|
++start // skip opening #
|
||||||
var/ch,which=0,hue=0,sat=0,val=0,alpha=0,usealpha
|
var/ch,which=0,hue=0,sat=0,val=0,alpha=0,usealpha
|
||||||
var/digits=0
|
var/digits=0
|
||||||
for(i=start, i<=length(hsv), ++i)
|
for(i=start, i<=length(hsv), ++i)
|
||||||
ch = text2ascii(hsv, i)
|
ch = text2ascii(hsv, i)
|
||||||
if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102) break
|
if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102)
|
||||||
|
break
|
||||||
++digits
|
++digits
|
||||||
if(digits == 9) break
|
if(digits == 9)
|
||||||
if(digits > 7) usealpha = 1
|
break
|
||||||
if(digits <= 4) ++which
|
if(digits > 7)
|
||||||
if(digits <= 2) ++which
|
usealpha = 1
|
||||||
|
if(digits <= 4)
|
||||||
|
++which
|
||||||
|
if(digits <= 2)
|
||||||
|
++which
|
||||||
for(i=start, digits>0, ++i)
|
for(i=start, digits>0, ++i)
|
||||||
ch = text2ascii(hsv, i)
|
ch = text2ascii(hsv, i)
|
||||||
if(ch >= 48 && ch <= 57) ch -= 48
|
if(ch >= 48 && ch <= 57)
|
||||||
else if(ch >= 65 && ch <= 70) ch -= 55
|
ch -= 48
|
||||||
else if(ch >= 97 && ch <= 102) ch -= 87
|
else if(ch >= 65 && ch <= 70)
|
||||||
else break
|
ch -= 55
|
||||||
|
else if(ch >= 97 && ch <= 102)
|
||||||
|
ch -= 87
|
||||||
|
else
|
||||||
|
break
|
||||||
--digits
|
--digits
|
||||||
switch(which)
|
switch(which)
|
||||||
if(0)
|
if(0)
|
||||||
hue = (hue << 4) | ch
|
hue = (hue << 4) | ch
|
||||||
if(digits == (usealpha ? 6 : 4)) ++which
|
if(digits == (usealpha ? 6 : 4))
|
||||||
|
++which
|
||||||
if(1)
|
if(1)
|
||||||
sat = (sat << 4) | ch
|
sat = (sat << 4) | ch
|
||||||
if(digits == (usealpha ? 4 : 2)) ++which
|
if(digits == (usealpha ? 4 : 2))
|
||||||
|
++which
|
||||||
if(2)
|
if(2)
|
||||||
val = (val << 4) | ch
|
val = (val << 4) | ch
|
||||||
if(digits == (usealpha ? 2 : 0)) ++which
|
if(digits == (usealpha ? 2 : 0))
|
||||||
|
++which
|
||||||
if(3)
|
if(3)
|
||||||
alpha = (alpha << 4) | ch
|
alpha = (alpha << 4) | ch
|
||||||
|
|
||||||
. = list(hue, sat, val)
|
. = list(hue, sat, val)
|
||||||
if(usealpha) . += alpha
|
if(usealpha)
|
||||||
|
. += alpha
|
||||||
|
|
||||||
/proc/HSVtoRGB(hsv)
|
/proc/HSVtoRGB(hsv)
|
||||||
if(!hsv) return "#000000"
|
if(!hsv)
|
||||||
|
return "#000000"
|
||||||
var/list/HSV = ReadHSV(hsv)
|
var/list/HSV = ReadHSV(hsv)
|
||||||
if(!HSV) return "#000000"
|
if(!HSV)
|
||||||
|
return "#000000"
|
||||||
|
|
||||||
var/hue = HSV[1]
|
var/hue = HSV[1]
|
||||||
var/sat = HSV[2]
|
var/sat = HSV[2]
|
||||||
@@ -407,27 +438,30 @@ world
|
|||||||
|
|
||||||
// Compress hue into easier-to-manage range
|
// Compress hue into easier-to-manage range
|
||||||
hue -= hue >> 8
|
hue -= hue >> 8
|
||||||
if(hue >= 0x5fa) hue -= 0x5fa
|
if(hue >= 0x5fa)
|
||||||
|
hue -= 0x5fa
|
||||||
|
|
||||||
var/hi,mid,lo,r,g,b
|
var/hi,mid,lo,r,g,b
|
||||||
hi = val
|
hi = val
|
||||||
lo = round((255 - sat) * val / 255, 1)
|
lo = round((255 - sat) * val / 255, 1)
|
||||||
mid = lo + round(abs(round(hue, 510) - hue) * (hi - lo) / 255, 1)
|
mid = lo + round(abs(round(hue, 510) - hue) * (hi - lo) / 255, 1)
|
||||||
if(hue >= 765)
|
if(hue >= 765)
|
||||||
if(hue >= 1275) {r=hi; g=lo; b=mid}
|
if(hue >= 1275) {r=hi; g=lo; b=mid}
|
||||||
else if(hue >= 1020) {r=mid; g=lo; b=hi }
|
else if(hue >= 1020) {r=mid; g=lo; b=hi }
|
||||||
else {r=lo; g=mid; b=hi }
|
else {r=lo; g=mid; b=hi }
|
||||||
else
|
else
|
||||||
if(hue >= 510) {r=lo; g=hi; b=mid}
|
if(hue >= 510) {r=lo; g=hi; b=mid}
|
||||||
else if(hue >= 255) {r=mid; g=hi; b=lo }
|
else if(hue >= 255) {r=mid; g=hi; b=lo }
|
||||||
else {r=hi; g=mid; b=lo }
|
else {r=hi; g=mid; b=lo }
|
||||||
|
|
||||||
return (HSV.len > 3) ? rgb(r,g,b,HSV[4]) : rgb(r,g,b)
|
return (HSV.len > 3) ? rgb(r,g,b,HSV[4]) : rgb(r,g,b)
|
||||||
|
|
||||||
/proc/RGBtoHSV(rgb)
|
/proc/RGBtoHSV(rgb)
|
||||||
if(!rgb) return "#0000000"
|
if(!rgb)
|
||||||
|
return "#0000000"
|
||||||
var/list/RGB = ReadRGB(rgb)
|
var/list/RGB = ReadRGB(rgb)
|
||||||
if(!RGB) return "#0000000"
|
if(!RGB)
|
||||||
|
return "#0000000"
|
||||||
|
|
||||||
var/r = RGB[1]
|
var/r = RGB[1]
|
||||||
var/g = RGB[2]
|
var/g = RGB[2]
|
||||||
@@ -456,15 +490,22 @@ world
|
|||||||
return hsv(hue, sat, val, (RGB.len>3 ? RGB[4] : null))
|
return hsv(hue, sat, val, (RGB.len>3 ? RGB[4] : null))
|
||||||
|
|
||||||
/proc/hsv(hue, sat, val, alpha)
|
/proc/hsv(hue, sat, val, alpha)
|
||||||
if(hue < 0 || hue >= 1536) hue %= 1536
|
if(hue < 0 || hue >= 1536)
|
||||||
if(hue < 0) hue += 1536
|
hue %= 1536
|
||||||
|
if(hue < 0)
|
||||||
|
hue += 1536
|
||||||
if((hue & 0xFF) == 0xFF)
|
if((hue & 0xFF) == 0xFF)
|
||||||
++hue
|
++hue
|
||||||
if(hue >= 1536) hue = 0
|
if(hue >= 1536)
|
||||||
if(sat < 0) sat = 0
|
hue = 0
|
||||||
if(sat > 255) sat = 255
|
if(sat < 0)
|
||||||
if(val < 0) val = 0
|
sat = 0
|
||||||
if(val > 255) val = 255
|
if(sat > 255)
|
||||||
|
sat = 255
|
||||||
|
if(val < 0)
|
||||||
|
val = 0
|
||||||
|
if(val > 255)
|
||||||
|
val = 255
|
||||||
. = "#"
|
. = "#"
|
||||||
. += TO_HEX_DIGIT(hue >> 8)
|
. += TO_HEX_DIGIT(hue >> 8)
|
||||||
. += TO_HEX_DIGIT(hue >> 4)
|
. += TO_HEX_DIGIT(hue >> 4)
|
||||||
@@ -474,8 +515,10 @@ world
|
|||||||
. += TO_HEX_DIGIT(val >> 4)
|
. += TO_HEX_DIGIT(val >> 4)
|
||||||
. += TO_HEX_DIGIT(val)
|
. += TO_HEX_DIGIT(val)
|
||||||
if(!isnull(alpha))
|
if(!isnull(alpha))
|
||||||
if(alpha < 0) alpha = 0
|
if(alpha < 0)
|
||||||
if(alpha > 255) alpha = 255
|
alpha = 0
|
||||||
|
if(alpha > 255)
|
||||||
|
alpha = 255
|
||||||
. += TO_HEX_DIGIT(alpha >> 4)
|
. += TO_HEX_DIGIT(alpha >> 4)
|
||||||
. += TO_HEX_DIGIT(alpha)
|
. += TO_HEX_DIGIT(alpha)
|
||||||
|
|
||||||
@@ -493,32 +536,44 @@ world
|
|||||||
var/list/HSV2 = ReadHSV(hsv2)
|
var/list/HSV2 = ReadHSV(hsv2)
|
||||||
|
|
||||||
// add missing alpha if needed
|
// add missing alpha if needed
|
||||||
if(HSV1.len < HSV2.len) HSV1 += 255
|
if(HSV1.len < HSV2.len)
|
||||||
else if(HSV2.len < HSV1.len) HSV2 += 255
|
HSV1 += 255
|
||||||
|
else if(HSV2.len < HSV1.len)
|
||||||
|
HSV2 += 255
|
||||||
var/usealpha = HSV1.len > 3
|
var/usealpha = HSV1.len > 3
|
||||||
|
|
||||||
// normalize hsv values in case anything is screwy
|
// normalize hsv values in case anything is screwy
|
||||||
if(HSV1[1] > 1536) HSV1[1] %= 1536
|
if(HSV1[1] > 1536)
|
||||||
if(HSV2[1] > 1536) HSV2[1] %= 1536
|
HSV1[1] %= 1536
|
||||||
if(HSV1[1] < 0) HSV1[1] += 1536
|
if(HSV2[1] > 1536)
|
||||||
if(HSV2[1] < 0) HSV2[1] += 1536
|
HSV2[1] %= 1536
|
||||||
|
if(HSV1[1] < 0)
|
||||||
|
HSV1[1] += 1536
|
||||||
|
if(HSV2[1] < 0)
|
||||||
|
HSV2[1] += 1536
|
||||||
if(!HSV1[3]) {HSV1[1] = 0; HSV1[2] = 0}
|
if(!HSV1[3]) {HSV1[1] = 0; HSV1[2] = 0}
|
||||||
if(!HSV2[3]) {HSV2[1] = 0; HSV2[2] = 0}
|
if(!HSV2[3]) {HSV2[1] = 0; HSV2[2] = 0}
|
||||||
|
|
||||||
// no value for one color means don't change saturation
|
// no value for one color means don't change saturation
|
||||||
if(!HSV1[3]) HSV1[2] = HSV2[2]
|
if(!HSV1[3])
|
||||||
if(!HSV2[3]) HSV2[2] = HSV1[2]
|
HSV1[2] = HSV2[2]
|
||||||
|
if(!HSV2[3])
|
||||||
|
HSV2[2] = HSV1[2]
|
||||||
// no saturation for one color means don't change hues
|
// no saturation for one color means don't change hues
|
||||||
if(!HSV1[2]) HSV1[1] = HSV2[1]
|
if(!HSV1[2])
|
||||||
if(!HSV2[2]) HSV2[1] = HSV1[1]
|
HSV1[1] = HSV2[1]
|
||||||
|
if(!HSV2[2])
|
||||||
|
HSV2[1] = HSV1[1]
|
||||||
|
|
||||||
// Compress hues into easier-to-manage range
|
// Compress hues into easier-to-manage range
|
||||||
HSV1[1] -= HSV1[1] >> 8
|
HSV1[1] -= HSV1[1] >> 8
|
||||||
HSV2[1] -= HSV2[1] >> 8
|
HSV2[1] -= HSV2[1] >> 8
|
||||||
|
|
||||||
var/hue_diff = HSV2[1] - HSV1[1]
|
var/hue_diff = HSV2[1] - HSV1[1]
|
||||||
if(hue_diff > 765) hue_diff -= 1530
|
if(hue_diff > 765)
|
||||||
else if(hue_diff <= -765) hue_diff += 1530
|
hue_diff -= 1530
|
||||||
|
else if(hue_diff <= -765)
|
||||||
|
hue_diff += 1530
|
||||||
|
|
||||||
var/hue = round(HSV1[1] + hue_diff * amount, 1)
|
var/hue = round(HSV1[1] + hue_diff * amount, 1)
|
||||||
var/sat = round(HSV1[2] + (HSV2[2] - HSV1[2]) * amount, 1)
|
var/sat = round(HSV1[2] + (HSV2[2] - HSV1[2]) * amount, 1)
|
||||||
@@ -526,8 +581,10 @@ world
|
|||||||
var/alpha = usealpha ? round(HSV1[4] + (HSV2[4] - HSV1[4]) * amount, 1) : null
|
var/alpha = usealpha ? round(HSV1[4] + (HSV2[4] - HSV1[4]) * amount, 1) : null
|
||||||
|
|
||||||
// normalize hue
|
// normalize hue
|
||||||
if(hue < 0 || hue >= 1530) hue %= 1530
|
if(hue < 0 || hue >= 1530)
|
||||||
if(hue < 0) hue += 1530
|
hue %= 1530
|
||||||
|
if(hue < 0)
|
||||||
|
hue += 1530
|
||||||
// decompress hue
|
// decompress hue
|
||||||
hue += round(hue / 255)
|
hue += round(hue / 255)
|
||||||
|
|
||||||
@@ -547,8 +604,10 @@ world
|
|||||||
var/list/RGB2 = ReadRGB(rgb2)
|
var/list/RGB2 = ReadRGB(rgb2)
|
||||||
|
|
||||||
// add missing alpha if needed
|
// add missing alpha if needed
|
||||||
if(RGB1.len < RGB2.len) RGB1 += 255
|
if(RGB1.len < RGB2.len)
|
||||||
else if(RGB2.len < RGB1.len) RGB2 += 255
|
RGB1 += 255
|
||||||
|
else if(RGB2.len < RGB1.len)
|
||||||
|
RGB2 += 255
|
||||||
var/usealpha = RGB1.len > 3
|
var/usealpha = RGB1.len > 3
|
||||||
|
|
||||||
var/r = round(RGB1[1] + (RGB2[1] - RGB1[1]) * amount, 1)
|
var/r = round(RGB1[1] + (RGB2[1] - RGB1[1]) * amount, 1)
|
||||||
@@ -563,15 +622,18 @@ world
|
|||||||
|
|
||||||
/proc/HueToAngle(hue)
|
/proc/HueToAngle(hue)
|
||||||
// normalize hsv in case anything is screwy
|
// normalize hsv in case anything is screwy
|
||||||
if(hue < 0 || hue >= 1536) hue %= 1536
|
if(hue < 0 || hue >= 1536)
|
||||||
if(hue < 0) hue += 1536
|
hue %= 1536
|
||||||
|
if(hue < 0)
|
||||||
|
hue += 1536
|
||||||
// Compress hue into easier-to-manage range
|
// Compress hue into easier-to-manage range
|
||||||
hue -= hue >> 8
|
hue -= hue >> 8
|
||||||
return hue / (1530/360)
|
return hue / (1530/360)
|
||||||
|
|
||||||
/proc/AngleToHue(angle)
|
/proc/AngleToHue(angle)
|
||||||
// normalize hsv in case anything is screwy
|
// normalize hsv in case anything is screwy
|
||||||
if(angle < 0 || angle >= 360) angle -= 360 * round(angle / 360)
|
if(angle < 0 || angle >= 360)
|
||||||
|
angle -= 360 * round(angle / 360)
|
||||||
var/hue = angle * (1530/360)
|
var/hue = angle * (1530/360)
|
||||||
// Decompress hue
|
// Decompress hue
|
||||||
hue += round(hue / 255)
|
hue += round(hue / 255)
|
||||||
@@ -583,18 +645,23 @@ world
|
|||||||
var/list/HSV = ReadHSV(hsv)
|
var/list/HSV = ReadHSV(hsv)
|
||||||
|
|
||||||
// normalize hsv in case anything is screwy
|
// normalize hsv in case anything is screwy
|
||||||
if(HSV[1] >= 1536) HSV[1] %= 1536
|
if(HSV[1] >= 1536)
|
||||||
if(HSV[1] < 0) HSV[1] += 1536
|
HSV[1] %= 1536
|
||||||
|
if(HSV[1] < 0)
|
||||||
|
HSV[1] += 1536
|
||||||
|
|
||||||
// Compress hue into easier-to-manage range
|
// Compress hue into easier-to-manage range
|
||||||
HSV[1] -= HSV[1] >> 8
|
HSV[1] -= HSV[1] >> 8
|
||||||
|
|
||||||
if(angle < 0 || angle >= 360) angle -= 360 * round(angle / 360)
|
if(angle < 0 || angle >= 360)
|
||||||
|
angle -= 360 * round(angle / 360)
|
||||||
HSV[1] = round(HSV[1] + angle * (1530/360), 1)
|
HSV[1] = round(HSV[1] + angle * (1530/360), 1)
|
||||||
|
|
||||||
// normalize hue
|
// normalize hue
|
||||||
if(HSV[1] < 0 || HSV[1] >= 1530) HSV[1] %= 1530
|
if(HSV[1] < 0 || HSV[1] >= 1530)
|
||||||
if(HSV[1] < 0) HSV[1] += 1530
|
HSV[1] %= 1530
|
||||||
|
if(HSV[1] < 0)
|
||||||
|
HSV[1] += 1530
|
||||||
// decompress hue
|
// decompress hue
|
||||||
HSV[1] += round(HSV[1] / 255)
|
HSV[1] += round(HSV[1] / 255)
|
||||||
|
|
||||||
@@ -614,8 +681,10 @@ world
|
|||||||
var/gray = RGB[1]*0.3 + RGB[2]*0.59 + RGB[3]*0.11
|
var/gray = RGB[1]*0.3 + RGB[2]*0.59 + RGB[3]*0.11
|
||||||
var/tone_gray = TONE[1]*0.3 + TONE[2]*0.59 + TONE[3]*0.11
|
var/tone_gray = TONE[1]*0.3 + TONE[2]*0.59 + TONE[3]*0.11
|
||||||
|
|
||||||
if(gray <= tone_gray) return BlendRGB("#000000", tone, gray/(tone_gray || 1))
|
if(gray <= tone_gray)
|
||||||
else return BlendRGB(tone, "#ffffff", (gray-tone_gray)/((255-tone_gray) || 1))
|
return BlendRGB("#000000", tone, gray/(tone_gray || 1))
|
||||||
|
else
|
||||||
|
return BlendRGB(tone, "#ffffff", (gray-tone_gray)/((255-tone_gray) || 1))
|
||||||
|
|
||||||
|
|
||||||
//Used in the OLD chem colour mixing algorithm
|
//Used in the OLD chem colour mixing algorithm
|
||||||
@@ -715,7 +784,8 @@ The _flatIcons list is a cache for generated icon files.
|
|||||||
var/image/I = current
|
var/image/I = current
|
||||||
currentLayer = I.layer
|
currentLayer = I.layer
|
||||||
if(currentLayer<0) // Special case for FLY_LAYER
|
if(currentLayer<0) // Special case for FLY_LAYER
|
||||||
if(currentLayer <= -1000) return flat
|
if(currentLayer <= -1000)
|
||||||
|
return flat
|
||||||
if(pSet == 0) // Underlay
|
if(pSet == 0) // Underlay
|
||||||
currentLayer = A.layer+currentLayer/1000
|
currentLayer = A.layer+currentLayer/1000
|
||||||
else // Overlay
|
else // Overlay
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4,
|
|||||||
return x!=0?x/abs(x):0
|
return x!=0?x/abs(x):0
|
||||||
|
|
||||||
/proc/Atan2(x, y)
|
/proc/Atan2(x, y)
|
||||||
if(!x && !y) return 0
|
if(!x && !y)
|
||||||
|
return 0
|
||||||
var/a = arccos(x / sqrt(x*x + y*y))
|
var/a = arccos(x / sqrt(x*x + y*y))
|
||||||
return y >= 0 ? a : -a
|
return y >= 0 ? a : -a
|
||||||
|
|
||||||
@@ -98,10 +99,12 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4,
|
|||||||
. = list()
|
. = list()
|
||||||
var/d = b*b - 4 * a * c
|
var/d = b*b - 4 * a * c
|
||||||
var/bottom = 2 * a
|
var/bottom = 2 * a
|
||||||
if(d < 0) return
|
if(d < 0)
|
||||||
|
return
|
||||||
var/root = sqrt(d)
|
var/root = sqrt(d)
|
||||||
. += (-b + root) / bottom
|
. += (-b + root) / bottom
|
||||||
if(!d) return
|
if(!d)
|
||||||
|
return
|
||||||
. += (-b - root) / bottom
|
. += (-b - root) / bottom
|
||||||
|
|
||||||
// tangent
|
// tangent
|
||||||
|
|||||||
@@ -137,7 +137,8 @@ Turf and target are separate in case you want to teleport some distance from a t
|
|||||||
return
|
return
|
||||||
if(destination.y>world.maxy || destination.y<1)
|
if(destination.y>world.maxy || destination.y<1)
|
||||||
return
|
return
|
||||||
else return
|
else
|
||||||
|
return
|
||||||
|
|
||||||
return destination
|
return destination
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,8 @@
|
|||||||
|
|
||||||
// This is necessary for storage items not on your person.
|
// This is necessary for storage items not on your person.
|
||||||
/obj/item/Adjacent(var/atom/neighbor, var/recurse = 1)
|
/obj/item/Adjacent(var/atom/neighbor, var/recurse = 1)
|
||||||
if(neighbor == loc) return 1
|
if(neighbor == loc)
|
||||||
|
return 1
|
||||||
if(isitem(loc))
|
if(isitem(loc))
|
||||||
if(recurse > 0)
|
if(recurse > 0)
|
||||||
return loc.Adjacent(neighbor,recurse - 1)
|
return loc.Adjacent(neighbor,recurse - 1)
|
||||||
|
|||||||
@@ -6,11 +6,12 @@
|
|||||||
almost anything into a trash can.
|
almost anything into a trash can.
|
||||||
*/
|
*/
|
||||||
/atom/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
/atom/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
||||||
if(!usr || !over)
|
if(!usr || !over)
|
||||||
return
|
return
|
||||||
if(over == src)
|
if(over == src)
|
||||||
return usr.client.Click(src, src_location, src_control, params)
|
return usr.client.Click(src, src_location, src_control, params)
|
||||||
if(!Adjacent(usr) || !over.Adjacent(usr)) return // should stop you from dragging through windows
|
if(!Adjacent(usr) || !over.Adjacent(usr))
|
||||||
|
return // should stop you from dragging through windows
|
||||||
|
|
||||||
over.MouseDrop_T(src,usr)
|
over.MouseDrop_T(src,usr)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -577,8 +577,10 @@ so as to remain in compliance with the most up-to-date laws."
|
|||||||
var/atom/target = null
|
var/atom/target = null
|
||||||
|
|
||||||
/obj/screen/alert/hackingapc/Click()
|
/obj/screen/alert/hackingapc/Click()
|
||||||
if(!usr || !usr.client) return
|
if(!usr || !usr.client)
|
||||||
if(!target) return
|
return
|
||||||
|
if(!target)
|
||||||
|
return
|
||||||
var/mob/living/silicon/ai/AI = usr
|
var/mob/living/silicon/ai/AI = usr
|
||||||
var/turf/T = get_turf(target)
|
var/turf/T = get_turf(target)
|
||||||
if(T)
|
if(T)
|
||||||
@@ -601,7 +603,8 @@ so as to remain in compliance with the most up-to-date laws."
|
|||||||
timeout = 300
|
timeout = 300
|
||||||
|
|
||||||
/obj/screen/alert/notify_cloning/Click()
|
/obj/screen/alert/notify_cloning/Click()
|
||||||
if(!usr || !usr.client) return
|
if(!usr || !usr.client)
|
||||||
|
return
|
||||||
var/mob/dead/observer/G = usr
|
var/mob/dead/observer/G = usr
|
||||||
G.reenter_corpse()
|
G.reenter_corpse()
|
||||||
|
|
||||||
@@ -614,10 +617,13 @@ so as to remain in compliance with the most up-to-date laws."
|
|||||||
var/action = NOTIFY_JUMP
|
var/action = NOTIFY_JUMP
|
||||||
|
|
||||||
/obj/screen/alert/notify_action/Click()
|
/obj/screen/alert/notify_action/Click()
|
||||||
if(!usr || !usr.client) return
|
if(!usr || !usr.client)
|
||||||
if(!target) return
|
return
|
||||||
|
if(!target)
|
||||||
|
return
|
||||||
var/mob/dead/observer/G = usr
|
var/mob/dead/observer/G = usr
|
||||||
if(!istype(G)) return
|
if(!istype(G))
|
||||||
|
return
|
||||||
switch(action)
|
switch(action)
|
||||||
if(NOTIFY_ATTACK)
|
if(NOTIFY_ATTACK)
|
||||||
target.attack_ghost(G)
|
target.attack_ghost(G)
|
||||||
|
|||||||
@@ -180,7 +180,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/datum/hud/proc/toggle_show_robot_modules()
|
/datum/hud/proc/toggle_show_robot_modules()
|
||||||
if(!iscyborg(mymob)) return
|
if(!iscyborg(mymob))
|
||||||
|
return
|
||||||
|
|
||||||
var/mob/living/silicon/robot/R = mymob
|
var/mob/living/silicon/robot/R = mymob
|
||||||
|
|
||||||
@@ -188,7 +189,8 @@
|
|||||||
update_robot_modules_display()
|
update_robot_modules_display()
|
||||||
|
|
||||||
/datum/hud/proc/update_robot_modules_display(mob/viewer)
|
/datum/hud/proc/update_robot_modules_display(mob/viewer)
|
||||||
if(!iscyborg(mymob)) return
|
if(!iscyborg(mymob))
|
||||||
|
return
|
||||||
|
|
||||||
var/mob/living/silicon/robot/R = mymob
|
var/mob/living/silicon/robot/R = mymob
|
||||||
|
|
||||||
|
|||||||
@@ -324,7 +324,8 @@
|
|||||||
usr.stop_pulling()
|
usr.stop_pulling()
|
||||||
|
|
||||||
/obj/screen/pull/update_icon(mob/mymob)
|
/obj/screen/pull/update_icon(mob/mymob)
|
||||||
if(!mymob) return
|
if(!mymob)
|
||||||
|
return
|
||||||
if(mymob.pulling)
|
if(mymob.pulling)
|
||||||
icon_state = "pull"
|
icon_state = "pull"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -281,16 +281,29 @@ Delayed insert mode was removed in mysql 7 and only works with MyISAM type table
|
|||||||
|
|
||||||
/datum/DBColumn/proc/SqlTypeName(type_handler = sql_type)
|
/datum/DBColumn/proc/SqlTypeName(type_handler = sql_type)
|
||||||
switch(type_handler)
|
switch(type_handler)
|
||||||
if(TINYINT) return "TINYINT"
|
if(TINYINT)
|
||||||
if(SMALLINT) return "SMALLINT"
|
return "TINYINT"
|
||||||
if(MEDIUMINT) return "MEDIUMINT"
|
if(SMALLINT)
|
||||||
if(INTEGER) return "INTEGER"
|
return "SMALLINT"
|
||||||
if(BIGINT) return "BIGINT"
|
if(MEDIUMINT)
|
||||||
if(FLOAT) return "FLOAT"
|
return "MEDIUMINT"
|
||||||
if(DOUBLE) return "DOUBLE"
|
if(INTEGER)
|
||||||
if(DATE) return "DATE"
|
return "INTEGER"
|
||||||
if(DATETIME) return "DATETIME"
|
if(BIGINT)
|
||||||
if(TIMESTAMP) return "TIMESTAMP"
|
return "BIGINT"
|
||||||
if(TIME) return "TIME"
|
if(FLOAT)
|
||||||
if(STRING) return "STRING"
|
return "FLOAT"
|
||||||
if(BLOB) return "BLOB"
|
if(DOUBLE)
|
||||||
|
return "DOUBLE"
|
||||||
|
if(DATE)
|
||||||
|
return "DATE"
|
||||||
|
if(DATETIME)
|
||||||
|
return "DATETIME"
|
||||||
|
if(TIMESTAMP)
|
||||||
|
return "TIMESTAMP"
|
||||||
|
if(TIME)
|
||||||
|
return "TIME"
|
||||||
|
if(STRING)
|
||||||
|
return "STRING"
|
||||||
|
if(BLOB)
|
||||||
|
return "BLOB"
|
||||||
|
|||||||
@@ -385,7 +385,8 @@ SUBSYSTEM_DEF(garbage)
|
|||||||
find_references(TRUE)
|
find_references(TRUE)
|
||||||
|
|
||||||
/datum/proc/DoSearchVar(X, Xname)
|
/datum/proc/DoSearchVar(X, Xname)
|
||||||
if(usr && usr.client && !usr.client.running_find_references) return
|
if(usr && usr.client && !usr.client.running_find_references)
|
||||||
|
return
|
||||||
if(istype(X, /datum))
|
if(istype(X, /datum))
|
||||||
var/datum/D = X
|
var/datum/D = X
|
||||||
if(D.last_find_references == last_find_references)
|
if(D.last_find_references == last_find_references)
|
||||||
|
|||||||
@@ -249,7 +249,8 @@
|
|||||||
// Otherwise, the user mob's machine var will be reset directly.
|
// Otherwise, the user mob's machine var will be reset directly.
|
||||||
//
|
//
|
||||||
/proc/onclose(mob/user, windowid, atom/ref=null)
|
/proc/onclose(mob/user, windowid, atom/ref=null)
|
||||||
if(!user.client) return
|
if(!user.client)
|
||||||
|
return
|
||||||
var/param = "null"
|
var/param = "null"
|
||||||
if(ref)
|
if(ref)
|
||||||
param = "\ref[ref]"
|
param = "\ref[ref]"
|
||||||
|
|||||||
@@ -15,10 +15,14 @@
|
|||||||
..()
|
..()
|
||||||
switch(stage)
|
switch(stage)
|
||||||
if(1)
|
if(1)
|
||||||
if(prob(10)) to_chat(affected_mob, "<span class='danger'>You feel a little silly.</span>")
|
if(prob(10))
|
||||||
|
to_chat(affected_mob, "<span class='danger'>You feel a little silly.</span>")
|
||||||
if(2)
|
if(2)
|
||||||
if(prob(10)) to_chat(affected_mob, "<span class='danger'>You start seeing rainbows.</span>")
|
if(prob(10))
|
||||||
|
to_chat(affected_mob, "<span class='danger'>You start seeing rainbows.</span>")
|
||||||
if(3)
|
if(3)
|
||||||
if(prob(10)) to_chat(affected_mob, "<span class='danger'>Your thoughts are interrupted by a loud <b>HONK!</b></span>")
|
if(prob(10))
|
||||||
|
to_chat(affected_mob, "<span class='danger'>Your thoughts are interrupted by a loud <b>HONK!</b></span>")
|
||||||
if(4)
|
if(4)
|
||||||
if(prob(5)) affected_mob.say( pick( list("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk...") ) )
|
if(prob(5))
|
||||||
|
affected_mob.say( pick( list("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk...") ) )
|
||||||
|
|||||||
@@ -95,8 +95,10 @@ STI KALY - blind
|
|||||||
|
|
||||||
var/list/L = list()
|
var/list/L = list()
|
||||||
for(var/turf/T in get_area_turfs(thearea.type))
|
for(var/turf/T in get_area_turfs(thearea.type))
|
||||||
if(T.z != affected_mob.z) continue
|
if(T.z != affected_mob.z)
|
||||||
if(T.name == "space") continue
|
continue
|
||||||
|
if(T.name == "space")
|
||||||
|
continue
|
||||||
if(!T.density)
|
if(!T.density)
|
||||||
var/clear = 1
|
var/clear = 1
|
||||||
for(var/obj/O in T)
|
for(var/obj/O in T)
|
||||||
|
|||||||
@@ -358,9 +358,12 @@
|
|||||||
|
|
||||||
for (var/obj/O in oview(1, A))
|
for (var/obj/O in oview(1, A))
|
||||||
if (O.density == 1)
|
if (O.density == 1)
|
||||||
if (O == A) continue
|
if (O == A)
|
||||||
if (O == D) continue
|
continue
|
||||||
if (O.opacity) continue
|
if (O == D)
|
||||||
|
continue
|
||||||
|
if (O.opacity)
|
||||||
|
continue
|
||||||
else
|
else
|
||||||
surface = O
|
surface = O
|
||||||
ST = get_turf(O)
|
ST = get_turf(O)
|
||||||
|
|||||||
@@ -290,7 +290,8 @@
|
|||||||
uplink_loc = R
|
uplink_loc = R
|
||||||
|
|
||||||
if (!uplink_loc)
|
if (!uplink_loc)
|
||||||
if(!silent) to_chat(traitor_mob, "Unfortunately, [employer] wasn't able to get you an Uplink.")
|
if(!silent)
|
||||||
|
to_chat(traitor_mob, "Unfortunately, [employer] wasn't able to get you an Uplink.")
|
||||||
. = 0
|
. = 0
|
||||||
else
|
else
|
||||||
var/obj/item/device/uplink/U = new(uplink_loc)
|
var/obj/item/device/uplink/U = new(uplink_loc)
|
||||||
@@ -300,19 +301,22 @@
|
|||||||
if(uplink_loc == R)
|
if(uplink_loc == R)
|
||||||
R.traitor_frequency = sanitize_frequency(rand(MIN_FREQ, MAX_FREQ))
|
R.traitor_frequency = sanitize_frequency(rand(MIN_FREQ, MAX_FREQ))
|
||||||
|
|
||||||
if(!silent) to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [R.name]. Simply dial the frequency [format_frequency(R.traitor_frequency)] to unlock its hidden features.")
|
if(!silent)
|
||||||
|
to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [R.name]. Simply dial the frequency [format_frequency(R.traitor_frequency)] to unlock its hidden features.")
|
||||||
traitor_mob.mind.store_memory("<B>Radio Frequency:</B> [format_frequency(R.traitor_frequency)] ([R.name]).")
|
traitor_mob.mind.store_memory("<B>Radio Frequency:</B> [format_frequency(R.traitor_frequency)] ([R.name]).")
|
||||||
|
|
||||||
else if(uplink_loc == PDA)
|
else if(uplink_loc == PDA)
|
||||||
PDA.lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]"
|
PDA.lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]"
|
||||||
|
|
||||||
if(!silent) to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [PDA.name]. Simply enter the code \"[PDA.lock_code]\" into the ringtone select to unlock its hidden features.")
|
if(!silent)
|
||||||
|
to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [PDA.name]. Simply enter the code \"[PDA.lock_code]\" into the ringtone select to unlock its hidden features.")
|
||||||
traitor_mob.mind.store_memory("<B>Uplink Passcode:</B> [PDA.lock_code] ([PDA.name]).")
|
traitor_mob.mind.store_memory("<B>Uplink Passcode:</B> [PDA.lock_code] ([PDA.name]).")
|
||||||
|
|
||||||
else if(uplink_loc == P)
|
else if(uplink_loc == P)
|
||||||
P.traitor_unlock_degrees = rand(1, 360)
|
P.traitor_unlock_degrees = rand(1, 360)
|
||||||
|
|
||||||
if(!silent) to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [P.name]. Simply twist the top of the pen [P.traitor_unlock_degrees] from its starting position to unlock its hidden features.")
|
if(!silent)
|
||||||
|
to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [P.name]. Simply twist the top of the pen [P.traitor_unlock_degrees] from its starting position to unlock its hidden features.")
|
||||||
traitor_mob.mind.store_memory("<B>Uplink Degrees:</B> [P.traitor_unlock_degrees] ([P.name]).")
|
traitor_mob.mind.store_memory("<B>Uplink Degrees:</B> [P.traitor_unlock_degrees] ([P.name]).")
|
||||||
|
|
||||||
//Link a new mobs mind to the creator of said mob. They will join any team they are currently on, and will only switch teams when their creator does.
|
//Link a new mobs mind to the creator of said mob. They will join any team they are currently on, and will only switch teams when their creator does.
|
||||||
|
|||||||
@@ -89,7 +89,8 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
|||||||
// want to find machines, mobs, etc, in the same logical area, you will need to check all the
|
// want to find machines, mobs, etc, in the same logical area, you will need to check all the
|
||||||
// related areas. This returns a master contents list to assist in that.
|
// related areas. This returns a master contents list to assist in that.
|
||||||
/proc/area_contents(area/A)
|
/proc/area_contents(area/A)
|
||||||
if(!istype(A)) return null
|
if(!istype(A))
|
||||||
|
return null
|
||||||
var/list/contents = list()
|
var/list/contents = list()
|
||||||
for(var/area/LSA in A.related)
|
for(var/area/LSA in A.related)
|
||||||
contents += LSA.contents
|
contents += LSA.contents
|
||||||
|
|||||||
@@ -445,7 +445,8 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
/atom/proc/get_global_map_pos()
|
/atom/proc/get_global_map_pos()
|
||||||
if(!islist(GLOB.global_map) || isemptylist(GLOB.global_map)) return
|
if(!islist(GLOB.global_map) || isemptylist(GLOB.global_map))
|
||||||
|
return
|
||||||
var/cur_x = null
|
var/cur_x = null
|
||||||
var/cur_y = null
|
var/cur_y = null
|
||||||
var/list/y_arr = null
|
var/list/y_arr = null
|
||||||
|
|||||||
@@ -61,7 +61,8 @@
|
|||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/atom/movable/Move(atom/newloc, direct = 0)
|
/atom/movable/Move(atom/newloc, direct = 0)
|
||||||
if(!loc || !newloc) return 0
|
if(!loc || !newloc)
|
||||||
|
return 0
|
||||||
var/atom/oldloc = loc
|
var/atom/oldloc = loc
|
||||||
|
|
||||||
if(loc != newloc)
|
if(loc != newloc)
|
||||||
|
|||||||
@@ -8,10 +8,12 @@
|
|||||||
/* DATA HUD DATUMS */
|
/* DATA HUD DATUMS */
|
||||||
|
|
||||||
/atom/proc/add_to_all_human_data_huds()
|
/atom/proc/add_to_all_human_data_huds()
|
||||||
for(var/datum/atom_hud/data/human/hud in GLOB.huds) hud.add_to_hud(src)
|
for(var/datum/atom_hud/data/human/hud in GLOB.huds)
|
||||||
|
hud.add_to_hud(src)
|
||||||
|
|
||||||
/atom/proc/remove_from_all_data_huds()
|
/atom/proc/remove_from_all_data_huds()
|
||||||
for(var/datum/atom_hud/data/hud in GLOB.huds) hud.remove_from_hud(src)
|
for(var/datum/atom_hud/data/hud in GLOB.huds)
|
||||||
|
hud.remove_from_hud(src)
|
||||||
|
|
||||||
/datum/atom_hud/data
|
/datum/atom_hud/data
|
||||||
|
|
||||||
@@ -21,10 +23,13 @@
|
|||||||
/datum/atom_hud/data/human/medical/basic
|
/datum/atom_hud/data/human/medical/basic
|
||||||
|
|
||||||
/datum/atom_hud/data/human/medical/basic/proc/check_sensors(mob/living/carbon/human/H)
|
/datum/atom_hud/data/human/medical/basic/proc/check_sensors(mob/living/carbon/human/H)
|
||||||
if(!istype(H)) return 0
|
if(!istype(H))
|
||||||
|
return 0
|
||||||
var/obj/item/clothing/under/U = H.w_uniform
|
var/obj/item/clothing/under/U = H.w_uniform
|
||||||
if(!istype(U)) return 0
|
if(!istype(U))
|
||||||
if(U.sensor_mode <= SENSOR_VITALS) return 0
|
return 0
|
||||||
|
if(U.sensor_mode <= SENSOR_VITALS)
|
||||||
|
return 0
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/datum/atom_hud/data/human/medical/basic/add_to_single_hud(mob/M, mob/living/carbon/H)
|
/datum/atom_hud/data/human/medical/basic/add_to_single_hud(mob/M, mob/living/carbon/H)
|
||||||
@@ -132,7 +137,8 @@
|
|||||||
B.update_suit_sensors(src)
|
B.update_suit_sensors(src)
|
||||||
|
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
if (T) GLOB.crewmonitor.queueUpdate(T.z)
|
if (T)
|
||||||
|
GLOB.crewmonitor.queueUpdate(T.z)
|
||||||
|
|
||||||
//called when a living mob changes health
|
//called when a living mob changes health
|
||||||
/mob/living/proc/med_hud_set_health()
|
/mob/living/proc/med_hud_set_health()
|
||||||
@@ -192,7 +198,8 @@
|
|||||||
sec_hud_set_security_status()
|
sec_hud_set_security_status()
|
||||||
|
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
if (T) GLOB.crewmonitor.queueUpdate(T.z)
|
if (T)
|
||||||
|
GLOB.crewmonitor.queueUpdate(T.z)
|
||||||
|
|
||||||
/mob/living/carbon/human/proc/sec_hud_set_implants()
|
/mob/living/carbon/human/proc/sec_hud_set_implants()
|
||||||
var/image/holder
|
var/image/holder
|
||||||
|
|||||||
@@ -67,7 +67,8 @@ GLOBAL_LIST_INIT(slot2type, list("head" = /obj/item/clothing/head/changeling, "w
|
|||||||
|
|
||||||
if(antag_candidates.len>0)
|
if(antag_candidates.len>0)
|
||||||
for(var/i = 0, i < num_changelings, i++)
|
for(var/i = 0, i < num_changelings, i++)
|
||||||
if(!antag_candidates.len) break
|
if(!antag_candidates.len)
|
||||||
|
break
|
||||||
var/datum/mind/changeling = pick(antag_candidates)
|
var/datum/mind/changeling = pick(antag_candidates)
|
||||||
antag_candidates -= changeling
|
antag_candidates -= changeling
|
||||||
changelings += changeling
|
changelings += changeling
|
||||||
|
|||||||
@@ -42,7 +42,8 @@
|
|||||||
|
|
||||||
if(possible_changelings.len>0)
|
if(possible_changelings.len>0)
|
||||||
for(var/j = 0, j < num_changelings, j++)
|
for(var/j = 0, j < num_changelings, j++)
|
||||||
if(!possible_changelings.len) break
|
if(!possible_changelings.len)
|
||||||
|
break
|
||||||
var/datum/mind/changeling = pick(possible_changelings)
|
var/datum/mind/changeling = pick(possible_changelings)
|
||||||
antag_candidates -= changeling
|
antag_candidates -= changeling
|
||||||
possible_changelings -= changeling
|
possible_changelings -= changeling
|
||||||
|
|||||||
@@ -25,7 +25,8 @@
|
|||||||
if(!(AT.z in GLOB.station_z_levels)) //Only check one, it's enough.
|
if(!(AT.z in GLOB.station_z_levels)) //Only check one, it's enough.
|
||||||
skip = 1
|
skip = 1
|
||||||
break
|
break
|
||||||
if(skip) continue
|
if(skip)
|
||||||
|
continue
|
||||||
A.power_light = FALSE
|
A.power_light = FALSE
|
||||||
A.power_equip = FALSE
|
A.power_equip = FALSE
|
||||||
A.power_environ = FALSE
|
A.power_environ = FALSE
|
||||||
@@ -40,7 +41,8 @@
|
|||||||
if(istype(A,area_type))
|
if(istype(A,area_type))
|
||||||
skip = 1
|
skip = 1
|
||||||
break
|
break
|
||||||
if(skip) continue
|
if(skip)
|
||||||
|
continue
|
||||||
|
|
||||||
C.cell.charge = 0
|
C.cell.charge = 0
|
||||||
|
|
||||||
|
|||||||
@@ -242,10 +242,12 @@
|
|||||||
/obj/item/organ/heart/gland/plasma/activate()
|
/obj/item/organ/heart/gland/plasma/activate()
|
||||||
to_chat(owner, "<span class='warning'>You feel bloated.</span>")
|
to_chat(owner, "<span class='warning'>You feel bloated.</span>")
|
||||||
sleep(150)
|
sleep(150)
|
||||||
if(!owner) return
|
if(!owner)
|
||||||
|
return
|
||||||
to_chat(owner, "<span class='userdanger'>A massive stomachache overcomes you.</span>")
|
to_chat(owner, "<span class='userdanger'>A massive stomachache overcomes you.</span>")
|
||||||
sleep(50)
|
sleep(50)
|
||||||
if(!owner) return
|
if(!owner)
|
||||||
|
return
|
||||||
owner.visible_message("<span class='danger'>[owner] vomits a cloud of plasma!</span>")
|
owner.visible_message("<span class='danger'>[owner] vomits a cloud of plasma!</span>")
|
||||||
var/turf/open/T = get_turf(owner)
|
var/turf/open/T = get_turf(owner)
|
||||||
if(istype(T))
|
if(istype(T))
|
||||||
|
|||||||
@@ -409,14 +409,17 @@ GLOBAL_LIST_EMPTY(possible_items)
|
|||||||
/datum/objective/steal/proc/select_target() //For admins setting objectives manually.
|
/datum/objective/steal/proc/select_target() //For admins setting objectives manually.
|
||||||
var/list/possible_items_all = GLOB.possible_items+"custom"
|
var/list/possible_items_all = GLOB.possible_items+"custom"
|
||||||
var/new_target = input("Select target:", "Objective target", steal_target) as null|anything in possible_items_all
|
var/new_target = input("Select target:", "Objective target", steal_target) as null|anything in possible_items_all
|
||||||
if (!new_target) return
|
if (!new_target)
|
||||||
|
return
|
||||||
|
|
||||||
if (new_target == "custom") //Can set custom items.
|
if (new_target == "custom") //Can set custom items.
|
||||||
var/obj/item/custom_target = input("Select type:","Type") as null|anything in typesof(/obj/item)
|
var/obj/item/custom_target = input("Select type:","Type") as null|anything in typesof(/obj/item)
|
||||||
if (!custom_target) return
|
if (!custom_target)
|
||||||
|
return
|
||||||
var/custom_name = initial(custom_target.name)
|
var/custom_name = initial(custom_target.name)
|
||||||
custom_name = stripped_input("Enter target name:", "Objective target", custom_name)
|
custom_name = stripped_input("Enter target name:", "Objective target", custom_name)
|
||||||
if (!custom_name) return
|
if (!custom_name)
|
||||||
|
return
|
||||||
steal_target = custom_target
|
steal_target = custom_target
|
||||||
explanation_text = "Steal [custom_name]."
|
explanation_text = "Steal [custom_name]."
|
||||||
|
|
||||||
@@ -578,7 +581,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
|||||||
for(var/datum/mind/M in owners)
|
for(var/datum/mind/M in owners)
|
||||||
if(!owner || !owner.changeling || !owner.changeling.stored_profiles)
|
if(!owner || !owner.changeling || !owner.changeling.stored_profiles)
|
||||||
continue
|
continue
|
||||||
absorbedcount += M.changeling.absorbedcount
|
absorbedcount += M.changeling.absorbedcount
|
||||||
return absorbedcount >= target_amount
|
return absorbedcount >= target_amount
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,8 @@
|
|||||||
usr << browse(dat,"window=airlockmaker")
|
usr << browse(dat,"window=airlockmaker")
|
||||||
|
|
||||||
/datum/airlock_maker/Topic(var/href,var/list/href_list)
|
/datum/airlock_maker/Topic(var/href,var/list/href_list)
|
||||||
if(!usr) return
|
if(!usr)
|
||||||
|
return
|
||||||
if(!src || !linked || !linked.loc)
|
if(!src || !linked || !linked.loc)
|
||||||
usr << browse(null,"window=airlockmaker")
|
usr << browse(null,"window=airlockmaker")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -112,7 +112,8 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
|||||||
// Admin: toggle spawning
|
// Admin: toggle spawning
|
||||||
//
|
//
|
||||||
if("hsbtobj")
|
if("hsbtobj")
|
||||||
if(!admin) return
|
if(!admin)
|
||||||
|
return
|
||||||
if(GLOB.hsboxspawn)
|
if(GLOB.hsboxspawn)
|
||||||
to_chat(world, "<span class='boldannounce'>Sandbox:</span> <b>\black[usr.key] has disabled object spawning!</b>")
|
to_chat(world, "<span class='boldannounce'>Sandbox:</span> <b>\black[usr.key] has disabled object spawning!</b>")
|
||||||
GLOB.hsboxspawn = FALSE
|
GLOB.hsboxspawn = FALSE
|
||||||
@@ -125,7 +126,8 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
|||||||
// Admin: Toggle auto-close
|
// Admin: Toggle auto-close
|
||||||
//
|
//
|
||||||
if("hsbtac")
|
if("hsbtac")
|
||||||
if(!admin) return
|
if(!admin)
|
||||||
|
return
|
||||||
if(config.sandbox_autoclose)
|
if(config.sandbox_autoclose)
|
||||||
to_chat(world, "<span class='boldnotice'>Sandbox:</span> <b>\black [usr.key] has removed the object spawn limiter.</b>")
|
to_chat(world, "<span class='boldnotice'>Sandbox:</span> <b>\black [usr.key] has removed the object spawn limiter.</b>")
|
||||||
config.sandbox_autoclose = FALSE
|
config.sandbox_autoclose = FALSE
|
||||||
@@ -138,7 +140,8 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
|||||||
//
|
//
|
||||||
if("hsbsuit")
|
if("hsbsuit")
|
||||||
var/mob/living/carbon/human/P = usr
|
var/mob/living/carbon/human/P = usr
|
||||||
if(!istype(P)) return
|
if(!istype(P))
|
||||||
|
return
|
||||||
if(P.wear_suit)
|
if(P.wear_suit)
|
||||||
P.wear_suit.loc = P.loc
|
P.wear_suit.loc = P.loc
|
||||||
P.wear_suit.layer = initial(P.wear_suit.layer)
|
P.wear_suit.layer = initial(P.wear_suit.layer)
|
||||||
@@ -216,7 +219,8 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
|||||||
// Spawn check due to grief potential (destroying floors, walls, etc)
|
// Spawn check due to grief potential (destroying floors, walls, etc)
|
||||||
//
|
//
|
||||||
if("hsbrcd")
|
if("hsbrcd")
|
||||||
if(!GLOB.hsboxspawn) return
|
if(!GLOB.hsboxspawn)
|
||||||
|
return
|
||||||
|
|
||||||
new/obj/item/construction/rcd/combat(usr.loc)
|
new/obj/item/construction/rcd/combat(usr.loc)
|
||||||
|
|
||||||
@@ -232,7 +236,8 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
|||||||
|
|
||||||
// Clothing
|
// Clothing
|
||||||
if("hsbcloth")
|
if("hsbcloth")
|
||||||
if(!GLOB.hsboxspawn) return
|
if(!GLOB.hsboxspawn)
|
||||||
|
return
|
||||||
|
|
||||||
if(!clothinfo)
|
if(!clothinfo)
|
||||||
clothinfo = "<b>Clothing</b> <a href='?\ref[src];hsb=hsbreag'>(Reagent Containers)</a> <a href='?\ref[src];hsb=hsbobj'>(Other Items)</a><hr><br>"
|
clothinfo = "<b>Clothing</b> <a href='?\ref[src];hsb=hsbreag'>(Reagent Containers)</a> <a href='?\ref[src];hsb=hsbobj'>(Other Items)</a><hr><br>"
|
||||||
@@ -246,7 +251,8 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
|||||||
|
|
||||||
// Reagent containers
|
// Reagent containers
|
||||||
if("hsbreag")
|
if("hsbreag")
|
||||||
if(!GLOB.hsboxspawn) return
|
if(!GLOB.hsboxspawn)
|
||||||
|
return
|
||||||
|
|
||||||
if(!reaginfo)
|
if(!reaginfo)
|
||||||
reaginfo = "<b>Reagent Containers</b> <a href='?\ref[src];hsb=hsbcloth'>(Clothing)</a> <a href='?\ref[src];hsb=hsbobj'>(Other Items)</a><hr><br>"
|
reaginfo = "<b>Reagent Containers</b> <a href='?\ref[src];hsb=hsbcloth'>(Clothing)</a> <a href='?\ref[src];hsb=hsbobj'>(Other Items)</a><hr><br>"
|
||||||
@@ -260,7 +266,8 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
|||||||
|
|
||||||
// Other items
|
// Other items
|
||||||
if("hsbobj")
|
if("hsbobj")
|
||||||
if(!GLOB.hsboxspawn) return
|
if(!GLOB.hsboxspawn)
|
||||||
|
return
|
||||||
|
|
||||||
if(!objinfo)
|
if(!objinfo)
|
||||||
objinfo = "<b>Other Items</b> <a href='?\ref[src];hsb=hsbcloth'>(Clothing)</a> <a href='?\ref[src];hsb=hsbreag'>(Reagent Containers)</a><hr><br>"
|
objinfo = "<b>Other Items</b> <a href='?\ref[src];hsb=hsbcloth'>(Clothing)</a> <a href='?\ref[src];hsb=hsbreag'>(Reagent Containers)</a><hr><br>"
|
||||||
|
|||||||
@@ -475,14 +475,17 @@ Class Procs:
|
|||||||
// Hook for html_interface module to prevent updates to clients who don't have this as their active machine.
|
// Hook for html_interface module to prevent updates to clients who don't have this as their active machine.
|
||||||
/obj/machinery/proc/hiIsValidClient(datum/html_interface_client/hclient, datum/html_interface/hi)
|
/obj/machinery/proc/hiIsValidClient(datum/html_interface_client/hclient, datum/html_interface/hi)
|
||||||
if (hclient.client.mob && (hclient.client.mob.stat == 0 || IsAdminGhost(hclient.client.mob)))
|
if (hclient.client.mob && (hclient.client.mob.stat == 0 || IsAdminGhost(hclient.client.mob)))
|
||||||
if (isAI(hclient.client.mob) || IsAdminGhost(hclient.client.mob)) return TRUE
|
if (isAI(hclient.client.mob) || IsAdminGhost(hclient.client.mob))
|
||||||
else return hclient.client.mob.machine == src && Adjacent(hclient.client.mob)
|
return TRUE
|
||||||
|
else
|
||||||
|
return hclient.client.mob.machine == src && Adjacent(hclient.client.mob)
|
||||||
else
|
else
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
// Hook for html_interface module to unset the active machine when the window is closed by the player.
|
// Hook for html_interface module to unset the active machine when the window is closed by the player.
|
||||||
/obj/machinery/proc/hiOnHide(datum/html_interface_client/hclient)
|
/obj/machinery/proc/hiOnHide(datum/html_interface_client/hclient)
|
||||||
if (hclient.client.mob && hclient.client.mob.machine == src) hclient.client.mob.unset_machine()
|
if (hclient.client.mob && hclient.client.mob.machine == src)
|
||||||
|
hclient.client.mob.unset_machine()
|
||||||
|
|
||||||
/obj/machinery/proc/can_be_overridden()
|
/obj/machinery/proc/can_be_overridden()
|
||||||
. = 1
|
. = 1
|
||||||
|
|||||||
@@ -8,9 +8,11 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
/obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
||||||
if(!signal || signal.encryption) return
|
if(!signal || signal.encryption)
|
||||||
|
return
|
||||||
|
|
||||||
if(id_tag != signal.data["tag"] || !signal.data["command"]) return
|
if(id_tag != signal.data["tag"] || !signal.data["command"])
|
||||||
|
return
|
||||||
|
|
||||||
switch(signal.data["command"])
|
switch(signal.data["command"])
|
||||||
if("open")
|
if("open")
|
||||||
@@ -63,12 +65,14 @@
|
|||||||
|
|
||||||
/obj/machinery/door/airlock/open(surpress_send)
|
/obj/machinery/door/airlock/open(surpress_send)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(!surpress_send) send_status()
|
if(!surpress_send)
|
||||||
|
send_status()
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/door/airlock/close(surpress_send)
|
/obj/machinery/door/airlock/close(surpress_send)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(!surpress_send) send_status()
|
if(!surpress_send)
|
||||||
|
send_status()
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/door/airlock/proc/set_frequency(new_frequency)
|
/obj/machinery/door/airlock/proc/set_frequency(new_frequency)
|
||||||
|
|||||||
@@ -57,7 +57,8 @@
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/machinery/camera/proc/triggerAlarm()
|
/obj/machinery/camera/proc/triggerAlarm()
|
||||||
if (!detectTime) return 0
|
if (!detectTime)
|
||||||
|
return 0
|
||||||
for (var/mob/living/silicon/aiPlayer in GLOB.player_list)
|
for (var/mob/living/silicon/aiPlayer in GLOB.player_list)
|
||||||
if (status)
|
if (status)
|
||||||
aiPlayer.triggerAlarm("Motion", get_area(src), list(src), src)
|
aiPlayer.triggerAlarm("Motion", get_area(src), list(src), src)
|
||||||
|
|||||||
@@ -53,7 +53,8 @@
|
|||||||
var/area/A = get_area(src)
|
var/area/A = get_area(src)
|
||||||
if(A)
|
if(A)
|
||||||
for(var/obj/machinery/camera/autoname/C in GLOB.machines)
|
for(var/obj/machinery/camera/autoname/C in GLOB.machines)
|
||||||
if(C == src) continue
|
if(C == src)
|
||||||
|
continue
|
||||||
var/area/CA = get_area(C)
|
var/area/CA = get_area(C)
|
||||||
if(CA.type == A.type)
|
if(CA.type == A.type)
|
||||||
if(C.number)
|
if(C.number)
|
||||||
|
|||||||
@@ -60,12 +60,14 @@
|
|||||||
radio_connection = SSradio.add_object(src, receive_frequency, GLOB.RADIO_ATMOSIA)
|
radio_connection = SSradio.add_object(src, receive_frequency, GLOB.RADIO_ATMOSIA)
|
||||||
|
|
||||||
/obj/machinery/computer/atmos_alert/receive_signal(datum/signal/signal)
|
/obj/machinery/computer/atmos_alert/receive_signal(datum/signal/signal)
|
||||||
if(!signal || signal.encryption) return
|
if(!signal || signal.encryption)
|
||||||
|
return
|
||||||
|
|
||||||
var/zone = signal.data["zone"]
|
var/zone = signal.data["zone"]
|
||||||
var/severity = signal.data["alert"]
|
var/severity = signal.data["alert"]
|
||||||
|
|
||||||
if(!zone || !severity) return
|
if(!zone || !severity)
|
||||||
|
return
|
||||||
|
|
||||||
minor_alarms -= zone
|
minor_alarms -= zone
|
||||||
priority_alarms -= zone
|
priority_alarms -= zone
|
||||||
|
|||||||
@@ -24,7 +24,8 @@
|
|||||||
playsound(src.loc, P.usesound, 50, 1)
|
playsound(src.loc, P.usesound, 50, 1)
|
||||||
to_chat(user, "<span class='notice'>You start deconstructing the frame...</span>")
|
to_chat(user, "<span class='notice'>You start deconstructing the frame...</span>")
|
||||||
if(do_after(user, 20*P.toolspeed, target = src))
|
if(do_after(user, 20*P.toolspeed, target = src))
|
||||||
if(!src || !WT.isOn()) return
|
if(!src || !WT.isOn())
|
||||||
|
return
|
||||||
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
|
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
|
||||||
var/obj/item/stack/sheet/metal/M = new (loc, 5)
|
var/obj/item/stack/sheet/metal/M = new (loc, 5)
|
||||||
M.add_fingerprint(user)
|
M.add_fingerprint(user)
|
||||||
|
|||||||
@@ -103,9 +103,12 @@
|
|||||||
if (I && istype(I))
|
if (I && istype(I))
|
||||||
if(ACCESS_CAPTAIN in I.access)
|
if(ACCESS_CAPTAIN in I.access)
|
||||||
var/old_level = GLOB.security_level
|
var/old_level = GLOB.security_level
|
||||||
if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN
|
if(!tmp_alertlevel)
|
||||||
if(tmp_alertlevel < SEC_LEVEL_GREEN) tmp_alertlevel = SEC_LEVEL_GREEN
|
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||||
if(tmp_alertlevel > SEC_LEVEL_BLUE) tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this
|
if(tmp_alertlevel < SEC_LEVEL_GREEN)
|
||||||
|
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||||
|
if(tmp_alertlevel > SEC_LEVEL_BLUE)
|
||||||
|
tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this
|
||||||
set_security_level(tmp_alertlevel)
|
set_security_level(tmp_alertlevel)
|
||||||
if(GLOB.security_level != old_level)
|
if(GLOB.security_level != old_level)
|
||||||
to_chat(usr, "<span class='notice'>Authorization confirmed. Modifying security level.</span>")
|
to_chat(usr, "<span class='notice'>Authorization confirmed. Modifying security level.</span>")
|
||||||
@@ -230,7 +233,8 @@
|
|||||||
|
|
||||||
if("securitylevel")
|
if("securitylevel")
|
||||||
src.tmp_alertlevel = text2num( href_list["newalertlevel"] )
|
src.tmp_alertlevel = text2num( href_list["newalertlevel"] )
|
||||||
if(!tmp_alertlevel) tmp_alertlevel = 0
|
if(!tmp_alertlevel)
|
||||||
|
tmp_alertlevel = 0
|
||||||
state = STATE_CONFIRM_LEVEL
|
state = STATE_CONFIRM_LEVEL
|
||||||
if("changeseclevel")
|
if("changeseclevel")
|
||||||
state = STATE_ALERT_LEVEL
|
state = STATE_ALERT_LEVEL
|
||||||
@@ -356,11 +360,15 @@
|
|||||||
make_announcement(usr, 1)
|
make_announcement(usr, 1)
|
||||||
if("ai-securitylevel")
|
if("ai-securitylevel")
|
||||||
src.tmp_alertlevel = text2num( href_list["newalertlevel"] )
|
src.tmp_alertlevel = text2num( href_list["newalertlevel"] )
|
||||||
if(!tmp_alertlevel) tmp_alertlevel = 0
|
if(!tmp_alertlevel)
|
||||||
|
tmp_alertlevel = 0
|
||||||
var/old_level = GLOB.security_level
|
var/old_level = GLOB.security_level
|
||||||
if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN
|
if(!tmp_alertlevel)
|
||||||
if(tmp_alertlevel < SEC_LEVEL_GREEN) tmp_alertlevel = SEC_LEVEL_GREEN
|
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||||
if(tmp_alertlevel > SEC_LEVEL_BLUE) tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this
|
if(tmp_alertlevel < SEC_LEVEL_GREEN)
|
||||||
|
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||||
|
if(tmp_alertlevel > SEC_LEVEL_BLUE)
|
||||||
|
tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this
|
||||||
set_security_level(tmp_alertlevel)
|
set_security_level(tmp_alertlevel)
|
||||||
if(GLOB.security_level != old_level)
|
if(GLOB.security_level != old_level)
|
||||||
//Only notify the admins if an actual change happened
|
//Only notify the admins if an actual change happened
|
||||||
@@ -670,7 +678,8 @@
|
|||||||
|
|
||||||
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
|
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
|
||||||
|
|
||||||
if(!frequency) return
|
if(!frequency)
|
||||||
|
return
|
||||||
|
|
||||||
var/datum/signal/status_signal = new
|
var/datum/signal/status_signal = new
|
||||||
status_signal.source = src
|
status_signal.source = src
|
||||||
|
|||||||
@@ -93,7 +93,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
|
|||||||
/datum/crewmonitor/proc/show(mob/mob, z)
|
/datum/crewmonitor/proc/show(mob/mob, z)
|
||||||
if (mob.client)
|
if (mob.client)
|
||||||
sendResources(mob.client)
|
sendResources(mob.client)
|
||||||
if (!z) z = mob.z
|
if (!z)
|
||||||
|
z = mob.z
|
||||||
|
|
||||||
if (z > 0 && src.interfaces)
|
if (z > 0 && src.interfaces)
|
||||||
var/datum/html_interface/hi
|
var/datum/html_interface/hi
|
||||||
@@ -160,7 +161,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
|
|||||||
pos = H.z == 0 || U.sensor_mode == SENSOR_COORDS ? get_turf(H) : null
|
pos = H.z == 0 || U.sensor_mode == SENSOR_COORDS ? get_turf(H) : null
|
||||||
|
|
||||||
// Special case: If the mob is inside an object confirm the z-level on turf level.
|
// Special case: If the mob is inside an object confirm the z-level on turf level.
|
||||||
if (H.z == 0 && (!pos || pos.z != z)) continue
|
if (H.z == 0 && (!pos || pos.z != z))
|
||||||
|
continue
|
||||||
|
|
||||||
I = H.wear_id ? H.wear_id.GetID() : null
|
I = H.wear_id ? H.wear_id.GetID() : null
|
||||||
|
|
||||||
@@ -173,8 +175,10 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
|
|||||||
assignment = ""
|
assignment = ""
|
||||||
ijob = 80
|
ijob = 80
|
||||||
|
|
||||||
if (U.sensor_mode >= SENSOR_LIVING) life_status = (!H.stat ? "true" : "false")
|
if (U.sensor_mode >= SENSOR_LIVING)
|
||||||
else life_status = null
|
life_status = (!H.stat ? "true" : "false")
|
||||||
|
else
|
||||||
|
life_status = null
|
||||||
|
|
||||||
if (U.sensor_mode >= SENSOR_VITALS)
|
if (U.sensor_mode >= SENSOR_VITALS)
|
||||||
dam1 = round(H.getOxyLoss(),1)
|
dam1 = round(H.getOxyLoss(),1)
|
||||||
@@ -188,7 +192,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
|
|||||||
dam4 = null
|
dam4 = null
|
||||||
|
|
||||||
if (U.sensor_mode >= SENSOR_COORDS)
|
if (U.sensor_mode >= SENSOR_COORDS)
|
||||||
if (!pos) pos = get_turf(H)
|
if (!pos)
|
||||||
|
pos = get_turf(H)
|
||||||
var/area/player_area = get_area(H)
|
var/area/player_area = get_area(H)
|
||||||
|
|
||||||
area = format_text(player_area.name)
|
area = format_text(player_area.name)
|
||||||
@@ -208,13 +213,15 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
|
|||||||
var/z = ""
|
var/z = ""
|
||||||
|
|
||||||
for (z in src.interfaces)
|
for (z in src.interfaces)
|
||||||
if (src.interfaces[z] == hi) break
|
if (src.interfaces[z] == hi)
|
||||||
|
break
|
||||||
|
|
||||||
if(hclient.client.mob && IsAdminGhost(hclient.client.mob))
|
if(hclient.client.mob && IsAdminGhost(hclient.client.mob))
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
if (hclient.client.mob && hclient.client.mob.stat == 0 && hclient.client.mob.z == text2num(z))
|
if (hclient.client.mob && hclient.client.mob.stat == 0 && hclient.client.mob.z == text2num(z))
|
||||||
if (isAI(hclient.client.mob)) return TRUE
|
if (isAI(hclient.client.mob))
|
||||||
|
return TRUE
|
||||||
else if (iscyborg(hclient.client.mob))
|
else if (iscyborg(hclient.client.mob))
|
||||||
return (locate(/obj/machinery/computer/crew, range(world.view, hclient.client.mob))) || (locate(/obj/item/device/sensor_device, hclient.client.mob.contents))
|
return (locate(/obj/machinery/computer/crew, range(world.view, hclient.client.mob))) || (locate(/obj/item/device/sensor_device, hclient.client.mob.contents))
|
||||||
else
|
else
|
||||||
@@ -238,8 +245,10 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
|
|||||||
|
|
||||||
var/obj/machinery/camera/C = locate(/obj/machinery/camera) in range(5, tile)
|
var/obj/machinery/camera/C = locate(/obj/machinery/camera) in range(5, tile)
|
||||||
|
|
||||||
if (!C) C = locate(/obj/machinery/camera) in urange(10, tile)
|
if (!C)
|
||||||
if (!C) C = locate(/obj/machinery/camera) in urange(15, tile)
|
C = locate(/obj/machinery/camera) in urange(10, tile)
|
||||||
|
if (!C)
|
||||||
|
C = locate(/obj/machinery/camera) in urange(15, tile)
|
||||||
|
|
||||||
if (C)
|
if (C)
|
||||||
addtimer(CALLBACK(src, .proc/update_ai, AI, C, AI.eyeobj.loc), min(30, get_dist(get_turf(C), AI.eyeobj) / 4))
|
addtimer(CALLBACK(src, .proc/update_ai, AI, C, AI.eyeobj.loc), min(30, get_dist(get_turf(C), AI.eyeobj) / 4))
|
||||||
@@ -254,7 +263,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
|
|||||||
|
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
if (old_z != src.z) GLOB.crewmonitor.queueUpdate(old_z)
|
if (old_z != src.z)
|
||||||
|
GLOB.crewmonitor.queueUpdate(old_z)
|
||||||
GLOB.crewmonitor.queueUpdate(src.z)
|
GLOB.crewmonitor.queueUpdate(src.z)
|
||||||
else
|
else
|
||||||
return ..()
|
return ..()
|
||||||
|
|||||||
@@ -67,7 +67,8 @@
|
|||||||
ShowInterface(user)
|
ShowInterface(user)
|
||||||
|
|
||||||
/obj/machinery/computer/scan_consolenew/proc/ShowInterface(mob/user, last_change)
|
/obj/machinery/computer/scan_consolenew/proc/ShowInterface(mob/user, last_change)
|
||||||
if(!user) return
|
if(!user)
|
||||||
|
return
|
||||||
var/datum/browser/popup = new(user, "scannernew", "DNA Modifier Console", 800, 630) // Set up the popup browser window
|
var/datum/browser/popup = new(user, "scannernew", "DNA Modifier Console", 800, 630) // Set up the popup browser window
|
||||||
if(!(in_range(src, user) || issilicon(user)))
|
if(!(in_range(src, user) || issilicon(user)))
|
||||||
popup.close()
|
popup.close()
|
||||||
|
|||||||
@@ -82,7 +82,8 @@
|
|||||||
if(hacking || emagged)
|
if(hacking || emagged)
|
||||||
screen = 2
|
screen = 2
|
||||||
else if(!auth || !linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
|
else if(!auth || !linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
|
||||||
if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN))) message = noserver
|
if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
|
||||||
|
message = noserver
|
||||||
screen = 0
|
screen = 0
|
||||||
|
|
||||||
switch(screen)
|
switch(screen)
|
||||||
@@ -267,7 +268,8 @@
|
|||||||
|
|
||||||
//Turn the server on/off.
|
//Turn the server on/off.
|
||||||
if (href_list["active"])
|
if (href_list["active"])
|
||||||
if(auth) linkedServer.active = !linkedServer.active
|
if(auth)
|
||||||
|
linkedServer.active = !linkedServer.active
|
||||||
//Find a server
|
//Find a server
|
||||||
if (href_list["find"])
|
if (href_list["find"])
|
||||||
if(GLOB.message_servers && GLOB.message_servers.len > 1)
|
if(GLOB.message_servers && GLOB.message_servers.len > 1)
|
||||||
|
|||||||
@@ -96,7 +96,8 @@
|
|||||||
return
|
return
|
||||||
I.loc = src
|
I.loc = src
|
||||||
inserted_id = I
|
inserted_id = I
|
||||||
else to_chat(usr, "<span class='danger'>No valid ID.</span>")
|
else
|
||||||
|
to_chat(usr, "<span class='danger'>No valid ID.</span>")
|
||||||
else if(inserted_id)
|
else if(inserted_id)
|
||||||
switch(href_list["id"])
|
switch(href_list["id"])
|
||||||
if("eject")
|
if("eject")
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
|
|
||||||
/datum/computer/file/embedded_program/airlock_controller/receive_signal(datum/signal/signal, receive_method, receive_param)
|
/datum/computer/file/embedded_program/airlock_controller/receive_signal(datum/signal/signal, receive_method, receive_param)
|
||||||
var/receive_tag = signal.data["tag"]
|
var/receive_tag = signal.data["tag"]
|
||||||
if(!receive_tag) return
|
if(!receive_tag)
|
||||||
|
return
|
||||||
|
|
||||||
if(receive_tag==sensor_tag)
|
if(receive_tag==sensor_tag)
|
||||||
if(signal.data["pressure"])
|
if(signal.data["pressure"])
|
||||||
|
|||||||
@@ -44,7 +44,8 @@
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
/obj/machinery/embedded_controller/receive_signal(datum/signal/signal, receive_method, receive_param)
|
/obj/machinery/embedded_controller/receive_signal(datum/signal/signal, receive_method, receive_param)
|
||||||
if(!signal || signal.encryption) return
|
if(!signal || signal.encryption)
|
||||||
|
return
|
||||||
|
|
||||||
if(program)
|
if(program)
|
||||||
program.receive_signal(signal, receive_method, receive_param)
|
program.receive_signal(signal, receive_method, receive_param)
|
||||||
|
|||||||
@@ -166,7 +166,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/machinery/magnetic_module/proc/magnetic_process() // proc that actually does the pulling
|
/obj/machinery/magnetic_module/proc/magnetic_process() // proc that actually does the pulling
|
||||||
if(pulling) return
|
if(pulling)
|
||||||
|
return
|
||||||
while(on)
|
while(on)
|
||||||
|
|
||||||
pulling = 1
|
pulling = 1
|
||||||
@@ -333,7 +334,8 @@
|
|||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
|
|
||||||
/obj/machinery/magnetic_controller/proc/MagnetMove()
|
/obj/machinery/magnetic_controller/proc/MagnetMove()
|
||||||
if(looping) return
|
if(looping)
|
||||||
|
return
|
||||||
|
|
||||||
while(moving && rpath.len >= 1)
|
while(moving && rpath.len >= 1)
|
||||||
|
|
||||||
|
|||||||
@@ -343,7 +343,8 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
|||||||
if (sending)
|
if (sending)
|
||||||
var/pass = 0
|
var/pass = 0
|
||||||
for (var/obj/machinery/message_server/MS in GLOB.machines)
|
for (var/obj/machinery/message_server/MS in GLOB.machines)
|
||||||
if(!MS.active) continue
|
if(!MS.active)
|
||||||
|
continue
|
||||||
MS.send_rc_message(href_list["department"],department,log_msg,msgStamped,msgVerified,priority)
|
MS.send_rc_message(href_list["department"],department,log_msg,msgStamped,msgVerified,priority)
|
||||||
pass = 1
|
pass = 1
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
|
|
||||||
/obj/machinery/power/singularity_beacon/proc/Activate(mob/user = null)
|
/obj/machinery/power/singularity_beacon/proc/Activate(mob/user = null)
|
||||||
if(surplus() < 1500)
|
if(surplus() < 1500)
|
||||||
if(user) to_chat(user, "<span class='notice'>The connected wire doesn't have enough current.</span>")
|
if(user)
|
||||||
|
to_chat(user, "<span class='notice'>The connected wire doesn't have enough current.</span>")
|
||||||
return
|
return
|
||||||
for(var/obj/singularity/singulo in GLOB.singularities)
|
for(var/obj/singularity/singulo in GLOB.singularities)
|
||||||
if(singulo.z == z)
|
if(singulo.z == z)
|
||||||
|
|||||||
@@ -60,7 +60,8 @@
|
|||||||
dat += "<br>Identification String: <a href='?src=\ref[src];input=id'>NULL</a>"
|
dat += "<br>Identification String: <a href='?src=\ref[src];input=id'>NULL</a>"
|
||||||
dat += "<br>Network: <a href='?src=\ref[src];input=network'>[network]</a>"
|
dat += "<br>Network: <a href='?src=\ref[src];input=network'>[network]</a>"
|
||||||
dat += "<br>Prefabrication: [autolinkers.len ? "TRUE" : "FALSE"]"
|
dat += "<br>Prefabrication: [autolinkers.len ? "TRUE" : "FALSE"]"
|
||||||
if(hide) dat += "<br>Shadow Link: ACTIVE</a>"
|
if(hide)
|
||||||
|
dat += "<br>Shadow Link: ACTIVE</a>"
|
||||||
|
|
||||||
//Show additional options for certain machines.
|
//Show additional options for certain machines.
|
||||||
dat += Options_Menu()
|
dat += Options_Menu()
|
||||||
|
|||||||
@@ -46,7 +46,8 @@
|
|||||||
log_message("Critical failure",1)
|
log_message("Critical failure",1)
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/proc/get_equip_info()
|
/obj/item/mecha_parts/mecha_equipment/proc/get_equip_info()
|
||||||
if(!chassis) return
|
if(!chassis)
|
||||||
|
return
|
||||||
var/txt = "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> "
|
var/txt = "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> "
|
||||||
if(chassis.selected == src)
|
if(chassis.selected == src)
|
||||||
txt += "<b>[src.name]</b>"
|
txt += "<b>[src.name]</b>"
|
||||||
|
|||||||
@@ -14,7 +14,8 @@
|
|||||||
range = RANGED
|
range = RANGED
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target)
|
/obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target)
|
||||||
if(!action_checks(target) || src.loc.z == ZLEVEL_CENTCOM) return
|
if(!action_checks(target) || src.loc.z == ZLEVEL_CENTCOM)
|
||||||
|
return
|
||||||
var/turf/T = get_turf(target)
|
var/turf/T = get_turf(target)
|
||||||
if(T)
|
if(T)
|
||||||
do_teleport(chassis, T, 4)
|
do_teleport(chassis, T, 4)
|
||||||
@@ -112,7 +113,8 @@
|
|||||||
else
|
else
|
||||||
atoms = orange(3, target)
|
atoms = orange(3, target)
|
||||||
for(var/atom/movable/A in atoms)
|
for(var/atom/movable/A in atoms)
|
||||||
if(A.anchored) continue
|
if(A.anchored)
|
||||||
|
continue
|
||||||
spawn(0)
|
spawn(0)
|
||||||
var/iter = 5-get_dist(A,target)
|
var/iter = 5-get_dist(A,target)
|
||||||
for(var/i=0 to iter)
|
for(var/i=0 to iter)
|
||||||
@@ -208,7 +210,8 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/repair_droid/get_equip_info()
|
/obj/item/mecha_parts/mecha_equipment/repair_droid/get_equip_info()
|
||||||
if(!chassis) return
|
if(!chassis)
|
||||||
|
return
|
||||||
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> [src.name] - <a href='?src=\ref[src];toggle_repairs=1'>[equip_ready?"A":"Dea"]ctivate</a>"
|
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> [src.name] - <a href='?src=\ref[src];toggle_repairs=1'>[equip_ready?"A":"Dea"]ctivate</a>"
|
||||||
|
|
||||||
|
|
||||||
@@ -315,7 +318,8 @@
|
|||||||
log_message("Deactivated.")
|
log_message("Deactivated.")
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/get_equip_info()
|
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/get_equip_info()
|
||||||
if(!chassis) return
|
if(!chassis)
|
||||||
|
return
|
||||||
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> [src.name] - <a href='?src=\ref[src];toggle_relay=1'>[equip_ready?"A":"Dea"]ctivate</a>"
|
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> [src.name] - <a href='?src=\ref[src];toggle_relay=1'>[equip_ready?"A":"Dea"]ctivate</a>"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,8 @@
|
|||||||
|
|
||||||
else if(isliving(target))
|
else if(isliving(target))
|
||||||
var/mob/living/M = target
|
var/mob/living/M = target
|
||||||
if(M.stat == DEAD) return
|
if(M.stat == DEAD)
|
||||||
|
return
|
||||||
if(chassis.occupant.a_intent == INTENT_HARM)
|
if(chassis.occupant.a_intent == INTENT_HARM)
|
||||||
M.take_overall_damage(dam_force)
|
M.take_overall_damage(dam_force)
|
||||||
if(!M)
|
if(!M)
|
||||||
@@ -103,7 +104,8 @@
|
|||||||
|
|
||||||
else if(isliving(target))
|
else if(isliving(target))
|
||||||
var/mob/living/M = target
|
var/mob/living/M = target
|
||||||
if(M.stat == DEAD) return
|
if(M.stat == DEAD)
|
||||||
|
return
|
||||||
if(chassis.occupant.a_intent == INTENT_HARM)
|
if(chassis.occupant.a_intent == INTENT_HARM)
|
||||||
target.visible_message("<span class='danger'>[chassis] destroys [target] in an unholy fury.</span>", \
|
target.visible_message("<span class='danger'>[chassis] destroys [target] in an unholy fury.</span>", \
|
||||||
"<span class='userdanger'>[chassis] destroys [target] in an unholy fury.</span>")
|
"<span class='userdanger'>[chassis] destroys [target] in an unholy fury.</span>")
|
||||||
|
|||||||
@@ -580,7 +580,8 @@
|
|||||||
///////////////////////////////////
|
///////////////////////////////////
|
||||||
|
|
||||||
/obj/mecha/proc/check_for_internal_damage(list/possible_int_damage,ignore_threshold=null)
|
/obj/mecha/proc/check_for_internal_damage(list/possible_int_damage,ignore_threshold=null)
|
||||||
if(!islist(possible_int_damage) || isemptylist(possible_int_damage)) return
|
if(!islist(possible_int_damage) || isemptylist(possible_int_damage))
|
||||||
|
return
|
||||||
if(prob(20))
|
if(prob(20))
|
||||||
if(ignore_threshold || obj_integrity*100/max_integrity < internal_damage_threshold)
|
if(ignore_threshold || obj_integrity*100/max_integrity < internal_damage_threshold)
|
||||||
for(var/T in possible_int_damage)
|
for(var/T in possible_int_damage)
|
||||||
|
|||||||
@@ -159,7 +159,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/mecha/proc/output_access_dialog(obj/item/card/id/id_card, mob/user)
|
/obj/mecha/proc/output_access_dialog(obj/item/card/id/id_card, mob/user)
|
||||||
if(!id_card || !user) return
|
if(!id_card || !user)
|
||||||
|
return
|
||||||
. = {"<html>
|
. = {"<html>
|
||||||
<head><style>
|
<head><style>
|
||||||
h1 {font-size:15px;margin-bottom:4px;}
|
h1 {font-size:15px;margin-bottom:4px;}
|
||||||
@@ -173,9 +174,11 @@
|
|||||||
. += "[get_access_desc(a)] - <a href='?src=\ref[src];del_req_access=[a];user=\ref[user];id_card=\ref[id_card]'>Delete</a><br>"
|
. += "[get_access_desc(a)] - <a href='?src=\ref[src];del_req_access=[a];user=\ref[user];id_card=\ref[id_card]'>Delete</a><br>"
|
||||||
. += "<hr><h1>Following keycodes were detected on portable device:</h1>"
|
. += "<hr><h1>Following keycodes were detected on portable device:</h1>"
|
||||||
for(var/a in id_card.access)
|
for(var/a in id_card.access)
|
||||||
if(a in operation_req_access) continue
|
if(a in operation_req_access)
|
||||||
|
continue
|
||||||
var/a_name = get_access_desc(a)
|
var/a_name = get_access_desc(a)
|
||||||
if(!a_name) continue //there's some strange access without a name
|
if(!a_name)
|
||||||
|
continue //there's some strange access without a name
|
||||||
. += "[a_name] - <a href='?src=\ref[src];add_req_access=[a];user=\ref[user];id_card=\ref[id_card]'>Add</a><br>"
|
. += "[a_name] - <a href='?src=\ref[src];add_req_access=[a];user=\ref[user];id_card=\ref[id_card]'>Add</a><br>"
|
||||||
. += "<hr><a href='?src=\ref[src];finish_req_access=1;user=\ref[user]'>Finish</a> "
|
. += "<hr><a href='?src=\ref[src];finish_req_access=1;user=\ref[user]'>Finish</a> "
|
||||||
. += "<span class='danger'>(Warning! The ID upload panel will be locked. It can be unlocked only through Exosuit Interface.)</span>"
|
. += "<span class='danger'>(Warning! The ID upload panel will be locked. It can be unlocked only through Exosuit Interface.)</span>"
|
||||||
@@ -185,7 +188,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/mecha/proc/output_maintenance_dialog(obj/item/card/id/id_card,mob/user)
|
/obj/mecha/proc/output_maintenance_dialog(obj/item/card/id/id_card,mob/user)
|
||||||
if(!id_card || !user) return
|
if(!id_card || !user)
|
||||||
|
return
|
||||||
. = {"<html>
|
. = {"<html>
|
||||||
<head>
|
<head>
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -221,8 +221,10 @@
|
|||||||
var/y_distance = TO.y - FROM.y
|
var/y_distance = TO.y - FROM.y
|
||||||
var/x_distance = TO.x - FROM.x
|
var/x_distance = TO.x - FROM.x
|
||||||
for (var/atom/movable/A in urange(12, FROM )) // iterate thru list of mobs in the area
|
for (var/atom/movable/A in urange(12, FROM )) // iterate thru list of mobs in the area
|
||||||
if(istype(A, /obj/item/device/radio/beacon)) continue // don't teleport beacons because that's just insanely stupid
|
if(istype(A, /obj/item/device/radio/beacon))
|
||||||
if(A.anchored) continue
|
continue // don't teleport beacons because that's just insanely stupid
|
||||||
|
if(A.anchored)
|
||||||
|
continue
|
||||||
|
|
||||||
var/turf/newloc = locate(A.x + x_distance, A.y + y_distance, TO.z) // calculate the new place
|
var/turf/newloc = locate(A.x + x_distance, A.y + y_distance, TO.z) // calculate the new place
|
||||||
if(!A.Move(newloc) && newloc) // if the atom, for some reason, can't move, FORCE them to move! :) We try Move() first to invoke any movement-related checks the atom needs to perform after moving
|
if(!A.Move(newloc) && newloc) // if the atom, for some reason, can't move, FORCE them to move! :) We try Move() first to invoke any movement-related checks the atom needs to perform after moving
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
|
/proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
|
||||||
if(!epicenter) return
|
if(!epicenter)
|
||||||
|
return
|
||||||
|
|
||||||
if(!isturf(epicenter))
|
if(!isturf(epicenter))
|
||||||
epicenter = get_turf(epicenter.loc)
|
epicenter = get_turf(epicenter.loc)
|
||||||
|
|||||||
@@ -549,7 +549,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
|||||||
..()
|
..()
|
||||||
if(current_size >= STAGE_FOUR)
|
if(current_size >= STAGE_FOUR)
|
||||||
throw_at(S,14,3, spin=0)
|
throw_at(S,14,3, spin=0)
|
||||||
else return
|
else
|
||||||
|
return
|
||||||
|
|
||||||
/obj/item/throw_impact(atom/A)
|
/obj/item/throw_impact(atom/A)
|
||||||
if(A && !QDELETED(A))
|
if(A && !QDELETED(A))
|
||||||
|
|||||||
@@ -16,7 +16,8 @@
|
|||||||
to_chat(user, "<span class='notice'>You pet [src]. You swear it looks up at you.</span>")
|
to_chat(user, "<span class='notice'>You pet [src]. You swear it looks up at you.</span>")
|
||||||
owner = user
|
owner = user
|
||||||
owned = 1
|
owned = 1
|
||||||
else return ..()
|
else
|
||||||
|
return ..()
|
||||||
|
|
||||||
/obj/item/toy/plush/carpplushie/dehy_carp/proc/Swell()
|
/obj/item/toy/plush/carpplushie/dehy_carp/proc/Swell()
|
||||||
desc = "It's growing!"
|
desc = "It's growing!"
|
||||||
|
|||||||
@@ -774,7 +774,8 @@ GLOBAL_LIST_EMPTY(PDAs)
|
|||||||
user.show_message("<span class='notice'>No radiation detected.</span>")
|
user.show_message("<span class='notice'>No radiation detected.</span>")
|
||||||
|
|
||||||
/obj/item/device/pda/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
|
/obj/item/device/pda/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
|
||||||
if(!proximity) return
|
if(!proximity)
|
||||||
|
return
|
||||||
switch(scanmode)
|
switch(scanmode)
|
||||||
|
|
||||||
if(3)
|
if(3)
|
||||||
@@ -824,7 +825,8 @@ GLOBAL_LIST_EMPTY(PDAs)
|
|||||||
|
|
||||||
|
|
||||||
/obj/item/device/pda/proc/explode() //This needs tuning.
|
/obj/item/device/pda/proc/explode() //This needs tuning.
|
||||||
if(!detonatable) return
|
if(!detonatable)
|
||||||
|
return
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
|
|
||||||
if (ismob(loc))
|
if (ismob(loc))
|
||||||
@@ -936,5 +938,6 @@ GLOBAL_LIST_EMPTY(PDAs)
|
|||||||
. = list()
|
. = list()
|
||||||
// Returns a list of PDAs which can be viewed from another PDA/message monitor.
|
// Returns a list of PDAs which can be viewed from another PDA/message monitor.
|
||||||
for(var/obj/item/device/pda/P in GLOB.PDAs)
|
for(var/obj/item/device/pda/P in GLOB.PDAs)
|
||||||
if(!P.owner || P.toff || P.hidden) continue
|
if(!P.owner || P.toff || P.hidden)
|
||||||
|
continue
|
||||||
. += P
|
. += P
|
||||||
|
|||||||
@@ -202,7 +202,8 @@
|
|||||||
|
|
||||||
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
|
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
|
||||||
|
|
||||||
if(!frequency) return
|
if(!frequency)
|
||||||
|
return
|
||||||
|
|
||||||
var/datum/signal/status_signal = new
|
var/datum/signal/status_signal = new
|
||||||
status_signal.source = src
|
status_signal.source = src
|
||||||
|
|||||||
@@ -124,7 +124,8 @@
|
|||||||
// 15 second intervals ~ 1/4 minute
|
// 15 second intervals ~ 1/4 minute
|
||||||
var/m = round(time_diff/4)
|
var/m = round(time_diff/4)
|
||||||
var/s = (time_diff - 4*m) * 15
|
var/s = (time_diff - 4*m) * 15
|
||||||
if(!s) s = "00"
|
if(!s)
|
||||||
|
s = "00"
|
||||||
html += "Last seen near [outstring] ([m]:[s] minute\s ago)<br>"
|
html += "Last seen near [outstring] ([m]:[s] minute\s ago)<br>"
|
||||||
if( C && (C.bug == src)) //Checks to see if the camera has a bug
|
if( C && (C.bug == src)) //Checks to see if the camera has a bug
|
||||||
html += "<a href='?src=\ref[src];emp=\ref[C]'>\[Disable\]</a>"
|
html += "<a href='?src=\ref[src];emp=\ref[C]'>\[Disable\]</a>"
|
||||||
|
|||||||
@@ -32,7 +32,8 @@
|
|||||||
toggle()
|
toggle()
|
||||||
|
|
||||||
/obj/item/device/chameleon/afterattack(atom/target, mob/user , proximity)
|
/obj/item/device/chameleon/afterattack(atom/target, mob/user , proximity)
|
||||||
if(!proximity) return
|
if(!proximity)
|
||||||
|
return
|
||||||
if(!check_sprite(target))
|
if(!check_sprite(target))
|
||||||
return
|
return
|
||||||
if(!active_dummy)
|
if(!active_dummy)
|
||||||
@@ -51,7 +52,8 @@
|
|||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/obj/item/device/chameleon/proc/toggle()
|
/obj/item/device/chameleon/proc/toggle()
|
||||||
if(!can_use || !saved_appearance) return
|
if(!can_use || !saved_appearance)
|
||||||
|
return
|
||||||
if(active_dummy)
|
if(active_dummy)
|
||||||
eject_all()
|
eject_all()
|
||||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
|
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
|
||||||
|
|||||||
@@ -192,7 +192,8 @@
|
|||||||
|
|
||||||
if(target.status != LIGHT_OK)
|
if(target.status != LIGHT_OK)
|
||||||
if(CanUse(U))
|
if(CanUse(U))
|
||||||
if(!Use(U)) return
|
if(!Use(U))
|
||||||
|
return
|
||||||
to_chat(U, "<span class='notice'>You replace the [target.fitting] with \the [src].</span>")
|
to_chat(U, "<span class='notice'>You replace the [target.fitting] with \the [src].</span>")
|
||||||
|
|
||||||
if(target.status != LIGHT_EMPTY)
|
if(target.status != LIGHT_EMPTY)
|
||||||
|
|||||||
@@ -128,16 +128,26 @@
|
|||||||
if(pai)
|
if(pai)
|
||||||
src.cut_overlays()
|
src.cut_overlays()
|
||||||
switch(emotion)
|
switch(emotion)
|
||||||
if(1) src.add_overlay("pai-happy")
|
if(1)
|
||||||
if(2) src.add_overlay("pai-cat")
|
src.add_overlay("pai-happy")
|
||||||
if(3) src.add_overlay("pai-extremely-happy")
|
if(2)
|
||||||
if(4) src.add_overlay("pai-face")
|
src.add_overlay("pai-cat")
|
||||||
if(5) src.add_overlay("pai-laugh")
|
if(3)
|
||||||
if(6) src.add_overlay("pai-off")
|
src.add_overlay("pai-extremely-happy")
|
||||||
if(7) src.add_overlay("pai-sad")
|
if(4)
|
||||||
if(8) src.add_overlay("pai-angry")
|
src.add_overlay("pai-face")
|
||||||
if(9) src.add_overlay("pai-what")
|
if(5)
|
||||||
if(10) src.add_overlay("pai-null")
|
src.add_overlay("pai-laugh")
|
||||||
|
if(6)
|
||||||
|
src.add_overlay("pai-off")
|
||||||
|
if(7)
|
||||||
|
src.add_overlay("pai-sad")
|
||||||
|
if(8)
|
||||||
|
src.add_overlay("pai-angry")
|
||||||
|
if(9)
|
||||||
|
src.add_overlay("pai-what")
|
||||||
|
if(10)
|
||||||
|
src.add_overlay("pai-null")
|
||||||
|
|
||||||
/obj/item/device/paicard/proc/alertUpdate()
|
/obj/item/device/paicard/proc/alertUpdate()
|
||||||
visible_message("<span class ='info'>[src] flashes a message across its screen, \"Additional personalities available for download.\"", "<span class='notice'>[src] bleeps electronically.</span>")
|
visible_message("<span class ='info'>[src] flashes a message across its screen, \"Additional personalities available for download.\"", "<span class='notice'>[src] bleeps electronically.</span>")
|
||||||
|
|||||||
@@ -194,9 +194,11 @@
|
|||||||
return ITALICS | REDUCE_RANGE
|
return ITALICS | REDUCE_RANGE
|
||||||
|
|
||||||
/obj/item/device/radio/proc/talk_into_impl(atom/movable/M, message, channel, list/spans, datum/language/language)
|
/obj/item/device/radio/proc/talk_into_impl(atom/movable/M, message, channel, list/spans, datum/language/language)
|
||||||
if(!on) return // the device has to be on
|
if(!on)
|
||||||
|
return // the device has to be on
|
||||||
// Fix for permacell radios, but kinda eh about actually fixing them.
|
// Fix for permacell radios, but kinda eh about actually fixing them.
|
||||||
if(!M || !message) return
|
if(!M || !message)
|
||||||
|
return
|
||||||
|
|
||||||
if(wires.is_cut(WIRE_TX))
|
if(wires.is_cut(WIRE_TX))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -155,19 +155,24 @@
|
|||||||
if(precision)
|
if(precision)
|
||||||
the_targets -= my_target
|
the_targets -= my_target
|
||||||
var/datum/reagents/R = new/datum/reagents(5)
|
var/datum/reagents/R = new/datum/reagents(5)
|
||||||
if(!W) return
|
if(!W)
|
||||||
|
return
|
||||||
W.reagents = R
|
W.reagents = R
|
||||||
R.my_atom = W
|
R.my_atom = W
|
||||||
if(!W || !src) return
|
if(!W || !src)
|
||||||
|
return
|
||||||
src.reagents.trans_to(W,1)
|
src.reagents.trans_to(W,1)
|
||||||
for(var/b=0, b<power, b++)
|
for(var/b=0, b<power, b++)
|
||||||
step_towards(W,my_target)
|
step_towards(W,my_target)
|
||||||
if(!W || !W.reagents) return
|
if(!W || !W.reagents)
|
||||||
|
return
|
||||||
W.reagents.reaction(get_turf(W))
|
W.reagents.reaction(get_turf(W))
|
||||||
for(var/A in get_turf(W))
|
for(var/A in get_turf(W))
|
||||||
if(!W) return
|
if(!W)
|
||||||
|
return
|
||||||
W.reagents.reaction(A)
|
W.reagents.reaction(A)
|
||||||
if(W.loc == my_target) break
|
if(W.loc == my_target)
|
||||||
|
break
|
||||||
sleep(2)
|
sleep(2)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -37,7 +37,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/item/mop/afterattack(atom/A, mob/user, proximity)
|
/obj/item/mop/afterattack(atom/A, mob/user, proximity)
|
||||||
if(!proximity) return
|
if(!proximity)
|
||||||
|
return
|
||||||
|
|
||||||
if(reagents.total_volume < 1)
|
if(reagents.total_volume < 1)
|
||||||
to_chat(user, "<span class='warning'>Your mop is dry!</span>")
|
to_chat(user, "<span class='warning'>Your mop is dry!</span>")
|
||||||
|
|||||||
@@ -79,7 +79,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/item/paint/afterattack(turf/target, mob/user, proximity)
|
/obj/item/paint/afterattack(turf/target, mob/user, proximity)
|
||||||
if(!proximity) return
|
if(!proximity)
|
||||||
|
return
|
||||||
if(paintleft <= 0)
|
if(paintleft <= 0)
|
||||||
icon_state = "paint_empty"
|
icon_state = "paint_empty"
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -58,7 +58,8 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/twohanded/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
|
/obj/item/twohanded/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
|
||||||
if(!proximity) return
|
if(!proximity)
|
||||||
|
return
|
||||||
if(wielded)
|
if(wielded)
|
||||||
if(charged == 5)
|
if(charged == 5)
|
||||||
charged = 0
|
charged = 0
|
||||||
|
|||||||
@@ -134,7 +134,8 @@
|
|||||||
if (usr.restrained() || usr.stat || usr.get_active_held_item() != src)
|
if (usr.restrained() || usr.stat || usr.get_active_held_item() != src)
|
||||||
return
|
return
|
||||||
if (href_list["make"])
|
if (href_list["make"])
|
||||||
if (get_amount() < 1) qdel(src) //Never should happen
|
if (get_amount() < 1)
|
||||||
|
qdel(src) //Never should happen
|
||||||
|
|
||||||
var/datum/stack_recipe/R = recipes[text2num(href_list["make"])]
|
var/datum/stack_recipe/R = recipes[text2num(href_list["make"])]
|
||||||
var/multiplier = text2num(href_list["multiplier"])
|
var/multiplier = text2num(href_list["multiplier"])
|
||||||
|
|||||||
@@ -172,7 +172,8 @@
|
|||||||
// Modified handle_item_insertion. Would prefer not to, but...
|
// Modified handle_item_insertion. Would prefer not to, but...
|
||||||
/obj/item/storage/bag/sheetsnatcher/handle_item_insertion(obj/item/W, prevent_warning = 0)
|
/obj/item/storage/bag/sheetsnatcher/handle_item_insertion(obj/item/W, prevent_warning = 0)
|
||||||
var/obj/item/stack/sheet/S = W
|
var/obj/item/stack/sheet/S = W
|
||||||
if(!istype(S)) return 0
|
if(!istype(S))
|
||||||
|
return 0
|
||||||
|
|
||||||
var/amount
|
var/amount
|
||||||
var/inserted = 0
|
var/inserted = 0
|
||||||
@@ -253,7 +254,8 @@
|
|||||||
// Instead of removing
|
// Instead of removing
|
||||||
/obj/item/storage/bag/sheetsnatcher/remove_from_storage(obj/item/W, atom/new_location)
|
/obj/item/storage/bag/sheetsnatcher/remove_from_storage(obj/item/W, atom/new_location)
|
||||||
var/obj/item/stack/sheet/S = W
|
var/obj/item/stack/sheet/S = W
|
||||||
if(!istype(S)) return 0
|
if(!istype(S))
|
||||||
|
return 0
|
||||||
|
|
||||||
//I would prefer to drop a new stack, but the item/attack_hand code
|
//I would prefer to drop a new stack, but the item/attack_hand code
|
||||||
// that calls this can't recieve a different object than you clicked on.
|
// that calls this can't recieve a different object than you clicked on.
|
||||||
|
|||||||
@@ -71,7 +71,8 @@
|
|||||||
if (istype(src.loc, /obj/item/assembly))
|
if (istype(src.loc, /obj/item/assembly))
|
||||||
icon = src.loc
|
icon = src.loc
|
||||||
if(!in_range(src, user))
|
if(!in_range(src, user))
|
||||||
if (icon == src) to_chat(user, "<span class='notice'>If you want any more information you'll need to get closer.</span>")
|
if (icon == src)
|
||||||
|
to_chat(user, "<span class='notice'>If you want any more information you'll need to get closer.</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
to_chat(user, "<span class='notice'>The pressure gauge reads [round(src.air_contents.return_pressure(),0.01)] kPa.</span>")
|
to_chat(user, "<span class='notice'>The pressure gauge reads [round(src.air_contents.return_pressure(),0.01)] kPa.</span>")
|
||||||
|
|||||||
@@ -475,7 +475,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity)
|
/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity)
|
||||||
if(!proximity) return
|
if(!proximity)
|
||||||
|
return
|
||||||
|
|
||||||
if(welding)
|
if(welding)
|
||||||
remove_fuel(1)
|
remove_fuel(1)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
icon = 'icons/obj/toy.dmi'
|
icon = 'icons/obj/toy.dmi'
|
||||||
icon_state = "waterballoon-e"
|
icon_state = "waterballoon-e"
|
||||||
item_state = "balloon-empty"
|
item_state = "balloon-empty"
|
||||||
|
|
||||||
|
|
||||||
/obj/item/toy/balloon/New()
|
/obj/item/toy/balloon/New()
|
||||||
create_reagents(10)
|
create_reagents(10)
|
||||||
@@ -49,7 +49,8 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/toy/balloon/afterattack(atom/A as mob|obj, mob/user, proximity)
|
/obj/item/toy/balloon/afterattack(atom/A as mob|obj, mob/user, proximity)
|
||||||
if(!proximity) return
|
if(!proximity)
|
||||||
|
return
|
||||||
if (istype(A, /obj/structure/reagent_dispensers))
|
if (istype(A, /obj/structure/reagent_dispensers))
|
||||||
var/obj/structure/reagent_dispensers/RD = A
|
var/obj/structure/reagent_dispensers/RD = A
|
||||||
if(RD.reagents.total_volume <= 0)
|
if(RD.reagents.total_volume <= 0)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/proc/radiation_pulse(turf/epicenter, heavy_range, light_range, severity, log=0)
|
/proc/radiation_pulse(turf/epicenter, heavy_range, light_range, severity, log=0)
|
||||||
if(!epicenter || !severity) return
|
if(!epicenter || !severity)
|
||||||
|
return
|
||||||
|
|
||||||
if(!isturf(epicenter))
|
if(!isturf(epicenter))
|
||||||
epicenter = get_turf(epicenter.loc)
|
epicenter = get_turf(epicenter.loc)
|
||||||
|
|||||||
@@ -113,7 +113,8 @@
|
|||||||
R.loaded = new/obj/structure/bed/roller(R)
|
R.loaded = new/obj/structure/bed/roller(R)
|
||||||
qdel(src) //"Load"
|
qdel(src) //"Load"
|
||||||
return
|
return
|
||||||
else return ..()
|
else
|
||||||
|
return ..()
|
||||||
|
|
||||||
/obj/item/roller/attack_self(mob/user)
|
/obj/item/roller/attack_self(mob/user)
|
||||||
deploy_roller(user, user.loc)
|
deploy_roller(user, user.loc)
|
||||||
|
|||||||
@@ -558,7 +558,8 @@
|
|||||||
user.visible_message("[user] wires the airlock assembly.", \
|
user.visible_message("[user] wires the airlock assembly.", \
|
||||||
"<span class='notice'>You start to wire the airlock assembly...</span>")
|
"<span class='notice'>You start to wire the airlock assembly...</span>")
|
||||||
if(do_after(user, 40, target = src))
|
if(do_after(user, 40, target = src))
|
||||||
if(C.get_amount() < 1 || state != 0) return
|
if(C.get_amount() < 1 || state != 0)
|
||||||
|
return
|
||||||
C.use(1)
|
C.use(1)
|
||||||
src.state = 1
|
src.state = 1
|
||||||
to_chat(user, "<span class='notice'>You wire the airlock assembly.</span>")
|
to_chat(user, "<span class='notice'>You wire the airlock assembly.</span>")
|
||||||
@@ -621,7 +622,8 @@
|
|||||||
user.visible_message("[user] adds [G.name] to the airlock assembly.", \
|
user.visible_message("[user] adds [G.name] to the airlock assembly.", \
|
||||||
"<span class='notice'>You start to install [G.name] into the airlock assembly...</span>")
|
"<span class='notice'>You start to install [G.name] into the airlock assembly...</span>")
|
||||||
if(do_after(user, 40, target = src))
|
if(do_after(user, 40, target = src))
|
||||||
if(G.get_amount() < 1 || mineral) return
|
if(G.get_amount() < 1 || mineral)
|
||||||
|
return
|
||||||
if(!istype(G, /obj/item/stack/sheet/glass))
|
if(!istype(G, /obj/item/stack/sheet/glass))
|
||||||
to_chat(user, "<span class='notice'>You install [G.name] windows into the airlock assembly.</span>")
|
to_chat(user, "<span class='notice'>You install [G.name] windows into the airlock assembly.</span>")
|
||||||
heat_proof_finished = 1 //plasma & reinforced glass makes the airlock heat-proof
|
heat_proof_finished = 1 //plasma & reinforced glass makes the airlock heat-proof
|
||||||
@@ -649,7 +651,8 @@
|
|||||||
user.visible_message("[user] adds [G.name] to the airlock assembly.", \
|
user.visible_message("[user] adds [G.name] to the airlock assembly.", \
|
||||||
"<span class='notice'>You start to install [G.name] into the airlock assembly...</span>")
|
"<span class='notice'>You start to install [G.name] into the airlock assembly...</span>")
|
||||||
if(do_after(user, 40, target = src))
|
if(do_after(user, 40, target = src))
|
||||||
if(G.get_amount() < 2 || mineral) return
|
if(G.get_amount() < 2 || mineral)
|
||||||
|
return
|
||||||
to_chat(user, "<span class='notice'>You install [M] plating into the airlock assembly.</span>")
|
to_chat(user, "<span class='notice'>You install [M] plating into the airlock assembly.</span>")
|
||||||
G.use(2)
|
G.use(2)
|
||||||
mineral = "[M]"
|
mineral = "[M]"
|
||||||
|
|||||||
@@ -24,7 +24,8 @@
|
|||||||
if(RCD_WINDOWGRILLE)
|
if(RCD_WINDOWGRILLE)
|
||||||
if(the_rcd.window_type == /obj/structure/window/reinforced/fulltile)
|
if(the_rcd.window_type == /obj/structure/window/reinforced/fulltile)
|
||||||
return list("mode" = RCD_WINDOWGRILLE, "delay" = 40, "cost" = 12)
|
return list("mode" = RCD_WINDOWGRILLE, "delay" = 40, "cost" = 12)
|
||||||
else return list("mode" = RCD_WINDOWGRILLE, "delay" = 20, "cost" = 8)
|
else
|
||||||
|
return list("mode" = RCD_WINDOWGRILLE, "delay" = 20, "cost" = 8)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/obj/structure/grille/rcd_act(mob/user, var/obj/item/construction/rcd/the_rcd, passed_mode)
|
/obj/structure/grille/rcd_act(mob/user, var/obj/item/construction/rcd/the_rcd, passed_mode)
|
||||||
|
|||||||
@@ -15,7 +15,8 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
for(var/obj/item/I in loc)
|
for(var/obj/item/I in loc)
|
||||||
if(notices > 4) break
|
if(notices > 4)
|
||||||
|
break
|
||||||
if(istype(I, /obj/item/paper))
|
if(istype(I, /obj/item/paper))
|
||||||
I.loc = src
|
I.loc = src
|
||||||
notices++
|
notices++
|
||||||
|
|||||||
@@ -53,7 +53,8 @@ FLOOR SAFES
|
|||||||
if(tumbler_2_pos == tumbler_2_open)
|
if(tumbler_2_pos == tumbler_2_open)
|
||||||
to_chat(user, "<span class='italics'>You hear a [pick("tink", "krink", "plink")] from [src].</span>")
|
to_chat(user, "<span class='italics'>You hear a [pick("tink", "krink", "plink")] from [src].</span>")
|
||||||
if(tumbler_1_pos == tumbler_1_open && tumbler_2_pos == tumbler_2_open)
|
if(tumbler_1_pos == tumbler_1_open && tumbler_2_pos == tumbler_2_open)
|
||||||
if(user) visible_message("<i><b>[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!</b></i>")
|
if(user)
|
||||||
|
visible_message("<i><b>[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!</b></i>")
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
@@ -303,13 +303,15 @@
|
|||||||
if(deconstruction_ready)
|
if(deconstruction_ready)
|
||||||
to_chat(user, "<span class='notice'>You start strengthening the reinforced table...</span>")
|
to_chat(user, "<span class='notice'>You start strengthening the reinforced table...</span>")
|
||||||
if (do_after(user, 50*W.toolspeed, target = src))
|
if (do_after(user, 50*W.toolspeed, target = src))
|
||||||
if(!src || !WT.isOn()) return
|
if(!src || !WT.isOn())
|
||||||
|
return
|
||||||
to_chat(user, "<span class='notice'>You strengthen the table.</span>")
|
to_chat(user, "<span class='notice'>You strengthen the table.</span>")
|
||||||
deconstruction_ready = 0
|
deconstruction_ready = 0
|
||||||
else
|
else
|
||||||
to_chat(user, "<span class='notice'>You start weakening the reinforced table...</span>")
|
to_chat(user, "<span class='notice'>You start weakening the reinforced table...</span>")
|
||||||
if (do_after(user, 50*W.toolspeed, target = src))
|
if (do_after(user, 50*W.toolspeed, target = src))
|
||||||
if(!src || !WT.isOn()) return
|
if(!src || !WT.isOn())
|
||||||
|
return
|
||||||
to_chat(user, "<span class='notice'>You weaken the table.</span>")
|
to_chat(user, "<span class='notice'>You weaken the table.</span>")
|
||||||
deconstruction_ready = 1
|
deconstruction_ready = 1
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -88,7 +88,8 @@
|
|||||||
/obj/structure/transit_tube_pod/Process_Spacemove()
|
/obj/structure/transit_tube_pod/Process_Spacemove()
|
||||||
if(moving) //No drifting while moving in the tubes
|
if(moving) //No drifting while moving in the tubes
|
||||||
return 1
|
return 1
|
||||||
else return ..()
|
else
|
||||||
|
return ..()
|
||||||
|
|
||||||
/obj/structure/transit_tube_pod/proc/follow_tube()
|
/obj/structure/transit_tube_pod/proc/follow_tube()
|
||||||
set waitfor = 0
|
set waitfor = 0
|
||||||
|
|||||||
@@ -97,7 +97,8 @@
|
|||||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||||
|
|
||||||
if(do_after(user, 40*W.toolspeed, target = src))
|
if(do_after(user, 40*W.toolspeed, target = src))
|
||||||
if(!src || !WT.isOn()) return
|
if(!src || !WT.isOn())
|
||||||
|
return
|
||||||
to_chat(user, "<span class='notice'>You disassemble the windoor assembly.</span>")
|
to_chat(user, "<span class='notice'>You disassemble the windoor assembly.</span>")
|
||||||
var/obj/item/stack/sheet/rglass/RG = new (get_turf(src), 5)
|
var/obj/item/stack/sheet/rglass/RG = new (get_turf(src), 5)
|
||||||
RG.add_fingerprint(user)
|
RG.add_fingerprint(user)
|
||||||
|
|||||||
@@ -62,7 +62,8 @@
|
|||||||
switch(pick(1,2;75,3))
|
switch(pick(1,2;75,3))
|
||||||
if(1)
|
if(1)
|
||||||
src.ReplaceWithLattice()
|
src.ReplaceWithLattice()
|
||||||
if(prob(33)) new /obj/item/stack/sheet/metal(src)
|
if(prob(33))
|
||||||
|
new /obj/item/stack/sheet/metal(src)
|
||||||
if(2)
|
if(2)
|
||||||
src.ChangeTurf(src.baseturf)
|
src.ChangeTurf(src.baseturf)
|
||||||
if(3)
|
if(3)
|
||||||
@@ -71,7 +72,8 @@
|
|||||||
else
|
else
|
||||||
src.break_tile()
|
src.break_tile()
|
||||||
src.hotspot_expose(1000,CELL_VOLUME)
|
src.hotspot_expose(1000,CELL_VOLUME)
|
||||||
if(prob(33)) new /obj/item/stack/sheet/metal(src)
|
if(prob(33))
|
||||||
|
new /obj/item/stack/sheet/metal(src)
|
||||||
if(3)
|
if(3)
|
||||||
if (prob(50))
|
if (prob(50))
|
||||||
src.break_tile()
|
src.break_tile()
|
||||||
@@ -209,7 +211,8 @@
|
|||||||
if(RCD_AIRLOCK)
|
if(RCD_AIRLOCK)
|
||||||
if(the_rcd.airlock_glass)
|
if(the_rcd.airlock_glass)
|
||||||
return list("mode" = RCD_AIRLOCK, "delay" = 50, "cost" = 20)
|
return list("mode" = RCD_AIRLOCK, "delay" = 50, "cost" = 20)
|
||||||
else return list("mode" = RCD_AIRLOCK, "delay" = 50, "cost" = 16)
|
else
|
||||||
|
return list("mode" = RCD_AIRLOCK, "delay" = 50, "cost" = 16)
|
||||||
if(RCD_DECONSTRUCT)
|
if(RCD_DECONSTRUCT)
|
||||||
return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 33)
|
return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 33)
|
||||||
if(RCD_WINDOWGRILLE)
|
if(RCD_WINDOWGRILLE)
|
||||||
|
|||||||
@@ -176,7 +176,8 @@
|
|||||||
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
|
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
|
||||||
if(L)
|
if(L)
|
||||||
return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 1)
|
return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 1)
|
||||||
else return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 3)
|
else
|
||||||
|
return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 3)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/turf/open/space/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
|
/turf/open/space/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
|
||||||
|
|||||||
@@ -112,7 +112,8 @@
|
|||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/turf/CanPass(atom/movable/mover, turf/target)
|
/turf/CanPass(atom/movable/mover, turf/target)
|
||||||
if(!target) return FALSE
|
if(!target)
|
||||||
|
return FALSE
|
||||||
|
|
||||||
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
|
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
|
||||||
return !density
|
return !density
|
||||||
@@ -353,7 +354,8 @@
|
|||||||
// possible. It results in more efficient (CPU-wise) pathing
|
// possible. It results in more efficient (CPU-wise) pathing
|
||||||
// for bots and anything else that only moves in cardinal dirs.
|
// for bots and anything else that only moves in cardinal dirs.
|
||||||
/turf/proc/Distance_cardinal(turf/T)
|
/turf/proc/Distance_cardinal(turf/T)
|
||||||
if(!src || !T) return FALSE
|
if(!src || !T)
|
||||||
|
return FALSE
|
||||||
return abs(x - T.x) + abs(y - T.y)
|
return abs(x - T.x) + abs(y - T.y)
|
||||||
|
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -51,9 +51,12 @@
|
|||||||
announceinirc = 1
|
announceinirc = 1
|
||||||
blockselfban = 1
|
blockselfban = 1
|
||||||
kickbannedckey = 1
|
kickbannedckey = 1
|
||||||
if( !bantype_pass ) return
|
if( !bantype_pass )
|
||||||
if( !istext(reason) ) return
|
return
|
||||||
if( !isnum(duration) ) return
|
if( !istext(reason) )
|
||||||
|
return
|
||||||
|
if( !isnum(duration) )
|
||||||
|
return
|
||||||
|
|
||||||
var/ckey
|
var/ckey
|
||||||
var/computerid
|
var/computerid
|
||||||
@@ -178,7 +181,8 @@
|
|||||||
if(BANTYPE_ANY_JOB)
|
if(BANTYPE_ANY_JOB)
|
||||||
bantype_str = "ANYJOB"
|
bantype_str = "ANYJOB"
|
||||||
bantype_pass = 1
|
bantype_pass = 1
|
||||||
if( !bantype_pass ) return
|
if( !bantype_pass )
|
||||||
|
return
|
||||||
|
|
||||||
var/bantype_sql
|
var/bantype_sql
|
||||||
if(bantype_str == "ANY")
|
if(bantype_str == "ANY")
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ GLOBAL_PROTECT(Banlist)
|
|||||||
GLOB.Banlist = new("data/banlist.bdb")
|
GLOB.Banlist = new("data/banlist.bdb")
|
||||||
log_admin("Loading Banlist")
|
log_admin("Loading Banlist")
|
||||||
|
|
||||||
if (!length(GLOB.Banlist.dir)) log_admin("Banlist is empty.")
|
if (!length(GLOB.Banlist.dir))
|
||||||
|
log_admin("Banlist is empty.")
|
||||||
|
|
||||||
if (!GLOB.Banlist.dir.Find("base"))
|
if (!GLOB.Banlist.dir.Find("base"))
|
||||||
log_admin("Banlist missing base dir.")
|
log_admin("Banlist missing base dir.")
|
||||||
@@ -88,8 +89,10 @@ GLOBAL_PROTECT(Banlist)
|
|||||||
message_admins("Invalid Ban.")
|
message_admins("Invalid Ban.")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if (!GLOB.Banlist["temp"]) continue
|
if (!GLOB.Banlist["temp"])
|
||||||
if (GLOB.CMinutes >= GLOB.Banlist["minutes"]) RemoveBan(A)
|
continue
|
||||||
|
if (GLOB.CMinutes >= GLOB.Banlist["minutes"])
|
||||||
|
RemoveBan(A)
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -132,7 +135,8 @@ GLOBAL_PROTECT(Banlist)
|
|||||||
GLOB.Banlist["id"] >> id
|
GLOB.Banlist["id"] >> id
|
||||||
GLOB.Banlist.cd = "/base"
|
GLOB.Banlist.cd = "/base"
|
||||||
|
|
||||||
if (!GLOB.Banlist.dir.Remove(foldername)) return 0
|
if (!GLOB.Banlist.dir.Remove(foldername))
|
||||||
|
return 0
|
||||||
|
|
||||||
if(!usr)
|
if(!usr)
|
||||||
log_admin_private("Ban Expired: [key]")
|
log_admin_private("Ban Expired: [key]")
|
||||||
|
|||||||
@@ -593,7 +593,8 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
|
|||||||
set name = "Give Disease"
|
set name = "Give Disease"
|
||||||
set desc = "Gives a Disease to a mob."
|
set desc = "Gives a Disease to a mob."
|
||||||
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in SSdisease.diseases
|
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in SSdisease.diseases
|
||||||
if(!D) return
|
if(!D)
|
||||||
|
return
|
||||||
T.ForceContractDisease(new D)
|
T.ForceContractDisease(new D)
|
||||||
SSblackbox.add_details("admin_verb","Give Disease") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
SSblackbox.add_details("admin_verb","Give Disease") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].")
|
log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].")
|
||||||
|
|||||||
@@ -93,7 +93,8 @@ if it doesn't return 1 and show_msg=1 it will prints a message explaining why th
|
|||||||
generally it would be used like so:
|
generally it would be used like so:
|
||||||
|
|
||||||
/proc/admin_proc()
|
/proc/admin_proc()
|
||||||
if(!check_rights(R_ADMIN)) return
|
if(!check_rights(R_ADMIN))
|
||||||
|
return
|
||||||
to_chat(world, "you have enough rights!")
|
to_chat(world, "you have enough rights!")
|
||||||
|
|
||||||
NOTE: it checks usr! not src! So if you're checking somebody's rank in a proc which they did not call
|
NOTE: it checks usr! not src! So if you're checking somebody's rank in a proc which they did not call
|
||||||
|
|||||||
@@ -333,9 +333,12 @@
|
|||||||
return
|
return
|
||||||
SSblackbox.add_details("admin_secrets_fun_used","Traitor All ([objective])")
|
SSblackbox.add_details("admin_secrets_fun_used","Traitor All ([objective])")
|
||||||
for(var/mob/living/H in GLOB.player_list)
|
for(var/mob/living/H in GLOB.player_list)
|
||||||
if(!(ishuman(H)||istype(H, /mob/living/silicon/))) continue
|
if(!(ishuman(H)||istype(H, /mob/living/silicon/)))
|
||||||
if(H.stat == DEAD || !H.client || !H.mind || ispAI(H)) continue
|
continue
|
||||||
if(is_special_character(H)) continue
|
if(H.stat == DEAD || !H.client || !H.mind || ispAI(H))
|
||||||
|
continue
|
||||||
|
if(is_special_character(H))
|
||||||
|
continue
|
||||||
H.mind.add_antag_datum(ANTAG_DATUM_TRAITOR_CUSTOM)
|
H.mind.add_antag_datum(ANTAG_DATUM_TRAITOR_CUSTOM)
|
||||||
var/datum/antagonist/traitor/traitordatum = H.mind.has_antag_datum(ANTAG_DATUM_TRAITOR) //original datum self deletes
|
var/datum/antagonist/traitor/traitordatum = H.mind.has_antag_datum(ANTAG_DATUM_TRAITOR) //original datum self deletes
|
||||||
var/datum/objective/new_objective = new
|
var/datum/objective/new_objective = new
|
||||||
@@ -545,7 +548,8 @@
|
|||||||
if(!check_rights(R_DEBUG))
|
if(!check_rights(R_DEBUG))
|
||||||
return
|
return
|
||||||
var/datum/job/J = SSjob.GetJob("Security Officer")
|
var/datum/job/J = SSjob.GetJob("Security Officer")
|
||||||
if(!J) return
|
if(!J)
|
||||||
|
return
|
||||||
J.total_positions = -1
|
J.total_positions = -1
|
||||||
J.spawn_positions = -1
|
J.spawn_positions = -1
|
||||||
message_admins("[key_name_admin(usr)] has removed the cap on security officers.")
|
message_admins("[key_name_admin(usr)] has removed the cap on security officers.")
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
var/text
|
var/text
|
||||||
for(var/A in typesof(/obj/item))
|
for(var/A in typesof(/obj/item))
|
||||||
var/obj/item/O = new A( locate(1,1,1) )
|
var/obj/item/O = new A( locate(1,1,1) )
|
||||||
if(!O) continue
|
if(!O)
|
||||||
|
continue
|
||||||
var/icon/IL = new(O.lefthand_file)
|
var/icon/IL = new(O.lefthand_file)
|
||||||
var/list/Lstates = IL.IconStates()
|
var/list/Lstates = IL.IconStates()
|
||||||
var/icon/IR = new(O.righthand_file)
|
var/icon/IR = new(O.righthand_file)
|
||||||
|
|||||||
@@ -181,7 +181,8 @@
|
|||||||
if(varholder in locked && !check_rights(R_DEBUG,0))
|
if(varholder in locked && !check_rights(R_DEBUG,0))
|
||||||
return 1
|
return 1
|
||||||
var/thetype = input(user,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
|
var/thetype = input(user,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
|
||||||
if(!thetype) return 1
|
if(!thetype)
|
||||||
|
return 1
|
||||||
switch(thetype)
|
switch(thetype)
|
||||||
if("text")
|
if("text")
|
||||||
valueholder = input(user,"Enter variable value:" ,"Value", "value") as text
|
valueholder = input(user,"Enter variable value:" ,"Value", "value") as text
|
||||||
@@ -200,7 +201,8 @@
|
|||||||
var/datum/mapGenerator/MP = path
|
var/datum/mapGenerator/MP = path
|
||||||
options[initial(MP.buildmode_name)] = path
|
options[initial(MP.buildmode_name)] = path
|
||||||
var/type = input(user,"Select Generator Type","Type") as null|anything in options
|
var/type = input(user,"Select Generator Type","Type") as null|anything in options
|
||||||
if(!type) return
|
if(!type)
|
||||||
|
return
|
||||||
|
|
||||||
generator_path = options[type]
|
generator_path = options[type]
|
||||||
cornerA = null
|
cornerA = null
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
|||||||
set name = "Advanced ProcCall"
|
set name = "Advanced ProcCall"
|
||||||
set waitfor = 0
|
set waitfor = 0
|
||||||
|
|
||||||
if(!check_rights(R_DEBUG)) return
|
if(!check_rights(R_DEBUG))
|
||||||
|
return
|
||||||
|
|
||||||
var/datum/target = null
|
var/datum/target = null
|
||||||
var/targetselected = 0
|
var/targetselected = 0
|
||||||
|
|||||||
@@ -36,7 +36,8 @@
|
|||||||
|
|
||||||
var/obj/item/organ = input("Select organ/implant:", "Organ Manipulation", null) in organs
|
var/obj/item/organ = input("Select organ/implant:", "Organ Manipulation", null) in organs
|
||||||
organ = organs[organ]
|
organ = organs[organ]
|
||||||
if(!organ) return
|
if(!organ)
|
||||||
|
return
|
||||||
var/obj/item/organ/O
|
var/obj/item/organ/O
|
||||||
var/obj/item/implant/I
|
var/obj/item/implant/I
|
||||||
|
|
||||||
|
|||||||
@@ -194,15 +194,20 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
|
|||||||
set category = "Mapping"
|
set category = "Mapping"
|
||||||
set name = "Count Objects On Level"
|
set name = "Count Objects On Level"
|
||||||
var/level = input("Which z-level?","Level?") as text
|
var/level = input("Which z-level?","Level?") as text
|
||||||
if(!level) return
|
if(!level)
|
||||||
|
return
|
||||||
var/num_level = text2num(level)
|
var/num_level = text2num(level)
|
||||||
if(!num_level) return
|
if(!num_level)
|
||||||
if(!isnum(num_level)) return
|
return
|
||||||
|
if(!isnum(num_level))
|
||||||
|
return
|
||||||
|
|
||||||
var/type_text = input("Which type path?","Path?") as text
|
var/type_text = input("Which type path?","Path?") as text
|
||||||
if(!type_text) return
|
if(!type_text)
|
||||||
|
return
|
||||||
var/type_path = text2path(type_text)
|
var/type_path = text2path(type_text)
|
||||||
if(!type_path) return
|
if(!type_path)
|
||||||
|
return
|
||||||
|
|
||||||
var/count = 0
|
var/count = 0
|
||||||
|
|
||||||
@@ -238,9 +243,11 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
|
|||||||
set name = "Count Objects All"
|
set name = "Count Objects All"
|
||||||
|
|
||||||
var/type_text = input("Which type path?","") as text
|
var/type_text = input("Which type path?","") as text
|
||||||
if(!type_text) return
|
if(!type_text)
|
||||||
|
return
|
||||||
var/type_path = text2path(type_text)
|
var/type_path = text2path(type_text)
|
||||||
if(!type_path) return
|
if(!type_path)
|
||||||
|
return
|
||||||
|
|
||||||
var/count = 0
|
var/count = 0
|
||||||
|
|
||||||
|
|||||||
@@ -549,15 +549,20 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
|||||||
return
|
return
|
||||||
|
|
||||||
var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
|
var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
|
||||||
if(devastation == null) return
|
if(devastation == null)
|
||||||
|
return
|
||||||
var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null
|
var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null
|
||||||
if(heavy == null) return
|
if(heavy == null)
|
||||||
|
return
|
||||||
var/light = input("Range of light impact. -1 to none", text("Input")) as num|null
|
var/light = input("Range of light impact. -1 to none", text("Input")) as num|null
|
||||||
if(light == null) return
|
if(light == null)
|
||||||
|
return
|
||||||
var/flash = input("Range of flash. -1 to none", text("Input")) as num|null
|
var/flash = input("Range of flash. -1 to none", text("Input")) as num|null
|
||||||
if(flash == null) return
|
if(flash == null)
|
||||||
|
return
|
||||||
var/flames = input("Range of flames. -1 to none", text("Input")) as num|null
|
var/flames = input("Range of flames. -1 to none", text("Input")) as num|null
|
||||||
if(flames == null) return
|
if(flames == null)
|
||||||
|
return
|
||||||
|
|
||||||
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
|
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
|
||||||
if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
|
if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
|
||||||
@@ -581,9 +586,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
|||||||
return
|
return
|
||||||
|
|
||||||
var/heavy = input("Range of heavy pulse.", text("Input")) as num|null
|
var/heavy = input("Range of heavy pulse.", text("Input")) as num|null
|
||||||
if(heavy == null) return
|
if(heavy == null)
|
||||||
|
return
|
||||||
var/light = input("Range of light pulse.", text("Input")) as num|null
|
var/light = input("Range of light pulse.", text("Input")) as num|null
|
||||||
if(light == null) return
|
if(light == null)
|
||||||
|
return
|
||||||
|
|
||||||
if (heavy || light)
|
if (heavy || light)
|
||||||
|
|
||||||
@@ -962,7 +969,8 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
|||||||
set name = "Toggle AntagHUD"
|
set name = "Toggle AntagHUD"
|
||||||
set desc = "Toggles the Admin AntagHUD"
|
set desc = "Toggles the Admin AntagHUD"
|
||||||
|
|
||||||
if(!holder) return
|
if(!holder)
|
||||||
|
return
|
||||||
|
|
||||||
var/adding_hud = !has_antag_hud()
|
var/adding_hud = !has_antag_hud()
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,8 @@ Code:
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/item/device/assembly/signaler/proc/signal()
|
/obj/item/device/assembly/signaler/proc/signal()
|
||||||
if(!radio_connection) return
|
if(!radio_connection)
|
||||||
|
return
|
||||||
|
|
||||||
var/datum/signal/signal = new
|
var/datum/signal/signal = new
|
||||||
signal.source = src
|
signal.source = src
|
||||||
@@ -173,7 +174,8 @@ Code:
|
|||||||
return "The radio receiver is [on?"on":"off"]."
|
return "The radio receiver is [on?"on":"off"]."
|
||||||
|
|
||||||
/obj/item/device/assembly/signaler/reciever/receive_signal(datum/signal/signal)
|
/obj/item/device/assembly/signaler/reciever/receive_signal(datum/signal/signal)
|
||||||
if(!on) return
|
if(!on)
|
||||||
|
return
|
||||||
return ..(signal)
|
return ..(signal)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -159,7 +159,8 @@ GLOBAL_VAR_INIT(sc_safecode5, "[rand(0,9)]")
|
|||||||
else if(istype(A, /obj/))
|
else if(istype(A, /obj/))
|
||||||
var/obj/O = A
|
var/obj/O = A
|
||||||
O.ex_act(EXPLODE_DEVASTATE)
|
O.ex_act(EXPLODE_DEVASTATE)
|
||||||
if(O) qdel(O)
|
if(O)
|
||||||
|
qdel(O)
|
||||||
else if(isturf(A))
|
else if(isturf(A))
|
||||||
var/turf/T = A
|
var/turf/T = A
|
||||||
if(T.intact)
|
if(T.intact)
|
||||||
|
|||||||
@@ -163,7 +163,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
|||||||
S["real_name"] >> name
|
S["real_name"] >> name
|
||||||
if(!name)
|
if(!name)
|
||||||
name = "Character[i]"
|
name = "Character[i]"
|
||||||
//if(i!=1) dat += " | "
|
/*if(i!=1)
|
||||||
|
dat += " | " */
|
||||||
dat += "<a style='white-space:nowrap;' href='?_src_=prefs;preference=changeslot;num=[i];' [i == default_slot ? "class='linkOn'" : ""]>[name]</a> "
|
dat += "<a style='white-space:nowrap;' href='?_src_=prefs;preference=changeslot;num=[i];' [i == default_slot ? "class='linkOn'" : ""]>[name]</a> "
|
||||||
dat += "</center>"
|
dat += "</center>"
|
||||||
|
|
||||||
|
|||||||
@@ -391,7 +391,8 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
|
|||||||
set name = "Show/Hide Radio Chatter"
|
set name = "Show/Hide Radio Chatter"
|
||||||
set category = "Preferences"
|
set category = "Preferences"
|
||||||
set desc = "Toggle seeing radiochatter from nearby radios and speakers"
|
set desc = "Toggle seeing radiochatter from nearby radios and speakers"
|
||||||
if(!holder) return
|
if(!holder)
|
||||||
|
return
|
||||||
prefs.chat_toggles ^= CHAT_RADIO
|
prefs.chat_toggles ^= CHAT_RADIO
|
||||||
prefs.save_preferences()
|
prefs.save_preferences()
|
||||||
to_chat(usr, "You will [(prefs.chat_toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from nearby radios or speakers")
|
to_chat(usr, "You will [(prefs.chat_toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from nearby radios or speakers")
|
||||||
|
|||||||
@@ -139,8 +139,10 @@
|
|||||||
log_game("<b>[key_name(M)]</b> was given the following commendation by <b>[key_name(user)]</b>: [input]")
|
log_game("<b>[key_name(M)]</b> was given the following commendation by <b>[key_name(user)]</b>: [input]")
|
||||||
message_admins("<b>[key_name(M)]</b> was given the following commendation by <b>[key_name(user)]</b>: [input]")
|
message_admins("<b>[key_name(M)]</b> was given the following commendation by <b>[key_name(user)]</b>: [input]")
|
||||||
|
|
||||||
else to_chat(user, "<span class='warning'>Medals can only be pinned on jumpsuits!</span>")
|
else
|
||||||
else ..()
|
to_chat(user, "<span class='warning'>Medals can only be pinned on jumpsuits!</span>")
|
||||||
|
else
|
||||||
|
..()
|
||||||
|
|
||||||
/obj/item/clothing/accessory/medal/conduct
|
/obj/item/clothing/accessory/medal/conduct
|
||||||
name = "distinguished conduct medal"
|
name = "distinguished conduct medal"
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
else if(M.bloody_hands > 1)
|
else if(M.bloody_hands > 1)
|
||||||
if(add_blood(M.blood_DNA))
|
if(add_blood(M.blood_DNA))
|
||||||
M.bloody_hands--
|
M.bloody_hands--
|
||||||
if(!suit_fibers) suit_fibers = list()
|
if(!suit_fibers)
|
||||||
|
suit_fibers = list()
|
||||||
var/fibertext
|
var/fibertext
|
||||||
var/item_multiplier = isitem(src)?1.2:1
|
var/item_multiplier = isitem(src)?1.2:1
|
||||||
if(M.wear_suit)
|
if(M.wear_suit)
|
||||||
|
|||||||
@@ -164,7 +164,8 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
|
|||||||
feedback_details += "Vent Coords: [center.x],[center.y],[center.z]"
|
feedback_details += "Vent Coords: [center.x],[center.y],[center.z]"
|
||||||
flood_images += image(image_icon,center,image_state,MOB_LAYER)
|
flood_images += image(image_icon,center,image_state,MOB_LAYER)
|
||||||
flood_turfs += center
|
flood_turfs += center
|
||||||
if(target.client) target.client.images |= flood_images
|
if(target.client)
|
||||||
|
target.client.images |= flood_images
|
||||||
next_expand = world.time + FAKE_FLOOD_EXPAND_TIME
|
next_expand = world.time + FAKE_FLOOD_EXPAND_TIME
|
||||||
START_PROCESSING(SSobj, src)
|
START_PROCESSING(SSobj, src)
|
||||||
|
|
||||||
@@ -960,13 +961,18 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
|
|||||||
var/l = ui_hand_position(target.get_held_index_of_item(l_hand))
|
var/l = ui_hand_position(target.get_held_index_of_item(l_hand))
|
||||||
var/r = ui_hand_position(target.get_held_index_of_item(r_hand))
|
var/r = ui_hand_position(target.get_held_index_of_item(r_hand))
|
||||||
var/list/slots_free = list(l,r)
|
var/list/slots_free = list(l,r)
|
||||||
if(l_hand) slots_free -= l
|
if(l_hand)
|
||||||
if(r_hand) slots_free -= r
|
slots_free -= l
|
||||||
|
if(r_hand)
|
||||||
|
slots_free -= r
|
||||||
if(ishuman(target))
|
if(ishuman(target))
|
||||||
var/mob/living/carbon/human/H = target
|
var/mob/living/carbon/human/H = target
|
||||||
if(!H.belt) slots_free += ui_belt
|
if(!H.belt)
|
||||||
if(!H.l_store) slots_free += ui_storage1
|
slots_free += ui_belt
|
||||||
if(!H.r_store) slots_free += ui_storage2
|
if(!H.l_store)
|
||||||
|
slots_free += ui_storage1
|
||||||
|
if(!H.r_store)
|
||||||
|
slots_free += ui_storage2
|
||||||
if(slots_free.len)
|
if(slots_free.len)
|
||||||
target.halitem.screen_loc = pick(slots_free)
|
target.halitem.screen_loc = pick(slots_free)
|
||||||
target.halitem.layer = ABOVE_HUD_LAYER
|
target.halitem.layer = ABOVE_HUD_LAYER
|
||||||
@@ -999,7 +1005,8 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
|
|||||||
target.halitem.icon_state = "flashbang1"
|
target.halitem.icon_state = "flashbang1"
|
||||||
target.halitem.name = "Flashbang"
|
target.halitem.name = "Flashbang"
|
||||||
feedback_details += "Type: [target.halitem.name]"
|
feedback_details += "Type: [target.halitem.name]"
|
||||||
if(target.client) target.client.screen += target.halitem
|
if(target.client)
|
||||||
|
target.client.screen += target.halitem
|
||||||
QDEL_IN(target.halitem, rand(150, 350))
|
QDEL_IN(target.halitem, rand(150, 350))
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
|
|||||||
@@ -41,8 +41,10 @@
|
|||||||
step(M, pick(d,turn(d,90),turn(d,-90)))
|
step(M, pick(d,turn(d,90),turn(d,-90)))
|
||||||
|
|
||||||
/proc/Ellipsis(original_msg, chance = 50, keep_words)
|
/proc/Ellipsis(original_msg, chance = 50, keep_words)
|
||||||
if(chance <= 0) return "..."
|
if(chance <= 0)
|
||||||
if(chance >= 100) return original_msg
|
return "..."
|
||||||
|
if(chance >= 100)
|
||||||
|
return original_msg
|
||||||
|
|
||||||
var/list
|
var/list
|
||||||
words = splittext(original_msg," ")
|
words = splittext(original_msg," ")
|
||||||
|
|||||||
@@ -15,8 +15,10 @@
|
|||||||
resistance_flags = 0
|
resistance_flags = 0
|
||||||
|
|
||||||
/obj/item/reagent_containers/food/drinks/on_reagent_change()
|
/obj/item/reagent_containers/food/drinks/on_reagent_change()
|
||||||
if (gulp_size < 5) gulp_size = 5
|
if (gulp_size < 5)
|
||||||
else gulp_size = max(round(reagents.total_volume / 5), 5)
|
gulp_size = 5
|
||||||
|
else
|
||||||
|
gulp_size = max(round(reagents.total_volume / 5), 5)
|
||||||
|
|
||||||
/obj/item/reagent_containers/food/drinks/attack(mob/M, mob/user, def_zone)
|
/obj/item/reagent_containers/food/drinks/attack(mob/M, mob/user, def_zone)
|
||||||
|
|
||||||
@@ -51,7 +53,8 @@
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/item/reagent_containers/food/drinks/afterattack(obj/target, mob/user , proximity)
|
/obj/item/reagent_containers/food/drinks/afterattack(obj/target, mob/user , proximity)
|
||||||
if(!proximity) return
|
if(!proximity)
|
||||||
|
return
|
||||||
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
||||||
|
|
||||||
if (!is_open_container())
|
if (!is_open_container())
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user