mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
[MIRROR] [READY] Bespoke Datum Mats (#2737)
* [READY] Bespoke Datum Mats * Update sheetifier.dm Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com> Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
co-authored by
TemporalOroboros
Azarak
parent
d67a62cce4
commit
94f9a384b0
@@ -320,7 +320,7 @@
|
||||
if(remaining_mats)
|
||||
for(var/M=1 to remaining_mats)
|
||||
new stack_type(get_turf(loc))
|
||||
else if(custom_materials[SSmaterials.GetMaterialRef(/datum/material/iron)])
|
||||
else if(custom_materials[GET_MATERIAL_REF(/datum/material/iron)])
|
||||
new /obj/item/stack/rods(get_turf(loc), 2)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
var/turf/newturf = T.PlaceOnTop(/turf/closed/wall/material)
|
||||
var/list/material_list = list()
|
||||
if(S.material_type)
|
||||
material_list[SSmaterials.GetMaterialRef(S.material_type)] = MINERAL_MATERIAL_AMOUNT * 2
|
||||
material_list[GET_MATERIAL_REF(S.material_type)] = MINERAL_MATERIAL_AMOUNT * 2
|
||||
if(material_list)
|
||||
newturf.set_custom_materials(material_list)
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
var/amount_mod = disassembled ? 0 : -2
|
||||
for(var/mat in custom_materials)
|
||||
var/datum/material/custom_material = SSmaterials.GetMaterialRef(mat)
|
||||
var/datum/material/custom_material = GET_MATERIAL_REF(mat)
|
||||
var/amount = max(0,round(custom_materials[mat]/MINERAL_MATERIAL_AMOUNT) + amount_mod)
|
||||
if(amount > 0)
|
||||
new custom_material.sheet_type(drop_location(),amount)
|
||||
@@ -520,7 +520,7 @@ Moving interrupts
|
||||
var/list/carving_cost = statue_costs[statue_path]
|
||||
var/enough_materials = TRUE
|
||||
for(var/required_material in carving_cost)
|
||||
if(!custom_materials[required_material] || custom_materials[required_material] < carving_cost[required_material])
|
||||
if(!has_material_type(required_material, TRUE, carving_cost[required_material]))
|
||||
enough_materials = FALSE
|
||||
break
|
||||
if(enough_materials)
|
||||
|
||||
Reference in New Issue
Block a user