mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-18 03:32:56 +01:00
Bulletproofing
We already get the full info field, so fields will be always be fully totalled. Let's not assume it's zero.
This commit is contained in:
@@ -31,14 +31,15 @@
|
||||
if(paper_title)
|
||||
P.name = paper_title
|
||||
P.update_icon()
|
||||
P.fields = count_fields(P.info, P.fields)
|
||||
P.fields = count_fields(P.info)
|
||||
P.updateinfolinks()
|
||||
|
||||
stored_paper--
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/computer_hardware/nano_printer/proc/count_fields(var/info, var/fields)
|
||||
/obj/item/weapon/computer_hardware/nano_printer/proc/count_fields(var/info)
|
||||
//Count the fields. This is taken directly from paper.dm, /obj/item/weapon/paper/proc/parsepencode(). -Hawk_v3
|
||||
var/fields = 0
|
||||
var/t = info
|
||||
var/laststart = 1
|
||||
while(1)
|
||||
|
||||
Reference in New Issue
Block a user