diff --git a/SpacemanDMM.toml b/SpacemanDMM.toml new file mode 100644 index 0000000000..500be06fa6 --- /dev/null +++ b/SpacemanDMM.toml @@ -0,0 +1,5 @@ +[diagnostics] +macro_redefined = "off" +macro_undefined_no_definition = "off" +as_local_var = "off" +tmp_no_effect = "off" diff --git a/code/ZAS/Controller.dm b/code/ZAS/Controller.dm index 7adba1474f..be103e7a55 100644 --- a/code/ZAS/Controller.dm +++ b/code/ZAS/Controller.dm @@ -144,9 +144,8 @@ Class Procs: merge(A.zone,B.zone) return - var - a_to_b = get_dir(A,B) - b_to_a = get_dir(B,A) + var/a_to_b = get_dir(A,B) + var/b_to_a = get_dir(B,A) if(!A.connections) A.connections = new if(!B.connections) B.connections = new diff --git a/code/datums/position_point_vector.dm b/code/datums/position_point_vector.dm index c5c392e126..eb5127aed6 100644 --- a/code/datums/position_point_vector.dm +++ b/code/datums/position_point_vector.dm @@ -6,8 +6,8 @@ #define RETURN_PRECISE_POSITION(A) new /datum/position(A) #define RETURN_PRECISE_POINT(A) new /datum/point(A) -#define RETURN_POINT_VECTOR(ATOM, ANGLE, SPEED) {new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED)} -#define RETURN_POINT_VECTOR_INCREMENT(ATOM, ANGLE, SPEED, AMT) {new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED, AMT)} +#define RETURN_POINT_VECTOR(ATOM, ANGLE, SPEED) (new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED)) +#define RETURN_POINT_VECTOR_INCREMENT(ATOM, ANGLE, SPEED, AMT) (new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED, AMT)) /datum/position //For positions with map x/y/z and pixel x/y so you don't have to return lists. Could use addition/subtraction in the future I guess. var/x = 0 diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 048c1563b9..9f61a8ab7c 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -298,7 +298,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co if(CHANNEL.is_admin_channel) dat+="[CHANNEL.channel_name]
" else - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" + dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : null]
" dat+="

Refresh" dat+="
Back" if(2) @@ -396,7 +396,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co dat+="No feed channels found active...
" else for(var/datum/feed_channel/CHANNEL in news_network.network_channels) - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" + dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : null]
" dat+="
Cancel" if(11) dat+="[using_map.company_name] D-Notice Handler
" @@ -407,7 +407,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co dat+="No feed channels found active...
" else for(var/datum/feed_channel/CHANNEL in news_network.network_channels) - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" + dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : null]
" dat+="
Back" if(12) diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index 676ad392f0..f9ae1e7bc3 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -138,7 +138,7 @@ /turf/simulated/wall/attackby(obj/item/weapon/W as obj, mob/user as mob) user.setClickCooldown(user.get_attack_speed(W)) - if (!user.) + if (!user.IsAdvancedToolUser()) to_chat(user, "You don't have the dexterity to do this!") return diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index c23a6020b0..500bc42633 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -369,7 +369,7 @@ proc/admin_notice(var/message, var/rights) if(CHANNEL.is_admin_channel) dat+="[CHANNEL.channel_name]
" else - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" + dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : null]
" dat+={"

