diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index fb7c90e5ef..554159ab22 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 a05e06a05a..22fb2d69b5 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 @@ -103,10 +104,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 62d0bd07af..cae42d62e8 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 11ab21d21f..b831a8cbcb 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 e7d5755962..3d62cdd0ac 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 2d3a3341da..0184b5308d 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -491,8 +491,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) @@ -515,7 +517,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() @@ -528,10 +531,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 05a291bad7..f1ec409520 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 9730aaf552..7cddaf9a6f 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -325,7 +325,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 12a5342e33..10978b7d32 100644 --- a/code/controllers/subsystem/dbcore.dm +++ b/code/controllers/subsystem/dbcore.dm @@ -276,16 +276,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 d202c08d39..689ff83935 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 48fb688e53..31e8daadb2 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/wizarditis.dm b/code/datums/diseases/wizarditis.dm index cabf22b280..612418b1ca 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 f489f99564..ac9bfcbab5 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 319a235587..6efcd18324 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -299,7 +299,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) @@ -309,19 +310,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 f2f04ea00c..ac2fa4be01 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 ff8ad3e081..f20b13e1a3 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -451,7 +451,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 a43b88efe5..b05a1d78f1 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 2cee1d595c..10ff185fd6 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) @@ -128,7 +133,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() @@ -200,7 +206,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 5a177b80c4..653beed98c 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -68,7 +68,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 bd4c522477..8da88e18d7 100644 --- a/code/game/gamemodes/changeling/traitor_chan.dm +++ b/code/game/gamemodes/changeling/traitor_chan.dm @@ -43,7 +43,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 b405cc935c..743a4aea3c 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 6f5a2b4f7e..20bd7c9df2 100644 --- a/code/game/gamemodes/miniantags/abduction/gland.dm +++ b/code/game/gamemodes/miniantags/abduction/gland.dm @@ -241,10 +241,11 @@ /obj/item/organ/heart/gland/plasma/activate() to_chat(owner, "You feel bloated.") - addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, owner, "A massive stomachache overcomes you."), 150) - addtimer(CALLBACK(src, .proc/vomit_plasma), 200) - -/obj/item/organ/heart/gland/plasma/proc/vomit_plasma() + sleep(150) + if(!owner) + return + to_chat(owner, "A massive stomachache overcomes you.") + sleep(50) if(!owner) return owner.visible_message("[owner] vomits a cloud of plasma!") diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index e4fca6c240..77e26f026a 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -407,14 +407,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]." diff --git a/code/game/gamemodes/sandbox/airlock_maker.dm b/code/game/gamemodes/sandbox/airlock_maker.dm index f4298e1f62..aafbffa82e 100644 --- a/code/game/gamemodes/sandbox/airlock_maker.dm +++ b/code/game/gamemodes/sandbox/airlock_maker.dm @@ -26,7 +26,7 @@ /datum/airlock_maker/New(var/atom/target_loc) linked = new(target_loc) linked.maker = src - linked.anchored = FALSE + linked.anchored = FALSE access_used = list() interact() @@ -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/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 24c0e0b388..60260d2a4f 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -477,14 +477,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 diff --git a/code/game/machinery/airlock_control.dm b/code/game/machinery/airlock_control.dm index b5175b215f..01651e6e08 100644 --- a/code/game/machinery/airlock_control.dm +++ b/code/game/machinery/airlock_control.dm @@ -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) @@ -148,4 +152,4 @@ /obj/machinery/airlock_sensor/Destroy() SSradio.remove_object(src,frequency) - return ..() \ No newline at end of file + return ..() diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm index d933fc4ae1..e7887d0fb4 100644 --- a/code/game/machinery/camera/motion.dm +++ b/code/game/machinery/camera/motion.dm @@ -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) @@ -69,4 +70,3 @@ if (!area_motion) if(isliving(AM)) newTarget(AM) - diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm index 864ab2bff2..ba72d9676d 100644 --- a/code/game/machinery/camera/presets.dm +++ b/code/game/machinery/camera/presets.dm @@ -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) diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index 457abb3259..f5115c7e2a 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -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 diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 209bf5e47f..58d29d0698 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -24,7 +24,8 @@ playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You start deconstructing the frame...") if(do_after(user, 20*P.toolspeed, target = src)) - if(!src || !WT.isOn()) return + if(!src || !WT.isOn()) + return to_chat(user, "You deconstruct the frame.") var/obj/item/stack/sheet/metal/M = new (loc, 5) M.add_fingerprint(user) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 89b2bc4620..77f6e08c7d 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -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, "Authorization confirmed. Modifying security level.") @@ -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 diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index 9b5e14963f..2b46f1959c 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -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 ..() diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm index 7f5276d908..c540b51560 100644 --- a/code/game/machinery/computer/dna_console.dm +++ b/code/game/machinery/computer/dna_console.dm @@ -66,7 +66,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() diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index f3fabcc21c..5ba20bc527 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -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) @@ -468,4 +470,4 @@ info = "

Daily Key Reset


