Skip to content

Commit

Permalink
Fix OD lint errors (#6566)
Browse files Browse the repository at this point in the history
# About the pull request

This PR fixes these messages for the OD lint:
```
Warning OD1002 at code/__pragmas.dm:15:26: Warning 'TooManyArguments' does not exist
Error OD0000 at code/datums/global_variables.dm:127:30: attempt to reference r-value
Error OD0000 at code/datums/global_variables.dm:369:44: attempt to reference r-value
```
`TooManyArguments` was replaced with `InvalidArgumentCount` which should
already be an error. The other two errors are regarding initial not
working on globals, which it does not appear to.

# Explain why it's good for the game

Passing checks is good.

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>


![image](https://github.com/cmss13-devs/cmss13/assets/76988376/22a4520c-555d-4d03-971d-703b4bb6197e)

</details>


# Changelog

No player facing changes.
  • Loading branch information
Drulikar authored and Doubleumc committed Jun 29, 2024
1 parent 221c69c commit 6db0264
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion code/__pragmas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#pragma SoftReservedKeyword error
#pragma DuplicateVariable error
#pragma DuplicateProcDefinition error
#pragma TooManyArguments error
#pragma PointlessParentCall error
#pragma PointlessBuiltinCall error
#pragma SuspiciousMatrixCall error
Expand Down
10 changes: 0 additions & 10 deletions code/datums/global_variables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,11 @@

/client/proc/debug_global_variable(name, value, level)
var/html = ""
var/change = 0
//to make the value bold if changed
if(!(admin_holder.rights & R_DEBUG))
return html

html += "<li style='backgroundColor:white'><a href='?_src_=glob_vars;varnameedit=[name]'>E</a><a href='?_src_=glob_vars;varnamechange=[name]'>C</a> "
if(value != initial(global.vars[name]))
html += "<font color='#B300B3'>"
change = 1

if (isnull(value))
html += "[name] = <span class='value'>null</span>"
Expand Down Expand Up @@ -175,8 +171,6 @@

else
html += "[name] = <span class='value'>[value]</span>"
if(change)
html += "</font>"

html += "</li>"

Expand Down Expand Up @@ -353,7 +347,6 @@
if(admin_holder && admin_holder.marked_datum)
possible_classes += "marked datum"
possible_classes += "edit referenced object"
possible_classes += "restore to default"

class = tgui_input_list(usr, "What kind of variable?","Variable Type", possible_classes)
if(!class)
Expand All @@ -365,9 +358,6 @@
mod_list(global.vars[variable])
return

if("restore to default")
global.vars[variable] = initial(global.vars[variable])

if("edit referenced object")
return .(global.vars[variable])

Expand Down

0 comments on commit 6db0264

Please sign in to comment.