Merge pull request #3641 from Holdelta/materials-update

Update to Sheet Materials
This commit is contained in:
Razgriz
2022-02-08 14:19:40 -07:00
committed by GitHub
5 changed files with 16 additions and 15 deletions
+7 -7
View File
@@ -12,7 +12,7 @@
/obj/item/stack
gender = PLURAL
origin_tech = list(TECH_MATERIAL = 1)
icon = 'icons/obj/stacks.dmi'
icon = 'icons/obj/stacks_ch.dmi' //CHOMPedit - materials update
randpixel = 7
center_of_mass = null
var/list/datum/stack_recipe/recipes
@@ -282,16 +282,16 @@
if(new_amount < 0 || new_amount % 1)
stack_trace("Tried to set a bad stack amount: [new_amount]")
return 0
// Clean up the new amount
new_amount = max(round(new_amount), 0)
// Can exceed max if you really want
if(new_amount > max_amount && !no_limits)
new_amount = max_amount
amount = new_amount
// Can set it to 0 without qdel if you really want
if(amount == 0 && !no_limits)
qdel(src)
@@ -316,7 +316,7 @@
if (isnull(tamount))
tamount = src.get_amount()
if(tamount < 0 || tamount % 1)
stack_trace("Tried to transfer a bad stack amount: [tamount]")
return 0
@@ -343,7 +343,7 @@
if(tamount < 0 || tamount % 1)
stack_trace("Tried to split a bad stack amount: [tamount]")
return null
var/transfer = max(min(tamount, src.amount, initial(max_amount)), 0)
var/orig_amount = src.amount