mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user