Skip to content

Commit

Permalink
some blurb shtukas
Browse files Browse the repository at this point in the history
some blurb shtukas

linter is 3.14 RAS
  • Loading branch information
ImJustKisik committed Dec 12, 2023
1 parent 7c3fdd1 commit da576b8
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
43 changes: 43 additions & 0 deletions modular_ss220/loc_blurb/code/location_blurb.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

/proc/show_location_blurb(client/C, duration = 3 SECONDS)
set waitfor = FALSE

var/style = "font-family: 'Fixedsys'; -dm-text-outline: 1 black; font-size: 11px;"
var/area/A = get_area(C.mob)
var/text = "[GLOB.current_date_string], [station_time_timestamp()]\n[station_name()], [A.name]"
text = uppertext(text)

var/atom/movable/screen/T = new /atom/movable/screen{
maptext_height = 64;
maptext_width = 512;
layer = FLOAT_LAYER;
plane = HUD_PLANE;
appearance_flags = APPEARANCE_UI_IGNORE_ALPHA;
screen_loc = "LEFT+1,BOTTOM+2";
alpha = 0;
}

C.screen += T
animate(T, alpha = 255, time = 10)
for(var/i = 1 to length_char(text) + 1)
T.maptext = "<span style=\"[style]\">[copytext_char(text, 1, i)] </span>"
sleep(1)

addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(fade_location_blurb), C, T), duration)

/proc/fade_location_blurb(client/C, obj/T)
animate(T, alpha = 0, time = 5)
sleep(5)
if(C)
C.screen -= T
qdel(T)


/datum/controller/subsystem/jobs/EquipRank(mob/living/carbon/human/H, rank, joined_late = 0)
. = ..()
INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(show_location_blurb), H.client, 30)

/datum/controller/subsystem/ticker/reboot_helper(reason, end_string, delay)
for(var/mob/M as anything in GLOB.player_list)
show_blurb(M, 900, "Round is restarting...", null, "center", "center", COLOR_RED, null, null, 1)
. = ..()
9 changes: 9 additions & 0 deletions modular_ss220/loc_blurb/loc_blurb.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef MODPACK_LOCBLURB
#define MODPACK_LOCBLURB

#endif

// BEGIN INCLUDE
#include "code/location_blurb.dm"
// END_INCLUDE

1 change: 1 addition & 0 deletions modular_ss220/modular_ss220.dme
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
#include "queue/_queue.dme"
#include "phrases/_phrases.dme"
#include "species_whitelist/_species_whitelist.dme"
#include "loc_blurb/loc_blurb.dme"

// --- PRIME --- //
// #define MODPACK_MAIN_ONLY
Expand Down

0 comments on commit da576b8

Please sign in to comment.