diff --git a/code/__DEFINES/chat.dm b/code/__DEFINES/chat.dm index d4585227ea2..c147938224b 100644 --- a/code/__DEFINES/chat.dm +++ b/code/__DEFINES/chat.dm @@ -26,7 +26,7 @@ type = MESSAGE_TYPE_DEBUG, \ text = "DEBUG: [msg]") /// Used for debug messages to the player -#define debug_usr(msg) if (GLOB.Debug2&&usr) to_chat(usr, \ +#define debug_usr(msg) if (GLOB.Debug2 && usr) to_chat(usr, \ type = MESSAGE_TYPE_DEBUG, \ text = "DEBUG: [msg]") /// Used for debug messages to the admins diff --git a/code/__DEFINES/maths.dm b/code/__DEFINES/maths.dm index 7117d7b4645..5adb1a5f6ec 100644 --- a/code/__DEFINES/maths.dm +++ b/code/__DEFINES/maths.dm @@ -1,11 +1,11 @@ // Remove these once we have Byond implementation. // ------------------------------------ -#define IS_NAN(a) (a!=a) +#define IS_NAN(a) (a != a) -#define IS_INF__UNSAFE(a) (a==a && a-a!=a-a) +#define IS_INF__UNSAFE(a) (a == a && a-a != a-a) #define IS_INF(a) (isnum(a) && IS_INF__UNSAFE(a)) -#define IS_FINITE__UNSAFE(a) (a-a==a-a) +#define IS_FINITE__UNSAFE(a) (a-a == a-a) #define IS_FINITE(a) (isnum(a) && IS_FINITE__UNSAFE(a)) // ------------------------------------ // Aight dont remove the rest @@ -169,7 +169,7 @@ R1 = rand(-ACCURACY,ACCURACY)/ACCURACY R2 = rand(-ACCURACY,ACCURACY)/ACCURACY working = R1*R1 + R2*R2 - while(working >= 1 || working==0) + while(working >= 1 || working == 0) working = sqrt(-2 * log(working) / working) R1 *= working gaussian_next = R2 * working diff --git a/code/__HELPERS/atoms.dm b/code/__HELPERS/atoms.dm index 3eb8202f90c..402e3d975fd 100644 --- a/code/__HELPERS/atoms.dm +++ b/code/__HELPERS/atoms.dm @@ -273,11 +273,11 @@ rough example of the "cone" made by the 3 dirs checked if(!isnull(value) && value != "") matches = filter_fancy_list(matches, value) - if(matches.len==0) + if(matches.len == 0) return var/chosen - if(matches.len==1) + if(matches.len == 1) chosen = matches[1] else if(random) chosen = pick(matches) || null diff --git a/code/__HELPERS/hearted.dm b/code/__HELPERS/hearted.dm index 7ae75e6cc32..1eafef56a4f 100644 --- a/code/__HELPERS/hearted.dm +++ b/code/__HELPERS/hearted.dm @@ -32,7 +32,7 @@ if(!hearted_mob?.client) continue hearted_mob.client.adjust_heart() - message += "[hearted_ckey][i==hearts.len ? "" : ", "]" + message += "[hearted_ckey][i == hearts.len ? "" : ", "]" message_admins(message.Join()) /// Ask someone if they'd like to award a commendation for the round, 3 tries to get the name they want before we give up diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index adcc151af6a..12376f06cc5 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -277,7 +277,7 @@ world if(text2ascii(rgb) == 35) ++start // skip opening # var/ch,which=0,r=0,g=0,b=0,alpha=0,usealpha var/digits=0 - for(i=start, i<=length(rgb), ++i) + 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 @@ -342,7 +342,7 @@ world ++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) + 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 @@ -658,7 +658,7 @@ world var/lo3 = text2ascii(hex, 7) // B var/hi4 = text2ascii(hex, 8) // A var/lo4 = text2ascii(hex, 9) // A - return list(((hi1>= 65 ? hi1-55 : hi1-48)<<4) | (lo1 >= 65 ? lo1-55 : lo1-48), + return list(((hi1 >= 65 ? hi1-55 : hi1-48)<<4) | (lo1 >= 65 ? lo1-55 : lo1-48), ((hi2 >= 65 ? hi2-55 : hi2-48)<<4) | (lo2 >= 65 ? lo2-55 : lo2-48), ((hi3 >= 65 ? hi3-55 : hi3-48)<<4) | (lo3 >= 65 ? lo3-55 : lo3-48), ((hi4 >= 65 ? hi4-55 : hi4-48)<<4) | (lo4 >= 65 ? lo4-55 : lo4-48)) diff --git a/code/__HELPERS/maths.dm b/code/__HELPERS/maths.dm index 46d1ef3333b..5b5144e0cc2 100644 --- a/code/__HELPERS/maths.dm +++ b/code/__HELPERS/maths.dm @@ -116,7 +116,7 @@ ///chances are 1:value. anyprob(1) will always return true /proc/anyprob(value) - return (rand(1,value)==value) + return (rand(1,value) == value) ///counts the number of bits in Byond's 16-bit width field, in constant time and memory! /proc/bit_count(bit_field) diff --git a/code/__HELPERS/matrices.dm b/code/__HELPERS/matrices.dm index 60fb5fca7c9..6b7e5543d57 100644 --- a/code/__HELPERS/matrices.dm +++ b/code/__HELPERS/matrices.dm @@ -207,7 +207,7 @@ round(cos_inv_third+sqrt3_sin, 0.001), round(cos_inv_third-sqrt3_sin, 0.001), ro for(y in 1 to 5) offset = (y-1)*4 for(x in 1 to 4) - output[offset+x] = round(A[offset+1]*B[x] + A[offset+2]*B[x+4] + A[offset+3]*B[x+8] + A[offset+4]*B[x+12]+(y==5?B[x+16]:0), 0.001) + output[offset+x] = round(A[offset+1]*B[x] + A[offset+2]*B[x+4] + A[offset+3]*B[x+8] + A[offset+4]*B[x+12]+(y == 5?B[x+16]:0), 0.001) return output ///Converts RGB shorthands into RGBA matrices complete of constants rows (ergo a 20 keys list in byond). diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 5e701ad0b3a..82785f9db93 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -137,7 +137,7 @@ /proc/random_unique_name(gender, attempts_to_find_unique_name=10) for(var/i in 1 to attempts_to_find_unique_name) - if(gender==FEMALE) + if(gender == FEMALE) . = capitalize(pick(GLOB.first_names_female)) + " " + capitalize(pick(GLOB.last_names)) else . = capitalize(pick(GLOB.first_names_male)) + " " + capitalize(pick(GLOB.last_names)) diff --git a/code/__HELPERS/names.dm b/code/__HELPERS/names.dm index 22fd40c3764..d5356227613 100644 --- a/code/__HELPERS/names.dm +++ b/code/__HELPERS/names.dm @@ -183,16 +183,16 @@ GLOBAL_DATUM(syndicate_code_response_regex, /regex) for(words,words>0,words--)//Randomly picks from one of the choices below. - if(words==1&&(1 in safety)&&(2 in safety))//If there is only one word remaining and choice 1 or 2 have not been selected. + if(words == 1 && (1 in safety) && (2 in safety))//If there is only one word remaining and choice 1 or 2 have not been selected. safety = list(pick(1,2))//Select choice 1 or 2. - else if(words==1&&maxwords==2)//Else if there is only one word remaining (and there were two originally), and 1 or 2 were chosen, + else if(words == 1 && maxwords == 2)//Else if there is only one word remaining (and there were two originally), and 1 or 2 were chosen, safety = list(3)//Default to list 3 switch(pick(safety))//Chance based on the safety list. if(1)//1 and 2 can only be selected once each to prevent more than two specific names/places/etc. switch(rand(1,2))//Mainly to add more options later. if(1) - if(names.len&&prob(70)) + if(names.len && prob(70)) . += pick(names) else if(prob(10)) @@ -230,7 +230,7 @@ GLOBAL_DATUM(syndicate_code_response_regex, /regex) if(4) . += lowertext(pick(threats)) if(!return_list) - if(words==1) + if(words == 1) . += "." else . += ", " diff --git a/code/__HELPERS/spatial_info.dm b/code/__HELPERS/spatial_info.dm index 448b7bcba99..cbaa1b906d8 100644 --- a/code/__HELPERS/spatial_info.dm +++ b/code/__HELPERS/spatial_info.dm @@ -188,13 +188,13 @@ ///Calculate if two atoms are in sight, returns TRUE or FALSE /proc/inLineOfSight(X1,Y1,X2,Y2,Z=1,PX1=16.5,PY1=16.5,PX2=16.5,PY2=16.5) var/turf/T - if(X1==X2) - if(Y1==Y2) + if(X1 == X2) + if(Y1 == Y2) return TRUE //Light cannot be blocked on same tile else var/s = SIGN(Y2-Y1) Y1+=s - while(Y1!=Y2) + while(Y1 != Y2) T=locate(X1,Y1,Z) if(IS_OPAQUE_TURF(T)) return FALSE @@ -206,7 +206,7 @@ var/signY = SIGN(Y2-Y1) if(X1=0) { + if(elem.className.search('visible') >= 0) { elem.className = elem.className.replace('visible','hidden'); this.className = this.className.replace('open','closed'); this.innerHTML = this.innerHTML.replace('-','+'); diff --git a/code/controllers/subsystem/ambience.dm b/code/controllers/subsystem/ambience.dm index 6067dc87638..1381c4c5f5c 100644 --- a/code/controllers/subsystem/ambience.dm +++ b/code/controllers/subsystem/ambience.dm @@ -22,7 +22,7 @@ SUBSYSTEM_DEF(ambience) //Check to see if the client exists and isn't held by a new player var/mob/client_mob = client_iterator?.mob - if(isnull(client_iterator) || !client_mob ||isnewplayer(client_mob)) + if(isnull(client_iterator) || !client_mob || isnewplayer(client_mob)) ambience_listening_clients -= client_iterator client_old_areas -= client_iterator continue diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index ab9b27a1e4f..a099aacfbdd 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -616,7 +616,7 @@ GLOBAL_LIST_EMPTY(the_station_areas) set name = "Load Away Mission" set category = "Admin.Events" - if(!holder ||!check_rights(R_FUN)) + if(!holder || !check_rights(R_FUN)) return diff --git a/code/controllers/subsystem/processing/networks.dm b/code/controllers/subsystem/processing/networks.dm index c5884a1eeaa..10226564edb 100644 --- a/code/controllers/subsystem/processing/networks.dm +++ b/code/controllers/subsystem/processing/networks.dm @@ -310,7 +310,7 @@ SUBSYSTEM_DEF(networks) #ifdef DEBUG_NETWORKS ASSERT(tree && tree.len > 0) // this should be obvious but JUST in case. for(var/part in tree) - if(!verify_network_name(part) || findtext(name,".")!=0) // and no stray dots + if(!verify_network_name(part) || findtext(name,".") != 0) // and no stray dots stack_trace("network_list_to_string: Cannot create network with ([part]) of ([tree.Join(".")])") break #endif @@ -379,7 +379,7 @@ SUBSYSTEM_DEF(networks) /datum/controller/subsystem/networks/proc/create_network_simple(network_id) var/datum/ntnet/network = networks[network_id] - if(network!=null) + if(network != null) return network // don't worry about it /// Checks to make sure the network is valid. We log BOTH to mapping and telecoms diff --git a/code/controllers/subsystem/timer.dm b/code/controllers/subsystem/timer.dm index c632d9d4f04..602ccd2df2b 100644 --- a/code/controllers/subsystem/timer.dm +++ b/code/controllers/subsystem/timer.dm @@ -1,7 +1,7 @@ /// Controls how many buckets should be kept, each representing a tick. (1 minutes worth) #define BUCKET_LEN (world.fps*1*60) /// Helper for getting the correct bucket for a given timer -#define BUCKET_POS(timer) (((round((timer.timeToRun - timer.timer_subsystem.head_offset) / world.tick_lag)+1) % BUCKET_LEN)||BUCKET_LEN) +#define BUCKET_POS(timer) (((round((timer.timeToRun - timer.timer_subsystem.head_offset) / world.tick_lag)+1) % BUCKET_LEN) || BUCKET_LEN) /// Gets the maximum time at which timers will be invoked from buckets, used for deferring to secondary queue #define TIMER_MAX(timer_ss) (timer_ss.head_offset + TICKS2DS(BUCKET_LEN + timer_ss.practical_offset - 1)) /// Max float with integer precision diff --git a/code/controllers/subsystem/title.dm b/code/controllers/subsystem/title.dm index c869bfbe1b5..1fb7944191d 100644 --- a/code/controllers/subsystem/title.dm +++ b/code/controllers/subsystem/title.dm @@ -26,7 +26,7 @@ SUBSYSTEM_DEF(title) for(var/S in provisional_title_screens) var/list/L = splittext(S,"+") - if((L.len == 1 && (L[1] != "exclude" && L[1] != "blank.png"))|| (L.len > 1 && ((use_rare_screens && lowertext(L[1]) == "rare") || (lowertext(L[1]) == lowertext(SSmapping.config.map_name))))) + if((L.len == 1 && (L[1] != "exclude" && L[1] != "blank.png")) || (L.len > 1 && ((use_rare_screens && lowertext(L[1]) == "rare") || (lowertext(L[1]) == lowertext(SSmapping.config.map_name))))) title_screens += S if(length(title_screens)) diff --git a/code/datums/browser.dm b/code/datums/browser.dm index 65da53e5a6a..f6bff564d79 100644 --- a/code/datums/browser.dm +++ b/code/datums/browser.dm @@ -467,7 +467,7 @@ set hidden = TRUE // hide this verb from the user's panel set name = ".windowclose" // no autocomplete on cmd line - if(atomref!="null") // if passed a real atomref + if(atomref != "null") // if passed a real atomref var/hsrc = locate(atomref) // find the reffed atom var/href = "close=1" if(hsrc) diff --git a/code/datums/components/food/edible.dm b/code/datums/components/food/edible.dm index 021e96c1803..c802e2a138e 100644 --- a/code/datums/components/food/edible.dm +++ b/code/datums/components/food/edible.dm @@ -280,7 +280,7 @@ Behavior that's still missing from this component that original food items had t ///Makes sure the thing hasn't been destroyed or fully eaten to prevent eating phantom edibles /datum/component/edible/proc/IsFoodGone(atom/owner, mob/living/feeder) - if(QDELETED(owner)|| !(IS_EDIBLE(owner))) + if(QDELETED(owner) || !(IS_EDIBLE(owner))) return TRUE if(owner.reagents.total_volume) return FALSE diff --git a/code/datums/components/material_container.dm b/code/datums/components/material_container.dm index 2002f5701cd..665b9625b04 100644 --- a/code/datums/components/material_container.dm +++ b/code/datums/components/material_container.dm @@ -265,7 +265,7 @@ /datum/component/material_container/proc/transer_amt_to(datum/component/material_container/T, amt, datum/material/mat) if(!istype(mat)) mat = GET_MATERIAL_REF(mat) - if((amt==0)||(!T)||(!mat)) + if((amt == 0) || (!T) || (!mat)) return FALSE if(amt<0) return T.transer_amt_to(src, -amt, mat) diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index 19fb8f77dda..405b161b7d2 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -231,11 +231,11 @@ else visibility_flags &= ~HIDDEN_SCANNER - if(properties["transmittable"]>=11) + if(properties["transmittable"] >= 11) SetSpread(DISEASE_SPREAD_AIRBORNE) - else if(properties["transmittable"]>=7) + else if(properties["transmittable"] >= 7) SetSpread(DISEASE_SPREAD_CONTACT_SKIN) - else if(properties["transmittable"]>=3) + else if(properties["transmittable"] >= 3) SetSpread(DISEASE_SPREAD_CONTACT_FLUIDS) else SetSpread(DISEASE_SPREAD_BLOOD) diff --git a/code/datums/diseases/advance/symptoms/headache.dm b/code/datums/diseases/advance/symptoms/headache.dm index 40ed26d79b3..409aaa842ae 100644 --- a/code/datums/diseases/advance/symptoms/headache.dm +++ b/code/datums/diseases/advance/symptoms/headache.dm @@ -43,7 +43,7 @@ return var/mob/living/M = A.affected_mob if(power < 2) - if(prob(base_message_chance) || A.stage >=4) + if(prob(base_message_chance) || A.stage >= 4) to_chat(M, span_warning("[pick("Your head hurts.", "Your head pounds.")]")) if(power >= 2 && A.stage >= 4) to_chat(M, span_warning("[pick("Your head hurts a lot.", "Your head pounds incessantly.")]")) diff --git a/code/datums/diseases/wizarditis.dm b/code/datums/diseases/wizarditis.dm index 41ab2927ac9..4ef7aa9a531 100644 --- a/code/datums/diseases/wizarditis.dm +++ b/code/datums/diseases/wizarditis.dm @@ -84,7 +84,7 @@ STI KALY - blind for(var/area/space/S in theareas) theareas -= S - if(!theareas||!theareas.len) + if(!theareas || !theareas.len) return var/area/thearea = pick(theareas) diff --git a/code/datums/dna.dm b/code/datums/dna.dm index 3c3e69132be..e309ce3119c 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -812,7 +812,7 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) if(!M.has_dna()) CRASH("[M] does not have DNA") if(se) - for(var/i=1, i<=DNA_MUTATION_BLOCKS, i++) + for(var/i=1, i <= DNA_MUTATION_BLOCKS, i++) if(prob(probability)) M.dna.generate_dna_blocks() M.domutcheck() diff --git a/code/datums/martial/cqc.dm b/code/datums/martial/cqc.dm index bee85d633be..b77dbe5a1bb 100644 --- a/code/datums/martial/cqc.dm +++ b/code/datums/martial/cqc.dm @@ -146,7 +146,7 @@ return TRUE /datum/martial_art/cqc/grab_act(mob/living/A, mob/living/D) - if(A!=D && can_use(A)) // A!=D prevents grabbing yourself + if(A != D && can_use(A)) // A != D prevents grabbing yourself add_to_streak("G",D) if(check_streak(A,D)) //if a combo is made no grab upgrade is done return TRUE diff --git a/code/datums/recipe.dm b/code/datums/recipe.dm index 95f7650470b..de3d3d9b96d 100644 --- a/code/datums/recipe.dm +++ b/code/datums/recipe.dm @@ -100,11 +100,11 @@ exact = -1 var/list/datum/recipe/possible_recipes = new for (var/datum/recipe/recipe in avaiable_recipes) - if (recipe.check_reagents(obj.reagents)==exact && recipe.check_items(obj)==exact) + if (recipe.check_reagents(obj.reagents) == exact && recipe.check_items(obj) == exact) possible_recipes+=recipe - if (possible_recipes.len==0) + if (possible_recipes.len == 0) return null - else if (possible_recipes.len==1) + else if (possible_recipes.len == 1) return possible_recipes[1] else //okay, let's select the most complicated recipe var/r_count = 0 @@ -113,7 +113,7 @@ for (var/datum/recipe/recipe in possible_recipes) var/N_i = (recipe.items)?(recipe.items.len):0 var/N_r = (recipe.reagents_list)?(recipe.reagents_list.len):0 - if (N_i > i_count || (N_i== i_count && N_r > r_count )) + if (N_i > i_count || (N_i == i_count && N_r > r_count )) r_count = N_r i_count = N_i . = recipe diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets.dm b/code/game/gamemodes/dynamic/dynamic_rulesets.dm index 3b946b3b2f4..dafc418056b 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets.dm @@ -262,7 +262,7 @@ for(var/role in exclusive_roles) var/datum/job/job = SSjob.GetJob(role) - if((role in candidate_client.prefs.job_preferences) && SSjob.check_job_eligibility(candidate_player, job, "Dynamic Roundstart TC", add_job_to_log = TRUE)==JOB_AVAILABLE) + if((role in candidate_client.prefs.job_preferences) && SSjob.check_job_eligibility(candidate_player, job, "Dynamic Roundstart TC", add_job_to_log = TRUE) == JOB_AVAILABLE) exclusive_candidate = TRUE break diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm index 349a44d1e6e..027249c0801 100644 --- a/code/game/gamemodes/objective_items.dm +++ b/code/game/gamemodes/objective_items.dm @@ -275,7 +275,7 @@ var/found_amount = 0 var/datum/gas_mixture/mix = T.return_air() found_amount += mix.gases[/datum/gas/plasma] ? mix.gases[/datum/gas/plasma][MOLES] : 0 - return found_amount>=target_amount + return found_amount >= target_amount /datum/objective_item/steal/functionalai @@ -406,7 +406,7 @@ if(istype(S, targetitem)) found_amount = S.amount - return found_amount>=target_amount + return found_amount >= target_amount /datum/objective_item/stack/diamond name = "10 diamonds" diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm index 2462f2810f7..3bdac412f76 100644 --- a/code/game/machinery/computer/dna_console.dm +++ b/code/game/machinery/computer/dna_console.dm @@ -692,7 +692,7 @@ new_pair = (pair_str ? char + (pair_str[1] == char ? pair_str[2] : pair_str[1]) : null) // every second letter in the sequence represents a valid pair of the new sequence, otherwise it belongs to old if(new_pair) - if(i%2==0) + if(i%2 == 0) new_sequence+=new_pair else old_sequence+=new_pair diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index f577289fa47..2a297ef7ff4 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -275,7 +275,7 @@ temp = {"Name: [disease.name]
Number of stages: [disease.max_stages]
Spread: [disease.spread_text] Transmission -
Possible Cure: [(disease.cure_text||"none")] +
Possible Cure: [(disease.cure_text || "none")]
Affected Lifeforms:[applicable_mob_names]

