mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Printers print Fields correctly now.
You're all welcome!
This commit is contained in:
@@ -31,10 +31,24 @@
|
||||
if(paper_title)
|
||||
P.name = paper_title
|
||||
P.update_icon()
|
||||
P.fields = count_fields(P.info, P.fields)
|
||||
P.updateinfolinks()
|
||||
|
||||
stored_paper--
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/computer_hardware/nano_printer/proc/count_fields(var/info, var/fields)
|
||||
//Count the fields
|
||||
var/t = info
|
||||
var/laststart = 1
|
||||
while(1)
|
||||
var/i = findtext(t, "<span class=\"paper_field\">", laststart) //</span>
|
||||
if(i==0)
|
||||
break
|
||||
laststart = i+1
|
||||
fields++
|
||||
return fields
|
||||
|
||||
/obj/item/weapon/computer_hardware/nano_printer/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/paper))
|
||||
if(stored_paper >= max_paper)
|
||||
|
||||
Reference in New Issue
Block a user