[MIRROR] Techweb Fixes (#11299)

Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-08-04 15:36:43 -07:00
committed by GitHub
parent 399e4948e8
commit ac77b94d4b
29 changed files with 518 additions and 805 deletions

View File

@@ -464,8 +464,19 @@
/datum/component/material_container/proc/on_attackby(datum/source, obj/item/I, mob/living/user)
SIGNAL_HANDLER
if(istype(I, /obj/item/storage/bag/sheetsnatcher))
return OnSheetSnatcher(source, user, I)
return attempt_insert(user, I)
/datum/component/material_container/proc/OnSheetSnatcher(datum/source, mob/user, obj/item/storage/bag/sheetsnatcher/S)
SIGNAL_HANDLER
// this is called both locally and from remote_materials
var/list/sheets = S.quick_empty()
for(var/obj/item/stack/material/M as anything in sheets)
attempt_insert(user, M)
/// Proc that allows players to fill the parent with mats
/datum/component/material_container/proc/attempt_insert(mob/living/user, obj/item/weapon)
if(istype(parent, /obj/machinery))
@@ -714,17 +725,16 @@
return sheet_amt * SHEET_MATERIAL_AMOUNT
return FALSE
/datum/component/material_container/tgui_static_data(mob/user)
var/list/data = list()
var/list/data = ..()
data["SHEET_MATERIAL_AMOUNT"] = SHEET_MATERIAL_AMOUNT
return data
/// List format is list(list(name = ..., amount = ..., ref = ..., etc.), list(...))
/datum/component/material_container/tgui_data(mob/user, skip_empty = FALSE)
var/list/data = list()
for(var/datum/material/material as anything in materials)
var/amount = materials[material]

View File

@@ -165,6 +165,9 @@ handles linking back and forth.
if(mat_container_flags & MATCONTAINER_NO_INSERT)
return
if(istype(target, /obj/item/storage/bag/sheetsnatcher))
return mat_container.OnSheetSnatcher(source, target, user)
return attempt_insert(user, target)
/// Insert mats into silo