Skip to content

Commit

Permalink
[Port] Ports EFN Noise filter
Browse files Browse the repository at this point in the history
  • Loading branch information
QuacksQ committed Jul 14, 2024
1 parent c357ed9 commit dee00da
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@
/// Bubble for typing indicators
#define TYPING_LAYER 500

///Plane exclusively used by noise filter
#define NOISE_PLANE 550
#define NOISE_LAYER 1

//-------------------- HUD ---------------------
//HUD layer defines
#define HUD_PLANE 1000
Expand Down
21 changes: 21 additions & 0 deletions code/_onclick/hud/fullscreen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,24 @@
plane = LIGHTING_PLANE
blend_mode = BLEND_ADD
show_when_dead = TRUE

//Noise holder
/atom/movable/screen/fullscreen/noise
icon = 'icons/hud/noise.dmi'
icon_state = "blank"
screen_loc = "WEST,SOUTH to EAST,NORTH"
plane = NOISE_PLANE
layer = NOISE_LAYER
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
show_when_dead = TRUE
var/poggers = 1
var/loggers = "k"

/atom/movable/screen/fullscreen/noise/update_for_view(client_view)
screen_loc = "WEST,SOUTH to EAST,NORTH"
poggers = rand(1,9)
update_appearance()

/atom/movable/screen/fullscreen/noise/update_icon_state()
. = ..()
icon_state = "[poggers][loggers]"
1 change: 1 addition & 0 deletions code/_onclick/hud/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
plane_master_controllers[controller_instance.name] = controller_instance

owner.overlay_fullscreen("see_through_darkness", /atom/movable/screen/fullscreen/see_through_darkness)
owner.overlay_fullscreen("noise", /atom/movable/screen/fullscreen/noise)

AddComponent(/datum/component/zparallax, owner.client)

Expand Down
8 changes: 8 additions & 0 deletions code/_onclick/hud/rendering/plane_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,14 @@
render_relay_plane = RENDER_PLANE_NON_GAME
mouse_opacity = MOUSE_OPACITY_TRANSPARENT

/atom/movable/screen/plane_master/noise
name = "noise filter plane"
plane = NOISE_PLANE
appearance_flags = PLANE_MASTER //should use client color
blend_mode = BLEND_OVERLAY
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
render_relay_plane = RENDER_PLANE_NON_GAME

/atom/movable/screen/plane_master/hud
name = "HUD plane"
plane = HUD_PLANE
Expand Down
Binary file added icons/hud/noise.dmi
Binary file not shown.

0 comments on commit dee00da

Please sign in to comment.