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>
This commit is contained in:
npukoJl
2024-08-19 12:10:01 +03:00
committed by GitHub
parent 1ad1a89daf
commit 8fdb8a71bf
+14 -4
View File
@@ -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 = "<font face=\"[P.crayonfont]\" color=\"red\"><b>HONK HONK HONK HONK HONK HONK HONK<br>HOOOOOOOOOOOOOOOOOOOOOONK<br>APRIL FOOLS</b></font>"