Notes: [disease.desc] diff --git a/code/game/machinery/computer/prisoner/management.dm b/code/game/machinery/computer/prisoner/management.dm index c4281ffb474..d84b79f0fe1 100644 --- a/code/game/machinery/computer/prisoner/management.dm +++ b/code/game/machinery/computer/prisoner/management.dm @@ -89,7 +89,7 @@ usr.set_machine(src) if(href_list["id"]) - if(href_list["id"] =="insert" && !contained_id) + if(href_list["id"] == "insert" && !contained_id) id_insert(usr) else if(contained_id) switch(href_list["id"]) diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 9dc50258b04..e3d3a0e2acb 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -90,7 +90,7 @@ if(can_control(usr, R) && !..()) if(isAI(usr) && (R.ai_lockdown && R.lockcharge || !R.lockcharge) || !isAI(usr)) R.ai_lockdown = FALSE - if(isAI(usr)&&!R.lockcharge) + if(isAI(usr) && !R.lockcharge) R.ai_lockdown = TRUE message_admins(span_notice("[ADMIN_LOOKUPFLW(usr)] [!R.lockcharge ? "locked down" : "released"] [ADMIN_LOOKUPFLW(R)]!")) log_silicon("[key_name(usr)] [!R.lockcharge ? "locked down" : "released"] [key_name(R)]!") diff --git a/code/game/machinery/computer/teleporter.dm b/code/game/machinery/computer/teleporter.dm index 0593a8b19c4..7177da8f4ee 100644 --- a/code/game/machinery/computer/teleporter.dm +++ b/code/game/machinery/computer/teleporter.dm @@ -212,7 +212,7 @@ if(is_centcom_level(T.z) || is_away_level(T.z)) return FALSE var/area/A = get_area(T) - if(!A ||(A.area_flags & NOTELEPORT)) + if(!A || (A.area_flags & NOTELEPORT)) return FALSE return TRUE diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm index 5849208a888..a49ca4961db 100644 --- a/code/game/machinery/dance_machine.dm +++ b/code/game/machinery/dance_machine.dm @@ -200,16 +200,16 @@ if(t.x < cen.x && t.y == cen.y) spotlights += new /obj/item/flashlight/spotlight(t, 1 + get_dist(src, t), 30 - (get_dist(src, t) * 8), LIGHT_COLOR_GREEN) continue - if((t.x+1 == cen.x && t.y+1 == cen.y) || (t.x+2==cen.x && t.y+2 == cen.y)) + if((t.x+1 == cen.x && t.y+1 == cen.y) || (t.x+2 == cen.x && t.y+2 == cen.y)) spotlights += new /obj/item/flashlight/spotlight(t, 1.4 + get_dist(src, t), 30 - (get_dist(src, t) * 8), LIGHT_COLOR_ORANGE) continue - if((t.x-1 == cen.x && t.y-1 == cen.y) || (t.x-2==cen.x && t.y-2 == cen.y)) + if((t.x-1 == cen.x && t.y-1 == cen.y) || (t.x-2 == cen.x && t.y-2 == cen.y)) spotlights += new /obj/item/flashlight/spotlight(t, 1.4 + get_dist(src, t), 30 - (get_dist(src, t) * 8), LIGHT_COLOR_CYAN) continue - if((t.x-1 == cen.x && t.y+1 == cen.y) || (t.x-2==cen.x && t.y+2 == cen.y)) + if((t.x-1 == cen.x && t.y+1 == cen.y) || (t.x-2 == cen.x && t.y+2 == cen.y)) spotlights += new /obj/item/flashlight/spotlight(t, 1.4 + get_dist(src, t), 30 - (get_dist(src, t) * 8), LIGHT_COLOR_BLUEGREEN) continue - if((t.x+1 == cen.x && t.y-1 == cen.y) || (t.x+2==cen.x && t.y-2 == cen.y)) + if((t.x+1 == cen.x && t.y-1 == cen.y) || (t.x+2 == cen.x && t.y-2 == cen.y)) spotlights += new /obj/item/flashlight/spotlight(t, 1.4 + get_dist(src, t), 30 - (get_dist(src, t) * 8), LIGHT_COLOR_BLUE) continue continue diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 86091f01119..1637a263f58 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -389,7 +389,7 @@ return ((aiControlDisabled != AI_WIRE_DISABLED) && !isAllPowerCut()) /obj/machinery/door/airlock/proc/canAIHack() - return ((aiControlDisabled==AI_WIRE_DISABLED) && (!hackProof) && (!isAllPowerCut())); + return ((aiControlDisabled == AI_WIRE_DISABLED) && (!hackProof) && (!isAllPowerCut())); /obj/machinery/door/airlock/hasPower() return ((!secondsMainPowerLost || !secondsBackupPowerLost) && !(machine_stat & NOPOWER)) diff --git a/code/game/machinery/newscaster/newspaper.dm b/code/game/machinery/newscaster/newspaper.dm index 0a6010c8822..6b71bfc4266 100644 --- a/code/game/machinery/newscaster/newspaper.dm +++ b/code/game/machinery/newscaster/newspaper.dm @@ -57,7 +57,7 @@ temp_page++ dat+="[NP.channel_name] \[page [temp_page+1]\]
" dat+="" - if(scribble_page==curr_page) + if(scribble_page == curr_page) dat+="
There is a small scribble near the end of this page... It reads: \"[scribble]\"" dat+= "
Next Page
Done reading
" if(1) // X channel pages inbetween. @@ -86,13 +86,13 @@ dat+="
" dat+="\[Story by [MESSAGE.return_author(notContent(MESSAGE.author_censor_time))]\]

