mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-15 17:12:49 +01:00
Merge branch 'master' of https://github.com/PolarisSS13/Polaris into polaris-sync-2018-02-23
# Conflicts: # code/game/jobs/job_controller.dm # code/game/machinery/oxygen_pump.dm # code/game/objects/items/weapons/storage/firstaid.dm # code/game/objects/structures/crates_lockers/closets/secure/security.dm # code/modules/mob/new_player/new_player.dm # code/modules/organs/internal/eyes.dm # html/changelogs/.all_changelog.yml # maps/southern_cross/southern_cross-1.dmm # vorestation.dme
This commit is contained in:
@@ -1433,4 +1433,51 @@ var/mob/dview/dview_mob = new
|
||||
return USE_FAIL_NOT_IN_USER
|
||||
|
||||
#undef NOT_FLAG
|
||||
#undef HAS_FLAG
|
||||
#undef HAS_FLAG
|
||||
|
||||
// Returns direction-string, rounded to multiples of 22.5, from the first parameter to the second
|
||||
// N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, NNW
|
||||
/proc/get_adir(var/turf/A, var/turf/B)
|
||||
var/degree = Get_Angle(A, B)
|
||||
switch(round(degree%360, 22.5))
|
||||
if(0)
|
||||
return "North"
|
||||
if(22.5)
|
||||
return "North-Northeast"
|
||||
if(45)
|
||||
return "Northeast"
|
||||
if(67.5)
|
||||
return "East-Northeast"
|
||||
if(90)
|
||||
return "East"
|
||||
if(112.5)
|
||||
return "East-Southeast"
|
||||
if(135)
|
||||
return "Southeast"
|
||||
if(157.5)
|
||||
return "South-Southeast"
|
||||
if(180)
|
||||
return "South"
|
||||
if(202.5)
|
||||
return "South-Southwest"
|
||||
if(225)
|
||||
return "Southwest"
|
||||
if(247.5)
|
||||
return "West-Southwest"
|
||||
if(270)
|
||||
return "West"
|
||||
if(292.5)
|
||||
return "West-Northwest"
|
||||
if(315)
|
||||
return "Northwest"
|
||||
if(337.5)
|
||||
return "North-Northwest"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user