-
Notifications
You must be signed in to change notification settings - Fork 1
/
Procs.dm
117 lines (90 loc) · 2 KB
/
Procs.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/*******************************************
*** PROCS.DM REWRITEN BY KUMO ON 8/26/12 *** // <--- I only kinda half rewrote this one.. Sorry. D:
*******************************************/
// <--------- Variables --------->
var {
DE_DVIEW = 3
VERSION = "v.2.4.3" // <--- This is the displayed version of the server.
isserver2 = 0
}
// <--------- Procs --------->
proc
start_game()
if(hostenabled == 0)
mappicked = 1
create_vetos()
else
hostcheck()
hostcheck()
set background = 1
var {
time = 0
}
while(time <= 1200 && mappicked == 0)
sleep(1)
time += 1
if(mappicked == 0)
hostenabled = 0
create_vetos()
else
return
proc
de_view(var/range = DE_DVIEW, var/atom/A)
if(A && range > 0)
if(range > DE_DVIEW)
range = DE_DVIEW
var/list/L = list()
var/sx = (A.x - range)
if(sx < 1)
sx = 1
var/sy = (A.y - range)
if(sy < 1)
sy = 1
var/ex = (A.x + range)
if(ex > world.maxx)
ex = world.maxx
var/ey = (A.y + range)
if(ey > world.maxy)
ey = world.maxy
for(var/turf/T in block(locate(sx, sy, A.z),locate(ex, ey, A.z)))
if(T && isturf(T))
L += T
if(length(T.contents))
L += T.contents
return L
de_sound(var/range = DE_DVIEW, var/atom/A, var/sound/sfile)
if(sfile)
for(var/mob/player/client/M in players)
if(!M||!M.gamein)
continue
var/s_dist = get_dist(M, A)
if(s_dist <= range)
M << sfile
update_status()
var {
hst = world.host
}
if(!hst)
hst = "Unknown"
if(isOfficial())
hst = "Official Server"
else if(isOfficial2())
hst = "Official Server 2"
world.status = {"<font size = 1>[hst]</font>]
<font size = 1>Feed: {[VERSION]}
<b>Map:</b> [current_map]
<b>Wave:</b> [wave]"}
if(gameon)
world.name = "Feed | Wave: [wave]"
else
world.name = "Feed"
isOfficial()
if(world.internet_address == "67.210.108.209")
return 1
else
return 0
isOfficial2()
if(global.isserver2 == 1)
return 1
else
return 0