Skip to content

Commit

Permalink
Adds a small vignette that pops up when your laws are changed as AI. (#…
Browse files Browse the repository at this point in the history
…9939)

* Adds a small vignette that pops up when your laws are changed as AI.

* Update laws.dm

* Update code/modules/mob/living/silicon/laws.dm

Co-authored-by: PowerfulBacon <[email protected]>

---------

Co-authored-by: PowerfulBacon <[email protected]>
  • Loading branch information
Liver-1 and PowerfulBacon authored Oct 3, 2023
1 parent 4b44329 commit b19e03a
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 b19e03a

Please sign in to comment.