MoodyDoors (#36972)

This commit is contained in:
DeityLink
2024-08-30 01:48:05 +02:00
committed by GitHub
parent 06c8dfac9a
commit d971e36eeb
66 changed files with 50 additions and 9 deletions

View File

@@ -504,28 +504,35 @@ About the new airlock wires panel:
else
icon_state = "door_open"
return
update_moody_light(icon, "[icon_state]-moody")
/obj/machinery/door/airlock/door_animate(var/animation)
kill_moody_light()
switch(animation)
if("opening")
if(overlays)
overlays.len = 0
if(panel_open)
flick("o_door_opening", src)
anim(target = src, a_icon = icon, flick_anim = "o_door_opening-moody", sleeptime = animation_delay, plane = ABOVE_LIGHTING_PLANE, blend = BLEND_ADD)
else
flick("door_opening", src)
anim(target = src, a_icon = icon, flick_anim = "door_opening-moody", sleeptime = animation_delay, plane = ABOVE_LIGHTING_PLANE, blend = BLEND_ADD)
if("closing")
if(overlays)
overlays.len = 0
if(panel_open)
flick("o_door_closing", src)
anim(target = src, a_icon = icon, flick_anim = "o_door_closing-moody", sleeptime = animation_delay, plane = ABOVE_LIGHTING_PLANE, blend = BLEND_ADD)
else
flick("door_closing", src)
anim(target = src, a_icon = icon, flick_anim = "door_closing-moody", sleeptime = animation_delay, plane = ABOVE_LIGHTING_PLANE, blend = BLEND_ADD)
if("spark")
flick("door_spark", src)
anim(target = src, a_icon = icon, flick_anim = "door_spark-moody", sleeptime = animation_delay, plane = ABOVE_LIGHTING_PLANE, blend = BLEND_ADD)
if("deny")
flick("door_deny", src)
anim(target = src, a_icon = icon, flick_anim = "door_deny-moody", sleeptime = animation_delay, plane = ABOVE_LIGHTING_PLANE, blend = BLEND_ADD)
return
/obj/machinery/door/airlock/attack_ai(mob/user as mob)

View File

@@ -361,7 +361,7 @@ var/global/list/alert_overlays_global = list()
if(isEmag(C))
if(density)
flick("door_spark", src)
door_animate("spark")
sleep(6)
force_open(user, C)
sleep(8)
@@ -371,9 +371,22 @@ var/global/list/alert_overlays_global = list()
do_interaction(user, C)
/obj/machinery/door/firedoor/door_animate(var/animation)
switch (animation)
if ("opening")
flick("door_opening", src)
if ("closing")
flick("door_closing", src)
if("spark")
flick("door_spark", src)
anim(target = src, a_icon = icon, flick_anim = "door_spark-moody", sleeptime = 10, plane = ABOVE_LIGHTING_PLANE, blend = BLEND_ADD)
if("deny")
flick("door_deny", src)
anim(target = src, a_icon = icon, flick_anim = "door_deny-moody", sleeptime = 5, plane = ABOVE_LIGHTING_PLANE, blend = BLEND_ADD)
/obj/machinery/door/firedoor/emag_ai(mob/living/silicon/ai/A)
if(density)
flick("door_spark", src)
door_animate("spark")
sleep(6)
open()
sleep(8)
@@ -432,7 +445,7 @@ var/global/list/alert_overlays_global = list()
if(alarmed && density && lockdown && !access_granted)
if(horror_force(user))
return
door_animate("deny")
to_chat(user, "<span class='warning'>Access denied. Please wait for authorities to arrive, or for the alert to clear.</span>")
return
@@ -519,12 +532,17 @@ var/global/list/alert_overlays_global = list()
/obj/machinery/door/firedoor/update_icon()
overlays.len = 0
kill_moody_light_all()
if(density)
icon_state = "door_closed"
if(blocked)
overlays += image(icon = icon, icon_state = "welded")
if(pdiff_alert)
overlays += image(icon = icon, icon_state = "palert")
var/image/I = image(icon = icon, icon_state = "palert")
I.plane = ABOVE_LIGHTING_PLANE
I.layer = ABOVE_LIGHTING_LAYER
overlays += I
update_moody_light_index("palert", icon, "palert")
if(dir_alerts)
for(var/d=1;d<=4;d++)
var/cdir = cardinal[d]
@@ -534,14 +552,17 @@ var/global/list/alert_overlays_global = list()
var/list/state_list = alert_overlays_local["alert_[ALERT_STATES[i]]"]
if(flow_flags & ON_BORDER)
overlays += turn(state_list["[turn(cdir, dir2angle(src.dir))]"], dir2angle(src.dir))
var/image/I = image(turn(state_list["[turn(cdir, dir2angle(src.dir))]"], dir2angle(src.dir)))
overlays += I
update_moody_light_index("alert_[ALERT_STATES[i]]", image_override = I)
else
overlays += state_list["[cdir]"]
var/image/I = image(state_list["[cdir]"])
overlays += I
update_moody_light_index("alert_[ALERT_STATES[i]]", image_override = I)
else
icon_state = "door_open"
if(blocked)
overlays += image(icon = icon, icon_state = "welded_open")
return
// CHECK PRESSURE
/obj/machinery/door/firedoor/process()

View File

@@ -51,6 +51,7 @@ var/list/poddoors = list()
/obj/machinery/door/poddoor/New()
. = ..()
poddoors += src
update_moody_light(icon, "[icon_state]-moody")
/obj/machinery/door/poddoor/Destroy()
poddoors -= src
@@ -85,7 +86,10 @@ var/list/poddoors = list()
flick(openingicon, src)
icon_state = openicon
set_opacity(FALSE)
kill_moody_light()
anim(target = src, a_icon = icon, flick_anim = "[openingicon]-moody", sleeptime = animation_delay, plane = ABOVE_LIGHTING_PLANE, blend = BLEND_ADD)
sleep(animation_delay)
update_moody_light(icon, "[icon_state]-moody")
setDensity(FALSE)
operating = FALSE
@@ -105,7 +109,10 @@ var/list/poddoors = list()
flick(openingicon, src)
icon_state = openicon
set_opacity(0)
kill_moody_light()
anim(target = src, a_icon = icon, flick_anim = "[openingicon]-moody", sleeptime = animation_delay, plane = ABOVE_LIGHTING_PLANE, blend = BLEND_ADD)
sleep(animation_delay)
update_moody_light(icon, "[icon_state]-moody")
layer = open_layer
setDensity(FALSE)
update_nearby_tiles()
@@ -128,10 +135,13 @@ var/list/poddoors = list()
flick(closingicon, src)
icon_state = closedicon
setDensity(TRUE)
kill_moody_light()
anim(target = src, a_icon = icon, flick_anim = "[closingicon]-moody", sleeptime = animation_delay, plane = ABOVE_LIGHTING_PLANE, blend = BLEND_ADD)
set_opacity(initial(opacity))
update_nearby_tiles()
sleep(animation_delay)
update_moody_light(icon, "[icon_state]-moody")
src.operating = 0
return

View File

@@ -89,6 +89,7 @@ var/global/list/all_docking_ports = list()
for(var/obj/machinery/door/airlock/A in range(1,src))
if(!A.shuttle_warning_lights)
A.shuttle_warning_lights = image('icons/obj/doors/Doorint.dmi', src, "warning_lights")
A.shuttle_warning_lights.plane = ABOVE_LIGHTING_PLANE
A.overlays += A.shuttle_warning_lights
for(var/obj/machinery/docklight/D in dockinglights)
if(D.id_tag == areaname)

View File

@@ -28,7 +28,7 @@
//Does not require sleeptime, specifies for how long the animation should be allowed to exist before returning to pool
//Does not require animation direction, but you can specify
//Does not require a name
/proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 15,direction as num, name as text, lay as num, offX as num, offY as num, col as text, alph as num,plane as num, var/trans, var/invis, var/animate_movement)
/proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 15,direction as num, name as text, lay as num, offX as num, offY as num, col as text, alph as num,plane as num, var/trans, var/invis, var/animate_movement, var/blend)
//This proc throws up either an icon or an animation for a specified amount of time.
//The variables should be apparent enough.
if(!location && target)
@@ -48,6 +48,8 @@
animation.alpha = alph
if(invis)
animation.invisibility = invis
if(blend)
animation.blend_mode = blend
animation.icon = a_icon
animation.animate_movement = animate_movement
animation.mouse_opacity = 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 795 B

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB