Variable Door Delay + Timer Based Animations (#84631)

## About The Pull Request

### Variable Door Delay

Door opening/closing delay times are currently static, but many doors do
not have animations that FIT the actual timings.

It would be better if subtypes cound declare how long each animation
takes, and how long it takes for opening to say, become passable and
such.

Let's do that.

### Timer Based Animations

Currently all doors use flick() to do their animations. This is fine
right NOW, but fucks with walleniong because we have to split most
things into segments to make layering work.

So rather then flick let's use client timers and update_icon_state to
achive our effects, alongside a proc that lets us do other effects (like
sound) on playing an animation

## Why It's Good For The Game

Door behavior and visuals better match up, wallening compatability
upstreaming.

## Changelog
🆑
add: Most door animations now better line up with when they are/are not
passable.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
LemonInTheDark
2024-07-08 22:24:36 +02:00
committed by GitHub
co-authored by MrMelbert
parent 274c54f4df
commit 9bc534f3d6
22 changed files with 325 additions and 80 deletions
@@ -5,6 +5,18 @@
puzzle_id = "library"
open_message = "The door opens with a loud creak."
/obj/machinery/door/puzzle/keycard/library/animation_length(animation)
switch(animation)
if(DOOR_OPENING_ANIMATION)
return 1.2 SECONDS
/obj/machinery/door/puzzle/keycard/library/animation_segment_delay(animation)
switch(animation)
if(DOOR_OPENING_PASSABLE)
return 1.0 SECONDS
if(DOOR_OPENING_FINISHED)
return 1.2 SECONDS
/obj/item/keycard/library
name = "golden key"
desc = "A dull, golden key."