[MANUAL MIRROR] Port OD Pragma Lints (#17171) (#10255)

Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com>
This commit is contained in:
Selis
2025-03-01 22:14:20 +01:00
committed by GitHub
parent f05bc462ed
commit ed43b73661
118 changed files with 428 additions and 237 deletions

View File

@@ -90,8 +90,11 @@
var/ourdir = dir
if(!none && ourdir != SOUTH)
if(length(icon_states(icon(icon, state, NORTH))))
pass()
else if(length(icon_states(icon(icon, state, EAST))))
pass()
else if(length(icon_states(icon(icon, state, WEST))))
pass()
else
ourdir = SOUTH

View File

@@ -512,8 +512,7 @@ GLOBAL_VAR_INIT(jps_visualization_resolve, TRUE)
#endif
// check it's 1. there and 2. we haven't checked it yet and
// 3. we can reach it; if not this is just pointless
if(isnull(cscan_current) || (cscan_current.pathfinding_cycle == cycle) || !JPS_ADJACENCY_CALL(node_top_pos, cscan_current))
else
if(!(isnull(cscan_current) || (cscan_current.pathfinding_cycle == cycle) || !JPS_ADJACENCY_CALL(node_top_pos, cscan_current)))
// perform iteration
JPS_CARDINAL_SCAN(cscan_current, node_top_dir)

View File

@@ -48,7 +48,7 @@
while (i)
var/char = text2ascii(hex, i)
switch(char)
if(48) // 0 -- do nothing
if(48) pass() // 0 -- do nothing
if(49 to 57) num += (char - 48) * power // 1-9
if(97, 65) num += power * 10 // A
if(98, 66) num += power * 11 // B
@@ -166,6 +166,28 @@
if (NORTHWEST) return 315
if (SOUTHWEST) return 225
/// Returns a list(x, y), being the change in position required to step in the passed in direction
/proc/dir2offset(dir)
switch(dir)
if(NORTH)
return list(0, 1)
if(SOUTH)
return list(0, -1)
if(EAST)
return list(1, 0)
if(WEST)
return list(-1, 0)
if(NORTHEAST)
return list(1, 1)
if(SOUTHEAST)
return list(1, -1)
if(NORTHWEST)
return list(-1, 1)
if(SOUTHWEST)
return list(-1, -1)
else
return list(0, 0)
// Converts a blend_mode constant to one acceptable to icon.Blend()
/proc/blendMode2iconMode(blend_mode)
switch (blend_mode)

View File

@@ -1529,6 +1529,10 @@ var/mob/dview/dview_mob = new
return !QDELETED(D)
return FALSE
/// No op
/proc/pass(...)
return
//gives us the stack trace from CRASH() without ending the current proc.
/proc/stack_trace(msg)
CRASH(msg)