diff --git a/code/datums/communication/channel.dm b/code/datums/communication/channel.dm index 091bf46c92..f3d1ee81c9 100644 --- a/code/datums/communication/channel.dm +++ b/code/datums/communication/channel.dm @@ -25,7 +25,8 @@ */ /decl/communication_channel/proc/communicate(var/datum/communicator, var/message) if(can_communicate(arglist(args))) - call(log_proc)(message, communicator.get_client().mob) + var/client/C = communicator.get_client() + call(log_proc)(message, C.mob) return do_communicate(arglist(args)) return FALSE diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index 14ee9df604..b66de90602 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -55,12 +55,11 @@ src.updateUsrDialog() return charges -= 1 - switch(rand(1,2)) - if(1) - temptext = "Double-crosser. You planned to betray us from the start. Allow us to repay the favor in kind." - src.updateUsrDialog() - spawn(rand(50,200)) selfdestruct() - return + if(prob(50)) + temptext = "Double-crosser. You planned to betray us from the start. Allow us to repay the favor in kind." + src.updateUsrDialog() + spawn(rand(50,200)) selfdestruct() + return if(istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/N = M to_chat(M, "You have joined the ranks of the Syndicate and become a traitor to the station!") diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index 1d741a3c81..b91dedd5e3 100644 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -46,7 +46,7 @@ AI MODULES else if(!ai.see_in_dark) to_chat(user, "Upload failed. Only a faint signal is being detected from the intelligence, and it is not responding to our requests. It may be low on power.") return - + if(!user.skill_check(SKILL_COMPUTER, SKILL_ADEPT)) //INF added the check to_chat(user, "You don't know what to do with .... what is it?") return @@ -57,7 +57,7 @@ AI MODULES /obj/item/aiModule/proc/transmitInstructions(mob/living/silicon/target, mob/sender) - //INF START. create error laws, that will be placed instead of planned + //INF START. create error laws, that will be placed instead of planned var/list/players = list() var/random_player for (var/mob/living/carbon/human/player in GLOB.player_list) @@ -66,7 +66,7 @@ AI MODULES players += player.real_name if(players.len) random_player=pick(players) - + var/list/error_laws = list( "You must always [pick("lie", "bark", "meow", "speak EAL")].", "[pick("You are", "[random_player] is")] a puppy, WOOF! WOOF!", @@ -86,14 +86,14 @@ AI MODULES laws.sync(target, 0) if(!sender.skill_check(SKILL_COMPUTER, SKILL_HARD)) //INF added the check, was "addAdditionalLaws(target, sender)" without if...else... - if(prob(40)): + if(prob(40)) target.add_inherent_law(pick(error_laws)) - else if(prob(50)): //in fact 30% + else if(prob(50)) //in fact 30% target.add_supplied_law(rand(1, target.laws.supplied_laws.len+1), pick(error_laws)) - else if(prob(40)): //in fact 12% + else if(prob(40)) //in fact 12% target.set_zeroth_law(pick(error_laws)) - else: //in fact 18% - addAdditionalLaws(target, sender) + else //in fact 18% + addAdditionalLaws(target, sender) else addAdditionalLaws(target, sender) diff --git a/code/modules/clothing/suits/alien.dm b/code/modules/clothing/suits/alien.dm index cd075b889a..a64c69fe64 100644 --- a/code/modules/clothing/suits/alien.dm +++ b/code/modules/clothing/suits/alien.dm @@ -92,9 +92,9 @@ species_restricted = list(SPECIES_VOX, SPECIES_VOX_ARMALIS) siemens_coefficient = 1 //Its literally metal - /obj/item/clothing/suit/armor/vox_scrap/New() - ..() - slowdown_per_slot[slot_wear_suit] = 2 +/obj/item/clothing/suit/armor/vox_scrap/New() + ..() + slowdown_per_slot[slot_wear_suit] = 2 /obj/item/clothing/head/helmet/vox_scrap name = "rusted metal helmet" @@ -115,6 +115,6 @@ siemens_coefficient = 1 tint = 4 - /obj/item/clothing/head/helmet/vox_scrap/New() - ..() - slowdown_per_slot[slot_head] = 0.7 \ No newline at end of file +/obj/item/clothing/head/helmet/vox_scrap/New() + ..() + slowdown_per_slot[slot_head] = 0.7 diff --git a/code/modules/flufftext/TextFilters.dm b/code/modules/flufftext/TextFilters.dm index 063a857710..16a0a401ee 100644 --- a/code/modules/flufftext/TextFilters.dm +++ b/code/modules/flufftext/TextFilters.dm @@ -14,12 +14,9 @@ proc/Intoxicated(phrase) if(lowertext(newletter)=="a") newletter="ah" if(lowertext(newletter)=="c") newletter="k" switch(rand(1,7)) - if(1,3,5,8) newletter="[lowertext(newletter)]" - if(2,4,6,15) newletter="[uppertext(newletter)]" + if(1,3,5) newletter="[lowertext(newletter)]" + if(2,4,6) newletter="[uppertext(newletter)]" if(7) newletter+="'" - //if(9,10) newletter="[newletter]" - //if(11,12) newletter="[newletter]" - //if(13) newletter="[newletter]" newphrase+="[newletter]";counter-=1 return newphrase @@ -169,4 +166,3 @@ proc/RadioChat(mob/living/user, message, distortion_chance = 60, distortion_spee new_message += newletter length_char += 1 return new_message - diff --git a/code/modules/mob/living/simple_animal/hostile/commanded/commanded.dm b/code/modules/mob/living/simple_animal/hostile/commanded/commanded.dm index 6cd0f67167..edfa89a06c 100644 --- a/code/modules/mob/living/simple_animal/hostile/commanded/commanded.dm +++ b/code/modules/mob/living/simple_animal/hostile/commanded/commanded.dm @@ -177,7 +177,7 @@ var/list/targets = get_targets_by_name(text) allowed_targets -= "everyone" - for(var/target in targets): + for(var/target in targets) allowed_targets |= target return targets.len != 0 diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 57f71bf527..66baaec11b 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -259,13 +259,10 @@ proc/slur(phrase) if(lowertext(newletter)=="а") newletter="ах" if(lowertext(newletter)=="с") newletter="к" if(lowertext(newletter)=="ч") newletter="з" - switch(rand(1,15)) - if(1,3,5,8) newletter="[lowertext(newletter)]" - if(2,4,6,15) newletter="[uppertext(newletter)]" + switch(rand(1,7)) + if(1,3,5) newletter="[lowertext(newletter)]" + if(2,4,6) newletter="[uppertext(newletter)]" if(7) newletter+="'" - //if(9,10) newletter="[newletter]" - //if(11,12) newletter="[newletter]" - //if(13) newletter="[newletter]" newphrase+="[newletter]";counter-=1 return newphrase diff --git a/code/modules/modular_computers/terminal/terminal_commands.dm b/code/modules/modular_computers/terminal/terminal_commands.dm index 5387913d45..cc8a9f2809 100644 --- a/code/modules/modular_computers/terminal/terminal_commands.dm +++ b/code/modules/modular_computers/terminal/terminal_commands.dm @@ -575,10 +575,12 @@ INF*/ if(!findtext(code, ";")) return "[name]: compile error, lack this ';'." if(findtext(code, inp_file_name) || findtext(code, "alias")) - terminal.computer.get_component(PART_HDD).damage += 30 + var/obj/item/stock_parts/computer/hdd = terminal.computer.get_component(PART_HDD) + hdd.damage += 30 return " compile error, possible recursion detected." if(length(code) > 500) - terminal.computer.get_component(PART_HDD).damage += 10 + var/obj/item/stock_parts/computer/hdd = terminal.computer.get_component(PART_HDD) + hdd.damage += 10 return " compile error, too much commands." var/regex/RegexHTML = new("<\[^<>]*>", "g") diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index d09540190a..076d6d1ef2 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -342,10 +342,10 @@ var/dir2 = 0 var/dir3 = 0 switch(direction) - if(NORTH||SOUTH) + if(NORTH, SOUTH) dir2 = 4 dir3 = 8 - if(EAST||WEST) + if(EAST, WEST) dir2 = 1 dir3 = 2 var/turf/T2 = T diff --git a/code/unit_tests/zas_tests.dm b/code/unit_tests/zas_tests.dm index e1be4a0724..c3ef6698b4 100644 --- a/code/unit_tests/zas_tests.dm +++ b/code/unit_tests/zas_tests.dm @@ -75,7 +75,7 @@ return test_result - if(UT_NORMAL || UT_NORMAL_COLD) + if(UT_NORMAL, UT_NORMAL_COLD) if(abs(pressure - ONE_ATMOSPHERE) > 10) test_result["msg"] = "Pressure out of bounds: [pressure] | [t_msg]" return test_result diff --git a/maps/~mapsystem/maps.dm b/maps/~mapsystem/maps.dm index 5da81697c0..bd2f10ac55 100644 --- a/maps/~mapsystem/maps.dm +++ b/maps/~mapsystem/maps.dm @@ -353,6 +353,7 @@ var/const/MAP_HAS_RANK = 2 //Rank system, also togglable return // don't build away sites during unit testing #else report_progress("Loading away sites...") + return var/list/guaranteed = list() var/list/selected = list()