Files
CHOMPStation2/code/modules/materials/material_sheets.dm
2015-05-17 03:02:03 +09:30

174 lines
4.1 KiB
Plaintext

// Stacked resources.
/obj/item/stack/material
force = 5.0
throwforce = 5
w_class = 3.0
throw_speed = 3
throw_range = 3
var/default_type = DEFAULT_WALL_MATERIAL
var/material/material
var/perunit
var/apply_colour //temp pending icon rewrite
/obj/item/stack/material/New()
..()
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
if(!default_type)
default_type = DEFAULT_WALL_MATERIAL
material = get_material_by_name("[default_type]")
if(!material)
qdel(src)
return 0
// Update from material datum.
name = "[material.display_name] sheets"
desc = "A stack of sheets of [material.display_name]."
recipes = material.get_recipes()
stacktype = material.stack_type
origin_tech = material.stack_origin_tech
perunit = material.stack_per_sheet
if(apply_colour)
color = material.icon_colour
if(material.conductive)
flags |= CONDUCT
if(!islist(matter))
matter = list()
if(material.composite_material)
for(var/material_string in material.composite_material)
matter[material_string] = material.composite_material[material_string]
else
matter[material.name] = material.stack_per_sheet
return 1
/obj/item/stack/material/cyborg
uses_charge = 1
charge_costs = list(1000)
gender = NEUTER
matter = null
/obj/item/stack/material/cyborg/New()
if(..())
name = "[material.display_name] synthesiser"
desc = "A device that synthesises [material.display_name]."
/obj/item/stack/material/cyborg/plastic
default_type = "plastic"
/obj/item/stack/material/cyborg/steel
default_type = "steel"
/obj/item/stack/material/cyborg/plasteel
default_type = "plasteel"
/obj/item/stack/material/cyborg/wood
default_type = "wood"
/obj/item/stack/material/cyborg/glass
default_type = "glass"
/obj/item/stack/material/cyborg/glass/reinforced
default_type = "reinforced glass"
charge_costs = list(500, 1000)
obj/item/stack/material/iron
name = "iron"
icon_state = "sheet-silver"
default_type = "iron"
apply_colour = 1
/obj/item/stack/material/sandstone
name = "sandstone brick"
singular_name = "sandstone brick"
icon_state = "sheet-sandstone"
default_type = "sandstone"
/obj/item/stack/material/diamond
name = "diamond"
icon_state = "sheet-diamond"
default_type = "diamond"
/obj/item/stack/material/uranium
name = "uranium"
icon_state = "sheet-uranium"
default_type = "uranium"
/obj/item/stack/material/phoron
name = "solid phoron"
icon_state = "sheet-phoron"
default_type = "phoron"
/obj/item/stack/material/plastic
name = "Plastic"
icon_state = "sheet-plastic"
default_type = "plastic"
/obj/item/stack/material/gold
name = "gold"
icon_state = "sheet-gold"
default_type = "gold"
/obj/item/stack/material/silver
name = "silver"
icon_state = "sheet-silver"
default_type = "silver"
//Valuable resource, cargo can sell it.
/obj/item/stack/material/platinum
name = "platinum"
icon_state = "sheet-adamantine"
default_type = "platinum"
//Extremely valuable to Research.
/obj/item/stack/material/mhydrogen
name = "metallic hydrogen"
icon_state = "sheet-mythril"
default_type = "mhydrogen"
//Fuel for MRSPACMAN generator.
/obj/item/stack/material/tritium
name = "tritium"
icon_state = "sheet-silver"
default_type = "tritium"
apply_colour = 1
/obj/item/stack/material/osmium
name = "osmium"
icon_state = "sheet-silver"
default_type = "osmium"
apply_colour = 1
/obj/item/stack/material/steel
name = DEFAULT_WALL_MATERIAL
singular_name = "steel sheet"
icon_state = "sheet-metal"
default_type = DEFAULT_WALL_MATERIAL
/obj/item/stack/material/plasteel
name = "plasteel"
singular_name = "plasteel sheet"
icon_state = "sheet-plasteel"
item_state = "sheet-metal"
default_type = "plasteel"
/obj/item/stack/material/wood
name = "wooden plank"
singular_name = "wood plank"
icon_state = "sheet-wood"
default_type = "wood"
/obj/item/stack/material/cloth
name = "cloth"
singular_name = "cloth roll"
icon_state = "sheet-cloth"
/obj/item/stack/material/cardboard
name = "cardboard"
singular_name = "cardboard sheet"
icon_state = "sheet-card"
default_type = "cardboard"