This repository has been archived by the owner on Sep 12, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 66
/
asteroid.dm
213 lines (177 loc) · 6.34 KB
/
asteroid.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
/**********************Asteroid**************************/
/turf/open/floor/plating/asteroid //floor piece
gender = PLURAL
name = "asteroid sand"
baseturfs = /turf/open/floor/plating/asteroid
icon = 'icons/turf/floors.dmi'
icon_state = "asteroid"
icon_plating = "asteroid"
postdig_icon_change = TRUE
footstep = FOOTSTEP_SAND
barefootstep = FOOTSTEP_SAND
clawfootstep = FOOTSTEP_SAND
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
/// Environment type for the turf
var/environment_type = "asteroid"
/// Base turf type to be created by the tunnel
var/turf_type = /turf/open/floor/plating/asteroid
/// Probability floor has a different icon state
var/floor_variance = 20
attachment_holes = FALSE
/// Itemstack to drop when dug by a shovel
var/obj/item/stack/digResult = /obj/item/stack/ore/glass/basalt
/// Whether the turf has been dug or not
var/dug
/turf/open/floor/plating/asteroid/Initialize()
var/proper_name = name
. = ..()
name = proper_name
if(prob(floor_variance))
icon_state = "[environment_type][rand(0,12)]"
/// Drops itemstack when dug and changes icon
/turf/open/floor/plating/asteroid/proc/getDug()
new digResult(src, 5)
if(postdig_icon_change)
if(!postdig_icon)
icon_plating = "[environment_type]_dug"
icon_state = "[environment_type]_dug"
dug = TRUE
/// If the user can dig the turf
/turf/open/floor/plating/asteroid/proc/can_dig(mob/user)
if(!dug)
return TRUE
if(user)
to_chat(user, "<span class='warning'>Looks like someone has dug here already!</span>")
/turf/open/floor/plating/asteroid/try_replace_tile(obj/item/stack/tile/T, mob/user, params)
return
/turf/open/floor/plating/asteroid/burn_tile()
return
/turf/open/floor/plating/asteroid/MakeSlippery(wet_setting, min_wet_time, wet_time_to_add, max_wet_time, permanent)
return
/turf/open/floor/plating/asteroid/MakeDry()
return
/turf/open/floor/plating/asteroid/crush()
return
/turf/open/floor/plating/asteroid/attackby(obj/item/W, mob/user, params)
. = ..()
if(!.)
if(W.tool_behaviour == TOOL_SHOVEL || W.tool_behaviour == TOOL_MINING)
if(!can_dig(user))
return TRUE
if(!isturf(user.loc))
return
to_chat(user, "<span class='notice'>You start digging...</span>")
if(W.use_tool(src, user, 40, volume=50))
if(!can_dig(user))
return TRUE
to_chat(user, "<span class='notice'>You dig a hole.</span>")
getDug()
SSblackbox.record_feedback("tally", "pick_used_mining", 1, W.type)
return TRUE
else if(istype(W, /obj/item/storage/bag/ore))
for(var/obj/item/stack/ore/O in src)
SEND_SIGNAL(W, COMSIG_PARENT_ATTACKBY, O)
/turf/open/floor/plating/asteroid/ex_act(severity, target)
. = SEND_SIGNAL(src, COMSIG_ATOM_EX_ACT, severity, target)
contents_explosion(severity, target)
/turf/open/floor/plating/lavaland_baseturf
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
/turf/open/floor/plating/asteroid/basalt
name = "volcanic floor"
baseturfs = /turf/open/floor/plating/asteroid/basalt
icon = 'icons/turf/floors.dmi'
icon_state = "basalt"
icon_plating = "basalt"
environment_type = "basalt"
floor_variance = 15
digResult = /obj/item/stack/ore/glass/basalt
/turf/open/floor/plating/asteroid/basalt/lava //lava underneath
baseturfs = /turf/open/lava/smooth
/turf/open/floor/plating/asteroid/basalt/airless
initial_gas_mix = AIRLESS_ATMOS
/turf/open/floor/plating/asteroid/basalt/Initialize()
. = ..()
set_basalt_light(src)
/turf/open/floor/plating/asteroid/getDug()
set_light(0)
return ..()
/proc/set_basalt_light(turf/open/floor/B)
switch(B.icon_state)
if("basalt1", "basalt2", "basalt3")
B.set_light(2, 0.6, LIGHT_COLOR_LAVA) //more light
if("basalt5", "basalt9")
B.set_light(1.4, 0.6, LIGHT_COLOR_LAVA) //barely anything!
///////Surface. The surface is warm, but survivable without a suit. Internals are required. The floors break to chasms, which drop you into the underground.
/turf/open/floor/plating/asteroid/basalt/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
planetary_atmos = TRUE
baseturfs = /turf/open/lava/smooth/lava_land_surface
/turf/open/floor/plating/asteroid/lowpressure
initial_gas_mix = OPENTURF_LOW_PRESSURE
baseturfs = /turf/open/floor/plating/asteroid/lowpressure
turf_type = /turf/open/floor/plating/asteroid/lowpressure
/turf/open/floor/plating/asteroid/airless
initial_gas_mix = AIRLESS_ATMOS
baseturfs = /turf/open/floor/plating/asteroid/airless
turf_type = /turf/open/floor/plating/asteroid/airless
/turf/open/floor/plating/asteroid/snow
gender = PLURAL
name = "snow"
desc = "Looks cold."
icon = 'icons/turf/snow.dmi'
baseturfs = /turf/open/floor/plating/asteroid/snow
icon_state = "snow"
icon_plating = "snow"
initial_gas_mix = FROZEN_ATMOS
slowdown = 2
environment_type = "snow"
flags_1 = NONE
planetary_atmos = TRUE
broken_states = list("snow_dug")
burnt_states = list("snow_dug")
bullet_sizzle = TRUE
bullet_bounce_sound = null
digResult = /obj/item/stack/sheet/mineral/snow
/turf/open/floor/plating/asteroid/snow/burn_tile()
if(!burnt)
visible_message("<span class='danger'>[src] melts away!.</span>")
slowdown = 0
burnt = TRUE
icon_state = "snow_dug"
return TRUE
return FALSE
/turf/open/floor/plating/asteroid/snow/icemoon
baseturfs = /turf/open/transparent/openspace/icemoon
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
slowdown = 0
/turf/open/lava/plasma/ice_moon
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
baseturfs = /turf/open/lava/plasma/ice_moon
planetary_atmos = TRUE
/turf/open/floor/plating/asteroid/snow/ice
name = "icy snow"
desc = "Looks colder."
baseturfs = /turf/open/floor/plating/asteroid/snow/ice
initial_gas_mix = "o2=0;n2=82;plasma=24;TEMP=120"
floor_variance = 0
icon_state = "snow-ice"
icon_plating = "snow-ice"
environment_type = "snow_cavern"
footstep = FOOTSTEP_FLOOR
barefootstep = FOOTSTEP_HARD_BAREFOOT
clawfootstep = FOOTSTEP_HARD_CLAW
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
/turf/open/floor/plating/asteroid/snow/ice/icemoon
baseturfs = /turf/open/floor/plating/asteroid/snow/ice/icemoon
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
planetary_atmos = TRUE
slowdown = 0
/turf/open/floor/plating/asteroid/snow/ice/burn_tile()
return FALSE
/turf/open/floor/plating/asteroid/snow/airless
initial_gas_mix = AIRLESS_ATMOS
/turf/open/floor/plating/asteroid/snow/temperatre
initial_gas_mix = "o2=22;n2=82;TEMP=255.37"
/turf/open/floor/plating/asteroid/snow/atmosphere
initial_gas_mix = FROZEN_ATMOS
planetary_atmos = FALSE