Does some code standardization/consistency

This commit is contained in:
Firecage
2017-10-05 11:13:47 +02:00
parent 511e357472
commit 2ae0380fef
154 changed files with 935 additions and 475 deletions

View File

@@ -308,7 +308,8 @@ world
*/
/proc/ReadRGB(rgb)
if(!rgb) return
if(!rgb)
return
// interpret the HSV or HSVA value
var/i=1,start=1
@@ -317,19 +318,27 @@ world
var/digits=0
for(i=start, i<=length(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
if(digits == 8) break
if(digits == 8)
break
var/single = digits < 6
if(digits != 3 && digits != 4 && digits != 6 && digits != 8) return
if(digits == 4 || digits == 8) usealpha = 1
if(digits != 3 && digits != 4 && digits != 6 && digits != 8)
return
if(digits == 4 || digits == 8)
usealpha = 1
for(i=start, digits>0, ++i)
ch = text2ascii(rgb, i)
if(ch >= 48 && ch <= 57) ch -= 48
else if(ch >= 65 && ch <= 70) ch -= 55
else if(ch >= 97 && ch <= 102) ch -= 87
else break
if(ch >= 48 && ch <= 57)
ch -= 48
else if(ch >= 65 && ch <= 70)
ch -= 55
else if(ch >= 97 && ch <= 102)
ch -= 87
else
break
--digits
switch(which)
if(0)
@@ -337,69 +346,91 @@ world
if(single)
r |= r << 4
++which
else if(!(digits & 1)) ++which
else if(!(digits & 1))
++which
if(1)
g = (g << 4) | ch
if(single)
g |= g << 4
++which
else if(!(digits & 1)) ++which
else if(!(digits & 1))
++which
if(2)
b = (b << 4) | ch
if(single)
b |= b << 4
++which
else if(!(digits & 1)) ++which
else if(!(digits & 1))
++which
if(3)
alpha = (alpha << 4) | ch
if(single) alpha |= alpha << 4
if(single)
alpha |= alpha << 4
. = list(r, g, b)
if(usealpha) . += alpha
if(usealpha)
. += alpha
/proc/ReadHSV(hsv)
if(!hsv) return
if(!hsv)
return
// interpret the HSV or HSVA value
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/digits=0
for(i=start, i<=length(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
if(digits == 9) break
if(digits > 7) usealpha = 1
if(digits <= 4) ++which
if(digits <= 2) ++which
if(digits == 9)
break
if(digits > 7)
usealpha = 1
if(digits <= 4)
++which
if(digits <= 2)
++which
for(i=start, digits>0, ++i)
ch = text2ascii(hsv, i)
if(ch >= 48 && ch <= 57) ch -= 48
else if(ch >= 65 && ch <= 70) ch -= 55
else if(ch >= 97 && ch <= 102) ch -= 87
else break
if(ch >= 48 && ch <= 57)
ch -= 48
else if(ch >= 65 && ch <= 70)
ch -= 55
else if(ch >= 97 && ch <= 102)
ch -= 87
else
break
--digits
switch(which)
if(0)
hue = (hue << 4) | ch
if(digits == (usealpha ? 6 : 4)) ++which
if(digits == (usealpha ? 6 : 4))
++which
if(1)
sat = (sat << 4) | ch
if(digits == (usealpha ? 4 : 2)) ++which
if(digits == (usealpha ? 4 : 2))
++which
if(2)
val = (val << 4) | ch
if(digits == (usealpha ? 2 : 0)) ++which
if(digits == (usealpha ? 2 : 0))
++which
if(3)
alpha = (alpha << 4) | ch
. = list(hue, sat, val)
if(usealpha) . += alpha
if(usealpha)
. += alpha
/proc/HSVtoRGB(hsv)
if(!hsv) return "#000000"
if(!hsv)
return "#000000"
var/list/HSV = ReadHSV(hsv)
if(!HSV) return "#000000"
if(!HSV)
return "#000000"
var/hue = HSV[1]
var/sat = HSV[2]
@@ -407,27 +438,30 @@ world
// Compress hue into easier-to-manage range
hue -= hue >> 8
if(hue >= 0x5fa) hue -= 0x5fa
if(hue >= 0x5fa)
hue -= 0x5fa
var/hi,mid,lo,r,g,b
hi = val
lo = round((255 - sat) * val / 255, 1)
mid = lo + round(abs(round(hue, 510) - hue) * (hi - lo) / 255, 1)
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 {r=lo; g=mid; b=hi }
else {r=lo; g=mid; b=hi }
else
if(hue >= 510) {r=lo; g=hi; b=mid}
else if(hue >= 255) {r=mid; g=hi; b=lo }
else {r=hi; g=mid; b=lo }
if(hue >= 510) {r=lo; g=hi; b=mid}
else if(hue >= 255) {r=mid; g=hi; b=lo }
else {r=hi; g=mid; b=lo }
return (HSV.len > 3) ? rgb(r,g,b,HSV[4]) : rgb(r,g,b)
/proc/RGBtoHSV(rgb)
if(!rgb) return "#0000000"
if(!rgb)
return "#0000000"
var/list/RGB = ReadRGB(rgb)
if(!RGB) return "#0000000"
if(!RGB)
return "#0000000"
var/r = RGB[1]
var/g = RGB[2]
@@ -456,15 +490,22 @@ world
return hsv(hue, sat, val, (RGB.len>3 ? RGB[4] : null))
/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)
++hue
if(hue >= 1536) hue = 0
if(sat < 0) sat = 0
if(sat > 255) sat = 255
if(val < 0) val = 0
if(val > 255) val = 255
if(hue >= 1536)
hue = 0
if(sat < 0)
sat = 0
if(sat > 255)
sat = 255
if(val < 0)
val = 0
if(val > 255)
val = 255
. = "#"
. += TO_HEX_DIGIT(hue >> 8)
. += TO_HEX_DIGIT(hue >> 4)
@@ -474,8 +515,10 @@ world
. += TO_HEX_DIGIT(val >> 4)
. += TO_HEX_DIGIT(val)
if(!isnull(alpha))
if(alpha < 0) alpha = 0
if(alpha > 255) alpha = 255
if(alpha < 0)
alpha = 0
if(alpha > 255)
alpha = 255
. += TO_HEX_DIGIT(alpha >> 4)
. += TO_HEX_DIGIT(alpha)
@@ -493,32 +536,44 @@ world
var/list/HSV2 = ReadHSV(hsv2)
// add missing alpha if needed
if(HSV1.len < HSV2.len) HSV1 += 255
else if(HSV2.len < HSV1.len) HSV2 += 255
if(HSV1.len < HSV2.len)
HSV1 += 255
else if(HSV2.len < HSV1.len)
HSV2 += 255
var/usealpha = HSV1.len > 3
// normalize hsv values in case anything is screwy
if(HSV1[1] > 1536) HSV1[1] %= 1536
if(HSV2[1] > 1536) HSV2[1] %= 1536
if(HSV1[1] < 0) HSV1[1] += 1536
if(HSV2[1] < 0) HSV2[1] += 1536
if(HSV1[1] > 1536)
HSV1[1] %= 1536
if(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(!HSV2[3]) {HSV2[1] = 0; HSV2[2] = 0}
// no value for one color means don't change saturation
if(!HSV1[3]) HSV1[2] = HSV2[2]
if(!HSV2[3]) HSV2[2] = HSV1[2]
if(!HSV1[3])
HSV1[2] = HSV2[2]
if(!HSV2[3])
HSV2[2] = HSV1[2]
// no saturation for one color means don't change hues
if(!HSV1[2]) HSV1[1] = HSV2[1]
if(!HSV2[2]) HSV2[1] = HSV1[1]
if(!HSV1[2])
HSV1[1] = HSV2[1]
if(!HSV2[2])
HSV2[1] = HSV1[1]
// Compress hues into easier-to-manage range
HSV1[1] -= HSV1[1] >> 8
HSV2[1] -= HSV2[1] >> 8
var/hue_diff = HSV2[1] - HSV1[1]
if(hue_diff > 765) hue_diff -= 1530
else if(hue_diff <= -765) hue_diff += 1530
if(hue_diff > 765)
hue_diff -= 1530
else if(hue_diff <= -765)
hue_diff += 1530
var/hue = round(HSV1[1] + hue_diff * 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
// 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
hue += round(hue / 255)
@@ -547,8 +604,10 @@ world
var/list/RGB2 = ReadRGB(rgb2)
// add missing alpha if needed
if(RGB1.len < RGB2.len) RGB1 += 255
else if(RGB2.len < RGB1.len) RGB2 += 255
if(RGB1.len < RGB2.len)
RGB1 += 255
else if(RGB2.len < RGB1.len)
RGB2 += 255
var/usealpha = RGB1.len > 3
var/r = round(RGB1[1] + (RGB2[1] - RGB1[1]) * amount, 1)
@@ -563,15 +622,18 @@ world
/proc/HueToAngle(hue)
// 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
hue -= hue >> 8
return hue / (1530/360)
/proc/AngleToHue(angle)
// 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)
// Decompress hue
hue += round(hue / 255)
@@ -583,18 +645,23 @@ world
var/list/HSV = ReadHSV(hsv)
// normalize hsv in case anything is screwy
if(HSV[1] >= 1536) HSV[1] %= 1536
if(HSV[1] < 0) HSV[1] += 1536
if(HSV[1] >= 1536)
HSV[1] %= 1536
if(HSV[1] < 0)
HSV[1] += 1536
// Compress hue into easier-to-manage range
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)
// 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
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/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))
else return BlendRGB(tone, "#ffffff", (gray-tone_gray)/((255-tone_gray) || 1))
if(gray <= tone_gray)
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
@@ -715,7 +784,8 @@ The _flatIcons list is a cache for generated icon files.
var/image/I = current
currentLayer = I.layer
if(currentLayer<0) // Special case for FLY_LAYER
if(currentLayer <= -1000) return flat
if(currentLayer <= -1000)
return flat
if(pSet == 0) // Underlay
currentLayer = A.layer+currentLayer/1000
else // Overlay

View File

@@ -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
/proc/Atan2(x, y)
if(!x && !y) return 0
if(!x && !y)
return 0
var/a = arccos(x / sqrt(x*x + y*y))
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()
var/d = b*b - 4 * a * c
var/bottom = 2 * a
if(d < 0) return
if(d < 0)
return
var/root = sqrt(d)
. += (-b + root) / bottom
if(!d) return
if(!d)
return
. += (-b - root) / bottom
// tangent

View File

@@ -137,7 +137,8 @@ Turf and target are separate in case you want to teleport some distance from a t
return
if(destination.y>world.maxy || destination.y<1)
return
else return
else
return
return destination

View File

@@ -76,7 +76,8 @@
// This is necessary for storage items not on your person.
/obj/item/Adjacent(var/atom/neighbor, var/recurse = 1)
if(neighbor == loc) return 1
if(neighbor == loc)
return 1
if(isitem(loc))
if(recurse > 0)
return loc.Adjacent(neighbor,recurse - 1)

View File

@@ -10,7 +10,8 @@
return
if(over == src)
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)
return

View File

@@ -577,8 +577,10 @@ so as to remain in compliance with the most up-to-date laws."
var/atom/target = null
/obj/screen/alert/hackingapc/Click()
if(!usr || !usr.client) return
if(!target) return
if(!usr || !usr.client)
return
if(!target)
return
var/mob/living/silicon/ai/AI = usr
var/turf/T = get_turf(target)
if(T)
@@ -601,7 +603,8 @@ so as to remain in compliance with the most up-to-date laws."
timeout = 300
/obj/screen/alert/notify_cloning/Click()
if(!usr || !usr.client) return
if(!usr || !usr.client)
return
var/mob/dead/observer/G = usr
G.reenter_corpse()
@@ -614,10 +617,13 @@ so as to remain in compliance with the most up-to-date laws."
var/action = NOTIFY_JUMP
/obj/screen/alert/notify_action/Click()
if(!usr || !usr.client) return
if(!target) return
if(!usr || !usr.client)
return
if(!target)
return
var/mob/dead/observer/G = usr
if(!istype(G)) return
if(!istype(G))
return
switch(action)
if(NOTIFY_ATTACK)
target.attack_ghost(G)

View File

@@ -180,7 +180,8 @@
/datum/hud/proc/toggle_show_robot_modules()
if(!iscyborg(mymob)) return
if(!iscyborg(mymob))
return
var/mob/living/silicon/robot/R = mymob
@@ -188,7 +189,8 @@
update_robot_modules_display()
/datum/hud/proc/update_robot_modules_display(mob/viewer)
if(!iscyborg(mymob)) return
if(!iscyborg(mymob))
return
var/mob/living/silicon/robot/R = mymob

View File

@@ -324,7 +324,8 @@
usr.stop_pulling()
/obj/screen/pull/update_icon(mob/mymob)
if(!mymob) return
if(!mymob)
return
if(mymob.pulling)
icon_state = "pull"
else

View File

@@ -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)
switch(type_handler)
if(TINYINT) return "TINYINT"
if(SMALLINT) return "SMALLINT"
if(MEDIUMINT) return "MEDIUMINT"
if(INTEGER) return "INTEGER"
if(BIGINT) return "BIGINT"
if(FLOAT) return "FLOAT"
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"
if(TINYINT)
return "TINYINT"
if(SMALLINT)
return "SMALLINT"
if(MEDIUMINT)
return "MEDIUMINT"
if(INTEGER)
return "INTEGER"
if(BIGINT)
return "BIGINT"
if(FLOAT)
return "FLOAT"
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"

