Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+14 -15
View File
@@ -43,6 +43,7 @@ Actual Adjacent procs :
g = pg
h = ph
f = g + h
source.PNode = src
nt = pnt
/PathNode/proc/calc_f()
@@ -69,7 +70,7 @@ Actual Adjacent procs :
//the actual algorithm
/proc/AStar(caller, end, dist, maxnodes, maxnodedepth = 30, mintargetdist, adjacent = /turf/proc/reachableAdjacentTurfs, id=null, turf/exclude=null, simulated_only = 1)
var/list/pnodelist = list()
//sanitation
var/start = get_turf(caller)
if(!start)
@@ -122,25 +123,23 @@ Actual Adjacent procs :
continue
var/newg = cur.g + call(cur.source,dist)(T)
var/PathNode/P = pnodelist[T]
if(!P)
//is not already in open list, so add it
var/PathNode/newnode = new /PathNode(T,cur,newg,call(T,dist)(end),cur.nt+1)
open.Insert(newnode)
pnodelist[T] = newnode
if(!T.PNode) //is not already in open list, so add it
open.Insert(new /PathNode(T,cur,newg,call(T,dist)(end),cur.nt+1))
else //is already in open list, check if it's a better way from the current turf
if(newg < P.g)
P.prevNode = cur
P.g = newg
P.calc_f()
P.nt = cur.nt + 1
open.ReSort(P)//reorder the changed element in the list
if(newg < T.PNode.g)
T.PNode.prevNode = cur
T.PNode.g = newg
T.PNode.calc_f()
T.PNode.nt = cur.nt + 1
open.ReSort(T.PNode)//reorder the changed element in the list
CHECK_TICK
//cleaning after us
pnodelist = null
for(var/PathNode/PN in open.L)
PN.source.PNode = null
for(var/turf/T in closed)
T.PNode = null
//reverse the path to get it from start to finish
if(path)
+1 -1
View File
@@ -1,4 +1,4 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
//cursors
#define Default_Cursor 0
+2 -2
View File
@@ -25,7 +25,7 @@
announcement += "<br>"
for(var/mob/M in player_list)
if(!isnewplayer(M) && !M.ear_deaf)
if(!istype(M,/mob/new_player) && !M.ear_deaf)
M << announcement
if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS)
M << sound(sound)
@@ -45,7 +45,7 @@
return
for(var/mob/M in player_list)
if(!isnewplayer(M) && !M.ear_deaf)
if(!istype(M,/mob/new_player) && !M.ear_deaf)
M << "<b><font size = 3><font color = red>[title]</font color><BR>[message]</font size></b><BR>"
if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS)
if(alert)