Files
Aurora.3/code/game/objects/structures/cargo_elevator.dm
T
Kano 2d9d4ce4b6 Cargo elevator overhaul (#21430)
## About PR

Implements an animation logic heavily inspired from CM-SS13 elevators.
Elevator hatch and shaft sprites are courtesy of @KingOfThePing!

Currently if something is standing on the hatches when the elevator is
arriving, they'll be sent to CC level, fall, get paralyzed and severely
injured enough to have broken bones/arterial bleeding.

This PR also fixes cargo announcement screens not displaying elevator
ETA.

## Images

<details><summary>Elevator arriving</summary>
<p>



https://github.com/user-attachments/assets/34879994-d10b-4cb6-959e-314ec20411b8

</p>
</details> 

<details><summary>Elevator departing</summary>
<p>


https://github.com/user-attachments/assets/c345fd3b-07eb-4922-9b28-31cf40842da1

</p>
</details> 

<details><summary>Unfortunate victims falling to the pit</summary>
<p>



https://github.com/user-attachments/assets/98feac04-5d65-4383-8abc-363ce51a028a


</p>
</details> 

### Asset Licenses
The following assets that **have not** been created by myself are
included in this PR:

| Path | Original Author | License |
| --- | --- | --- |
| icons/effect/224x192.dmi | KingOfThePing | CC BY-SA 3.0 |
| icons/obj/doors/retractable_railing.dmi | CM-SS13 | CC BY-SA 3.0 |
| sound/machines/industrial_lift_raising.ogg | CM-SS13 | CC BY-SA 3.0 |
| sound/machines/industrial_lift_lowering.ogg | CM-SS13 | CC BY-SA 3.0 |
| sound/machines/warning-buzzer-2.ogg | Unknown -
https://pixabay.com/sound-effects/incorrect-buzzer-sound-147336/ |
Pixabay Licence |
2025-10-05 14:26:49 +00:00

63 lines
2.2 KiB
Plaintext

// Cargo Elevator Hatch
/obj/structure/cargo_elevator_hatch
name = "cargo elevator hatch"
desc = "The cargo elevator's hatch. Two hefty chunks of blast resistant and hermetically sealed plasteel. Cargo comes from below."
icon = 'icons/obj/cargo_elevator.dmi'
icon_state = "cargo_elevator_hatch_offset"
appearance_flags = DEFAULT_APPEARANCE_FLAGS // Makes it visible from off-screen, objects have "TILE_BOUND" set by default.
pixel_x = -96 // So it doesn't get deleted by the elevator.
pixel_y = -352 // Ditto.
anchored = TRUE
density = FALSE
/obj/structure/cargo_elevator_hatch/Initialize()
. = ..()
layer = DECAL_PLATING_LAYER // Set here, otherwise it isn't visible in the map editor.
/obj/structure/cargo_elevator_hatch/attack_hand(mob/user)
to_chat(user, SPAN_NOTICE("You reach down and touch \the [src]. Nothing happens."))
/obj/structure/cargo_elevator_hatch/attackby(obj/item/attacking_item, mob/user)
to_chat(user, SPAN_NOTICE("You hit \the [src] with \the [attacking_item]. Nothing happens."))
// Cargo Elevator Plating
/turf/simulated/floor/plating/cargo_elevator
name = "cargo hatch plating"
desc = "The cargo hatch's plating."
// Sanity checks in case someone somehow tries to interact with one of the platings.
/turf/simulated/floor/plating/cargo_elevator/attack_hand(mob/user)
to_chat(user, SPAN_NOTICE("You reach down and touch \the [src]. Nothing happens."))
/turf/simulated/floor/plating/cargo_elevator/attackby(obj/item/attacking_item, mob/user)
to_chat(user, SPAN_NOTICE("You hit \the [src] with \the [attacking_item]. Nothing happens."))
/obj/effect/elevator
name = "\proper elevator shaft"
desc = "There seems to be an awful lot of machinery down below."
icon = 'icons/effects/224x192.dmi'
icon_state = "elevator_shaft"
unacidable = TRUE
layer = TURF_DETAIL_LAYER
appearance_flags = KEEP_TOGETHER
/obj/effect/elevator/ex_act(severity)
return
/obj/effect/elevator/animation_overlay
icon_state = null
layer = TURF_SHADOW_LAYER
blend_mode = BLEND_INSET_OVERLAY
appearance_flags = KEEP_TOGETHER
/obj/effect/elevator/animation_overlay/hatch
name = "elevator hatch"
icon_state = "hatch"
/obj/effect/elevator/animation_overlay/hatch/left
icon_state = "hatch_L"
/obj/effect/elevator/animation_overlay/hatch/right
icon_state = "hatch_R"