mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-27 07:08:55 +01:00
[MIRROR] Gets rid of hasvar usage and moves up some vars (#11484)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Cameron Lennox
parent
f3954fdbeb
commit
938e760841
@@ -196,8 +196,8 @@
|
||||
if(recipe.use_material)
|
||||
O = new recipe.result_type(user.loc, recipe.use_material)
|
||||
|
||||
if(istype(O, /obj))
|
||||
var/obj/Ob = O
|
||||
if(istype(O, /obj/item))
|
||||
var/obj/item/Ob = O
|
||||
|
||||
if(LAZYLEN(Ob.matter)) // Law of equivalent exchange.
|
||||
Ob.matter.Cut()
|
||||
@@ -213,8 +213,8 @@
|
||||
O = new recipe.result_type(user.loc)
|
||||
|
||||
if(recipe.matter_material)
|
||||
if(istype(O, /obj))
|
||||
var/obj/Ob = O
|
||||
if(istype(O, /obj/item))
|
||||
var/obj/item/Ob = O
|
||||
|
||||
if(LAZYLEN(Ob.matter)) // Law of equivalent exchange.
|
||||
Ob.matter.Cut()
|
||||
@@ -228,16 +228,13 @@
|
||||
|
||||
O.set_dir(user.dir)
|
||||
O.add_fingerprint(user)
|
||||
//VOREStation Addition Start - Let's not store things that get crafted with materials like this, they won't spawn correctly when retrieved.
|
||||
if (isobj(O))
|
||||
var/obj/P = O
|
||||
P.persist_storable = FALSE
|
||||
//VOREStation Addition End
|
||||
if (istype(O, /obj/item/stack))
|
||||
var/obj/item/stack/S = O
|
||||
S.amount = produced
|
||||
S.add_to_stacks(user)
|
||||
|
||||
if (isitem(O))
|
||||
var/obj/item/P = O
|
||||
P.persist_storable = FALSE
|
||||
if (istype(O, /obj/item/storage)) //BubbleWrap - so newly formed boxes are empty
|
||||
for (var/obj/item/I in O)
|
||||
qdel(I)
|
||||
|
||||
Reference in New Issue
Block a user