Refresh
Back "} @@ -453,7 +453,7 @@ proc/admin_notice(var/message, var/rights) dat+="No feed channels found active...
" else for(var/datum/feed_channel/CHANNEL in news_network.network_channels) - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" + dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : null]
" dat+="
Cancel" if(11) dat+={" @@ -466,7 +466,7 @@ proc/admin_notice(var/message, var/rights) dat+="No feed channels found active...
" else for(var/datum/feed_channel/CHANNEL in news_network.network_channels) - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" + dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : null]
" dat+="
Back" if(12) @@ -1223,7 +1223,7 @@ var/datum/announcement/minor/admin_min_announcer = new out += "Autotraitor disabled.
" out += "All antag ids:" - if(ticker.mode.antag_templates && ticker.mode.antag_templates.len). + if(ticker.mode.antag_templates && ticker.mode.antag_templates.len) for(var/datum/antagonist/antag in ticker.mode.antag_templates) antag.update_current_antag_max() out += " [antag.id]" @@ -1532,9 +1532,8 @@ datum/admins/var/obj/item/weapon/paper/admin/faxreply // var to hold fax replies P.stamps += "
This paper has been stamped by the [P.origin] Quantum Relay." var/image/stampoverlay = image('icons/obj/bureaucracy.dmi') - var/{x; y;} - x = rand(-2, 0) - y = rand(-1, 2) + var/x = rand(-2, 0) + var/y = rand(-1, 2) P.offset_x += x P.offset_y += y stampoverlay.pixel_x = x diff --git a/code/modules/admin/admin_secrets.dm b/code/modules/admin/admin_secrets.dm index a0e5e24804..22430f17a3 100644 --- a/code/modules/admin/admin_secrets.dm +++ b/code/modules/admin/admin_secrets.dm @@ -28,10 +28,7 @@ var/datum/admin_secrets/admin_secrets = new() /datum/admin_secret_category var/name = "" var/desc = "" - var/list/datum/admin_secret_item/items - -/datum/admin_secret_category - items = list() + var/list/datum/admin_secret_item/items = list() /datum/admin_secret_category/proc/can_view(var/mob/user) for(var/datum/admin_secret_item/item in items) diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index a9232aa65c..643c335f73 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -100,7 +100,6 @@ slot_r_hand_str = "engiewelding", ) - /* * Cakehat */ diff --git a/code/modules/clothing/spacesuits/rig/suits/light.dm b/code/modules/clothing/spacesuits/rig/suits/light.dm index 5291b73cb8..edf982464d 100644 --- a/code/modules/clothing/spacesuits/rig/suits/light.dm +++ b/code/modules/clothing/spacesuits/rig/suits/light.dm @@ -106,7 +106,6 @@ /obj/item/rig_module/self_destruct ) - /obj/item/clothing/gloves/gauntlets/rig/light/ninja name = "insulated gloves" siemens_coefficient = 0 diff --git a/code/modules/flufftext/TextFilters.dm b/code/modules/flufftext/TextFilters.dm index c7582fe952..bc133a83b8 100644 --- a/code/modules/flufftext/TextFilters.dm +++ b/code/modules/flufftext/TextFilters.dm @@ -66,9 +66,8 @@ proc/Ellipsis(original_msg, chance = 50) if(chance <= 0) return "..." if(chance >= 100) return original_msg - var/list - words = splittext(original_msg," ") - new_words = list() + var/list/words = splittext(original_msg," ") + var/list/new_words = list() var/new_msg = "" diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index d86f19adeb..2e5d64c244 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -377,7 +377,7 @@ return // Check if we should even bother working on the current seed datum. - if(seed.mutants. && seed.mutants.len && severity > 1) + if(seed.mutants && seed.mutants.len && severity > 1) mutate_species() return diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index 9b9be0d6c8..894ff9e8d7 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -297,7 +297,7 @@ user << browse(dat + "[P.name]" \ + "" \ + "
Written on the back:
[P.scribble]" : ]"\ + + "[P.scribble ? "
Written on the back:
[P.scribble]" : null]"\ + "", "window=[name]") else if(!isnull(pages[page])) if(!(istype(usr, /mob/living/carbon/human) || isobserver(usr) || istype(usr, /mob/living/silicon))) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index f1efd4933d..643287cb19 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1186,7 +1186,7 @@ if(LAZYLEN(species.descriptors)) descriptors = list() for(var/desctype in species.descriptors) - var/datum/mob_descriptor.descriptor = species.descriptors[desctype] + var/datum/mob_descriptor/descriptor = species.descriptors[desctype] descriptors[desctype] = descriptor.default_value spawn(0) diff --git a/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm b/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm index 9d41f8b59b..d374562230 100644 --- a/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm +++ b/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm @@ -104,7 +104,7 @@ if("corrupted") // Load them up with ion laws. var/datum/ai_laws/laws = new() // Start with an empty lawset. - for(1 to rand(1, 3)) + for(var/i in 1 to rand(1, 3)) laws.add_ion_law(generate_ion_law(exclude_crew_names = TRUE)) return laws diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index c3eae7b359..59ef1182d0 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -269,7 +269,7 @@ return FALSE var/turf/below = GetBelow(src) - if((locate(/obj/structure/disposalpipe/up) in below) || locate(/obj/machinery/atmospherics/pipe/zpipe/up in below)) + if((locate(/obj/structure/disposalpipe/up) in below) || locate(/obj/machinery/atmospherics/pipe/zpipe/up) in below) return FALSE /mob/living/can_fall() diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 87dbadf800..13255f9c21 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -546,7 +546,7 @@ stamps += (stamps=="" ? "
" : "
") + "This paper has been stamped with the [P.name]." var/image/stampoverlay = image('icons/obj/bureaucracy.dmi') - var/{x; y;} + var/x, y if(istype(P, /obj/item/weapon/stamp/captain) || istype(P, /obj/item/weapon/stamp/centcomm)) x = rand(-2, 0) y = rand(-1, 2) diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 2e3bfb2f79..5a15777b72 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -134,7 +134,7 @@ user << browse(dat + "[P.name]" \ + "" \ + "
Written on the back:
[P.scribble]" : ]"\ + + "[P.scribble ? "
Written on the back:
[P.scribble]" : null]"\ + "", "window=[name]") /obj/item/weapon/paper_bundle/attack_self(mob/user as mob) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index b1bb7816f1..ecc685e435 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -1184,7 +1184,7 @@ // defines a state machine, returns the new state obj/machinery/power/apc/proc/autoset(var/cur_state, var/on) switch(cur_state) - if(POWERCHAN_OFF); //autoset will never turn on a channel set to off + //if(POWERCHAN_OFF); //autoset will never turn on a channel set to off if(POWERCHAN_OFF_AUTO) if(on == 1) return POWERCHAN_ON_AUTO diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 5346f50e6e..2aa6a9913f 100755 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -393,7 +393,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, var/obj/item/weapon/paper/PR = new/obj/item/weapon/paper PR.name = "list of researched technologies" PR.info = "
[station_name()] Science Laboratories" - PR.info += "

