mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
Stacks check for invalid amounts (#91656)
## About The Pull Request Alleviates #91603 As in it does not fix it because i have not been able to reproduce it. It now checks for invalid values and defaults to `amount`(which is 1) during `Initialize()` and not null so we don't have to pass the number `1` when creating a single sheet. A stack trace is thrown for <= 0 sheet amounts so we can debug & fix stuff ## Changelog 🆑 code: stacks error on invalid amounts, removed manual passing of number `1` when creating a single stack in many cases /🆑
This commit is contained in:
@@ -90,7 +90,7 @@
|
||||
bonfire_log.pixel_x += rand(1,4)
|
||||
bonfire_log.pixel_y += rand(1,4)
|
||||
if(can_buckle || grill)
|
||||
new /obj/item/stack/rods(loc, 1)
|
||||
new /obj/item/stack/rods(loc)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
/obj/structure/curtain/atom_deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/cloth (loc, 2)
|
||||
new /obj/item/stack/sheet/plastic (loc, 2)
|
||||
new /obj/item/stack/rods (loc, 1)
|
||||
new /obj/item/stack/rods (loc)
|
||||
|
||||
/obj/structure/curtain/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
/obj/structure/curtain/cloth/atom_deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/cloth (loc, 4)
|
||||
new /obj/item/stack/rods (loc, 1)
|
||||
new /obj/item/stack/rods (loc)
|
||||
|
||||
/obj/structure/curtain/cloth/fancy
|
||||
icon_type = "cur_fancy"
|
||||
|
||||
@@ -490,7 +490,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/girder/cult/atom_deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/runed_metal(drop_location(), 1)
|
||||
new /obj/item/stack/sheet/runed_metal(drop_location())
|
||||
|
||||
/obj/structure/girder/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
|
||||
switch(the_rcd.mode)
|
||||
|
||||
@@ -303,7 +303,7 @@ at the cost of risking a vicious bite.**/
|
||||
return TRUE
|
||||
|
||||
/obj/structure/steam_vent/atom_deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/iron(loc, 1)
|
||||
new /obj/item/stack/sheet/iron(loc)
|
||||
new /obj/item/stock_parts/water_recycler(loc, 1)
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user