Skip to content

Commit

Permalink
Фикс записи книг в библиотечную БД (#2581)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pivo24 authored Aug 13, 2024
1 parent 1ead776 commit bee5782
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions code/modules/library/lib_machines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@
sleep(rand(200,400))
visible_message(SPAN_NOTICE("\The [src] whirs as it prints and binds a new book."))
binding = FALSE
var/obj/item/book/b = new(loc)
b.dat = O:info
b.SetName("Print Job #" + "[rand(100, 999)]")
b.icon_state = "book[rand(1,7)]"
var/obj/item/book/B = new(loc)
B.dat = O:info
B.SetName("Print Job #" + "[rand(100, 999)]")
B.icon_state = "book[rand(1,7)]"
qdel(O)
return TRUE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,16 @@ The answer was five and a half years -ZeroBits
error_message = "Network Error: Connection to the Archive has been severed."
return 1

var/DBQuery/query = dbcon_old.NewQuery("SELECT * FROM library WHERE id=[sqlid]")
var/DBQuery/query = dbcon_old.NewQuery("SELECT id, category, title, author, content FROM library WHERE id=[sqlid]") // please work ;-; ~Vipo24
query.Execute()

while(query.NextRow())
current_book = list(
"id" = query.item[1],
"author" = query.item[2],
"category" = query.item[2],
"title" = query.item[3],
"content" = query.item[4]
"author" = query.item[4],
"content" = query.item[5]
)
break
return 1

0 comments on commit bee5782

Please sign in to comment.