diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index e7dc25fae51..a38ed50e908 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -223,10 +223,10 @@ */ //attempts to transfer amount to S, and returns the amount actually transferred -/obj/item/stack/proc/transfer_to(obj/item/stack/S, var/tamount=null) +/obj/item/stack/proc/transfer_to(obj/item/stack/S, var/tamount=null, var/type_verified) if (!get_amount()) return 0 - if (stacktype != S.stacktype) + if ((stacktype != S.stacktype) && !type_verified) return 0 if (isnull(tamount)) tamount = src.get_amount() @@ -240,7 +240,6 @@ transfer_fingerprints_to(S) if(blood_DNA) S.blood_DNA |= blood_DNA - //todo bloody overlay return transfer return 0 @@ -314,10 +313,8 @@ return /obj/item/stack/attackby(obj/item/W as obj, mob/user as mob) - ..() if (istype(W, /obj/item/stack)) var/obj/item/stack/S = W - if (user.get_inactive_hand()==src) src.transfer_to(S, 1) else @@ -328,7 +325,8 @@ S.interact(usr) if (src && usr.machine==src) src.interact(usr) - else return ..() + else + return ..() /* * Recipe datum diff --git a/code/modules/materials/material_sheets.dm b/code/modules/materials/material_sheets.dm index 2d53c6c29cb..312992ed7e0 100644 --- a/code/modules/materials/material_sheets.dm +++ b/code/modules/materials/material_sheets.dm @@ -5,6 +5,8 @@ w_class = 3.0 throw_speed = 3 throw_range = 3 + max_amount = 50 + var/default_type = DEFAULT_WALL_MATERIAL var/material/material var/perunit @@ -45,7 +47,13 @@ matter[material.name] = material.stack_per_sheet return 1 -obj/item/stack/material/iron +/obj/item/stack/material/transfer_to(obj/item/stack/S, var/tamount=null, var/type_verified) + var/obj/item/stack/material/M = S + if(!istype(M) || material.name != M.material.name) + return 0 + ..(S,tamount,1) + +/obj/item/stack/material/iron name = "iron" icon_state = "sheet-silver" default_type = "iron"