Skip to content

Commit

Permalink
[Upstream] Adds a small vignette that pops up when your laws are chan…
Browse files Browse the repository at this point in the history
…ged as AI. (#2564)
  • Loading branch information
someone543 authored Nov 3, 2023
1 parent 6f455ed commit a8a6c64
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions code/_onclick/hud/fullscreen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@
layer = BLIND_LAYER
plane = FULLSCREEN_PLANE

/atom/movable/screen/fullscreen/law_change
icon_state = "law_change"
layer = BLIND_LAYER
plane = FULLSCREEN_PLANE

/atom/movable/screen/fullscreen/curse
icon_state = "curse"
layer = CURSE_LAYER
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/living/silicon/laws.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
throw_alert("newlaw", /atom/movable/screen/alert/newlaw)
if(announce && last_lawchange_announce != world.time)
to_chat(src, "<b>Your laws have been changed.</b>")
overlay_fullscreen("law_change", /atom/movable/screen/fullscreen/law_change, 1)
// lawset modules cause this function to be executed multiple times in a tick, so we wait for the next tick in order to be able to see the entire lawset
addtimer(CALLBACK(src, PROC_REF(show_laws)), 0)
addtimer(CALLBACK(src, PROC_REF(deadchat_lawchange)), 0)
// Wait a tick and clear the vignette
addtimer(CALLBACK(src, PROC_REF(clear_fullscreen), "law_change"), 0.2 SECONDS)
last_lawchange_announce = world.time

/mob/living/silicon/proc/set_law_sixsixsix(law, announce = TRUE)
Expand Down
Binary file modified icons/mob/screen_full.dmi
Binary file not shown.

0 comments on commit a8a6c64

Please sign in to comment.