mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 00:27:31 +01:00
Autolathe, protolathe, mech fab and comp printer now use defines for matter bins values. Also some production ui do. (#76020)
Changed hardcoded matter bins values to use defined `SHEET_MATERIAL_AMOUNT` for following stuff: autolathe, protolathe, mech fabricator and component printer. `Material Access Bar` and `MaterialIcon` used for protolathes, circuit printers and etc. now also use defined `SHEET_MATERIAL_AMOUNT`, via static ui data, to prevent same issues in future. Also changed some notes in /// parts just because why not.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user