View File

@@ -385,7 +385,8 @@ SUBSYSTEM_DEF(garbage)
find_references(TRUE)
/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))
var/datum/D = X
if(D.last_find_references == last_find_references)

View File

@@ -249,7 +249,8 @@
// Otherwise, the user mob's machine var will be reset directly.
//
/proc/onclose(mob/user, windowid, atom/ref=null)
if(!user.client) return
if(!user.client)
return
var/param = "null"
if(ref)
param = "\ref[ref]"

View File

@@ -15,10 +15,14 @@
..()
switch(stage)
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(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(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(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...") ) )

View File

@@ -95,8 +95,10 @@ STI KALY - blind
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
if(T.z != affected_mob.z) continue
if(T.name == "space") continue
if(T.z != affected_mob.z)
continue
if(T.name == "space")
continue
if(!T.density)
var/clear = 1
for(var/obj/O in T)

View File

@@ -358,9 +358,12 @@
for (var/obj/O in oview(1, A))
if (O.density == 1)
if (O == A) continue
if (O == D) continue
if (O.opacity) continue
if (O == A)
continue
if (O == D)
continue
if (O.opacity)
continue
else
surface = O
ST = get_turf(O)

View File

@@ -290,7 +290,8 @@
uplink_loc = R
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
else
var/obj/item/device/uplink/U = new(uplink_loc)
@@ -300,19 +301,22 @@
if(uplink_loc == R)
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]).")
else if(uplink_loc == PDA)
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]).")
else if(uplink_loc == P)
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]).")
//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.

