Photocopiers now copy stamped papers, also minor bugfix

This commit is contained in:
Hubblenaut
2014-04-30 05:46:51 +02:00
parent 224fa5e8f9
commit 87d4cf7238
3 changed files with 30 additions and 2 deletions

View File

@@ -23,6 +23,9 @@
var/stamps //The (text for the) stamps on the paper. var/stamps //The (text for the) stamps on the paper.
var/fields //Amount of user created fields var/fields //Amount of user created fields
var/list/stamped var/list/stamped
var/ico[0] //Icons and
var/offset_x[0] //offsets stored for later
var/offset_y[0] //usage by the photocopier
var/rigged = 0 var/rigged = 0
var/spam_flag = 0 var/spam_flag = 0
@@ -36,6 +39,7 @@
..() ..()
pixel_y = rand(-8, 8) pixel_y = rand(-8, 8)
pixel_x = rand(-9, 9) pixel_x = rand(-9, 9)
stamps = ""
spawn(2) spawn(2)
update_icon() update_icon()
updateinfolinks() updateinfolinks()
@@ -320,14 +324,21 @@
stamps += (stamps=="" ? "<HR>" : "<BR>") + "<i>This paper has been stamped with the [P.name].</i>" stamps += (stamps=="" ? "<HR>" : "<BR>") + "<i>This paper has been stamped with the [P.name].</i>"
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi') var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
stampoverlay.pixel_x = rand(-2, 2) var/x = rand(-2, 2)
stampoverlay.pixel_y = rand(-3, 2) var/y = rand(-3, 2)
offset_x += x
offset_y += y
stampoverlay.pixel_x = x
stampoverlay.pixel_y = y
if(istype(P, /obj/item/weapon/stamp/clown)) if(istype(P, /obj/item/weapon/stamp/clown))
if(!clown) if(!clown)
user << "<span class='notice'>You are totally unable to use the stamp. HONK!</span>" user << "<span class='notice'>You are totally unable to use the stamp. HONK!</span>"
return return
if(!ico)
ico = new
ico += "paper_[P.icon_state]"
stampoverlay.icon_state = "paper_[P.icon_state]" stampoverlay.icon_state = "paper_[P.icon_state]"
if(!stamped) if(!stamped)

View File

@@ -57,6 +57,23 @@
c.info += "</font>" c.info += "</font>"
c.name = copy.name // -- Doohl c.name = copy.name // -- Doohl
c.fields = copy.fields c.fields = copy.fields
c.stamps = copy.stamps
c.stamped = copy.stamped
c.ico = copy.ico
c.offset_x = copy.offset_x
c.offset_y = copy.offset_y
var/list/temp_overlays = copy.overlays //Iterates through stamps
var/image/img //and puts a matching
for (var/j = 1, j <= temp_overlays.len, j++) //gray overlay onto the copy
if (findtext(copy.ico[j], "cap") || findtext(copy.ico[j], "cent"))
img = image('icons/obj/bureaucracy.dmi', "paper_stamp-circle")
else if (findtext(copy.ico[j], "deny"))
img = image('icons/obj/bureaucracy.dmi', "paper_stamp-x")
else
img = image('icons/obj/bureaucracy.dmi', "paper_stamp-dots")
img.pixel_x = copy.offset_x[j]
img.pixel_y = copy.offset_y[j]
c.overlays += img
c.updateinfolinks() c.updateinfolinks()
toner-- toner--
sleep(15) sleep(15)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB