mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-26 01:52:29 +00:00
-Fixed rune 4 not counting the cultist in the middle. -Expanded the explanation of a cultist objective. -Moved the "midis" setting to client, so it carries over when you ghost/robot/alien/etc. -Little extra something for Host level admins. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@374 316c924e-a436-60f5-8080-3fe189b3f50e
84 lines
1.8 KiB
Plaintext
84 lines
1.8 KiB
Plaintext
/proc/dopage(src,target)
|
|
var/href_list
|
|
var/href
|
|
href_list = params2list("src=\ref[src]&[target]=1")
|
|
href = "src=\ref[src];[target]=1"
|
|
src:temphtml = null
|
|
src:Topic(href, href_list)
|
|
return null
|
|
|
|
/proc/get_area(O)
|
|
var/location = O
|
|
var/i
|
|
for(i=1, i<=20, i++)
|
|
if(!isarea(location))
|
|
location = location:loc
|
|
else
|
|
return location
|
|
return 0
|
|
|
|
/proc/get_area_name(N) //get area by it's name
|
|
|
|
for(var/area/A in world)
|
|
if(A.name == N)
|
|
return A
|
|
return 0
|
|
|
|
/proc/in_range(source, user)
|
|
if(get_dist(source, user) <= 1)
|
|
return 1
|
|
else
|
|
if (istype(user, /mob/living/carbon))
|
|
if (user:mutations & 1 && get_dist(source, user) <= 7)
|
|
var/X = source:x
|
|
var/Y = source:y
|
|
var/Z = source:z
|
|
spawn(0)
|
|
//I really shouldnt put this here but i dont have a better idea
|
|
var/obj/overlay/O = new /obj/overlay ( locate(X,Y,Z) )
|
|
O.name = "sparkles"
|
|
O.anchored = 1
|
|
O.density = 0
|
|
O.layer = FLY_LAYER
|
|
O.dir = pick(cardinal)
|
|
O.icon = 'effects.dmi'
|
|
O.icon_state = "nothing"
|
|
flick("empdisable",O)
|
|
spawn(5)
|
|
del(O)
|
|
|
|
|
|
return 1
|
|
|
|
return 0 //not in range and not telekinetic
|
|
|
|
/proc/circlerange(center=usr,radius=3)
|
|
|
|
var/turf/centerturf = get_turf(center)
|
|
var/list/turfs = new/list()
|
|
var/rsq = radius * (radius+0.5)
|
|
|
|
for(var/atom/T in range(radius, centerturf))
|
|
var/dx = T.x - centerturf.x
|
|
var/dy = T.y - centerturf.y
|
|
if(dx*dx + dy*dy <= rsq)
|
|
turfs += T
|
|
|
|
//turfs += centerturf
|
|
return turfs
|
|
|
|
/proc/circleview(center=usr,radius=3)
|
|
|
|
var/turf/centerturf = get_turf(center)
|
|
var/list/turfs = new/list()
|
|
var/rsq = radius * (radius+0.5)
|
|
|
|
for(var/atom/T in view(radius, centerturf))
|
|
var/dx = T.x - centerturf.x
|
|
var/dy = T.y - centerturf.y
|
|
if(dx*dx + dy*dy <= rsq)
|
|
turfs += T
|
|
|
|
//turfs += centerturf
|
|
return turfs
|