|
69 | 69 | desc = "A manhole ladder, you could probably push the cover off from here, or try dragging it back on."
|
70 | 70 | travel_time = 2 SECONDS
|
71 | 71 | pixel_y = 7
|
72 |
| - icon_state = "manhole_closed" |
| 72 | + icon_state = "ladder10" |
73 | 73 |
|
74 | 74 | /obj/structure/ladder/ms13/manhole/examine(mob/user)
|
75 | 75 | . = ..()
|
|
106 | 106 | to_chat(user, span_warning("It's so heavy! Surely there's a better way of doing this."))
|
107 | 107 | if(do_after(user, 10 SECONDS, target = src, interaction_key = DOAFTER_SOURCE_LADDERBLOCKERS))
|
108 | 108 | obstructed = FALSE
|
| 109 | + down.obstructed = FALSE |
109 | 110 | icon_state = "manhole_open"
|
110 | 111 | desc = "An open manhole, it still stinks even after all these years. You could use a crowbar or your hands to slide the cover back on."
|
111 | 112 | to_chat(user, span_notice("With a lot of effort, you manage to finally get the cover off."))
|
|
116 | 117 | else
|
117 | 118 | if(do_after(user, 10 SECONDS, target = src, interaction_key = DOAFTER_SOURCE_LADDERBLOCKERS))
|
118 | 119 | obstructed = TRUE
|
| 120 | + down.obstructed = TRUE |
119 | 121 | icon_state = "manhole_closed"
|
120 | 122 | desc = "A heavy stamped manhole. You could probably pry it up with a crowbar to access the lower town systems. Or, try using your hands..."
|
121 | 123 | to_chat(user, span_notice("You carefully slide the cover back on the manhole."))
|
|
125 | 127 | if(down && obstructed)
|
126 | 128 | if(do_after(user, 4 SECONDS * tool.toolspeed, target = src, interaction_key = DOAFTER_SOURCE_LADDERBLOCKERS))
|
127 | 129 | obstructed = FALSE
|
| 130 | + down.obstructed = FALSE |
128 | 131 | icon_state = "manhole_open"
|
129 | 132 | desc = "An open manhole, it still stinks even after all these years. You could use a crowbar or your hands to slide the cover back on."
|
130 | 133 | to_chat(user, span_notice("You wedge the crowbar in and pull the cover off the manhole."))
|
|
133 | 136 | if(down && !obstructed)
|
134 | 137 | if(do_after(user, 4 SECONDS * tool.toolspeed, target = src, interaction_key = DOAFTER_SOURCE_LADDERBLOCKERS))
|
135 | 138 | obstructed = TRUE
|
| 139 | + down.obstructed = TRUE |
136 | 140 | icon_state = "manhole_closed"
|
137 | 141 | desc = "A heavy stamped manhole. You could probably pry it up with a crowbar to access the lower town systems. Or, try using your hands..."
|
138 | 142 | to_chat(user, span_notice("You hook the edge of the manhole cover with your crowbar and slide it back on."))
|
|
144 | 148 | name = "manhole entry"
|
145 | 149 | desc = "A heavy stamped manhole. You could probably pry it up with a crowbar to access the lower town systems."
|
146 | 150 | icon_state = "manhole_closed"
|
| 151 | + pixel_y = 7 |
147 | 152 | obstructed = TRUE
|
148 | 153 | else
|
149 | 154 | icon_state = "ladder10"
|
|
161 | 166 | return TRUE
|
162 | 167 | if(I.use_tool(src, user, 15 SECONDS, volume=80))
|
163 | 168 | obstructed = FALSE
|
| 169 | + down.obstructed = FALSE |
164 | 170 | icon_state = "bunker_open"
|
165 | 171 | desc = "Looks like the entrance to some bunker. The bars on the grate have been cut off, allowing entry."
|
166 | 172 | to_chat(user, span_notice("You cut-weld the bars off the grate, letting you slip past."))
|
|
173 | 179 | desc = "It looks like a grate, leading to some sort of bunker. You could probably weld the bars off."
|
174 | 180 | icon_state = "bunker_closed"
|
175 | 181 | obstructed = TRUE
|
| 182 | + down.obstructed = TRUE |
176 | 183 | else
|
177 | 184 | icon_state = "ladder10"
|
178 | 185 |
|
|
201 | 208 | name = "bunker hatch"
|
202 | 209 | desc = "A bunker ladder, you could probably push the hatch open from here, or try closing it."
|
203 | 210 | travel_time = 2 SECONDS
|
204 |
| - pixel_y = 7 |
205 |
| - var/locked = TRUE |
| 211 | + locked = TRUE |
206 | 212 |
|
207 | 213 | /obj/structure/ladder/ms13/hatch/examine(mob/user)
|
208 | 214 | . = ..()
|
209 | 215 | . += "<span class='notice'>Use <b>RIGHT-CLICK</b> on [src] to open or close it.</span>"
|
210 | 216 | if(down)
|
211 |
| - . += "<span class='notice'>Use <b>ALT-CLICK</b> on [src] to lock or unlock it.</span>" |
| 217 | + . += "<span class='notice'>Use <b>CTRL-CLICK</b> on [src] to lock or unlock it.</span>" |
212 | 218 |
|
213 | 219 | /// Open or close the hatch.
|
214 | 220 | /// Hatch can be opened/closed from both side.
|
|
222 | 228 |
|
223 | 229 | if(!down)
|
224 | 230 | if(up.locked)
|
225 |
| - to_chat(user, span_notice("The [src] is locked from above!")) |
| 231 | + to_chat(user, span_notice("The bunker hatch is locked from above!")) |
226 | 232 | else
|
227 |
| - to_chat(user, span_warning("You start to slowly [up.obstructed ? "open" : "close"] the [src] from below.")) |
| 233 | + to_chat(user, span_warning("You start to slowly [up.obstructed ? "open" : "close"] the bunker hatch from below.")) |
228 | 234 | if(do_after(user, 12 SECONDS, target = src, interaction_key = DOAFTER_SOURCE_LADDERBLOCKERS))
|
229 | 235 | obstructed = !obstructed
|
230 |
| - up.obstructed = !up.obstructed |
| 236 | + up.obstructed = obstructed |
231 | 237 | up.icon_state = up.obstructed ? "hatch_closed" : "hatch_open"
|
232 |
| - to_chat(user, span_notice("You [up.obstructed ? "closed" : "opened"] the [src] from below.")) |
| 238 | + to_chat(user, span_notice("You [up.obstructed ? "closed" : "opened"] the bunker hatch from below.")) |
233 | 239 | else
|
234 | 240 | if(locked)
|
235 |
| - to_chat(user, span_notice("The [src] must be unlocked first.")) |
| 241 | + to_chat(user, span_notice("[src] must be unlocked first.")) |
236 | 242 | else
|
237 |
| - to_chat(user, span_warning("You start to slowly [up.obstructed ? "open" : "close"] the [src].")) |
| 243 | + to_chat(user, span_warning("You start to slowly [obstructed ? "open" : "close"] [src].")) |
238 | 244 | if(do_after(user, 10 SECONDS, target = src, interaction_key = DOAFTER_SOURCE_LADDERBLOCKERS))
|
239 | 245 | obstructed = !obstructed
|
| 246 | + down.obstructed = obstructed |
240 | 247 | icon_state = obstructed ? "hatch_closed" : "hatch_open"
|
241 |
| - to_chat(user, span_notice("You [up.obstructed ? "closed" : "opened"] the [src].")) |
| 248 | + to_chat(user, span_notice("You [obstructed ? "closed" : "opened"] [src].")) |
242 | 249 |
|
243 | 250 | /// Lock or unlock the hatch.
|
244 | 251 | /// Hatch can only be locked/unlocked from above.
|
245 | 252 | /// Hatch must be closed before begin locked.
|
246 |
| -/obj/structure/ladder/ms13/hatch/AltClick(mob/user) |
| 253 | +/obj/structure/ladder/ms13/hatch/CtrlClick(mob/user) |
247 | 254 | . = ..()
|
248 | 255 | if(!down)
|
249 |
| - to_chat(user, span_notice("You cannot [locked ? "unlock" : "lock"] the [src] from this side!")) |
| 256 | + to_chat(user, span_notice("You cannot [locked ? "unlock" : "lock"] the bunker hatch from this side!")) |
250 | 257 | return
|
251 | 258 | else
|
252 | 259 | if(obstructed)
|
253 |
| - to_chat(user, span_warning("You start spinning the metal hand-wheel to [locked ? "unlock" : "lock"] the [src].")) |
| 260 | + to_chat(user, span_warning("You start spinning the metal hand-wheel to [locked ? "unlock" : "lock"] [src].")) |
254 | 261 | if(do_after(user, 10 SECONDS, target = src, interaction_key = DOAFTER_SOURCE_LADDERBLOCKERS))
|
255 | 262 | locked = !locked
|
256 |
| - to_chat(user, span_notice("You [locked ? "locked" : "unlocked"] the [src].")) |
| 263 | + down.locked = locked |
| 264 | + to_chat(user, span_notice("You [locked ? "locked" : "unlocked"] [src].")) |
257 | 265 | return
|
258 | 266 | else
|
259 |
| - to_chat(user, span_notice("The [src] must be brought down before you can lock it.")) |
| 267 | + to_chat(user, span_notice("[src] must be brought down before you can lock it.")) |
260 | 268 |
|
261 | 269 |
|
262 | 270 | /obj/structure/ladder/ms13/hatch/update_icon_state()
|
|
266 | 274 | icon_state = "hatch_closed"
|
267 | 275 | desc = "A bunker hatch that can be firmly closed or opened from above using a metal hand-wheel."
|
268 | 276 | obstructed = TRUE
|
| 277 | + down.obstructed = TRUE |
269 | 278 | locked = TRUE
|
| 279 | + down.locked = TRUE |
270 | 280 | else
|
271 | 281 | name = "bunker ladder"
|
272 | 282 | icon_state = "ladder10"
|
273 | 283 |
|
| 284 | +/obj/structure/ladder/ms13/hatch/Initialize(mapload) |
| 285 | + . = ..() |
| 286 | + register_context() |
| 287 | + |
| 288 | +/obj/structure/ladder/ms13/hatch/add_context(atom/source, list/context, obj/item/held_item, mob/living/user) |
| 289 | + . = ..() |
| 290 | + |
| 291 | + if (isnull(held_item)) |
| 292 | + context[SCREENTIP_CONTEXT_RMB] = "Open/Close" |
| 293 | + context[SCREENTIP_CONTEXT_CTRL_LMB] = "Lock/Unlock" |
| 294 | + return CONTEXTUAL_SCREENTIP_SET |
| 295 | + |
274 | 296 | ///////////////////// ENCLAVE BUNKER ////////////////////////
|
275 | 297 |
|
276 | 298 | /// An Enclave hatch than cannot be locked.
|
277 | 299 | /obj/structure/ladder/ms13/enclave
|
278 | 300 | name = "Enclave bunker ladder"
|
279 | 301 | desc = "A bunker ladder adorned with Enclave heraldic, you could probably push the hatch open from here, or try closing it."
|
280 | 302 | travel_time = 2 SECONDS
|
281 |
| - pixel_y = 7 |
282 | 303 |
|
283 | 304 | /obj/structure/ladder/ms13/enclave/examine(mob/user)
|
284 | 305 | . = ..()
|
|
294 | 315 | . = SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
295 | 316 |
|
296 | 317 | if(!down)
|
297 |
| - to_chat(user, span_warning("You start to slowly [up.obstructed ? "open" : "close"] the [src] from below.")) |
| 318 | + to_chat(user, span_warning("You start to slowly [up.obstructed ? "open" : "close"] the Enclave bunker hatch from below.")) |
298 | 319 | if(do_after(user, 12 SECONDS, target = src, interaction_key = DOAFTER_SOURCE_LADDERBLOCKERS))
|
299 | 320 | obstructed = !obstructed
|
300 |
| - up.obstructed = !up.obstructed |
| 321 | + up.obstructed = obstructed |
301 | 322 | up.icon_state = up.obstructed ? "enclave_closed" : "enclave_open"
|
302 |
| - to_chat(user, span_notice("You [up.obstructed ? "closed" : "opened"] the [src] from below.")) |
| 323 | + to_chat(user, span_notice("You [up.obstructed ? "closed" : "opened"] the Enclave bunker hatch from below.")) |
303 | 324 | else
|
304 |
| - to_chat(user, span_warning("You start to slowly [up.obstructed ? "open" : "close"] the [src].")) |
| 325 | + to_chat(user, span_warning("You start to slowly [obstructed ? "open" : "close"] [src].")) |
305 | 326 | if(do_after(user, 10 SECONDS, target = src, interaction_key = DOAFTER_SOURCE_LADDERBLOCKERS))
|
306 | 327 | obstructed = !obstructed
|
| 328 | + down.obstructed = obstructed |
307 | 329 | icon_state = obstructed ? "enclave_closed" : "enclave_open"
|
308 |
| - to_chat(user, span_notice("You [up.obstructed ? "closed" : "opened"] the [src].")) |
| 330 | + to_chat(user, span_notice("You [up.obstructed ? "closed" : "opened"] [src].")) |
309 | 331 |
|
310 | 332 | /obj/structure/ladder/ms13/enclave/update_icon_state()
|
311 | 333 | . = ..()
|
|
314 | 336 | desc = "A thick bunker hatch adorned with a half-faded Enclave roundel."
|
315 | 337 | icon_state = "enclave_closed"
|
316 | 338 | obstructed = TRUE
|
| 339 | + down.obstructed = TRUE |
317 | 340 | else
|
318 | 341 | name = "Enclave bunker ladder"
|
319 | 342 | icon_state = "ladder10"
|
| 343 | + |
| 344 | +/obj/structure/ladder/ms13/enclave/Initialize(mapload) |
| 345 | + . = ..() |
| 346 | + register_context() |
| 347 | + |
| 348 | +/obj/structure/ladder/ms13/enclave/add_context(atom/source, list/context, obj/item/held_item, mob/living/user) |
| 349 | + . = ..() |
| 350 | + |
| 351 | + if (isnull(held_item)) |
| 352 | + context[SCREENTIP_CONTEXT_RMB] = "Open/Close" |
| 353 | + return CONTEXTUAL_SCREENTIP_SET |
0 commit comments