mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-05 23:11:52 +00:00
Merge pull request #11277 from Hubblenaut/stacks
Fixes stack creation logic and return value
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
/obj/item/stack/material/proc/update_strings()
|
||||
// Update from material datum.
|
||||
singular_name = material.sheet_singular_name
|
||||
|
||||
|
||||
if(amount>1)
|
||||
name = "[material.use_name] [material.sheet_plural_name]"
|
||||
desc = "A stack of [material.use_name] [material.sheet_plural_name]."
|
||||
@@ -64,9 +64,10 @@
|
||||
var/obj/item/stack/material/M = S
|
||||
if(!istype(M) || material.name != M.material.name)
|
||||
return 0
|
||||
..(S,tamount,1)
|
||||
var/transfer = ..(S,tamount,1)
|
||||
if(src) update_strings()
|
||||
if(M) M.update_strings()
|
||||
return transfer
|
||||
|
||||
/obj/item/stack/material/attack_self(var/mob/user)
|
||||
if(!material.build_windows(user, src))
|
||||
|
||||
@@ -128,8 +128,6 @@ var/list/name_to_material
|
||||
var/obj/item/stack/S = new rod_product(get_turf(user))
|
||||
S.add_fingerprint(user)
|
||||
S.add_to_stacks(user)
|
||||
if(!(user.l_hand && user.r_hand))
|
||||
user.put_in_hands(S)
|
||||
|
||||
/material/proc/build_wired_product(var/mob/user, var/obj/item/stack/used_stack, var/obj/item/stack/target_stack)
|
||||
if(!wire_product)
|
||||
|
||||
Reference in New Issue
Block a user