This commit is contained in:
Letter N
2020-07-16 20:42:02 +08:00
parent abd0ac089d
commit 819ca63456
4 changed files with 9 additions and 1 deletions

View File

@@ -105,7 +105,7 @@
/// Proc specifically for inserting items, returns the amount of materials entered. /// Proc specifically for inserting items, returns the amount of materials entered.
/datum/component/material_container/proc/insert_item(obj/item/I, var/multiplier = 1, stack_amt) /datum/component/material_container/proc/insert_item(obj/item/I, var/multiplier = 1, stack_amt)
if(!I) if(QDELETED(I))
return FALSE return FALSE
multiplier = CEILING(multiplier, 0.01) multiplier = CEILING(multiplier, 0.01)

View File

@@ -98,6 +98,8 @@
process_ore(AM) process_ore(AM)
/obj/machinery/mineral/processing_unit/proc/process_ore(obj/item/stack/ore/O) /obj/machinery/mineral/processing_unit/proc/process_ore(obj/item/stack/ore/O)
if(QDELETED(O))
return
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/material_amount = materials.get_item_material_amount(O) var/material_amount = materials.get_item_material_amount(O)
if(!materials.has_space(material_amount)) if(!materials.has_space(material_amount))

View File

@@ -57,6 +57,8 @@
. += "<span class='notice'>The status display reads: Smelting <b>[ore_multiplier]</b> sheet(s) per piece of ore.<br>Reward point generation at <b>[point_upgrade*100]%</b>.<br>Ore pickup speed at <b>[ore_pickup_rate]</b>.</span>" . += "<span class='notice'>The status display reads: Smelting <b>[ore_multiplier]</b> sheet(s) per piece of ore.<br>Reward point generation at <b>[point_upgrade*100]%</b>.<br>Ore pickup speed at <b>[ore_pickup_rate]</b>.</span>"
/obj/machinery/mineral/ore_redemption/proc/smelt_ore(obj/item/stack/ore/O) /obj/machinery/mineral/ore_redemption/proc/smelt_ore(obj/item/stack/ore/O)
if(QDELETED(O))
return
var/datum/component/material_container/mat_container = materials.mat_container var/datum/component/material_container/mat_container = materials.mat_container
if (!mat_container) if (!mat_container)
return return

View File

@@ -92,6 +92,8 @@
return ..() return ..()
/obj/machinery/mineral/stacking_machine/HasProximity(atom/movable/AM) /obj/machinery/mineral/stacking_machine/HasProximity(atom/movable/AM)
if(QDELETED(AM))
return
if(istype(AM, /obj/item/stack/sheet) && AM.loc == get_step(src, input_dir)) if(istype(AM, /obj/item/stack/sheet) && AM.loc == get_step(src, input_dir))
process_sheet(AM) process_sheet(AM)
@@ -104,6 +106,8 @@
return TRUE return TRUE
/obj/machinery/mineral/stacking_machine/proc/process_sheet(obj/item/stack/sheet/inp) /obj/machinery/mineral/stacking_machine/proc/process_sheet(obj/item/stack/sheet/inp)
if(QDELETED(inp))
return
var/key = inp.merge_type var/key = inp.merge_type
var/obj/item/stack/sheet/storage = stack_list[key] var/obj/item/stack/sheet/storage = stack_list[key]
if(!storage) //It's the first of this sheet added if(!storage) //It's the first of this sheet added