View File

@@ -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
// related areas. This returns a master contents list to assist in that.
/proc/area_contents(area/A)
if(!istype(A)) return null
if(!istype(A))
return null
var/list/contents = list()
for(var/area/LSA in A.related)
contents += LSA.contents

View File

@@ -445,7 +445,8 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
return 1
/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_y = null
var/list/y_arr = null

View File

@@ -61,7 +61,8 @@
return ..()
/atom/movable/Move(atom/newloc, direct = 0)
if(!loc || !newloc) return 0
if(!loc || !newloc)
return 0
var/atom/oldloc = loc
if(loc != newloc)

View File

@@ -8,10 +8,12 @@
/* DATA HUD DATUMS */
/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()
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
@@ -21,10 +23,13 @@
/datum/atom_hud/data/human/medical/basic
/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
if(!istype(U)) return 0
if(U.sensor_mode <= SENSOR_VITALS) return 0
if(!istype(U))
return 0
if(U.sensor_mode <= SENSOR_VITALS)
return 0
return 1
/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)
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
/mob/living/proc/med_hud_set_health()
@@ -192,7 +198,8 @@
sec_hud_set_security_status()
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()
var/image/holder

View File

@@ -67,7 +67,8 @@ GLOBAL_LIST_INIT(slot2type, list("head" = /obj/item/clothing/head/changeling, "w
if(antag_candidates.len>0)
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)
antag_candidates -= changeling
changelings += changeling

View File

@@ -42,7 +42,8 @@
if(possible_changelings.len>0)
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)
antag_candidates -= changeling
possible_changelings -= changeling

View File

@@ -25,7 +25,8 @@
if(!(AT.z in GLOB.station_z_levels)) //Only check one, it's enough.
skip = 1
break
if(skip) continue
if(skip)
continue
A.power_light = FALSE
A.power_equip = FALSE
A.power_environ = FALSE
@@ -40,7 +41,8 @@
if(istype(A,area_type))
skip = 1
break
if(skip) continue
if(skip)
continue
C.cell.charge = 0

View File

@@ -242,10 +242,12 @@
/obj/item/organ/heart/gland/plasma/activate()
to_chat(owner, "<span class='warning'>You feel bloated.</span>")
sleep(150)
if(!owner) return
if(!owner)
return
to_chat(owner, "<span class='userdanger'>A massive stomachache overcomes you.</span>")
sleep(50)
if(!owner) return
if(!owner)
return
owner.visible_message("<span class='danger'>[owner] vomits a cloud of plasma!</span>")
var/turf/open/T = get_turf(owner)
if(istype(T))

