Upload files

This commit is contained in:
SandPoot
2021-10-05 00:33:49 -03:00
parent 2de686f4d6
commit bbe32fa38a
156 changed files with 830 additions and 413 deletions
+6 -6
View File
@@ -416,7 +416,7 @@
var/choice = input("Are you certain you wish to upload this title to the Archive?") in list("Confirm", "Abort")
if(choice == "Confirm")
if (!SSdbcore.Connect())
alert("Connection to Archive has been severed. Aborting.")
tgui_alert(usr, "Connection to Archive has been severed. Aborting.")
else
var/msg = "[key_name(usr)] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs"
var/datum/db_query/query_library_upload = SSdbcore.NewQuery({"
@@ -425,15 +425,15 @@
"}, list("title" = scanner.cache.name, "author" = scanner.cache.author, "content" = scanner.cache.dat, "category" = upload_category, "ckey" = usr.ckey, "round_id" = GLOB.round_id))
if(!query_library_upload.Execute())
qdel(query_library_upload)
alert("Database error encountered uploading to Archive")
tgui_alert(usr, "Database error encountered uploading to Archive")
return
else
log_game(msg)
qdel(query_library_upload)
alert("Upload Complete. Uploaded title will be unavailable for printing for a short period")
tgui_alert(usr, "Upload Complete. Uploaded title will be unavailable for printing for a short period")
if(href_list["newspost"])
if(!GLOB.news_network)
alert("No news network found on station. Aborting.")
tgui_alert(usr, "No news network found on station. Aborting.")
var/channelexists = 0
for(var/datum/news/feed_channel/FC in GLOB.news_network.network_channels)
if(FC.channel_name == "Nanotrasen Book Club")
@@ -442,7 +442,7 @@
if(!channelexists)
GLOB.news_network.CreateFeedChannel("Nanotrasen Book Club", "Library", null)
GLOB.news_network.SubmitArticle(scanner.cache.dat, "[scanner.cache.name]", "Nanotrasen Book Club", null)
alert("Upload complete. Your uploaded title is now available on station newscasters.")
tgui_alert(usr, "Upload complete. Your uploaded title is now available on station newscasters.")
if(href_list["orderbyid"])
if(printer_cooldown > world.time)
say("Printer unavailable. Please allow a short time before attempting to print.")
@@ -455,7 +455,7 @@
if(href_list["targetid"])
var/id = href_list["targetid"]
if (!SSdbcore.Connect())
alert("Connection to Archive has been severed. Aborting.")
tgui_alert(usr, "Connection to Archive has been severed. Aborting.")
if(printer_cooldown > world.time)
say("Printer unavailable. Please allow a short time before attempting to print.")
else
+1 -1
View File
@@ -265,7 +265,7 @@
if("delete")
if(!is_admin)
return
var/confirm = alert(user, "Confirm deletion of engraved message?", "Confirm Deletion", "Yes", "No")
var/confirm = tgui_alert(user, "Confirm deletion of engraved message?", "Confirm Deletion", list("Yes", "No"))
if(confirm == "Yes")
persists = FALSE
qdel(src)