From 8fdb8a71bf65fc28937c450761e89ba0e0ed3f6c Mon Sep 17 00:00:00 2001 From: npukoJl <71260144+npukoJl@users.noreply.github.com> Date: Mon, 19 Aug 2024 12:10:01 +0300 Subject: [PATCH] Fixes Nanotrasen paper bin + now its tgui_alert instead of alert (#26484) * Fixed + now its tgui_alert instead of alert * fixed as Aylong suggested * forgor to remove Cancel from first check * Update code/modules/paperwork/paperbin.dm missing whitespace Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Signed-off-by: npukoJl <71260144+MixerBaikalLover@users.noreply.github.com> * add a null check on P --------- Signed-off-by: npukoJl <71260144+MixerBaikalLover@users.noreply.github.com> Co-authored-by: npukoJl <71260144+MixerBaikalLover@users.noreply.github.com> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> --- code/modules/paperwork/paperbin.dm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index eef2ba38905..fa7aa75d6f2 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -73,10 +73,20 @@ P = papers[length(papers)] papers.Remove(P) else - if(letterhead_type && alert("Choose a style", null,"Letterhead","Blank")=="Letterhead") - P = new letterhead_type - else - P = new /obj/item/paper + var/choice = tgui_alert(user, "Choose a style", "Paperbin", list("Letterhead", "Blank", "Cancel")) + if(isnull(choice) || !Adjacent(user)) + return + switch(choice) + if("Letterhead") + P = new letterhead_type + if("Blank") + P = new /obj/item/paper + if("Cancel") + return + + if(isnull(P)) + return + if(SSholiday.holidays && SSholiday.holidays[APRIL_FOOLS]) if(prob(30)) P.info = "HONK HONK HONK HONK HONK HONK HONK
HOOOOOOOOOOOOOOOOOOOOOONK
APRIL FOOLS
"