View File

@@ -409,14 +409,17 @@ GLOBAL_LIST_EMPTY(possible_items)
/datum/objective/steal/proc/select_target() //For admins setting objectives manually.
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
if (!new_target) return
if (!new_target)
return
if (new_target == "custom") //Can set custom items.
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)
custom_name = stripped_input("Enter target name:", "Objective target", custom_name)
if (!custom_name) return
if (!custom_name)
return
steal_target = custom_target
explanation_text = "Steal [custom_name]."

View File

@@ -69,7 +69,8 @@
usr << browse(dat,"window=airlockmaker")
/datum/airlock_maker/Topic(var/href,var/list/href_list)
if(!usr) return
if(!usr)
return
if(!src || !linked || !linked.loc)
usr << browse(null,"window=airlockmaker")
return

View File

@@ -112,7 +112,8 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
// Admin: toggle spawning
//
if("hsbtobj")
if(!admin) return
if(!admin)
return
if(GLOB.hsboxspawn)
to_chat(world, "<span class='boldannounce'>Sandbox:</span> <b>\black[usr.key] has disabled object spawning!</b>")
GLOB.hsboxspawn = FALSE
@@ -125,7 +126,8 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
// Admin: Toggle auto-close
//
if("hsbtac")
if(!admin) return
if(!admin)
return
if(config.sandbox_autoclose)
to_chat(world, "<span class='boldnotice'>Sandbox:</span> <b>\black [usr.key] has removed the object spawn limiter.</b>")
config.sandbox_autoclose = FALSE
@@ -138,7 +140,8 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
//
if("hsbsuit")
var/mob/living/carbon/human/P = usr
if(!istype(P)) return
if(!istype(P))
return
if(P.wear_suit)
P.wear_suit.loc = P.loc
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)
//
if("hsbrcd")
if(!GLOB.hsboxspawn) return
if(!GLOB.hsboxspawn)
return
new/obj/item/construction/rcd/combat(usr.loc)
@@ -232,7 +236,8 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
// Clothing
if("hsbcloth")
if(!GLOB.hsboxspawn) return
if(!GLOB.hsboxspawn)
return
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>"
@@ -246,7 +251,8 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
// Reagent containers
if("hsbreag")
if(!GLOB.hsboxspawn) return
if(!GLOB.hsboxspawn)
return
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>"
@@ -260,7 +266,8 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
// Other items
if("hsbobj")
if(!GLOB.hsboxspawn) return
if(!GLOB.hsboxspawn)
return
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>"

View File

@@ -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.
/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 (isAI(hclient.client.mob) || IsAdminGhost(hclient.client.mob)) return TRUE
else return hclient.client.mob.machine == src && Adjacent(hclient.client.mob)
if (isAI(hclient.client.mob) || IsAdminGhost(hclient.client.mob))
return TRUE
else
return hclient.client.mob.machine == src && Adjacent(hclient.client.mob)
else
return FALSE
// 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)
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()
. = 1

View File

@@ -8,9 +8,11 @@
/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"])
if("open")
@@ -63,12 +65,14 @@
/obj/machinery/door/airlock/open(surpress_send)
. = ..()
if(!surpress_send) send_status()
if(!surpress_send)
send_status()
/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)

View File

@@ -57,7 +57,8 @@
return 1
/obj/machinery/camera/proc/triggerAlarm()
if (!detectTime) return 0
if (!detectTime)
return 0
for (var/mob/living/silicon/aiPlayer in GLOB.player_list)
if (status)
aiPlayer.triggerAlarm("Motion", get_area(src), list(src), src)

View File

@@ -53,7 +53,8 @@
var/area/A = get_area(src)
if(A)
for(var/obj/machinery/camera/autoname/C in GLOB.machines)
if(C == src) continue
if(C == src)
continue
var/area/CA = get_area(C)
if(CA.type == A.type)
if(C.number)

View File

@@ -60,12 +60,14 @@
radio_connection = SSradio.add_object(src, receive_frequency, GLOB.RADIO_ATMOSIA)
/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/severity = signal.data["alert"]
if(!zone || !severity) return
if(!zone || !severity)
return
minor_alarms -= zone
priority_alarms -= zone

View File

@@ -24,7 +24,8 @@
playsound(src.loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start deconstructing the frame...</span>")
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>")
var/obj/item/stack/sheet/metal/M = new (loc, 5)
M.add_fingerprint(user)

View File

@@ -103,9 +103,12 @@
if (I && istype(I))
if(ACCESS_CAPTAIN in I.access)
var/old_level = GLOB.security_level
if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN
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
if(!tmp_alertlevel)
tmp_alertlevel = SEC_LEVEL_GREEN
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)
if(GLOB.security_level != old_level)
to_chat(usr, "<span class='notice'>Authorization confirmed. Modifying security level.</span>")
@@ -230,7 +233,8 @@
if("securitylevel")
src.tmp_alertlevel = text2num( href_list["newalertlevel"] )
if(!tmp_alertlevel) tmp_alertlevel = 0
if(!tmp_alertlevel)
tmp_alertlevel = 0
state = STATE_CONFIRM_LEVEL
if("changeseclevel")
state = STATE_ALERT_LEVEL
@@ -356,11 +360,15 @@
make_announcement(usr, 1)
if("ai-securitylevel")
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
if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN
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
if(!tmp_alertlevel)
tmp_alertlevel = SEC_LEVEL_GREEN
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)
if(GLOB.security_level != old_level)
//Only notify the admins if an actual change happened
@@ -670,7 +678,8 @@
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
if(!frequency) return
if(!frequency)
return
var/datum/signal/status_signal = new
status_signal.source = src

View File

