-
Notifications
You must be signed in to change notification settings - Fork 1
/
Machines.dm
125 lines (90 loc) · 2.17 KB
/
Machines.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
118
119
120
121
122
123
124
125
/**********************************************
*** MACHINES.DM REWRITEN BY KUMO ON 8/26/12 ***
**********************************************/
// <--------- Variables and such --------->
obj
TELEuse
icon = 'Teleporter.dmi'
icon_state = "use"
layer = MOB_LAYER+10
// <--------- Machines Stuff --------->
Tiles
Machines
Teleporter1
parent_type = /obj
icon = 'Teleporter.dmi'
icon_state = "off"
layer = TURF_LAYER+1
pixel_x = -8
pixel_y = -8
bound_width = 32
var/can_use = 0
Crossed(atom/A)
if(A.type != /mob/player/client)
return
var/mob/player/client/P = A
if(P.gamein)
if(src.can_use)
src.can_use = 0
P.loc = src.loc
P.frozen = 1
P.dir = SOUTH
src.overlays += /obj/TELEuse
spawn(15)
src.overlays -= /obj/TELEuse
sleep(10)
for(var/Tiles/Machines/Teleporter2/T in world)
if(T)
T.can_use = 0
T.overlays += /obj/TELEuse
spawn(10)
T.overlays -= /obj/TELEuse
P.loc = T.loc
P.frozen = 0
T.icon_state = "off"
spawn(200)
T.icon_state = "on"
T.can_use = 1
src.icon_state = "off"
spawn(200)
src.icon_state = "on"
src.can_use = 1
Teleporter2
parent_type = /obj
icon = 'Teleporter.dmi'
icon_state = "off"
layer = TURF_LAYER+1
pixel_x = -8
pixel_y = -8
bound_width = 32
var/can_use = 0
Crossed(atom/A)
if(A.type != /mob/player/client)
return
var/mob/player/client/P = A
if(P.gamein)
if(src.can_use)
src.can_use = 0
P.loc = src.loc
P.frozen = 1
P.dir = SOUTH
src.overlays += /obj/TELEuse
spawn(15)
src.overlays -= /obj/TELEuse
sleep(10)
for(var/Tiles/Machines/Teleporter1/T in world)
if(T)
T.can_use = 0
T.overlays += /obj/TELEuse
spawn(10)
T.overlays -= /obj/TELEuse
P.loc = T.loc
P.frozen = 0
T.icon_state = "off"
spawn(200)
T.icon_state = "on"
T.can_use = 1
src.icon_state = "off"
spawn(200)
src.icon_state = "on"
src.can_use = 1