mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #6482 from VOREStation/upstream-merge-6636
[MIRROR] Fix various syntactic problems
This commit is contained in:
5
SpacemanDMM.toml
Normal file
5
SpacemanDMM.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[diagnostics]
|
||||
macro_redefined = "off"
|
||||
macro_undefined_no_definition = "off"
|
||||
as_local_var = "off"
|
||||
tmp_no_effect = "off"
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -298,7 +298,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
if(CHANNEL.is_admin_channel)
|
||||
dat+="<B><FONT style='BACKGROUND-COLOR: LightGreen '><A href='?src=\ref[src];show_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A></FONT></B><BR>"
|
||||
else
|
||||
dat+="<B><A href='?src=\ref[src];show_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR></B>"
|
||||
dat+="<B><A href='?src=\ref[src];show_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : null]<BR></B>"
|
||||
dat+="<BR><HR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||
dat+="<BR><A href='?src=\ref[src];setScreen=[0]'>Back</A>"
|
||||
if(2)
|
||||
@@ -396,7 +396,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
dat+="<I>No feed channels found active...</I><BR>"
|
||||
else
|
||||
for(var/datum/feed_channel/CHANNEL in news_network.network_channels)
|
||||
dat+="<A href='?src=\ref[src];pick_censor_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR>"
|
||||
dat+="<A href='?src=\ref[src];pick_censor_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : null]<BR>"
|
||||
dat+="<BR><A href='?src=\ref[src];setScreen=[0]'>Cancel</A>"
|
||||
if(11)
|
||||
dat+="<B>[using_map.company_name] D-Notice Handler</B><HR>"
|
||||
@@ -407,7 +407,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
dat+="<I>No feed channels found active...</I><BR>"
|
||||
else
|
||||
for(var/datum/feed_channel/CHANNEL in news_network.network_channels)
|
||||
dat+="<A href='?src=\ref[src];pick_d_notice=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR>"
|
||||
dat+="<A href='?src=\ref[src];pick_d_notice=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : null]<BR>"
|
||||
|
||||
dat+="<BR><A href='?src=\ref[src];setScreen=[0]'>Back</A>"
|
||||
if(12)
|
||||
|
||||
@@ -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, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -369,7 +369,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
if(CHANNEL.is_admin_channel)
|
||||
dat+="<B><FONT style='BACKGROUND-COLOR: LightGreen'><A href='?src=\ref[src];ac_show_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A></FONT></B><BR>"
|
||||
else
|
||||
dat+="<B><A href='?src=\ref[src];ac_show_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR></B>"
|
||||
dat+="<B><A href='?src=\ref[src];ac_show_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : null]<BR></B>"
|
||||
dat+={"<BR><HR><A href='?src=\ref[src];ac_refresh=1'>Refresh</A>
|
||||
<BR><A href='?src=\ref[src];ac_setScreen=[0]'>Back</A>
|
||||
"}
|
||||
@@ -453,7 +453,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
dat+="<I>No feed channels found active...</I><BR>"
|
||||
else
|
||||
for(var/datum/feed_channel/CHANNEL in news_network.network_channels)
|
||||
dat+="<A href='?src=\ref[src];ac_pick_censor_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR>"
|
||||
dat+="<A href='?src=\ref[src];ac_pick_censor_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : null]<BR>"
|
||||
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[0]'>Cancel</A>"
|
||||
if(11)
|
||||
dat+={"
|
||||
@@ -466,7 +466,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
dat+="<I>No feed channels found active...</I><BR>"
|
||||
else
|
||||
for(var/datum/feed_channel/CHANNEL in news_network.network_channels)
|
||||
dat+="<A href='?src=\ref[src];ac_pick_d_notice=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR>"
|
||||
dat+="<A href='?src=\ref[src];ac_pick_d_notice=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : null]<BR>"
|
||||
|
||||
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[0]'>Back</A>"
|
||||
if(12)
|
||||
@@ -1223,7 +1223,7 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
out += "<b>Autotraitor <a href='?src=\ref[ticker.mode];toggle=autotraitor'>disabled</a></b>.<br/>"
|
||||
|
||||
out += "<b>All antag ids:</b>"
|
||||
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 += " <a href='?src=\ref[ticker.mode];debug_antag=[antag.id]'>[antag.id]</a>"
|
||||
@@ -1532,9 +1532,8 @@ datum/admins/var/obj/item/weapon/paper/admin/faxreply // var to hold fax replies
|
||||
P.stamps += "<hr><i>This paper has been stamped by the [P.origin] Quantum Relay.</i>"
|
||||
|
||||
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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -100,7 +100,6 @@
|
||||
slot_r_hand_str = "engiewelding",
|
||||
)
|
||||
|
||||
|
||||
/*
|
||||
* Cakehat
|
||||
*/
|
||||
|
||||
@@ -106,7 +106,6 @@
|
||||
/obj/item/rig_module/self_destruct
|
||||
)
|
||||
|
||||
|
||||
/obj/item/clothing/gloves/gauntlets/rig/light/ninja
|
||||
name = "insulated gloves"
|
||||
siemens_coefficient = 0
|
||||
|
||||
@@ -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 = ""
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@
|
||||
user << browse(dat + "<html><head><title>[P.name]</title></head>" \
|
||||
+ "<body style='overflow:hidden'>" \
|
||||
+ "<div> <img src='tmp_photo.png' width = '180'" \
|
||||
+ "[P.scribble ? "<div> Written on the back:<br><i>[P.scribble]</i>" : ]"\
|
||||
+ "[P.scribble ? "<div> Written on the back:<br><i>[P.scribble]</i>" : null]"\
|
||||
+ "</body></html>", "window=[name]")
|
||||
else if(!isnull(pages[page]))
|
||||
if(!(istype(usr, /mob/living/carbon/human) || isobserver(usr) || istype(usr, /mob/living/silicon)))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -546,7 +546,7 @@
|
||||
stamps += (stamps=="" ? "<HR>" : "<BR>") + "<i>This paper has been stamped with the [P.name].</i>"
|
||||
|
||||
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)
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
user << browse(dat + "<html><head><title>[P.name]</title></head>" \
|
||||
+ "<body style='overflow:hidden'>" \
|
||||
+ "<div> <img src='tmp_photo.png' width = '180'" \
|
||||
+ "[P.scribble ? "<div> Written on the back:<br><i>[P.scribble]</i>" : ]"\
|
||||
+ "[P.scribble ? "<div> Written on the back:<br><i>[P.scribble]</i>" : null]"\
|
||||
+ "</body></html>", "window=[name]")
|
||||
|
||||
/obj/item/weapon/paper_bundle/attack_self(mob/user as mob)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = "<center><b>[station_name()] Science Laboratories</b>"
|
||||
PR.info += "<h2>[ (text2num(href_list["print"]) == 2) ? "Detailed" : ] Research Progress Report</h2>"
|
||||
PR.info += "<h2>[ (text2num(href_list["print"]) == 2) ? "Detailed" : null] Research Progress Report</h2>"
|
||||
PR.info += "<i>report prepared at [stationtime2text()] station time</i></center><br>"
|
||||
if(text2num(href_list["print"]) == 2)
|
||||
PR.info += GetResearchListInfo()
|
||||
|
||||
@@ -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 @@
|
||||
- <ParseParamExpression()>
|
||||
*/
|
||||
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 ;__;")
|
||||
|
||||
@@ -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(",")
|
||||
|
||||
@@ -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 ;__;")
|
||||
|
||||
@@ -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 <delim> 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 == "/*")
|
||||
|
||||
Reference in New Issue
Block a user