diff --git a/code/datums/components/material_container.dm b/code/datums/components/material_container.dm index 27a85480c13..3500bca5bcf 100644 --- a/code/datums/components/material_container.dm +++ b/code/datums/components/material_container.dm @@ -537,6 +537,11 @@ mat = GET_MATERIAL_REF(mat) return materials[mat] +/datum/component/material_container/ui_static_data(mob/user) + var/list/data = list() + data["SHEET_MATERIAL_AMOUNT"] = SHEET_MATERIAL_AMOUNT + return data + /// List format is list(material_name = list(amount = ..., ref = ..., etc.)) /datum/component/material_container/ui_data(mob/user) var/list/data = list() diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 4860340c77d..66926d0cc1e 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -341,7 +341,7 @@ . = ..() var/mat_capacity = 0 for(var/datum/stock_part/matter_bin/new_matter_bin in component_parts) - mat_capacity += new_matter_bin.tier * 75000 + mat_capacity += new_matter_bin.tier * (37.5*SHEET_MATERIAL_AMOUNT) var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.max_amount = mat_capacity diff --git a/code/modules/cargo/exports/materials.dm b/code/modules/cargo/exports/materials.dm index c22874dc068..06c52305f51 100644 --- a/code/modules/cargo/exports/materials.dm +++ b/code/modules/cargo/exports/materials.dm @@ -1,5 +1,5 @@ /datum/export/material - cost = 5 // Cost per SHEET_MATERIAL_AMOUNT, which is 2000cm3 as of April 2016. + cost = 5 // Cost per SHEET_MATERIAL_AMOUNT, which is 100cm3 as of May 2023. message = "cm3 of developer's tears. Please, report this on github" amount_report_multiplier = SHEET_MATERIAL_AMOUNT var/material_id = null diff --git a/code/modules/cargo/exports/sheets.dm b/code/modules/cargo/exports/sheets.dm index 1000433ceb7..324dce084fc 100644 --- a/code/modules/cargo/exports/sheets.dm +++ b/code/modules/cargo/exports/sheets.dm @@ -65,7 +65,7 @@ // For base materials, see materials.dm /datum/export/stack/plasteel - cost = CARGO_CRATE_VALUE * 0.41 // 2000u of plasma + 2000u of iron. + cost = CARGO_CRATE_VALUE * 0.41 // 100u of plasma + 100u of iron. message = "of plasteel" export_types = list(/obj/item/stack/sheet/plasteel) diff --git a/code/modules/mining/machine_silo.dm b/code/modules/mining/machine_silo.dm index f76cdcde796..6033263f6b1 100644 --- a/code/modules/mining/machine_silo.dm +++ b/code/modules/mining/machine_silo.dm @@ -192,7 +192,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs) * - action: Text that visually describes the action (smelted/deposited/resupplied...) * - amount: The amount of sheets/objects deposited/withdrawn by this action. Positive for depositing, negative for withdrawing. * - noun: Name of the object the action was performed with (sheet, units, ore...) - * - [mats][list]: Assoc list in format (material datum = amount of raw materials). Wants the actual amount of raw (iron, glass...) materials involved in this action. If you have 10 metal sheets each worth 2000 iron you would pass a list with the iron material datum = 20000 + * - [mats][list]: Assoc list in format (material datum = amount of raw materials). Wants the actual amount of raw (iron, glass...) materials involved in this action. If you have 10 metal sheets each worth 100 iron you would pass a list with the iron material datum = 1000 */ /obj/machinery/ore_silo/proc/silo_log(obj/machinery/M, action, amount, noun, list/mats) if (!length(mats)) diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/trader.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/trader.dm index 30f0e9cbae4..5be6fc9575d 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/trader.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/trader.dm @@ -75,7 +75,7 @@ * Associated list of items able to be sold to the NPC with the money given for them. * The price given should be the "base" price; any price manipulation based on variables should be done with apply_sell_price_mods() * ADDITIONAL_DESCRIPTION is any additional text added to explain how the variables of the item effect the price; if it's stack based, it's final price depends how much is in the stack - * EX; /obj/item/stack/sheet/mineral/diamond = list(500, INFINITY, ", per 2000 cm3 sheet of diamond") + * EX; /obj/item/stack/sheet/mineral/diamond = list(500, INFINITY, ", per 100 cm3 sheet of diamond") * This list is filled by Initialize(), if you want to change the starting wanted items, modify initial_wanteds() */ var/list/wanted_items diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index c8cf81253fe..f5421be6da6 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -6,13 +6,13 @@ For the materials datum, it assumes you need reagents unless specified otherwise. To designate a material that isn't a reagent, you use one of the material IDs below. These are NOT ids in the usual sense (they aren't defined in the object or part of a datum), they are simply references used as part of a "has materials?" type proc. They all start with a $ to denote that they aren't reagents. -The currently supporting non-reagent materials. All material amounts are set as the define SHEET_MATERIAL_AMOUNT, which defaults to 2000 +The currently supporting non-reagent materials. All material amounts are set as the define SHEET_MATERIAL_AMOUNT, which defaults to 100 Don't add new keyword/IDs if they are made from an existing one (such as rods which are made from iron). Only add raw materials. Design Guidelines - When adding new designs, check rdreadme.dm to see what kind of things have already been made and where new stuff is needed. -- A single sheet of anything is 2000 units of material. Materials besides iron/glass require help from other jobs (mining for +- A single sheet of anything is 100 units of material. Materials besides iron/glass require help from other jobs (mining for other types of metals and chemistry for reagents). - Add the AUTOLATHE tag to */ diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm index fd3c4d7178b..5822a354f06 100644 --- a/code/modules/research/machinery/_production.dm +++ b/code/modules/research/machinery/_production.dm @@ -121,7 +121,12 @@ ui.open() /obj/machinery/rnd/production/ui_static_data(mob/user) - var/list/data = list() + var/list/data + if(isnull(materials.mat_container)) + data = list() + else + data = materials.mat_container.ui_static_data() + var/list/designs = list() var/datum/asset/spritesheet/research_designs/spritesheet = get_asset_datum(/datum/asset/spritesheet/research_designs) @@ -201,7 +206,7 @@ var/total_storage = 0 for(var/datum/stock_part/matter_bin/bin in component_parts) - total_storage += bin.tier * 75000 + total_storage += bin.tier * (37.5*SHEET_MATERIAL_AMOUNT) materials.set_local_size(total_storage) diff --git a/code/modules/vehicles/mecha/mech_fabricator.dm b/code/modules/vehicles/mecha/mech_fabricator.dm index 7ae78576493..97894b28992 100644 --- a/code/modules/vehicles/mecha/mech_fabricator.dm +++ b/code/modules/vehicles/mecha/mech_fabricator.dm @@ -92,7 +92,7 @@ //maximum stocking amount (default 300000, 600000 at T4) for(var/datum/stock_part/matter_bin/matter_bin in component_parts) T += matter_bin.tier - rmat.set_local_size((200000 + (T * 50000))) + rmat.set_local_size(((100*SHEET_MATERIAL_AMOUNT) + (T * (25*SHEET_MATERIAL_AMOUNT)))) //resources adjustment coefficient (1 -> 0.85 -> 0.7 -> 0.55) T = 1.15 diff --git a/code/modules/wiremod/core/component_printer.dm b/code/modules/wiremod/core/component_printer.dm index ca05ac68a87..9c99b5423ea 100644 --- a/code/modules/wiremod/core/component_printer.dm +++ b/code/modules/wiremod/core/component_printer.dm @@ -90,7 +90,7 @@ var/total_storage = 0 for(var/datum/stock_part/matter_bin/bin in component_parts) - total_storage += bin.tier * 75000 + total_storage += bin.tier * (37.5*SHEET_MATERIAL_AMOUNT) materials.set_local_size(total_storage) @@ -343,7 +343,7 @@ var/total_storage = 0 for(var/datum/stock_part/matter_bin/bin in component_parts) - total_storage += bin.tier * 75000 + total_storage += bin.tier * (37.5*SHEET_MATERIAL_AMOUNT) materials.set_local_size(total_storage) diff --git a/tgui/packages/tgui/interfaces/Fabrication/MaterialAccessBar.tsx b/tgui/packages/tgui/interfaces/Fabrication/MaterialAccessBar.tsx index 578feadb8e2..bbef2ad3f87 100644 --- a/tgui/packages/tgui/interfaces/Fabrication/MaterialAccessBar.tsx +++ b/tgui/packages/tgui/interfaces/Fabrication/MaterialAccessBar.tsx @@ -1,6 +1,6 @@ import { sortBy } from 'common/collections'; import { classes } from 'common/react'; -import { useLocalState } from '../../backend'; +import { useLocalState, useBackend } from '../../backend'; import { Flex, Button, Stack, AnimatedNumber } from '../../components'; import { formatSiUnit } from '../../format'; import { MaterialIcon } from './MaterialIcon'; @@ -72,6 +72,8 @@ type MaterialCounterProps = { const MaterialCounter = (props: MaterialCounterProps, context) => { const { material, onEjectRequested } = props; + const { data } = useBackend(context); + const { SHEET_MATERIAL_AMOUNT } = data; const [hovering, setHovering] = useLocalState( context, @@ -79,7 +81,7 @@ const MaterialCounter = (props: MaterialCounterProps, context) => { false ); - const canEject = material.amount > 2_000; + const canEject = material.amount > SHEET_MATERIAL_AMOUNT; return (
{ const { amount, available, material, onEject } = props; + const { data } = useBackend(context); + const { SHEET_MATERIAL_AMOUNT } = data; return (