@@ -93,7 +93,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
/datum/crewmonitor/proc/show(mob/mob, z)
if (mob.client)
sendResources(mob.client)
if (!z) z = mob.z
if (!z)
z = mob.z
if (z > 0 && src.interfaces)
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
// 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
@@ -173,8 +175,10 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
assignment = ""
ijob = 80
if (U.sensor_mode >= SENSOR_LIVING) life_status = (!H.stat ? "true" : "false")
else life_status = null
if (U.sensor_mode >= SENSOR_LIVING)
life_status = (!H.stat ? "true" : "false")
else
life_status = null
if (U.sensor_mode >= SENSOR_VITALS)
dam1 = round(H.getOxyLoss(),1)
@@ -188,7 +192,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
dam4 = null
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)
area = format_text(player_area.name)
@@ -208,13 +213,15 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
var/z = ""
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))
return TRUE
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))
return (locate(/obj/machinery/computer/crew, range(world.view, hclient.client.mob))) || (locate(/obj/item/device/sensor_device, hclient.client.mob.contents))
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)
if (!C) C = locate(/obj/machinery/camera) in urange(10, tile)
if (!C) C = locate(/obj/machinery/camera) in urange(15, tile)
if (!C)
C = locate(/obj/machinery/camera) in urange(10, tile)
if (!C)
C = locate(/obj/machinery/camera) in urange(15, tile)
if (C)
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)
else
return ..()

View File

@@ -67,7 +67,8 @@
ShowInterface(user)
/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
if(!(in_range(src, user) || issilicon(user)))
popup.close()

View File

@@ -82,7 +82,8 @@
if(hacking || emagged)
screen = 2
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
switch(screen)
@@ -267,7 +268,8 @@
//Turn the server on/off.
if (href_list["active"])
if(auth) linkedServer.active = !linkedServer.active
if(auth)
linkedServer.active = !linkedServer.active
//Find a server
if (href_list["find"])
if(GLOB.message_servers && GLOB.message_servers.len > 1)

View File

@@ -96,7 +96,8 @@
return
I.loc = src
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)
switch(href_list["id"])
if("eject")

View File

@@ -19,7 +19,8 @@
/datum/computer/file/embedded_program/airlock_controller/receive_signal(datum/signal/signal, receive_method, receive_param)
var/receive_tag = signal.data["tag"]
if(!receive_tag) return
if(!receive_tag)
return
if(receive_tag==sensor_tag)
if(signal.data["pressure"])

View File

@@ -44,7 +44,8 @@
return 0
/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)
program.receive_signal(signal, receive_method, receive_param)

View File

@@ -166,7 +166,8 @@
/obj/machinery/magnetic_module/proc/magnetic_process() // proc that actually does the pulling
if(pulling) return
if(pulling)
return
while(on)
pulling = 1
@@ -333,7 +334,8 @@
updateUsrDialog()
/obj/machinery/magnetic_controller/proc/MagnetMove()
if(looping) return
if(looping)
return
while(moving && rpath.len >= 1)

View File

@@ -343,7 +343,8 @@ GLOBAL_LIST_EMPTY(allConsoles)
if (sending)
var/pass = 0
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)
pass = 1

View File

@@ -20,7 +20,8 @@
/obj/machinery/power/singularity_beacon/proc/Activate(mob/user = null)
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
for(var/obj/singularity/singulo in GLOB.singularities)
if(singulo.z == z)

View File

@@ -60,7 +60,8 @@
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>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.
dat += Options_Menu()

View File

@@ -46,7 +46,8 @@
log_message("Critical failure",1)
/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>&nbsp;"
if(chassis.selected == src)
txt += "<b>[src.name]</b>"

View File

@@ -14,7 +14,8 @@
range = RANGED
/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)
if(T)
do_teleport(chassis, T, 4)
@@ -112,7 +113,8 @@
else
atoms = orange(3, target)
for(var/atom/movable/A in atoms)
if(A.anchored) continue
if(A.anchored)
continue
spawn(0)
var/iter = 5-get_dist(A,target)
for(var/i=0 to iter)
@@ -208,7 +210,8 @@
..()
/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>&nbsp; [src.name] - <a href='?src=\ref[src];toggle_repairs=1'>[equip_ready?"A":"Dea"]ctivate</a>"
@@ -315,7 +318,8 @@
log_message("Deactivated.")
/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>&nbsp; [src.name] - <a href='?src=\ref[src];toggle_relay=1'>[equip_ready?"A":"Dea"]ctivate</a>"

View File

@@ -52,7 +52,8 @@
else if(isliving(target))
var/mob/living/M = target
if(M.stat == DEAD) return
if(M.stat == DEAD)
return
if(chassis.occupant.a_intent == INTENT_HARM)
M.take_overall_damage(dam_force)
if(!M)
@@ -103,7 +104,8 @@
else if(isliving(target))
var/mob/living/M = target
if(M.stat == DEAD) return
if(M.stat == DEAD)
return
if(chassis.occupant.a_intent == INTENT_HARM)
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>")

View File

@@ -580,7 +580,8 @@
///////////////////////////////////
/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(ignore_threshold || obj_integrity*100/max_integrity < internal_damage_threshold)
for(var/T in possible_int_damage)

View File

@@ -159,7 +159,8 @@
/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>
<head><style>
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>"
. += "<hr><h1>Following keycodes were detected on portable device:</h1>"
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)
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>"
. += "<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>"
@@ -185,7 +188,8 @@
/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>
<head>
<style>

View File

@@ -221,8 +221,10 @@
var/y_distance = TO.y - FROM.y
var/x_distance = TO.x - FROM.x
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(A.anchored) continue
if(istype(A, /obj/item/device/radio/beacon))
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
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

View File

@@ -1,5 +1,6 @@
/proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
if(!epicenter) return
if(!epicenter)
return
if(!isturf(epicenter))
epicenter = get_turf(epicenter.loc)

View File

@@ -549,7 +549,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
..()
if(current_size >= STAGE_FOUR)
throw_at(S,14,3, spin=0)
else return
else
return
/obj/item/throw_impact(atom/A)
if(A && !QDELETED(A))