" dat+="" - if(scribble_page==curr_page) + if(scribble_page == curr_page) dat+="
There is a small scribble near the end of this page... It reads: \"[scribble]\"" dat+= "

Previous Page
Next Page
" if(2) //Last page for(var/datum/feed_channel/NP in news_content) pages++ - if(wantedAuthor!=null) + if(wantedAuthor != null) dat+="
Wanted Issue:


" dat+="Criminal name: [wantedCriminal]
" dat+="Description: [wantedBody]
" @@ -104,7 +104,7 @@ dat+="None" else dat+="Apart from some uninteresting classified ads, there's nothing on this page..." - if(scribble_page==curr_page) + if(scribble_page == curr_page) dat+="
There is a small scribble near the end of this page... It reads: \"[scribble]\"" dat+= "
Previous Page
" dat+="

[curr_page+1]
" diff --git a/code/game/objects/effects/decals/remains.dm b/code/game/objects/effects/decals/remains.dm index 1d633fc7c5f..d0decbcf14f 100644 --- a/code/game/objects/effects/decals/remains.dm +++ b/code/game/objects/effects/decals/remains.dm @@ -4,7 +4,7 @@ icon = 'icons/effects/blood.dmi' /obj/effect/decal/remains/acid_act() - visible_message(span_warning("[src] dissolve[gender==PLURAL?"":"s"] into a puddle of sizzling goop!")) + visible_message(span_warning("[src] dissolve[gender == PLURAL?"":"s"] into a puddle of sizzling goop!")) playsound(src, 'sound/items/welder.ogg', 150, TRUE) new /obj/effect/decal/cleanable/greenglow(drop_location()) qdel(src) diff --git a/code/game/objects/effects/glowshroom.dm b/code/game/objects/effects/glowshroom.dm index 505caab018b..7af8f198533 100644 --- a/code/game/objects/effects/glowshroom.dm +++ b/code/game/objects/effects/glowshroom.dm @@ -209,7 +209,7 @@ GLOBAL_VAR_INIT(glowshrooms, 0) var/list/dir_list = list() - for(var/i=1,i<=16,i <<= 1) + for(var/i=1,i <= 16,i <<= 1) if(direction & i) dir_list += i diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index 992ed0d142d..e35dc79ea2c 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -4,7 +4,7 @@ var/turf/actual_destination = get_teleport_turf(destination, accuracy) var/obj/effect/portal/P1 = new newtype(source, _lifespan, null, FALSE, null) var/obj/effect/portal/P2 = new newtype(actual_destination, _lifespan, P1, TRUE, null) - if(!istype(P1)||!istype(P2)) + if(!istype(P1) || !istype(P2)) return P1.link_portal(P2) P1.hardlinked = TRUE diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index 2a064e48d59..4127bdd1672 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -753,7 +753,7 @@ GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window()) ui_interact(user) /obj/item/construction/rcd/proc/target_check(atom/A, mob/user) // only returns true for stuff the device can actually work with - if((isturf(A) && A.density && mode==RCD_DECONSTRUCT) || (isturf(A) && !A.density) || (istype(A, /obj/machinery/door/airlock) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/grille) || (istype(A, /obj/structure/window) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/girder)) + if((isturf(A) && A.density && mode == RCD_DECONSTRUCT) || (isturf(A) && !A.density) || (istype(A, /obj/machinery/door/airlock) && mode == RCD_DECONSTRUCT) || istype(A, /obj/structure/grille) || (istype(A, /obj/structure/window) && mode == RCD_DECONSTRUCT) || istype(A, /obj/structure/girder)) return TRUE else return FALSE diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 79596211dce..290fdea7776 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -93,7 +93,7 @@ if(..()) return if(href_list["edit_area"]) - if(get_area_type()!=AREA_STATION) + if(get_area_type() != AREA_STATION) return if(in_use) return @@ -192,7 +192,7 @@ var/area/A = get_area(usr) var/prevname = "[A.name]" var/str = tgui_input_text(usr, "New area name", "Area Creation", max_length = MAX_NAME_LEN) - if(!str || !length(str) || str==prevname) //cancel + if(!str || !length(str) || str == prevname) //cancel return if(length(str) > 50) to_chat(usr, span_warning("The given name is too long. The area's name is unchanged.")) diff --git a/code/game/objects/items/devices/scanners/health_analyzer.dm b/code/game/objects/items/devices/scanners/health_analyzer.dm index db19bb54ffe..1230fb23db7 100644 --- a/code/game/objects/items/devices/scanners/health_analyzer.dm +++ b/code/game/objects/items/devices/scanners/health_analyzer.dm @@ -66,7 +66,7 @@ \n[span_info("Body temperature: ???")]") return - if(ispodperson(M)&& !advanced) + if(ispodperson(M) && !advanced) to_chat(user, "[M]'s biological structure is too complex for the health analyzer.") return diff --git a/code/game/objects/items/dna_injector.dm b/code/game/objects/items/dna_injector.dm index 73ef14aecef..ad255f94f07 100644 --- a/code/game/objects/items/dna_injector.dm +++ b/code/game/objects/items/dna_injector.dm @@ -184,7 +184,7 @@ for(var/datum/disease/advance/disease in target.diseases) for(var/datum/symptom/symp in disease.symptoms) - if((symp.type == /datum/symptom/genetic_mutation)||(symp.type == /datum/symptom/viralevolution)) + if((symp.type == /datum/symptom/genetic_mutation) || (symp.type == /datum/symptom/viralevolution)) crispr_charge = TRUE log_combat(user, target, "[!doitanyway ? "failed to inject" : "injected"]", "[src] ([mutation])[crispr_charge ? " with CRISPR charge" : ""]") return TRUE diff --git a/code/game/objects/items/holosign_creator.dm b/code/game/objects/items/holosign_creator.dm index 56a3f8bbad3..e5f4939479f 100644 --- a/code/game/objects/items/holosign_creator.dm +++ b/code/game/objects/items/holosign_creator.dm @@ -141,7 +141,7 @@ qdel(sign) shock = 0 return - if(R.emagged&&!shock) + if(R.emagged && !shock) to_chat(user, span_warning("You clear all active holograms, and overload your energy projector!")) holosign_type = /obj/structure/holosign/barrier/cyborg/hacked creation_time = 30 diff --git a/code/game/objects/items/plushes.dm b/code/game/objects/items/plushes.dm index 32a1a76d519..5a60981b4c0 100644 --- a/code/game/objects/items/plushes.dm +++ b/code/game/objects/items/plushes.dm @@ -87,12 +87,12 @@ var/i var/obj/item/toy/plush/P - for(i=1, i<=scorned.len, i++) + for(i=1, i <= scorned.len, i++) P = scorned[i] P.bad_news(src) scorned = null - for(i=1, i<=scorned_by.len, i++) + for(i=1, i <= scorned_by.len, i++) P = scorned_by[i] P.bad_news(src) scorned_by = null diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 73165cc9815..66bffa7a0e2 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -155,7 +155,7 @@ var/obj/item/bot_assembly/ed209/B = new B.forceMove(drop_location()) to_chat(user, span_notice("You arm the robot frame.")) - var/holding_this = user.get_inactive_held_item()==src + var/holding_this = user.get_inactive_held_item() == src qdel(src) if (holding_this) user.put_in_inactive_hand(B) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 4b321e76654..51d8eb50e28 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -147,7 +147,7 @@ to_chat(user, span_notice("There's nothing there to bandage!")) return if(!LAZYLEN(limb.wounds)) - to_chat(user, span_notice("There's no wounds that require bandaging on [user==M ? "your" : "[M]'s"] [limb.plaintext_zone]!")) // good problem to have imo + to_chat(user, span_notice("There's no wounds that require bandaging on [user == M ? "your" : "[M]'s"] [limb.plaintext_zone]!")) // good problem to have imo return var/gauzeable_wound = FALSE @@ -157,13 +157,13 @@ gauzeable_wound = TRUE break if(!gauzeable_wound) - to_chat(user, span_notice("There's no wounds that require bandaging on [user==M ? "your" : "[M]'s"] [limb.plaintext_zone]!")) // good problem to have imo + to_chat(user, span_notice("There's no wounds that require bandaging on [user == M ? "your" : "[M]'s"] [limb.plaintext_zone]!")) // good problem to have imo return //SKYRAT EDIT CHANGE BEGIN - MEDICAL /* if(limb.current_gauze && (limb.current_gauze.absorption_capacity * 0.8 > absorption_capacity)) // ignore if our new wrap is < 20% better than the current one, so someone doesn't bandage it 5 times in a row - to_chat(user, span_warning("The bandage currently on [user==M ? "your" : "[M]'s"] [limb.plaintext_zone] is still in good condition!")) + to_chat(user, span_warning("The bandage currently on [user == M ? "your" : "[M]'s"] [limb.plaintext_zone] is still in good condition!")) return */ if(limb.current_gauze) diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index ace9849e80d..bec5abc88e0 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -68,7 +68,7 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \ var/obj/item/stack/sheet/rglass/RG = new (get_turf(user)) if(!QDELETED(RG)) RG.add_fingerprint(user) - var/replace = user.get_inactive_held_item()==src + var/replace = user.get_inactive_held_item() == src V.use(1) use(1) if(QDELETED(src) && replace && !QDELETED(RG)) @@ -120,7 +120,7 @@ GLOBAL_LIST_INIT(pglass_recipes, list ( \ var/obj/item/stack/sheet/plasmarglass/RG = new (get_turf(user)) if (!QDELETED(RG)) RG.add_fingerprint(user) - var/replace = user.get_inactive_held_item()==src + var/replace = user.get_inactive_held_item() == src V.use(1) use(1) if(QDELETED(src) && replace) diff --git a/code/game/objects/items/tanks/tank_types.dm b/code/game/objects/items/tanks/tank_types.dm index af726452d1b..c25ab3a2c51 100644 --- a/code/game/objects/items/tanks/tank_types.dm +++ b/code/game/objects/items/tanks/tank_types.dm @@ -92,7 +92,7 @@ /obj/item/tank/internals/plasma/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/flamethrower)) var/obj/item/flamethrower/F = W - if ((!F.status)||(F.ptank)) + if ((!F.status) || (F.ptank)) return if(!user.transferItemToLoc(src, F)) return diff --git a/code/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm index 782ca62cf1c..a30ac6f470d 100644 --- a/code/game/objects/items/tanks/watertank.dm +++ b/code/game/objects/items/tanks/watertank.dm @@ -327,7 +327,7 @@ return if(nozzle_mode == RESIN_FOAM) - if(!Adj|| !isturf(target)) + if(!Adj || !isturf(target)) balloon_alert(user, "too far!") return for(var/S in target) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 78a08c351e7..67c2ecae9c1 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -146,7 +146,7 @@ GLOBAL_LIST_EMPTY(objects_by_id_tag) ui_interact(M) if(issilicon(usr) || isAdminGhostAI(usr)) if (!(usr in nearby)) - if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh. + if (usr.client && usr.machine == src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh. is_in_use = TRUE ui_interact(usr) @@ -155,7 +155,7 @@ GLOBAL_LIST_EMPTY(objects_by_id_tag) if(ishuman(usr)) var/mob/living/carbon/human/H = usr if(!(usr in nearby)) - if(usr.client && usr.machine==src) + if(usr.client && usr.machine == src) if(H.dna.check_mutation(/datum/mutation/human/telekinesis)) is_in_use = TRUE ui_interact(usr) diff --git a/code/modules/admin/admin_pda_message.dm b/code/modules/admin/admin_pda_message.dm index 395dfde4dbd..2aeca2fd58c 100644 --- a/code/modules/admin/admin_pda_message.dm +++ b/code/modules/admin/admin_pda_message.dm @@ -3,7 +3,7 @@ set name = "PDA Message" set category = "Admin.Events" - if(!holder ||!check_rights(R_ADMIN)) + if(!holder || !check_rights(R_ADMIN)) return holder.message_pda() @@ -64,7 +64,7 @@ if(!spam && target["name"] != params["user"]) continue targets += target["tablet"] - + if(!length(targets)) to_chat(usr, span_warning("ERROR: Target is unavaiable(or not choosed).")) return diff --git a/code/modules/admin/antag_panel.dm b/code/modules/admin/antag_panel.dm index 042e27f76d5..6b6b3bca138 100644 --- a/code/modules/admin/antag_panel.dm +++ b/code/modules/admin/antag_panel.dm @@ -95,7 +95,7 @@ GLOBAL_VAR(antag_prototypes) tgui_alert(usr, "This mind doesn't have a mob, or is deleted! For some reason!", "Edit Memory") return - var/out = "[name][(current && (current.real_name!=name))?" (as [current.real_name])":""]
" + var/out = "[name][(current && (current.real_name != name))?" (as [current.real_name])":""]
" out += "Mind currently owned by key: [key] [active?"(synced)":"(not synced)"]
" out += "Assigned role: [assigned_role.title]. Edit
" out += "Faction and special role: [special_role]
" diff --git a/code/modules/admin/force_event.dm b/code/modules/admin/force_event.dm index f8d8ceccf0a..4e4338d019c 100644 --- a/code/modules/admin/force_event.dm +++ b/code/modules/admin/force_event.dm @@ -3,7 +3,7 @@ set name = "Trigger Event" set category = "Admin.Events" - if(!holder ||!check_rights(R_FUN)) + if(!holder || !check_rights(R_FUN)) return holder.forceEvent() diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 624d2b7a0ad..609d4c0b26e 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -107,13 +107,13 @@ var id = span.getAttribute("id"); - if(!id || !(id.indexOf("item")==0)) + if(!id || !(id.indexOf("item") == 0)) continue; var pass = 1; for(var j = 0; j < locked_tabs.length; j++){ - if(locked_tabs\[j\]==id){ + if(locked_tabs\[j\] == id){ pass = 0; break; } @@ -142,7 +142,7 @@ var pass = 1; for(var j = 0; j < locked_tabs.length; j++){ - if(locked_tabs\[j\]==id){ + if(locked_tabs\[j\] == id){ pass = 0; break; } @@ -163,7 +163,7 @@ var index = 0; var pass = 0; for(var j = 0; j < locked_tabs.length; j++){ - if(locked_tabs\[j\]==id){ + if(locked_tabs\[j\] == id){ pass = 1; index = j; break; diff --git a/code/modules/admin/sql_message_system.dm b/code/modules/admin/sql_message_system.dm index 4a89d434fdf..9bb4ac74bc3 100644 --- a/code/modules/admin/sql_message_system.dm +++ b/code/modules/admin/sql_message_system.dm @@ -527,7 +527,7 @@ if(!linkless) if(type == "note") if(severity) - data += "[severity=="none" ? "No" : "[capitalize(severity)]"] Severity" + data += "[severity == "none" ? "No" : "[capitalize(severity)]"] Severity" else data += "N/A Severity" data += " Change Expiry Time" diff --git a/code/modules/admin/verbs/admingame.dm b/code/modules/admin/verbs/admingame.dm index 5bb9b2d4d9e..87734493a7c 100644 --- a/code/modules/admin/verbs/admingame.dm +++ b/code/modules/admin/verbs/admingame.dm @@ -193,7 +193,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something //check if they were a monkey if(findtext(G_found.real_name,"monkey")) - if(tgui_alert(usr,"This character appears to have been a monkey. Would you like to respawn them as such?",,list("Yes","No"))=="Yes") + if(tgui_alert(usr,"This character appears to have been a monkey. Would you like to respawn them as such?",,list("Yes","No")) == "Yes") var/mob/living/carbon/human/species/monkey/new_monkey = new SSjob.SendToLateJoin(new_monkey) G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use @@ -284,10 +284,10 @@ Traitors and the like can also be revived with the previous role mostly intact. //Announces the character on all the systems, based on the record. if(!record_found && (new_character.mind.assigned_role.job_flags & JOB_CREW_MEMBER)) //Power to the user! - if(tgui_alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,list("No","Yes"))=="Yes") + if(tgui_alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,list("No","Yes")) == "Yes") GLOB.data_core.manifest_inject(new_character, src) // SKYRAT EDIT CHANGE - ALTERNATIVE_JOB_TITLES - Original: GLOB.data_core.manifest_inject(new_character) - if(tgui_alert(new_character,"Would you like an active AI to announce this character?",,list("No","Yes"))=="Yes") + if(tgui_alert(new_character,"Would you like an active AI to announce this character?",,list("No","Yes")) == "Yes") announce_arrival(new_character, new_character.mind.assigned_role.title) var/msg = span_adminnotice("[admin] has respawned [player_key] as [new_character.real_name].") diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 2a42f9fd5ae..02d2f3fe430 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -1020,7 +1020,7 @@ GLOBAL_DATUM_INIT(admin_help_ui_handler, /datum/admin_help_ui_handler, new) var/list/L = splittext(string, " ") var/surname_found = 0 //surnames - for(var/i=L.len, i>=1, i--) + for(var/i=L.len, i >= 1, i--) var/word = ckey(L[i]) if(word) surnames[word] = M diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index 69a98ad42f7..cef43970e23 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -75,7 +75,7 @@ return var/confirm = tgui_alert(usr, "Are you sure you want to reload all admins?", "Confirm", list("Yes", "No")) - if(confirm !="Yes") + if(confirm != "Yes") return load_admins() diff --git a/code/modules/admin/verbs/secrets.dm b/code/modules/admin/verbs/secrets.dm index 428ba61bd7c..d867d06f035 100644 --- a/code/modules/admin/verbs/secrets.dm +++ b/code/modules/admin/verbs/secrets.dm @@ -485,7 +485,7 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller) var/animetype = tgui_alert(usr,"Would you like to have the clothes be changed?",,list("Yes","No","Cancel")) var/droptype - if(animetype =="Yes") + if(animetype == "Yes") droptype = tgui_alert(usr,"Make the uniforms Nodrop?",,list("Yes","No","Cancel")) if(animetype == "Cancel" || droptype == "Cancel") diff --git a/code/modules/admin/view_variables/view_variables.dm b/code/modules/admin/view_variables/view_variables.dm index 9061cfe4501..2db59be5b38 100644 --- a/code/modules/admin/view_variables/view_variables.dm +++ b/code/modules/admin/view_variables/view_variables.dm @@ -123,8 +123,8 @@ var ca = document.cookie.split(';'); for(var i=0; i1) ratio = 1 uses -= round(overall_damage) - H.visible_message(span_warning("[H] is fully healed by [H==user ? "[H.p_their()]":"[H]'s"] blood magic!")) + H.visible_message(span_warning("[H] is fully healed by [H == user ? "[H.p_their()]":"[H]'s"] blood magic!")) else - H.visible_message(span_warning("[H] is partially healed by [H==user ? "[H.p_their()]":"[H]'s"] blood magic.")) + H.visible_message(span_warning("[H] is partially healed by [H == user ? "[H.p_their()]":"[H]'s"] blood magic.")) uses = 0 ratio *= -1 H.adjustOxyLoss((overall_damage*ratio) * (H.getOxyLoss() / overall_damage), 0) diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm index ab8c354273e..4f681b69321 100644 --- a/code/modules/antagonists/cult/runes.dm +++ b/code/modules/antagonists/cult/runes.dm @@ -1011,7 +1011,7 @@ structure_check() searches for nearby cultist structures required for the invoca to_chat(M, span_cultlarge("An Apocalypse Rune was invoked in the [place.name], it is no longer available as a summoning site!")) SEND_SOUND(M, 'sound/effects/pope_entry.ogg') image_handler(images, duration) - if(intensity>=285) // Based on the prior formula, this means the cult makes up <15% of current players + if(intensity >= 285) // Based on the prior formula, this means the cult makes up <15% of current players var/outcome = rand(1,100) switch(outcome) if(1 to 10) diff --git a/code/modules/antagonists/heretic/magic/flesh_surgery.dm b/code/modules/antagonists/heretic/magic/flesh_surgery.dm index 9f09ee7636c..d561a741a1f 100644 --- a/code/modules/antagonists/heretic/magic/flesh_surgery.dm +++ b/code/modules/antagonists/heretic/magic/flesh_surgery.dm @@ -221,7 +221,7 @@ /// Extra checks ran while we're healing something (organ, mob). /datum/action/cooldown/spell/touch/flesh_surgery/proc/heal_checks(obj/item/melee/touch_attack/hand, atom/healing, mob/living/carbon/caster) - if(QDELETED(src) || QDELETED(hand) ||QDELETED(healing) || !IsAvailable()) + if(QDELETED(src) || QDELETED(hand) || QDELETED(healing) || !IsAvailable()) return FALSE return TRUE diff --git a/code/modules/antagonists/morph/morph.dm b/code/modules/antagonists/morph/morph.dm index 548df16fa1b..e4981489622 100644 --- a/code/modules/antagonists/morph/morph.dm +++ b/code/modules/antagonists/morph/morph.dm @@ -51,7 +51,7 @@ /mob/living/simple_animal/hostile/morph/examine(mob/user) if(morphed) . = form.examine(user) - if(get_dist(user,src)<=3) + if(get_dist(user,src) <= 3) . += span_warning("It doesn't look quite right...") else . = ..() diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index 7befdd68719..6ffe77d20a9 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -163,13 +163,13 @@ if(bomb_mixture.temperature > (T0C + 400)) strength = (fuel_moles/15) - if(strength >=2) + if(strength >= 2) explosion(ground_zero, devastation_range = round(strength,1), heavy_impact_range = round(strength*2,1), light_impact_range = round(strength*3,1), flash_range = round(strength*4,1), explosion_cause = src) - else if(strength >=1) + else if(strength >= 1) explosion(ground_zero, devastation_range = round(strength,1), heavy_impact_range = round(strength*2,1), light_impact_range = round(strength*2,1), flash_range = round(strength*3,1), explosion_cause = src) - else if(strength >=0.5) + else if(strength >= 0.5) explosion(ground_zero, heavy_impact_range = 1, light_impact_range = 2, flash_range = 4, explosion_cause = src) - else if(strength >=0.2) + else if(strength >= 0.2) explosion(ground_zero, devastation_range = -1, light_impact_range = 1, flash_range = 2, explosion_cause = src) else ground_zero.assume_air(bomb_mixture) @@ -178,9 +178,9 @@ else if(bomb_mixture.temperature > (T0C + 250)) strength = (fuel_moles/20) - if(strength >=1) + if(strength >= 1) explosion(ground_zero, heavy_impact_range = round(strength,1), light_impact_range = round(strength*2,1), flash_range = round(strength*3,1), explosion_cause = src) - else if(strength >=0.5) + else if(strength >= 0.5) explosion(ground_zero, devastation_range = -1, light_impact_range = 1, flash_range = 2, explosion_cause = src) else ground_zero.assume_air(bomb_mixture) @@ -189,7 +189,7 @@ else if(bomb_mixture.temperature > (T0C + 100)) strength = (fuel_moles/25) - if(strength >=1) + if(strength >= 1) explosion(ground_zero, devastation_range = -1, light_impact_range = round(strength,1), flash_range = round(strength*3,1), explosion_cause = src) else ground_zero.assume_air(bomb_mixture) diff --git a/code/modules/atmospherics/gasmixtures/gas_types.dm b/code/modules/atmospherics/gasmixtures/gas_types.dm index a977e92a63a..8747125c5d0 100644 --- a/code/modules/atmospherics/gasmixtures/gas_types.dm +++ b/code/modules/atmospherics/gasmixtures/gas_types.dm @@ -40,10 +40,10 @@ /*||||||||||||||/----------\||||||||||||||*\ ||||||||||||||||[GAS DATUMS]|||||||||||||||| ||||||||||||||||\__________/|||||||||||||||| -||||These should never be instantiated. |||| -||||They exist only to make it easier |||| -||||to add a new gas. They are accessed |||| -||||only by meta_gas_list(). |||| +|||| These should never be instantiated. |||| +|||| They exist only to make it easier |||| +|||| to add a new gas. They are accessed |||| +|||| only by meta_gas_list(). |||| \*||||||||||||||||||||||||||||||||||||||||*/ //This is a plot created using the values for gas exports. Each gas has a value that works as it's kind of soft-cap, which limits you from making billions of credits per sale, based on the base_value variable on the gasses themselves. Most of these gasses as a result have a rather low value when sold, like nitrogen and oxygen at 1500 and 600 respectively at their maximum value. The diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index 500744fb97b..153af1fa125 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -60,7 +60,7 @@ var/input_starting_pressure = air1.return_pressure() var/output_starting_pressure = air2.return_pressure() - if((input_starting_pressure < 0.01) || ((output_starting_pressure > 9000))&&!overclocked) + if((input_starting_pressure < 0.01) || ((output_starting_pressure > 9000)) && !overclocked) return if(overclocked && (output_starting_pressure-input_starting_pressure > 1000))//Overclocked pumps can only force gas a certain amount. diff --git a/code/modules/capture_the_flag/ctf_map_loading.dm b/code/modules/capture_the_flag/ctf_map_loading.dm index 6d7cf28c3c6..02daaeb8af3 100644 --- a/code/modules/capture_the_flag/ctf_map_loading.dm +++ b/code/modules/capture_the_flag/ctf_map_loading.dm @@ -48,7 +48,7 @@ GLOBAL_DATUM(ctf_spawner, /obj/effect/landmark/ctf) else current_map = map_choices[chosen_map] - if(!user || chosen_map=="Random") + if(!user || chosen_map == "Random") current_map = pick(map_options) current_map = new current_map() diff --git a/code/modules/cargo/centcom_podlauncher.dm b/code/modules/cargo/centcom_podlauncher.dm index 8c25da21cf2..8c44b41682f 100644 --- a/code/modules/cargo/centcom_podlauncher.dm +++ b/code/modules/cargo/centcom_podlauncher.dm @@ -715,7 +715,7 @@ launchList |= typecache_filter_list_reverse(acceptable_turf.contents, ignored_atoms) //filter a random turf from the acceptableTurfs list and add it to the launchList if (iswallturf(acceptable_turf)) launchList += acceptable_turf - updateSelector() //Call updateSelector(), which, if we are launching one at a time (launchChoice==2), will move to the next turf that will be launched + updateSelector() //Call updateSelector(), which, if we are launching one at a time (launchChoice == 2), will move to the next turf that will be launched //UpdateSelector() is here (instead if the if(1) switch block) because it also moves the selector to nullspace (to hide it) if needed /datum/centcom_podlauncher/proc/launch(turf/target_turf) //Game time started diff --git a/code/modules/cargo/exports.dm b/code/modules/cargo/exports.dm index 0350175023e..31cb255cbbb 100644 --- a/code/modules/cargo/exports.dm +++ b/code/modules/cargo/exports.dm @@ -104,7 +104,7 @@ Then the player gets the profit from selling his own wasted time. /datum/export/proc/get_cost(obj/O, apply_elastic = TRUE) var/amount = get_amount(O) if(apply_elastic) - if(k_elasticity!=0) + if(k_elasticity != 0) return round((cost/k_elasticity) * (1 - NUM_E**(-1 * k_elasticity * amount))) //anti-derivative of the marginal cost function else return round(cost * amount) //alternative form derived from L'Hopital to avoid division by 0 diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index bc776962f9e..ebe0e5d8424 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -469,13 +469,13 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( if (CONFIG_GET(flag/irc_first_connection_alert)) send2tgs_adminless_only("New-user", "[key_name(src)] is connecting for the first time!") else if (isnum(cached_player_age) && cached_player_age < nnpa) - message_admins("New user: [key_name_admin(src)] just connected with an age of [cached_player_age] day[(player_age==1?"":"s")]") + message_admins("New user: [key_name_admin(src)] just connected with an age of [cached_player_age] day[(player_age == 1?"":"s")]") if(CONFIG_GET(flag/use_account_age_for_jobs) && account_age >= 0) player_age = account_age if(account_age >= 0 && account_age < nnpa) - message_admins("[key_name_admin(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age==1?"":"s")] old, created on [account_join_date].") + message_admins("[key_name_admin(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age == 1?"":"s")] old, created on [account_join_date].") if (CONFIG_GET(flag/irc_first_connection_alert)) - send2tgs_adminless_only("new_byond_user", "[key_name(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age==1?"":"s")] old, created on [account_join_date].") + send2tgs_adminless_only("new_byond_user", "[key_name(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age == 1?"":"s")] old, created on [account_join_date].") get_message_output("watchlist entry", ckey) check_ip_intel() validate_key_in_db() diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 10f59091243..bce9abd251a 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -11,7 +11,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn This proc checks if the current directory of the savefile S needs updating It is to be used by the load_character and load_preferences procs. - (S.cd=="/" is preferences, S.cd=="/character[integer]" is a character slot, etc) + (S.cd == "/" is preferences, S.cd == "/character[integer]" is a character slot, etc) if the current directory's version is below SAVEFILE_VERSION_MIN it will simply wipe everything in that directory (if we're at root "/" then it'll just wipe the entire savefile, for instance.) diff --git a/code/modules/food_and_drinks/machinery/gibber.dm b/code/modules/food_and_drinks/machinery/gibber.dm index 04a04d6c8cc..e18841c6e6f 100644 --- a/code/modules/food_and_drinks/machinery/gibber.dm +++ b/code/modules/food_and_drinks/machinery/gibber.dm @@ -85,7 +85,7 @@ to_chat(user, span_warning("This item is not suitable for [src]!")) return var/mob/living/carbon/C = L - if(C.buckled ||C.has_buckled_mobs()) + if(C.buckled || C.has_buckled_mobs()) to_chat(user, span_warning("[C] is attached to something!")) return diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 000eabb1716..dde07f6090b 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -375,7 +375,7 @@ if(pestlevel >= 8) if(!myseed.get_gene(/datum/plant_gene/trait/carnivory)) - if(myseed.potency >=30) + if(myseed.potency >= 30) myseed.adjust_potency(-rand(2,6)) //Pests eat leaves and nibble on fruit, lowering potency. myseed.set_potency(min((myseed.potency), CARNIVORY_POTENCY_MIN, MAX_PLANT_POTENCY)) else @@ -384,7 +384,7 @@ else if(pestlevel >= 4) if(!myseed.get_gene(/datum/plant_gene/trait/carnivory)) - if(myseed.potency >=30) + if(myseed.potency >= 30) myseed.adjust_potency(-rand(1,4)) myseed.set_potency(min((myseed.potency), CARNIVORY_POTENCY_MIN, MAX_PLANT_POTENCY)) @@ -399,7 +399,7 @@ // If it's a weed, it doesn't stunt the growth if(weedlevel >= 5 && !myseed.get_gene(/datum/plant_gene/trait/plant_type/weed_hardy)) - if(myseed.yield >=3) + if(myseed.yield >= 3) myseed.adjust_yield(-rand(1,2)) //Weeds choke out the plant's ability to bear more fruit. myseed.set_yield(min((myseed.yield), WEED_HARDY_YIELD_MIN, MAX_PLANT_YIELD)) diff --git a/code/modules/language/language.dm b/code/modules/language/language.dm index 963249ab5ea..6c446f1dae6 100644 --- a/code/modules/language/language.dm +++ b/code/modules/language/language.dm @@ -39,7 +39,7 @@ /datum/language/proc/get_random_name(gender, name_count=2, syllable_count=4, syllable_divisor=2) if(!syllables || !syllables.len) - if(gender==FEMALE) + if(gender == FEMALE) return capitalize(pick(GLOB.first_names_female)) + " " + capitalize(pick(GLOB.last_names)) else return capitalize(pick(GLOB.first_names_male)) + " " + capitalize(pick(GLOB.last_names)) diff --git a/code/modules/meteors/meteors.dm b/code/modules/meteors/meteors.dm index 800915df346..76d7b04e64b 100644 --- a/code/modules/meteors/meteors.dm +++ b/code/modules/meteors/meteors.dm @@ -50,7 +50,7 @@ GLOBAL_LIST_INIT(meteors_sandstorm, list(/obj/effect/meteor/sand=45, /obj/effect picked_start = spaceDebrisStartLoc(start_side, start_Z) picked_goal = spaceDebrisFinishLoc(start_side, start_Z) max_i-- - if(max_i<=0) + if(max_i <= 0) return var/new_meteor = pick_weight(meteor_types) new new_meteor(picked_start, picked_goal) diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 976fdc38e2f..4331a2860d8 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -14,7 +14,7 @@ if(status_flags & GODMODE) return if(stat != DEAD) - if(health<= -maxHealth || !getorgan(/obj/item/organ/internal/brain)) + if(health <= -maxHealth || !getorgan(/obj/item/organ/internal/brain)) death() return if((HAS_TRAIT(src, TRAIT_KNOCKEDOUT))) diff --git a/code/modules/mob/living/carbon/alien/organs.dm b/code/modules/mob/living/carbon/alien/organs.dm index 65c477925a7..aa0364b94ed 100644 --- a/code/modules/mob/living/carbon/alien/organs.dm +++ b/code/modules/mob/living/carbon/alien/organs.dm @@ -109,7 +109,7 @@ //When the alien queen dies, all aliens suffer a penalty as punishment for failing to protect her. /obj/item/organ/internal/alien/hivenode/proc/queen_death() - if(!owner|| owner.stat == DEAD) + if(!owner || owner.stat == DEAD) return if(isalien(owner)) //Different effects for aliens than humans to_chat(owner, span_userdanger("Your Queen has been struck down!")) diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index a0f7c4c24d1..f3f2304bc3e 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -59,7 +59,7 @@ msg += "[capitalize(t_his)] [BP.name] is [damage_text]!\n" for(var/t in missing) - if(t==BODY_ZONE_HEAD) + if(t == BODY_ZONE_HEAD) msg += "[span_deadsay("[t_His] [parse_zone(t)] is missing!")]\n" continue msg += "[span_warning("[t_His] [parse_zone(t)] is missing!")]\n" diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index ea513d899e5..30a8b1ec003 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -201,7 +201,7 @@ var/l_limbs_missing = 0 var/r_limbs_missing = 0 for(var/t in missing) - if(t==BODY_ZONE_HEAD) + if(t == BODY_ZONE_HEAD) msg += "[t_His] [parse_zone(t)] is missing!\n" continue if(t == BODY_ZONE_L_ARM || t == BODY_ZONE_L_LEG) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index f907c033a23..2cd4530dfb4 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -456,7 +456,7 @@ //Check for ID var/obj/item/card/id/idcard = get_idcard(FALSE) - if( (judgement_criteria & JUDGE_IDCHECK) && !idcard && name=="Unknown") + if( (judgement_criteria & JUDGE_IDCHECK) && !idcard && name == "Unknown") threatcount += 4 //Check for weapons diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 364ecf2b2e5..5de0594e7c9 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -159,7 +159,7 @@ if(M.pulledby == src && !too_strong) mob_swap = TRUE else if( - !(HAS_TRAIT(M, TRAIT_NOMOBSWAP) || HAS_TRAIT(src, TRAIT_NOMOBSWAP))&&\ + !(HAS_TRAIT(M, TRAIT_NOMOBSWAP) || HAS_TRAIT(src, TRAIT_NOMOBSWAP)) &&\ ((HAS_TRAIT(M, TRAIT_RESTRAINED) && !too_strong) || !their_combat_mode) &&\ (HAS_TRAIT(src, TRAIT_RESTRAINED) || !combat_mode) ) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index f6df60b125c..14fc8d21dc6 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -3,7 +3,7 @@ //Not sure why this is necessary... /proc/AutoUpdateAI(obj/subject) var/is_in_use = 0 - if (subject!=null) + if (subject != null) for(var/A in GLOB.ai_list) var/mob/living/silicon/ai/M = A if ((M.client && M.machine == subject)) @@ -1007,7 +1007,7 @@ for(var/borgie in GLOB.available_ai_shells) var/mob/living/silicon/robot/R = borgie - if(R.shell && !R.deployed && (R.stat != DEAD) && (!R.connected_ai ||(R.connected_ai == src))) + if(R.shell && !R.deployed && (R.stat != DEAD) && (!R.connected_ai || (R.connected_ai == src))) possible += R if(!LAZYLEN(possible)) @@ -1018,7 +1018,7 @@ if(isnull(target)) return - if (target.stat == DEAD || target.deployed || !(!target.connected_ai ||(target.connected_ai == src))) + if (target.stat == DEAD || target.deployed || !(!target.connected_ai || (target.connected_ai == src))) return else if(mind) @@ -1123,6 +1123,6 @@ /mob/living/silicon/ai/GetVoice() . = ..() - if(ai_voicechanger&&ai_voicechanger.changing_voice) + if(ai_voicechanger && ai_voicechanger.changing_voice) return ai_voicechanger.say_name return diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 4e331d9251e..0c2e14ea026 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -110,7 +110,7 @@ var/obj/machinery/power/apc/theAPC = null var/PRP //like ERP with the code, at least this stuff is no more 4x sametext - for (PRP=1, PRP<=4, PRP++) + for (PRP=1, PRP <= 4, PRP++) T = get_turf(src) AIarea = get_area(src) if(AIarea) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 9939c85ac39..d09f70deed0 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -564,7 +564,7 @@ new /obj/item/bodypart/arm/right/robot(T) new /obj/item/bodypart/head/robot(T) var/b - for(b=0, b!=2, b++) + for(b=0, b != 2, b++) var/obj/item/assembly/flash/handheld/F = new /obj/item/assembly/flash/handheld(T) F.burn_out() if (cell) //Sanity check. diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index 6b7484cbc4c..229d3f225ee 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -425,7 +425,7 @@ /mob/living/simple_animal/bot/cleanbot/ui_data(mob/user) var/list/data = ..() - if(!(bot_cover_flags & BOT_COVER_LOCKED) || issilicon(user)|| isAdminGhostAI(user)) + if(!(bot_cover_flags & BOT_COVER_LOCKED) || issilicon(user) || isAdminGhostAI(user)) data["custom_controls"]["clean_blood"] = janitor_mode_flags & CLEANBOT_CLEAN_BLOOD data["custom_controls"]["clean_trash"] = janitor_mode_flags & CLEANBOT_CLEAN_TRASH data["custom_controls"]["clean_graffiti"] = janitor_mode_flags & CLEANBOT_CLEAN_DRAWINGS diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 6d586393a4d..b252a978107 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -528,7 +528,7 @@ return var/oldloc = loc var/moved = step_towards(src, next) // attempt to move - if(moved && oldloc!=loc) // successful move + if(moved && oldloc != loc) // successful move SEND_SIGNAL(src, COMSIG_MOB_BOT_STEP) blockcount = 0 path -= loc diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index a91f968e2d2..62f1244e1f3 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -51,7 +51,7 @@ return plant_cooldown-- if(AIStatus == AI_IDLE) - if(!plants_off && prob(10) && plant_cooldown<=0) + if(!plants_off && prob(10) && plant_cooldown <= 0) plant_cooldown = initial(plant_cooldown) SpreadPlants() @@ -101,10 +101,10 @@ egg_cooldown-- plant_cooldown-- if(AIStatus == AI_IDLE) - if(!plants_off && prob(10) && plant_cooldown<=0) + if(!plants_off && prob(10) && plant_cooldown <= 0) plant_cooldown = initial(plant_cooldown) SpreadPlants() - if(!sterile && prob(10) && egg_cooldown<=0) + if(!sterile && prob(10) && egg_cooldown <= 0) egg_cooldown = initial(egg_cooldown) LayEggs() diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 9bf174d8e09..d19048c5b2d 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -278,7 +278,7 @@ var/obj/machinery/porta_turret/P = the_target if(P.in_faction(src)) //Don't attack if the turret is in the same faction return FALSE - if(P.has_cover &&!P.raised) //Don't attack invincible turrets + if(P.has_cover && !P.raised) //Don't attack invincible turrets return FALSE if(P.machine_stat & BROKEN) //Or turrets that are already broken return FALSE diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm index 845556cf2bb..87a1413c884 100644 --- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -194,7 +194,7 @@ /mob/living/simple_animal/hostile/mushroom/harvest() var/counter - for(counter=0, counter<=powerlevel, counter++) + for(counter=0, counter <= powerlevel, counter++) var/obj/item/food/hugemushroomslice/S = new /obj/item/food/hugemushroomslice(src.loc) S.reagents.add_reagent(/datum/reagent/drug/mushroomhallucinogen, powerlevel) S.reagents.add_reagent(/datum/reagent/medicine/omnizine, powerlevel) diff --git a/code/modules/mob/living/simple_animal/hostile/regalrat.dm b/code/modules/mob/living/simple_animal/hostile/regalrat.dm index 41c228e2650..cb8105da2b1 100644 --- a/code/modules/mob/living/simple_animal/hostile/regalrat.dm +++ b/code/modules/mob/living/simple_animal/hostile/regalrat.dm @@ -118,7 +118,7 @@ if(stat == DEAD || !environment || !environment.gases[/datum/gas/miasma]) return var/miasma_percentage = environment.gases[/datum/gas/miasma][MOLES] / environment.total_moles() - if(miasma_percentage>=0.25) + if(miasma_percentage >= 0.25) heal_bodypart_damage(1) #define REGALRAT_INTERACTION "regalrat" diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 24f2caa7b63..13f70bd0587 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -694,7 +694,7 @@ /mob/proc/spin(spintime, speed) set waitfor = 0 var/D = dir - if((spintime < 1)||(speed < 1)||!spintime||!speed) + if((spintime < 1) || (speed < 1) || !spintime || !speed) return flags_1 |= IS_SPINNING_1 diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index ac07fe69cac..7e3ed64bd3e 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -374,7 +374,7 @@ /mob/proc/click_random_mob() var/list/nearby_mobs = list() for(var/mob/living/L in range(1, src)) - if(L!=src) + if(L != src) nearby_mobs |= L if(nearby_mobs.len) var/mob/living/T = pick(nearby_mobs) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 972232a5907..a07a241db13 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -244,7 +244,7 @@ for(var/turf/T in get_line(mobloc, L.loc)) new /obj/effect/temp_visual/dir_setting/ninja/shadow(T, L.dir) limit-- - if(limit<=0) + if(limit <= 0) break else new /obj/effect/temp_visual/dir_setting/ninja/shadow(mobloc, L.dir) diff --git a/code/modules/photography/camera/camera.dm b/code/modules/photography/camera/camera.dm index 3e1c7f87856..b0637cea1a6 100644 --- a/code/modules/photography/camera/camera.dm +++ b/code/modules/photography/camera/camera.dm @@ -66,7 +66,7 @@ if(!desired_x || QDELETED(user) || QDELETED(src) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE) || loc != user) return FALSE var/desired_y = tgui_input_number(user, "How high do you want the camera to shoot", "Zoom", picture_size_y, picture_size_y_max, picture_size_y_min) - if(!desired_y|| QDELETED(user) || QDELETED(src) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE) || loc != user) + if(!desired_y || QDELETED(user) || QDELETED(src) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE) || loc != user) return FALSE picture_size_x = min(clamp(desired_x, picture_size_x_min, picture_size_x_max), CAMERA_PICTURE_SIZE_HARD_LIMIT) picture_size_y = min(clamp(desired_y, picture_size_y_min, picture_size_y_max), CAMERA_PICTURE_SIZE_HARD_LIMIT) diff --git a/code/modules/power/apc/apc_attack.dm b/code/modules/power/apc/apc_attack.dm index c7ee35837b2..87329410815 100644 --- a/code/modules/power/apc/apc_attack.dm +++ b/code/modules/power/apc/apc_attack.dm @@ -136,10 +136,10 @@ return if(istype(attacking_object, /obj/item/wallframe/apc) && opened) - if(!(machine_stat & BROKEN || opened==APC_COVER_REMOVED || atom_integrity < max_integrity)) // There is nothing to repair + if(!(machine_stat & BROKEN || opened == APC_COVER_REMOVED || atom_integrity < max_integrity)) // There is nothing to repair balloon_alert(user, "no reason for repairs!") return - if(!(machine_stat & BROKEN) && opened==APC_COVER_REMOVED) // Cover is the only thing broken, we do not need to remove elctronicks to replace cover + if(!(machine_stat & BROKEN) && opened == APC_COVER_REMOVED) // Cover is the only thing broken, we do not need to remove elctronicks to replace cover user.visible_message(span_notice("[user.name] replaces missing APC's cover.")) balloon_alert(user, "replacing APC's cover...") if(do_after(user, 20, target = src)) // replacing cover is quicker than replacing whole frame @@ -158,7 +158,7 @@ qdel(attacking_object) set_machine_stat(machine_stat & ~BROKEN) atom_integrity = max_integrity - if(opened==APC_COVER_REMOVED) + if(opened == APC_COVER_REMOVED) opened = APC_COVER_OPENED update_appearance() return @@ -286,7 +286,7 @@ return TRUE var/mob/living/silicon/ai/AI = user var/mob/living/silicon/robot/robot = user - if(aidisabled || malfhack && istype(malfai) && ((istype(AI) && (malfai!=AI && malfai != AI.parent)) || (istype(robot) && (robot in malfai.connected_robots)))) + if(aidisabled || malfhack && istype(malfai) && ((istype(AI) && (malfai != AI && malfai != AI.parent)) || (istype(robot) && (robot in malfai.connected_robots)))) if(!loud) balloon_alert(user, "it's disabled!") return FALSE diff --git a/code/modules/power/apc/apc_main.dm b/code/modules/power/apc/apc_main.dm index 66fe212eaba..cc2c138f656 100644 --- a/code/modules/power/apc/apc_main.dm +++ b/code/modules/power/apc/apc_main.dm @@ -236,7 +236,7 @@ return if(opened) if(has_electronics && terminal) - . += "The cover is [opened==APC_COVER_REMOVED?"removed":"open"] and the power cell is [ cell ? "installed" : "missing"]." + . += "The cover is [opened == APC_COVER_REMOVED?"removed":"open"] and the power cell is [ cell ? "installed" : "missing"]." else . += {"It's [ !terminal ? "not" : "" ] wired up.\n The electronics are[!has_electronics?"n't":""] installed."} diff --git a/code/modules/power/apc/apc_tool_act.dm b/code/modules/power/apc/apc_tool_act.dm index 713d2908256..f857e1946f5 100644 --- a/code/modules/power/apc/apc_tool_act.dm +++ b/code/modules/power/apc/apc_tool_act.dm @@ -110,7 +110,7 @@ balloon_alert(user, "welding the APC frame") if(!welder.use_tool(src, user, 50, volume=50, amount=3)) return - if((machine_stat & BROKEN) || opened==APC_COVER_REMOVED) + if((machine_stat & BROKEN) || opened == APC_COVER_REMOVED) new /obj/item/stack/sheet/iron(loc) user.visible_message(span_notice("[user.name] cuts [src] apart with [welder].")) balloon_alert(user, "disassembled the broken frame") diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 40dac3f8bcb..e13aec99be5 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -369,7 +369,7 @@ /obj/singularity/proc/can_move(turf/considered_turf) if(!considered_turf) return FALSE - if((locate(/obj/machinery/field/containment) in considered_turf)||(locate(/obj/machinery/shieldwall) in considered_turf)) + if((locate(/obj/machinery/field/containment) in considered_turf) || (locate(/obj/machinery/shieldwall) in considered_turf)) return FALSE else if(locate(/obj/machinery/field/generator) in considered_turf) var/obj/machinery/field/generator/check_generator = locate(/obj/machinery/field/generator) in considered_turf diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index 74b279a4a3e..c8cc5eb7824 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -317,7 +317,7 @@ // This checks that the user isn't on the station Z-level. /obj/item/firing_pin/explorer/pin_auth(mob/living/user) var/turf/station_check = get_turf(user) - if(!station_check||is_station_level(station_check.z)) + if(!station_check || is_station_level(station_check.z)) return FALSE return TRUE diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index fd86648082e..1b622c900aa 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -308,7 +308,7 @@ var/limb_hit = hit_limb if(limb_hit) organ_hit_text = " in \the [parse_zone(limb_hit)]" - if(suppressed==SUPPRESSED_VERY) + if(suppressed == SUPPRESSED_VERY) playsound(loc, hitsound, 5, TRUE, -1) else if(suppressed) playsound(loc, hitsound, 5, TRUE, -1) diff --git a/code/modules/projectiles/projectile/special/gravity.dm b/code/modules/projectiles/projectile/special/gravity.dm index 6e16137146b..f7f668f656e 100644 --- a/code/modules/projectiles/projectile/special/gravity.dm +++ b/code/modules/projectiles/projectile/special/gravity.dm @@ -90,7 +90,7 @@ . = ..() T = get_turf(src) for(var/atom/movable/A in range(T, power)) - if(A == src|| (firer && A == src.firer) || A.anchored || thrown_items[A]) + if(A == src || (firer && A == src.firer) || A.anchored || thrown_items[A]) continue if(ismob(A)) var/mob/M = A diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index c4cff0d1b1a..9f99f61a8dd 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -353,7 +353,7 @@ . = ..() if(!istype(exposed_turf)) return - if(reac_volume>=10) + if(reac_volume >= 10) for(var/obj/effect/rune/R in exposed_turf) qdel(R) exposed_turf.Bless() @@ -523,7 +523,7 @@ var/len = length(string) var/char = "" var/ascii = 0 - for(var/i=1, i<=len, i += length(char)) + for(var/i=1, i <= len, i += length(char)) char = string[i] ascii = text2ascii(char) switch(ascii) diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 72fe3806408..c12ab614751 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -755,7 +755,7 @@ return if(prompted || !ismob(switchy_mob)) return - if(!(isanimal(switchy_mob) || isbasicmob(switchy_mob))|| switchy_mob.ckey) //much like sentience, these will not work on something that is already player controlled + if(!(isanimal(switchy_mob) || isbasicmob(switchy_mob)) || switchy_mob.ckey) //much like sentience, these will not work on something that is already player controlled to_chat(user, span_warning("[switchy_mob] already has a higher consciousness!")) return ..() if(switchy_mob.stat) @@ -781,7 +781,7 @@ return prompted = 1 - if(tgui_alert(usr,"This will permanently transfer your consciousness to [switchy_mob]. Are you sure you want to do this?",,list("Yes","No"))=="No") + if(tgui_alert(usr,"This will permanently transfer your consciousness to [switchy_mob]. Are you sure you want to do this?",,list("Yes","No")) == "No") prompted = 0 return diff --git a/code/modules/shuttle/shuttle_rotate.dm b/code/modules/shuttle/shuttle_rotate.dm index a7ea83579e6..734e2337df5 100644 --- a/code/modules/shuttle/shuttle_rotate.dm +++ b/code/modules/shuttle/shuttle_rotate.dm @@ -33,7 +33,7 @@ If ever any of these procs are useful for non-shuttles, rename it to proc/rotate //Owerride non zero bound_x, bound_y, pixel_x, pixel_y to zero. //Dont take in account starting bound_x, bound_y, pixel_x, pixel_y. //So it can unintentionally shift physical bounds of things that starts with non zero bound_x, bound_y. - if(((bound_height != world.icon_size) || (bound_width != world.icon_size)) && (bound_x==0) && (bound_y==0)) //Dont shift things that have non zero bound_x and bound_y, or it move somewhere. Now it BSA and Gateway. + if(((bound_height != world.icon_size) || (bound_width != world.icon_size)) && (bound_x == 0) && (bound_y == 0)) //Dont shift things that have non zero bound_x and bound_y, or it move somewhere. Now it BSA and Gateway. pixel_x = dir & (NORTH|EAST) ? -bound_width+world.icon_size : 0 pixel_y = dir & (NORTH|WEST) ? -bound_width+world.icon_size : 0 bound_x = pixel_x diff --git a/code/modules/spells/spell_types/self/personality_commune.dm b/code/modules/spells/spell_types/self/personality_commune.dm index aef16cab31a..a5b969b5bef 100644 --- a/code/modules/spells/spell_types/self/personality_commune.dm +++ b/code/modules/spells/spell_types/self/personality_commune.dm @@ -30,7 +30,7 @@ return . | SPELL_CANCEL_CAST to_send = tgui_input_text(cast_on, "What would you like to tell your other self?", "Commune") - if(QDELETED(src) || QDELETED(trauma)|| QDELETED(cast_on) || QDELETED(trauma.owner) || !can_cast_spell()) + if(QDELETED(src) || QDELETED(trauma) || QDELETED(cast_on) || QDELETED(trauma.owner) || !can_cast_spell()) return . | SPELL_CANCEL_CAST if(!to_send) reset_cooldown() diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm index ee692f83046..785dc7796aa 100644 --- a/code/modules/station_goals/dna_vault.dm +++ b/code/modules/station_goals/dna_vault.dm @@ -190,7 +190,7 @@ /obj/machinery/dna_vault/proc/upgrade(mob/living/carbon/human/H, upgrade_type) var/datum/weakref/human_weakref = WEAKREF(H) - if(!(upgrade_type in power_lottery[human_weakref])||(HAS_TRAIT(H, TRAIT_USED_DNA_VAULT))) + if(!(upgrade_type in power_lottery[human_weakref]) || (HAS_TRAIT(H, TRAIT_USED_DNA_VAULT))) return var/datum/species/S = H.dna.species switch(upgrade_type) diff --git a/code/modules/surgery/organic_steps.dm b/code/modules/surgery/organic_steps.dm index 91a55805da4..53bafa54810 100644 --- a/code/modules/surgery/organic_steps.dm +++ b/code/modules/surgery/organic_steps.dm @@ -156,7 +156,7 @@ /obj/item/fireaxe = 50, /obj/item/hatchet = 35, /obj/item/knife/butcher = 25, - /obj/item = 20) //20% success (sort of) with any sharp item with a force>=10 + /obj/item = 20) //20% success (sort of) with any sharp item with a force >= 10 time = 54 preop_sound = list( /obj/item/circular_saw = 'sound/surgery/saw.ogg', diff --git a/code/modules/unit_tests/gas_transfer.dm b/code/modules/unit_tests/gas_transfer.dm index d403eafeb65..2b174ad8c62 100644 --- a/code/modules/unit_tests/gas_transfer.dm +++ b/code/modules/unit_tests/gas_transfer.dm @@ -10,7 +10,7 @@ /** * Proc to transfer x moles of x temp nob to x moles of x temp trit. - * + * * Arguments: * * nob_moles: Moles for the nob (origin) * * nob_temp: Temp for the nob (origin) @@ -36,17 +36,17 @@ var/initial_pressure = second_mix.return_pressure() // A fixed number would mean transfer is too small for high temps. So we make it scaled. - + if(isnull(additional_pressure)) additional_pressure = first_mix.return_pressure() / 10 - + /* ERROR MARGIN CALCULATION * We calculate how much would the pressure change if MOLAR_ACCURACY amount of hothotgas is imparted on the cold mix. * This number gets really big for very high temperatures so it's somewhat meaningless, but our main goal is to ensure the code doesn't break. - */ + */ var/error_margin = first_mix.gas_pressure_minimum_transfer(second_mix) - initial_pressure - + first_mix.pump_gas_to(second_mix, (initial_pressure + additional_pressure)) var/margin = abs(second_mix.return_pressure() - (initial_pressure+additional_pressure)) - TEST_ASSERT(margin<=error_margin, "Failed to pump [nob_moles] moles of [nob_temp] K Nob to [trit_moles] moles of [trit_temp] K Trit, . Expected pressure = [initial_pressure+additional_pressure] +/- [error_margin]. Got [second_mix.return_pressure()].") + TEST_ASSERT(margin <= error_margin, "Failed to pump [nob_moles] moles of [nob_temp] K Nob to [trit_moles] moles of [trit_temp] K Trit, . Expected pressure = [initial_pressure+additional_pressure] +/- [error_margin]. Got [second_mix.return_pressure()].") diff --git a/code/modules/vehicles/mecha/equipment/tools/medical_tools.dm b/code/modules/vehicles/mecha/equipment/tools/medical_tools.dm index 00fc6c2916a..04aea568aa3 100644 --- a/code/modules/vehicles/mecha/equipment/tools/medical_tools.dm +++ b/code/modules/vehicles/mecha/equipment/tools/medical_tools.dm @@ -324,7 +324,7 @@ if(!LAZYLEN(syringes)) to_chat(source, "[icon2html(src, source)]No syringes loaded.") return - if(reagents.total_volume<=0) + if(reagents.total_volume <= 0) to_chat(source, "[icon2html(src, source)]No available reagents to load syringe with.") return if(HAS_TRAIT(source, TRAIT_PACIFISM)) diff --git a/code/modules/vehicles/mecha/equipment/tools/other_tools.dm b/code/modules/vehicles/mecha/equipment/tools/other_tools.dm index d131f069cdf..a6963c2ed70 100644 --- a/code/modules/vehicles/mecha/equipment/tools/other_tools.dm +++ b/code/modules/vehicles/mecha/equipment/tools/other_tools.dm @@ -97,7 +97,7 @@ return movable_target = target to_chat(source, "[icon2html(src, source)][span_notice("locked on [target].")]") - else if(target!=movable_target) + else if(target != movable_target) if(movable_target in view(chassis)) var/turf/targ = get_turf(target) var/turf/orig = get_turf(movable_target) @@ -350,7 +350,7 @@ if(!chassis) activated = FALSE return PROCESS_KILL - if(fuel.amount<=0) + if(fuel.amount <= 0) activated = FALSE log_message("Deactivated - no fuel.", LOG_MECHA) to_chat(chassis.occupants, "[icon2html(src, chassis.occupants)][span_notice("Fuel reserves depleted.")]") diff --git a/code/modules/vehicles/mecha/mecha_helpers.dm b/code/modules/vehicles/mecha/mecha_helpers.dm index 56527ea30b7..75c3aee44eb 100644 --- a/code/modules/vehicles/mecha/mecha_helpers.dm +++ b/code/modules/vehicles/mecha/mecha_helpers.dm @@ -29,7 +29,7 @@ ///// Power stuff ///// /////////////////////// /obj/vehicle/sealed/mecha/proc/has_charge(amount) - return (get_charge()>=amount) + return (get_charge() >= amount) /obj/vehicle/sealed/mecha/proc/get_charge() return cell?.charge diff --git a/code/modules/wiremod/components/utility/router.dm b/code/modules/wiremod/components/utility/router.dm index c942853f982..640c465f958 100644 --- a/code/modules/wiremod/components/utility/router.dm +++ b/code/modules/wiremod/components/utility/router.dm @@ -53,7 +53,7 @@ // If I is in range, L[I]. If I is out of range, wrap around. -#define WRAPACCESS(L, I) L[(((I||1)-1)%length(L)+length(L))%length(L)+1] +#define WRAPACCESS(L, I) L[(((I || 1)-1)%length(L)+length(L))%length(L)+1] /obj/item/circuit_component/router/pre_input_received(datum/port/input/port) var/current_option = router_options.value if(current_type != current_option)