diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index 91bf127ab837..81187a05cb5b 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -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 diff --git a/code/__HELPERS/maths.dm b/code/__HELPERS/maths.dm index 41d2f721f597..10c0ea52e9d7 100644 --- a/code/__HELPERS/maths.dm +++ b/code/__HELPERS/maths.dm @@ -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 diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index a20cad1cf2b9..5f01d61ed06d 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -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 diff --git a/code/_onclick/adjacent.dm b/code/_onclick/adjacent.dm index 1f7121ba0e3f..95810c869bad 100644 --- a/code/_onclick/adjacent.dm +++ b/code/_onclick/adjacent.dm @@ -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) diff --git a/code/_onclick/drag_drop.dm b/code/_onclick/drag_drop.dm index e7d5755962dc..3d62cdd0ac0c 100644 --- a/code/_onclick/drag_drop.dm +++ b/code/_onclick/drag_drop.dm @@ -6,11 +6,12 @@ almost anything into a trash can. */ /atom/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params) - if(!usr || !over) + if(!usr || !over) 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 diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 638b4a31cf56..b5e72b791480 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -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) diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 62683584fa0b..526683c65ecf 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -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 diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 94799437868d..b2b516a3b89c 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -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 diff --git a/code/controllers/subsystem/dbcore.dm b/code/controllers/subsystem/dbcore.dm index 864274b8fb0d..f610cde218f9 100644 --- a/code/controllers/subsystem/dbcore.dm +++ b/code/controllers/subsystem/dbcore.dm @@ -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" diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index d202c08d3944..689ff8393513 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -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) diff --git a/code/datums/browser.dm b/code/datums/browser.dm index c854d20f18fb..9092cae09e42 100644 --- a/code/datums/browser.dm +++ b/code/datums/browser.dm @@ -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]" diff --git a/code/datums/diseases/pierrot_throat.dm b/code/datums/diseases/pierrot_throat.dm index adaf78375cea..ba2a43792f78 100644 --- a/code/datums/diseases/pierrot_throat.dm +++ b/code/datums/diseases/pierrot_throat.dm @@ -15,10 +15,14 @@ ..() switch(stage) if(1) - if(prob(10)) to_chat(affected_mob, "You feel a little silly.") + if(prob(10)) + to_chat(affected_mob, "You feel a little silly.") if(2) - if(prob(10)) to_chat(affected_mob, "You start seeing rainbows.") + if(prob(10)) + to_chat(affected_mob, "You start seeing rainbows.") if(3) - if(prob(10)) to_chat(affected_mob, "Your thoughts are interrupted by a loud HONK!") + if(prob(10)) + to_chat(affected_mob, "Your thoughts are interrupted by a loud HONK!") 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...") ) ) diff --git a/code/datums/diseases/wizarditis.dm b/code/datums/diseases/wizarditis.dm index eed96dc634a4..66d81804b850 100644 --- a/code/datums/diseases/wizarditis.dm +++ b/code/datums/diseases/wizarditis.dm @@ -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) diff --git a/code/datums/martial/wrestling.dm b/code/datums/martial/wrestling.dm index 02e2d9614db9..ae7146ca33f0 100644 --- a/code/datums/martial/wrestling.dm +++ b/code/datums/martial/wrestling.dm @@ -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) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 809222ec0188..e8724eb7175b 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -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("Radio Frequency: [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("Uplink Passcode: [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("Uplink Degrees: [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. diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index fafd057fea37..d6f15b25e8da 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -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 diff --git a/code/game/atoms.dm b/code/game/atoms.dm index b37a46161124..0a9a7918e95b 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -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 diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 4f7ab6366d46..70bbb44a77aa 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -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) diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 143842fe0748..84255da890d7 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -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 diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index c560b8cef0bd..259c3d491f5f 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -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 diff --git a/code/game/gamemodes/changeling/traitor_chan.dm b/code/game/gamemodes/changeling/traitor_chan.dm index af33b649edb2..883430ae84c2 100644 --- a/code/game/gamemodes/changeling/traitor_chan.dm +++ b/code/game/gamemodes/changeling/traitor_chan.dm @@ -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 diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index b405cc935c45..743a4aea3c36 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -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 diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm index 8c408c007e49..a3d69c45b942 100644 --- a/code/game/gamemodes/miniantags/abduction/gland.dm +++ b/code/game/gamemodes/miniantags/abduction/gland.dm @@ -242,10 +242,12 @@ /obj/item/organ/heart/gland/plasma/activate() to_chat(owner, "You feel bloated.") sleep(150) - if(!owner) return + if(!owner) + return to_chat(owner, "A massive stomachache overcomes you.") sleep(50) - if(!owner) return + if(!owner) + return owner.visible_message("[owner] vomits a cloud of plasma!") var/turf/open/T = get_turf(owner) if(istype(T)) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 424ea3242340..b65cea8bfc1d 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -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]." @@ -578,7 +581,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) for(var/datum/mind/M in owners) if(!owner || !owner.changeling || !owner.changeling.stored_profiles) continue - absorbedcount += M.changeling.absorbedcount + absorbedcount += M.changeling.absorbedcount return absorbedcount >= target_amount diff --git a/code/game/gamemodes/sandbox/airlock_maker.dm b/code/game/gamemodes/sandbox/airlock_maker.dm index 96e93c19fce4..311f65c4602b 100644 --- a/code/game/gamemodes/sandbox/airlock_maker.dm +++ b/code/game/gamemodes/sandbox/airlock_maker.dm @@ -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 diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm index 395369f6f896..177e051ff992 100644 --- a/code/game/gamemodes/sandbox/h_sandbox.dm +++ b/code/game/gamemodes/sandbox/h_sandbox.dm @@ -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, "Sandbox: \black[usr.key] has disabled object spawning!") 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, "Sandbox: \black [usr.key] has removed the object spawn limiter.") 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 = "Clothing (Reagent Containers) (Other Items)