View File

@@ -16,7 +16,8 @@
to_chat(user, "<span class='notice'>You pet [src]. You swear it looks up at you.</span>")
owner = user
owned = 1
else return ..()
else
return ..()
/obj/item/toy/plush/carpplushie/dehy_carp/proc/Swell()
desc = "It's growing!"

View File

@@ -774,7 +774,8 @@ GLOBAL_LIST_EMPTY(PDAs)
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)
if(!proximity) return
if(!proximity)
return
switch(scanmode)
if(3)
@@ -824,7 +825,8 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/device/pda/proc/explode() //This needs tuning.
if(!detonatable) return
if(!detonatable)
return
var/turf/T = get_turf(src)
if (ismob(loc))
@@ -936,5 +938,6 @@ GLOBAL_LIST_EMPTY(PDAs)
. = list()
// Returns a list of PDAs which can be viewed from another PDA/message monitor.
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

View File

@@ -202,7 +202,8 @@
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
if(!frequency) return
if(!frequency)
return
var/datum/signal/status_signal = new
status_signal.source = src

View File

@@ -124,7 +124,8 @@
// 15 second intervals ~ 1/4 minute
var/m = round(time_diff/4)
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>"
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>"

View File

@@ -32,7 +32,8 @@
toggle()
/obj/item/device/chameleon/afterattack(atom/target, mob/user , proximity)
if(!proximity) return
if(!proximity)
return
if(!check_sprite(target))
return
if(!active_dummy)
@@ -51,7 +52,8 @@
return FALSE
/obj/item/device/chameleon/proc/toggle()
if(!can_use || !saved_appearance) return
if(!can_use || !saved_appearance)
return
if(active_dummy)
eject_all()
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)

View File

@@ -192,7 +192,8 @@
if(target.status != LIGHT_OK)
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>")
if(target.status != LIGHT_EMPTY)

View File

@@ -128,16 +128,26 @@
if(pai)
src.cut_overlays()
switch(emotion)
if(1) src.add_overlay("pai-happy")
if(2) src.add_overlay("pai-cat")
if(3) src.add_overlay("pai-extremely-happy")
if(4) src.add_overlay("pai-face")
if(5) 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")
if(1)
src.add_overlay("pai-happy")
if(2)
src.add_overlay("pai-cat")
if(3)
src.add_overlay("pai-extremely-happy")
if(4)
src.add_overlay("pai-face")
if(5)
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()
visible_message("<span class ='info'>[src] flashes a message across its screen, \"Additional personalities available for download.\"", "<span class='notice'>[src] bleeps electronically.</span>")

View File

@@ -194,9 +194,11 @@
return ITALICS | REDUCE_RANGE
/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.
if(!M || !message) return
if(!M || !message)
return
if(wires.is_cut(WIRE_TX))
return

View File

@@ -155,19 +155,24 @@
if(precision)
the_targets -= my_target
var/datum/reagents/R = new/datum/reagents(5)
if(!W) return
if(!W)
return
W.reagents = R
R.my_atom = W
if(!W || !src) return
if(!W || !src)
return
src.reagents.trans_to(W,1)
for(var/b=0, b<power, b++)
step_towards(W,my_target)
if(!W || !W.reagents) return
if(!W || !W.reagents)
return
W.reagents.reaction(get_turf(W))
for(var/A in get_turf(W))
if(!W) return
if(!W)
return
W.reagents.reaction(A)
if(W.loc == my_target) break
if(W.loc == my_target)
break
sleep(2)
else

View File

@@ -37,7 +37,8 @@
/obj/item/mop/afterattack(atom/A, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
if(reagents.total_volume < 1)
to_chat(user, "<span class='warning'>Your mop is dry!</span>")

View File

@@ -79,7 +79,8 @@
/obj/item/paint/afterattack(turf/target, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
if(paintleft <= 0)
icon_state = "paint_empty"
return

View File

@@ -58,7 +58,8 @@
return
/obj/item/twohanded/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
if(wielded)
if(charged == 5)
charged = 0

View File

@@ -134,7 +134,8 @@
if (usr.restrained() || usr.stat || usr.get_active_held_item() != src)
return
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/multiplier = text2num(href_list["multiplier"])

View File

@@ -172,7 +172,8 @@
// Modified handle_item_insertion. Would prefer not to, but...
/obj/item/storage/bag/sheetsnatcher/handle_item_insertion(obj/item/W, prevent_warning = 0)
var/obj/item/stack/sheet/S = W
if(!istype(S)) return 0
if(!istype(S))
return 0
var/amount
var/inserted = 0
@@ -253,7 +254,8 @@
// Instead of removing
/obj/item/storage/bag/sheetsnatcher/remove_from_storage(obj/item/W, atom/new_location)
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
// that calls this can't recieve a different object than you clicked on.

View File

@@ -71,7 +71,8 @@
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
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
to_chat(user, "<span class='notice'>The pressure gauge reads [round(src.air_contents.return_pressure(),0.01)] kPa.</span>")

View File

@@ -475,7 +475,8 @@
/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
if(welding)
remove_fuel(1)

View File

@@ -49,7 +49,8 @@
return
/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))
var/obj/structure/reagent_dispensers/RD = A
if(RD.reagents.total_volume <= 0)

View File

@@ -1,5 +1,6 @@
/proc/radiation_pulse(turf/epicenter, heavy_range, light_range, severity, log=0)
if(!epicenter || !severity) return
if(!epicenter || !severity)
return
if(!isturf(epicenter))
epicenter = get_turf(epicenter.loc)

View File

@@ -113,7 +113,8 @@
R.loaded = new/obj/structure/bed/roller(R)
qdel(src) //"Load"
return
else return ..()
else
return ..()
/obj/item/roller/attack_self(mob/user)
deploy_roller(user, user.loc)

View File