The new message monitor key is '[server.decryptkey]'.
Please keep this a secret and away from the clown.
If necessary, change the password to a more secure one." info_links = info add_overlay("paper_words") - break \ No newline at end of file + break diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index c983bc319f..3e9d6df42a 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -95,7 +95,8 @@ if(!usr.transferItemToLoc(I, src)) return inserted_id = I - else to_chat(usr, "No valid ID.") + else + to_chat(usr, "No valid ID.") else if(inserted_id) switch(href_list["id"]) if("eject") diff --git a/code/game/machinery/embedded_controller/airlock_controller.dm b/code/game/machinery/embedded_controller/airlock_controller.dm index be027a89c8..59d58bc9a5 100644 --- a/code/game/machinery/embedded_controller/airlock_controller.dm +++ b/code/game/machinery/embedded_controller/airlock_controller.dm @@ -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"]) @@ -206,7 +207,7 @@ icon_state = "airlock_control_standby" name = "airlock console" - density = FALSE + density = FALSE frequency = 1449 power_channel = ENVIRON @@ -220,7 +221,7 @@ var/sanitize_external /obj/machinery/embedded_controller/radio/airlock_controller/Initialize(mapload) - . = ..() + . = ..() if(!mapload) return @@ -292,4 +293,4 @@ [state_options]"} - return output \ No newline at end of file + return output diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index ee0b8f287c..16691160f2 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -21,10 +21,10 @@ var/datum/computer/file/embedded_program/program name = "embedded controller" - density = FALSE - anchored = TRUE + density = FALSE + anchored = TRUE - var/on = TRUE + var/on = TRUE /obj/machinery/embedded_controller/interact(mob/user) user.set_machine(src) @@ -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) @@ -73,11 +74,11 @@ var/datum/radio_frequency/radio_connection /obj/machinery/embedded_controller/radio/Destroy() - SSradio.remove_object(src,frequency) + SSradio.remove_object(src,frequency) return ..() /obj/machinery/embedded_controller/radio/Initialize() - . = ..() + . = ..() set_frequency(frequency) /obj/machinery/embedded_controller/radio/post_signal(datum/signal/signal) diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 36366ffbd9..7808e7ed05 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -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) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 872194ee67..2f6fe2bdd0 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -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 diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index a8ddc6710e..79d000a6ec 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -7,8 +7,8 @@ icon = 'icons/obj/singularity.dmi' icon_state = "beacon" - anchored = FALSE - density = TRUE + anchored = FALSE + density = TRUE layer = BELOW_MOB_LAYER //so people can't hide it and it's REALLY OBVIOUS stat = 0 verb_say = "states" @@ -20,7 +20,8 @@ /obj/machinery/power/singularity_beacon/proc/Activate(mob/user = null) if(surplus() < 1500) - if(user) to_chat(user, "The connected wire doesn't have enough current.") + if(user) + to_chat(user, "The connected wire doesn't have enough current.") return for(var/obj/singularity/singulo in GLOB.singularities) if(singulo.z == z) @@ -54,13 +55,13 @@ /obj/machinery/power/singularity_beacon/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/screwdriver)) + if(istype(W, /obj/item/screwdriver)) if(active) to_chat(user, "You need to deactivate the beacon first!") return if(anchored) - anchored = FALSE + anchored = FALSE to_chat(user, "You unscrew the beacon from the floor.") disconnect_from_network() return @@ -68,7 +69,7 @@ if(!connect_to_network()) to_chat(user, "This device must be placed over an exposed, powered cable node!") return - anchored = TRUE + anchored = TRUE to_chat(user, "You screw the beacon to the floor and attach the cable.") return else @@ -105,8 +106,8 @@ name = "suspicious beacon" icon = 'icons/obj/radio.dmi' icon_state = "beacon" - lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' - righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' + lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' desc = "A label on it reads: Warning: Activating this device will send a special beacon to your location." origin_tech = "bluespace=6;syndicate=5" w_class = WEIGHT_CLASS_SMALL diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 5638b92b99..893ab38380 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -60,7 +60,8 @@ dat += "
Identification String: NULL" dat += "
Network: [network]" dat += "
Prefabrication: [autolinkers.len ? "TRUE" : "FALSE"]" - if(hide) dat += "
Shadow Link: ACTIVE" + if(hide) + dat += "
Shadow Link: ACTIVE" //Show additional options for certain machines. dat += Options_Menu() diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm index fa03878998..48d98aa70f 100644 --- a/code/game/mecha/equipment/mecha_equipment.dm +++ b/code/game/mecha/equipment/mecha_equipment.dm @@ -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 = "* " if(chassis.selected == src) txt += "[src.name]" diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm index 54d49065a0..38b8e2bb96 100644 --- a/code/game/mecha/equipment/tools/other_tools.dm +++ b/code/game/mecha/equipment/tools/other_tools.dm @@ -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 "*  [src.name] - [equip_ready?"A":"Dea"]ctivate" @@ -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 "*  [src.name] - [equip_ready?"A":"Dea"]ctivate" diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 8abab12baf..d8de939514 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -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("[chassis] destroys [target] in an unholy fury.", \ "[chassis] destroys [target] in an unholy fury.") diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 7353af909a..ad0e428f14 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -596,7 +596,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) diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm index 87009ac292..27256d8b0b 100644 --- a/code/game/mecha/mecha_topic.dm +++ b/code/game/mecha/mecha_topic.dm @@ -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 . = {"