mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 16:44:33 +01:00
Fixes paper bundle runtimes
This commit is contained in:
@@ -316,7 +316,7 @@
|
||||
to_chat(user, "<span class='notice'>Take off the carbon copy first.</span>")
|
||||
add_fingerprint(user)
|
||||
return
|
||||
var/obj/item/paper_bundle/B = new(src.loc)
|
||||
var/obj/item/paper_bundle/B = new(src.loc, default_papers = FALSE)
|
||||
if(name != "paper")
|
||||
B.name = name
|
||||
else if(P.name != "paper" && P.name != "photo")
|
||||
|
||||
@@ -11,11 +11,15 @@
|
||||
layer = 4
|
||||
pressure_resistance = 1
|
||||
attack_verb = list("bapped")
|
||||
var/amount = 0 //Amount of items clipped to the paper
|
||||
var/amount = 0 //Amount of items clipped to the paper. Note: If you have 2 paper, this should be 1
|
||||
var/page = 1
|
||||
var/screen = 0
|
||||
|
||||
|
||||
/obj/item/paper_bundle/New(default_papers = TRUE)
|
||||
if(default_papers) // This is to avoid runtime occuring from a paper bundle being created without a paper in it.
|
||||
new /obj/item/paper(src)
|
||||
new /obj/item/paper(src)
|
||||
amount += 1
|
||||
/obj/item/paper_bundle/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
var/obj/item/paper/P
|
||||
|
||||
@@ -73,8 +73,10 @@
|
||||
sleep(15)
|
||||
else if(istype(copyitem, /obj/item/paper_bundle))
|
||||
var/obj/item/paper_bundle/B = bundlecopy(copyitem)
|
||||
if(!B)
|
||||
return
|
||||
sleep(15*B.amount)
|
||||
else if(ass && ass.loc == src.loc)
|
||||
else if(ass && ass.loc == loc)
|
||||
copyass()
|
||||
sleep(15)
|
||||
else
|
||||
@@ -287,7 +289,7 @@
|
||||
|
||||
//If need_toner is 0, the copies will still be lightened when low on toner, however it will not be prevented from printing. TODO: Implement print queues for fax machines and get rid of need_toner
|
||||
/obj/machinery/photocopier/proc/bundlecopy(var/obj/item/paper_bundle/bundle, var/need_toner=1)
|
||||
var/obj/item/paper_bundle/p = new /obj/item/paper_bundle (src)
|
||||
var/obj/item/paper_bundle/P = new /obj/item/paper_bundle (src, default_papers = FALSE)
|
||||
for(var/obj/item/W in bundle)
|
||||
if(toner <= 0 && need_toner)
|
||||
toner = 0
|
||||
@@ -298,16 +300,19 @@
|
||||
W = copy(W)
|
||||
else if(istype(W, /obj/item/photo))
|
||||
W = photocopy(W)
|
||||
W.forceMove(p)
|
||||
p.amount++
|
||||
p.amount--
|
||||
p.forceMove(get_turf(src))
|
||||
p.update_icon()
|
||||
p.icon_state = "paper_words"
|
||||
p.name = bundle.name
|
||||
p.pixel_y = rand(-8, 8)
|
||||
p.pixel_x = rand(-9, 9)
|
||||
return p
|
||||
W.forceMove(P)
|
||||
P.amount++
|
||||
if(!P.amount)
|
||||
qdel(P)
|
||||
return null
|
||||
P.amount--
|
||||
P.forceMove(get_turf(src))
|
||||
P.update_icon()
|
||||
P.icon_state = "paper_words"
|
||||
P.name = bundle.name
|
||||
P.pixel_y = rand(-8, 8)
|
||||
P.pixel_x = rand(-9, 9)
|
||||
return P
|
||||
|
||||
|
||||
/obj/machinery/photocopier/MouseDrop_T(mob/target, mob/user)
|
||||
|
||||
Reference in New Issue
Block a user