@@ -558,7 +558,8 @@
user.visible_message("[user] wires the airlock assembly.", \
"<span class='notice'>You start to wire the airlock assembly...</span>")
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)
src.state = 1
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.", \
"<span class='notice'>You start to install [G.name] into the airlock assembly...</span>")
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))
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
@@ -649,7 +651,8 @@
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>")
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>")
G.use(2)
mineral = "[M]"

View File

@@ -24,7 +24,8 @@
if(RCD_WINDOWGRILLE)
if(the_rcd.window_type == /obj/structure/window/reinforced/fulltile)
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
/obj/structure/grille/rcd_act(mob/user, var/obj/item/construction/rcd/the_rcd, passed_mode)

View File

@@ -15,7 +15,8 @@
return
for(var/obj/item/I in loc)
if(notices > 4) break
if(notices > 4)
break
if(istype(I, /obj/item/paper))
I.loc = src
notices++

View File

@@ -53,7 +53,8 @@ FLOOR SAFES
if(tumbler_2_pos == tumbler_2_open)
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(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 0

View File

@@ -303,13 +303,15 @@
if(deconstruction_ready)
to_chat(user, "<span class='notice'>You start strengthening the reinforced table...</span>")
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>")
deconstruction_ready = 0
else
to_chat(user, "<span class='notice'>You start weakening the reinforced table...</span>")
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>")
deconstruction_ready = 1
else

View File

@@ -88,7 +88,8 @@
/obj/structure/transit_tube_pod/Process_Spacemove()
if(moving) //No drifting while moving in the tubes
return 1
else return ..()
else
return ..()
/obj/structure/transit_tube_pod/proc/follow_tube()
set waitfor = 0

View File

@@ -97,7 +97,8 @@
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
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>")
var/obj/item/stack/sheet/rglass/RG = new (get_turf(src), 5)
RG.add_fingerprint(user)

View File

@@ -62,7 +62,8 @@
switch(pick(1,2;75,3))
if(1)
src.ReplaceWithLattice()
if(prob(33)) new /obj/item/stack/sheet/metal(src)
if(prob(33))
new /obj/item/stack/sheet/metal(src)
if(2)
src.ChangeTurf(src.baseturf)
if(3)
@@ -71,7 +72,8 @@
else
src.break_tile()
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 (prob(50))
src.break_tile()
@@ -209,7 +211,8 @@
if(RCD_AIRLOCK)
if(the_rcd.airlock_glass)
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)
return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 33)
if(RCD_WINDOWGRILLE)

View File

@@ -176,7 +176,8 @@
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
if(L)
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
/turf/open/space/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)

View File

@@ -112,7 +112,8 @@
return FALSE
/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
return !density
@@ -353,7 +354,8 @@
// possible. It results in more efficient (CPU-wise) pathing
// for bots and anything else that only moves in cardinal dirs.
/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)
////////////////////////////////////////////////////

View File

@@ -51,9 +51,12 @@
announceinirc = 1
blockselfban = 1
kickbannedckey = 1
if( !bantype_pass ) return
if( !istext(reason) ) return
if( !isnum(duration) ) return
if( !bantype_pass )
return
if( !istext(reason) )
return
if( !isnum(duration) )
return
var/ckey
var/computerid
@@ -178,7 +181,8 @@
if(BANTYPE_ANY_JOB)
bantype_str = "ANYJOB"
bantype_pass = 1
if( !bantype_pass ) return
if( !bantype_pass )
return
var/bantype_sql
if(bantype_str == "ANY")

View File

@@ -64,7 +64,8 @@ GLOBAL_PROTECT(Banlist)
GLOB.Banlist = new("data/banlist.bdb")
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"))
log_admin("Banlist missing base dir.")
@@ -88,8 +89,10 @@ GLOBAL_PROTECT(Banlist)
message_admins("Invalid Ban.")
continue
if (!GLOB.Banlist["temp"]) continue
if (GLOB.CMinutes >= GLOB.Banlist["minutes"]) RemoveBan(A)
if (!GLOB.Banlist["temp"])
continue
if (GLOB.CMinutes >= GLOB.Banlist["minutes"])
RemoveBan(A)
return 1
@@ -132,7 +135,8 @@ GLOBAL_PROTECT(Banlist)
GLOB.Banlist["id"] >> id
GLOB.Banlist.cd = "/base"
if (!GLOB.Banlist.dir.Remove(foldername)) return 0
if (!GLOB.Banlist.dir.Remove(foldername))
return 0
if(!usr)
log_admin_private("Ban Expired: [key]")

View File

@@ -593,7 +593,8 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
set name = "Give Disease"
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
if(!D) return
if(!D)
return
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!
log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].")

View File

@@ -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:
/proc/admin_proc()
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
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

View File

@@ -333,9 +333,12 @@
return
SSblackbox.add_details("admin_secrets_fun_used","Traitor All ([objective])")
for(var/mob/living/H in GLOB.player_list)
if(!(ishuman(H)||istype(H, /mob/living/silicon/))) continue
if(H.stat == DEAD || !H.client || !H.mind || ispAI(H)) continue
if(is_special_character(H)) continue
if(!(ishuman(H)||istype(H, /mob/living/silicon/)))
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)
var/datum/antagonist/traitor/traitordatum = H.mind.has_antag_datum(ANTAG_DATUM_TRAITOR) //original datum self deletes
var/datum/objective/new_objective = new
@@ -545,7 +548,8 @@
if(!check_rights(R_DEBUG))
return
var/datum/job/J = SSjob.GetJob("Security Officer")
if(!J) return
if(!J)
return
J.total_positions = -1
J.spawn_positions = -1
message_admins("[key_name_admin(usr)] has removed the cap on security officers.")

View File

@@ -2,7 +2,8 @@
var/text
for(var/A in typesof(/obj/item))
var/obj/item/O = new A( locate(1,1,1) )
if(!O) continue
if(!O)
continue
var/icon/IL = new(O.lefthand_file)
var/list/Lstates = IL.IconStates()
var/icon/IR = new(O.righthand_file)