[ (text2num(href_list["print"]) == 2) ? "Detailed" : ] Research Progress Report

" + PR.info += "

[ (text2num(href_list["print"]) == 2) ? "Detailed" : null] Research Progress Report

" PR.info += "report prepared at [stationtime2text()] station time

" if(text2num(href_list["print"]) == 2) PR.info += GetResearchListInfo() diff --git a/code/modules/scripting/Parser/Expressions.dm b/code/modules/scripting/Parser/Expressions.dm index f27a30d3ad..14fa1b297c 100644 --- a/code/modules/scripting/Parser/Expressions.dm +++ b/code/modules/scripting/Parser/Expressions.dm @@ -53,10 +53,9 @@ if(/token/word) return new/node/expression/value/variable(T.value) if(/token/accessor) - var - token/accessor/A=T - node/expression/value/variable/E//=new(A.member) - stack/S=new() + var/token/accessor/A=T + var/node/expression/value/variable/E//=new(A.member) + var/stack/S=new() while(istype(A.object, /token/accessor)) S.Push(A) A=A.object @@ -181,11 +180,10 @@ - */ ParseExpression(list/end=list(/token/end), list/ErrChars=list("{", "}")) - var/stack - opr=new - val=new + var/stack/opr=new + var/stack/val=new src.expecting=VALUE - for() + while(TRUE) if(EndOfExpression(end)) break if(istype(curToken, /token/symbol) && ErrChars.Find(curToken.value)) @@ -278,7 +276,7 @@ NextToken() //skip open parenthesis, already found var/loops = 0 - for() + while(TRUE) loops++ if(loops>=1000) CRASH("Something TERRIBLE has gone wrong in ParseFunctionExpression ;__;") diff --git a/code/modules/scripting/Parser/Keywords.dm b/code/modules/scripting/Parser/Keywords.dm index 7d933c52ef..94e6f41afe 100644 --- a/code/modules/scripting/Parser/Keywords.dm +++ b/code/modules/scripting/Parser/Keywords.dm @@ -134,7 +134,7 @@ var/const/Represents a special statement in the code triggered by a keyword. parser.NextToken() if(!parser.CheckToken("(", /token/symbol)) return KW_FAIL - for() //for now parameters can be separated by whitespace - they don't need a comma in between + while(TRUE) //for now parameters can be separated by whitespace - they don't need a comma in between if(istype(parser.curToken, /token/symbol)) switch(parser.curToken.value) if(",") diff --git a/code/modules/scripting/Parser/Parser.dm b/code/modules/scripting/Parser/Parser.dm index ad961c755f..fa7dd8789f 100644 --- a/code/modules/scripting/Parser/Parser.dm +++ b/code/modules/scripting/Parser/Parser.dm @@ -172,7 +172,7 @@ if(!CheckToken("(", /token/symbol)) //Check for and skip open parenthesis return var/loops = 0 - for() + while(TRUE) loops++ if(loops>=6000) CRASH("Something TERRIBLE has gone wrong in ParseFunctionStatement ;__;") diff --git a/code/modules/scripting/Scanner/Scanner.dm b/code/modules/scripting/Scanner/Scanner.dm index 0162119760..78c120a22e 100644 --- a/code/modules/scripting/Scanner/Scanner.dm +++ b/code/modules/scripting/Scanner/Scanner.dm @@ -153,8 +153,7 @@ start - The character used to start the string. */ ReadString(start) - var - buf + var/buf for(, codepos <= length(code), codepos++)//codepos to length(code)) var/char=copytext(code, codepos, codepos+1) switch(char) @@ -189,9 +188,8 @@ Reads characters separated by an item in into a token. */ ReadWord() - var - char=copytext(code, codepos, codepos+1) - buf + var/char=copytext(code, codepos, codepos+1) + var/buf while(!delim.Find(char) && codepos<=length(code)) buf+=char char=copytext(code, ++codepos, codepos+1) @@ -206,9 +204,8 @@ Reads a symbol into a token. */ ReadSymbol() - var - char=copytext(code, codepos, codepos+1) - buf + var/char=copytext(code, codepos, codepos+1) + var/buf while(options.symbols.Find(buf+char)) buf+=char @@ -223,10 +220,9 @@ Reads a number into a token. */ ReadNumber() - var - char=copytext(code, codepos, codepos+1) - buf - dec=0 + var/char=copytext(code, codepos, codepos+1) + var/buf + var/dec=0 while(options.IsDigit(char) || (char=="." && !dec)) if(char==".") dec=1 @@ -246,14 +242,13 @@ */ ReadComment() - var - char=copytext(code, codepos, codepos+1) - nextchar=copytext(code, codepos+1, codepos+2) - charstring = char+nextchar - comm = 1 - // 1: single-line comment - // 2: multi-line comment - expectedend = 0 + var/char=copytext(code, codepos, codepos+1) + var/nextchar=copytext(code, codepos+1, codepos+2) + var/charstring = char+nextchar + var/comm = 1 + // 1: single-line comment + // 2: multi-line comment + var/expectedend = 0 if(charstring == "//" || charstring == "/*") if(charstring == "/*")