View File

@@ -181,7 +181,8 @@
if(varholder in locked && !check_rights(R_DEBUG,0))
return 1
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)
if("text")
valueholder = input(user,"Enter variable value:" ,"Value", "value") as text
@@ -200,7 +201,8 @@
var/datum/mapGenerator/MP = path
options[initial(MP.buildmode_name)] = path
var/type = input(user,"Select Generator Type","Type") as null|anything in options
if(!type) return
if(!type)
return
generator_path = options[type]
cornerA = null

View File

@@ -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 waitfor = 0
if(!check_rights(R_DEBUG)) return
if(!check_rights(R_DEBUG))
return
var/datum/target = null
var/targetselected = 0

View File

@@ -36,7 +36,8 @@
var/obj/item/organ = input("Select organ/implant:", "Organ Manipulation", null) in organs
organ = organs[organ]
if(!organ) return
if(!organ)
return
var/obj/item/organ/O
var/obj/item/implant/I

View File

@@ -194,15 +194,20 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
set category = "Mapping"
set name = "Count Objects On Level"
var/level = input("Which z-level?","Level?") as text
if(!level) return
if(!level)
return
var/num_level = text2num(level)
if(!num_level) return
if(!isnum(num_level)) return
if(!num_level)
return
if(!isnum(num_level))
return
var/type_text = input("Which type path?","Path?") as text
if(!type_text) return
if(!type_text)
return
var/type_path = text2path(type_text)
if(!type_path) return
if(!type_path)
return
var/count = 0
@@ -238,9 +243,11 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
set name = "Count Objects All"
var/type_text = input("Which type path?","") as text
if(!type_text) return
if(!type_text)
return
var/type_path = text2path(type_text)
if(!type_path) return
if(!type_path)
return
var/count = 0

View File

@@ -549,15 +549,20 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
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
if(heavy == null) return
if(heavy == null)
return
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
if(flash == null) return
if(flash == null)
return
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 > 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
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
if(light == null) return
if(light == null)
return
if (heavy || light)
@@ -962,7 +969,8 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
set name = "Toggle AntagHUD"
set desc = "Toggles the Admin AntagHUD"
if(!holder) return
if(!holder)
return
var/adding_hud = !has_antag_hud()

View File

@@ -107,7 +107,8 @@ Code:
..()
/obj/item/device/assembly/signaler/proc/signal()
if(!radio_connection) return
if(!radio_connection)
return
var/datum/signal/signal = new
signal.source = src
@@ -173,7 +174,8 @@ Code:
return "The radio receiver is [on?"on":"off"]."
/obj/item/device/assembly/signaler/reciever/receive_signal(datum/signal/signal)
if(!on) return
if(!on)
return
return ..(signal)

View File

@@ -159,7 +159,8 @@ GLOBAL_VAR_INIT(sc_safecode5, "[rand(0,9)]")
else if(istype(A, /obj/))
var/obj/O = A
O.ex_act(EXPLODE_DEVASTATE)
if(O) qdel(O)
if(O)
qdel(O)
else if(isturf(A))
var/turf/T = A
if(T.intact)

View File

@@ -163,7 +163,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
S["real_name"] >> name
if(!name)
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 += "</center>"

View File

@@ -391,7 +391,8 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
set name = "Show/Hide Radio Chatter"
set category = "Preferences"
set desc = "Toggle seeing radiochatter from nearby radios and speakers"
if(!holder) return
if(!holder)
return
prefs.chat_toggles ^= CHAT_RADIO
prefs.save_preferences()
to_chat(usr, "You will [(prefs.chat_toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from nearby radios or speakers")

View File

@@ -139,8 +139,10 @@
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]")
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
name = "distinguished conduct medal"

View File

@@ -11,7 +11,8 @@
else if(M.bloody_hands > 1)
if(add_blood(M.blood_DNA))
M.bloody_hands--
if(!suit_fibers) suit_fibers = list()
if(!suit_fibers)
suit_fibers = list()
var/fibertext
var/item_multiplier = isitem(src)?1.2:1
if(M.wear_suit)

View File

@@ -164,7 +164,8 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
feedback_details += "Vent Coords: [center.x],[center.y],[center.z]"
flood_images += image(image_icon,center,image_state,MOB_LAYER)
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
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/r = ui_hand_position(target.get_held_index_of_item(r_hand))
var/list/slots_free = list(l,r)
if(l_hand) slots_free -= l
if(r_hand) slots_free -= r
if(l_hand)
slots_free -= l
if(r_hand)
slots_free -= r
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(!H.belt) slots_free += ui_belt
if(!H.l_store) slots_free += ui_storage1
if(!H.r_store) slots_free += ui_storage2
if(!H.belt)
slots_free += ui_belt
if(!H.l_store)
slots_free += ui_storage1
if(!H.r_store)
slots_free += ui_storage2
if(slots_free.len)
target.halitem.screen_loc = pick(slots_free)
target.halitem.layer = ABOVE_HUD_LAYER
@@ -999,7 +1005,8 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
target.halitem.icon_state = "flashbang1"
target.halitem.name = "Flashbang"
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(src)

View File

@@ -41,8 +41,10 @@
step(M, pick(d,turn(d,90),turn(d,-90)))
/proc/Ellipsis(original_msg, chance = 50, keep_words)
if(chance <= 0) return "..."
if(chance >= 100) return original_msg
if(chance <= 0)
return "..."
if(chance >= 100)
return original_msg
var/list
words = splittext(original_msg," ")

View File

@@ -15,8 +15,10 @@
resistance_flags = 0
/obj/item/reagent_containers/food/drinks/on_reagent_change()
if (gulp_size < 5) gulp_size = 5
else gulp_size = max(round(reagents.total_volume / 5), 5)
if (gulp_size < 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)
@@ -51,7 +53,8 @@
return 1
/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 (!is_open_container())

Some files were not shown because too many files have changed in this diff Show More