mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-29 11:31:51 +00:00
Merge branch 'dev' into ofBeesAndHoney
Conflicts: baystation12.dme
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
..()
|
||||
recipes += new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1)
|
||||
recipes += new/datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1)
|
||||
recipes += new/datum/stack_recipe("knife grip", /obj/item/weapon/material/butterflyhandle, 4, time = 20, one_per_turf = 0, on_floor = 1)
|
||||
recipes += new/datum/stack_recipe("knife grip", /obj/item/weapon/material/butterflyhandle, 4, time = 20, one_per_turf = 0, on_floor = 1, supplied_material = "[name]")
|
||||
|
||||
/material/sandstone/generate_recipes()
|
||||
..()
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
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
|
||||
if(islist(material.stack_origin_tech))
|
||||
@@ -40,13 +37,37 @@
|
||||
flags |= CONDUCT
|
||||
|
||||
matter = material.get_matter()
|
||||
update_strings()
|
||||
return 1
|
||||
|
||||
/obj/item/stack/material/get_material()
|
||||
return material
|
||||
|
||||
/obj/item/stack/material/proc/update_strings()
|
||||
// Update from material datum.
|
||||
singular_name = material.sheet_singular_name
|
||||
|
||||
if(amount>1)
|
||||
name = "[material.use_name] [material.sheet_plural_name]"
|
||||
desc = "A stack of [material.use_name] [material.sheet_plural_name]."
|
||||
gender = PLURAL
|
||||
else
|
||||
name = "[material.use_name] [material.sheet_singular_name]"
|
||||
desc = "A [material.sheet_singular_name] of [material.use_name]."
|
||||
gender = NEUTER
|
||||
|
||||
/obj/item/stack/material/use(var/used)
|
||||
. = ..()
|
||||
update_strings()
|
||||
return
|
||||
|
||||
/obj/item/stack/material/transfer_to(obj/item/stack/S, var/tamount=null, var/type_verified)
|
||||
var/obj/item/stack/material/M = S
|
||||
if(!istype(M) || material.name != M.material.name)
|
||||
return 0
|
||||
..(S,tamount,1)
|
||||
if(src) update_strings()
|
||||
if(M) M.update_strings()
|
||||
|
||||
/obj/item/stack/material/attack_self(var/mob/user)
|
||||
if(!material.build_windows(user, src))
|
||||
@@ -69,10 +90,14 @@
|
||||
|
||||
/obj/item/stack/material/sandstone
|
||||
name = "sandstone brick"
|
||||
singular_name = "sandstone brick"
|
||||
icon_state = "sheet-sandstone"
|
||||
default_type = "sandstone"
|
||||
|
||||
/obj/item/stack/material/marble
|
||||
name = "marble brick"
|
||||
icon_state = "sheet-marble"
|
||||
default_type = "marble"
|
||||
|
||||
/obj/item/stack/material/diamond
|
||||
name = "diamond"
|
||||
icon_state = "sheet-diamond"
|
||||
@@ -130,62 +155,53 @@
|
||||
|
||||
/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"
|
||||
default_type = "cloth"
|
||||
|
||||
/obj/item/stack/material/cardboard
|
||||
name = "cardboard"
|
||||
singular_name = "cardboard sheet"
|
||||
icon_state = "sheet-card"
|
||||
default_type = "cardboard"
|
||||
|
||||
/obj/item/stack/material/leather
|
||||
name = "leather"
|
||||
desc = "The by-product of mob grinding."
|
||||
singular_name = "leather piece"
|
||||
icon_state = "sheet-leather"
|
||||
default_type = "leather"
|
||||
|
||||
/obj/item/stack/material/glass
|
||||
name = "glass"
|
||||
singular_name = "glass sheet"
|
||||
icon_state = "sheet-glass"
|
||||
default_type = "glass"
|
||||
|
||||
/obj/item/stack/material/glass/reinforced
|
||||
name = "reinforced glass"
|
||||
singular_name = "reinforced glass sheet"
|
||||
icon_state = "sheet-rglass"
|
||||
default_type = "reinforced glass"
|
||||
default_type = "rglass"
|
||||
|
||||
/obj/item/stack/material/glass/phoronglass
|
||||
name = "phoron glass"
|
||||
singular_name = "phoron glass sheet"
|
||||
icon_state = "sheet-phoronglass"
|
||||
default_type = "phoron glass"
|
||||
default_type = "phglass"
|
||||
|
||||
/obj/item/stack/material/glass/phoronrglass
|
||||
name = "reinforced phoron glass"
|
||||
singular_name = "reinforced phoron glass sheet"
|
||||
icon_state = "sheet-phoronrglass"
|
||||
default_type = "reinforced phoron glass"
|
||||
default_type = "rphglass"
|
||||
|
||||
@@ -34,5 +34,5 @@
|
||||
|
||||
/obj/item/stack/material/cyborg/glass/reinforced
|
||||
icon_state = "sheet-rglass"
|
||||
default_type = "reinforced glass"
|
||||
default_type = "rglass"
|
||||
charge_costs = list(500, 1000)
|
||||
@@ -27,6 +27,17 @@
|
||||
// Assoc list containing all material datums indexed by name.
|
||||
var/list/name_to_material
|
||||
|
||||
//Returns the material the object is made of, if applicable.
|
||||
//Will we ever need to return more than one value here? Or should we just return the "dominant" material.
|
||||
/obj/proc/get_material()
|
||||
return null
|
||||
|
||||
//mostly for convenience
|
||||
/obj/proc/get_material_name()
|
||||
var/material/material = get_material()
|
||||
if(material)
|
||||
return material.name
|
||||
|
||||
// Builds the datum list above.
|
||||
/proc/populate_material_list(force_remake=0)
|
||||
if(name_to_material && !force_remake) return // Already set up!
|
||||
@@ -44,12 +55,20 @@ var/list/name_to_material
|
||||
populate_material_list()
|
||||
return name_to_material[name]
|
||||
|
||||
/proc/material_display_name(name)
|
||||
var/material/material = get_material_by_name(name)
|
||||
if(material)
|
||||
return material.display_name
|
||||
return null
|
||||
|
||||
// Material definition and procs follow.
|
||||
/material
|
||||
var/name // Unique name for use in indexing the list.
|
||||
var/display_name // Prettier name for display.
|
||||
var/use_name
|
||||
var/flags = 0 // Various status modifiers.
|
||||
var/sheet_singular_name = "sheet"
|
||||
var/sheet_plural_name = "sheets"
|
||||
|
||||
// Shards/tables/structures
|
||||
var/shard_type = SHARD_SHRAPNEL // Path of debris object.
|
||||
@@ -231,6 +250,8 @@ var/list/name_to_material
|
||||
weight = 24
|
||||
hardness = 40
|
||||
stack_origin_tech = list(TECH_MATERIAL = 4)
|
||||
sheet_singular_name = "ingot"
|
||||
sheet_plural_name = "ingots"
|
||||
|
||||
/material/gold/bronze //placeholder for ashtrays
|
||||
name = "bronze"
|
||||
@@ -243,6 +264,8 @@ var/list/name_to_material
|
||||
weight = 22
|
||||
hardness = 50
|
||||
stack_origin_tech = list(TECH_MATERIAL = 3)
|
||||
sheet_singular_name = "ingot"
|
||||
sheet_plural_name = "ingots"
|
||||
|
||||
/material/phoron
|
||||
name = "phoron"
|
||||
@@ -254,6 +277,8 @@ var/list/name_to_material
|
||||
hardness = 30
|
||||
stack_origin_tech = list(TECH_MATERIAL = 2, TECH_PHORON = 2)
|
||||
door_icon_base = "stone"
|
||||
sheet_singular_name = "crystal"
|
||||
sheet_plural_name = "crystals"
|
||||
|
||||
/*
|
||||
// Commenting this out while fires are so spectacularly lethal, as I can't seem to get this balanced appropriately.
|
||||
@@ -282,6 +307,8 @@ var/list/name_to_material
|
||||
weight = 22
|
||||
hardness = 55
|
||||
door_icon_base = "stone"
|
||||
sheet_singular_name = "brick"
|
||||
sheet_plural_name = "bricks"
|
||||
|
||||
/material/stone/marble
|
||||
name = "marble"
|
||||
@@ -289,6 +316,7 @@ var/list/name_to_material
|
||||
weight = 26
|
||||
hardness = 100
|
||||
integrity = 201 //hack to stop kitchen benches being flippable, todo: refactor into weight system
|
||||
stack_type = /obj/item/stack/material/marble
|
||||
|
||||
/material/steel
|
||||
name = DEFAULT_WALL_MATERIAL
|
||||
@@ -299,7 +327,7 @@ var/list/name_to_material
|
||||
icon_colour = "#666666"
|
||||
|
||||
/material/steel/holographic
|
||||
name = "holographic " + DEFAULT_WALL_MATERIAL
|
||||
name = "holo" + DEFAULT_WALL_MATERIAL
|
||||
display_name = DEFAULT_WALL_MATERIAL
|
||||
stack_type = null
|
||||
shard_type = SHARD_NONE
|
||||
@@ -409,7 +437,8 @@ var/list/name_to_material
|
||||
return (hardness > 35) //todo
|
||||
|
||||
/material/glass/reinforced
|
||||
name = "reinforced glass"
|
||||
name = "rglass"
|
||||
display_name = "reinforced glass"
|
||||
stack_type = /obj/item/stack/material/glass/reinforced
|
||||
flags = MATERIAL_BRITTLE
|
||||
icon_colour = "#00E1FF"
|
||||
@@ -427,7 +456,8 @@ var/list/name_to_material
|
||||
rod_product = null
|
||||
|
||||
/material/glass/phoron
|
||||
name = "phoron glass"
|
||||
name = "phglass"
|
||||
display_name = "phoron glass"
|
||||
stack_type = /obj/item/stack/material/glass/phoronglass
|
||||
flags = MATERIAL_BRITTLE
|
||||
ignition_point = PHORON_MINIMUM_BURN_TEMPERATURE+300
|
||||
@@ -439,7 +469,8 @@ var/list/name_to_material
|
||||
rod_product = /obj/item/stack/material/glass/phoronrglass
|
||||
|
||||
/material/glass/phoron/reinforced
|
||||
name = "reinforced phoron glass"
|
||||
name = "rphglass"
|
||||
display_name = "reinforced phoron glass"
|
||||
stack_type = /obj/item/stack/material/glass/phoronrglass
|
||||
stack_origin_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 2)
|
||||
composite_material = list() //todo
|
||||
@@ -463,7 +494,7 @@ var/list/name_to_material
|
||||
stack_origin_tech = list(TECH_MATERIAL = 3)
|
||||
|
||||
/material/plastic/holographic
|
||||
name = "holographic plastic"
|
||||
name = "holoplastic"
|
||||
display_name = "plastic"
|
||||
stack_type = null
|
||||
shard_type = SHARD_NONE
|
||||
@@ -473,12 +504,16 @@ var/list/name_to_material
|
||||
stack_type = /obj/item/stack/material/osmium
|
||||
icon_colour = "#9999FF"
|
||||
stack_origin_tech = list(TECH_MATERIAL = 5)
|
||||
sheet_singular_name = "ingot"
|
||||
sheet_plural_name = "ingots"
|
||||
|
||||
/material/tritium
|
||||
name = "tritium"
|
||||
stack_type = /obj/item/stack/material/tritium
|
||||
icon_colour = "#777777"
|
||||
stack_origin_tech = list(TECH_MATERIAL = 5)
|
||||
sheet_singular_name = "ingot"
|
||||
sheet_plural_name = "ingots"
|
||||
|
||||
/material/mhydrogen
|
||||
name = "mhydrogen"
|
||||
@@ -492,12 +527,16 @@ var/list/name_to_material
|
||||
icon_colour = "#9999FF"
|
||||
weight = 27
|
||||
stack_origin_tech = list(TECH_MATERIAL = 2)
|
||||
sheet_singular_name = "ingot"
|
||||
sheet_plural_name = "ingots"
|
||||
|
||||
/material/iron
|
||||
name = "iron"
|
||||
stack_type = /obj/item/stack/material/iron
|
||||
icon_colour = "#5C5454"
|
||||
weight = 22
|
||||
sheet_singular_name = "ingot"
|
||||
sheet_plural_name = "ingots"
|
||||
|
||||
// Adminspawn only, do not let anyone get this.
|
||||
/material/voxalloy
|
||||
@@ -528,9 +567,11 @@ var/list/name_to_material
|
||||
dooropen_noise = 'sound/effects/doorcreaky.ogg'
|
||||
door_icon_base = "wood"
|
||||
destruction_desc = "splinters"
|
||||
sheet_singular_name = "plank"
|
||||
sheet_plural_name = "planks"
|
||||
|
||||
/material/wood/holographic
|
||||
name = "holographic wood"
|
||||
name = "holowood"
|
||||
display_name = "wood"
|
||||
stack_type = null
|
||||
shard_type = SHARD_NONE
|
||||
@@ -566,6 +607,8 @@ var/list/name_to_material
|
||||
icon_colour = "#402821"
|
||||
icon_reinf = "reinf_cult"
|
||||
shard_type = SHARD_STONE_PIECE
|
||||
sheet_singular_name = "brick"
|
||||
sheet_plural_name = "bricks"
|
||||
|
||||
/material/cult/place_dismantled_girder(var/turf/target)
|
||||
new /obj/structure/girder/cult(target)
|
||||
@@ -586,6 +629,8 @@ var/list/name_to_material
|
||||
dooropen_noise = 'sound/effects/attackblob.ogg'
|
||||
door_icon_base = "resin"
|
||||
melting_point = T0C+300
|
||||
sheet_singular_name = "blob"
|
||||
sheet_plural_name = "blobs"
|
||||
|
||||
/material/resin/can_open_material_door(var/mob/living/user)
|
||||
var/mob/living/carbon/M = user
|
||||
@@ -610,6 +655,8 @@ var/list/name_to_material
|
||||
flags = MATERIAL_PADDING
|
||||
ignition_point = T0C+232
|
||||
melting_point = T0C+300
|
||||
sheet_singular_name = "tile"
|
||||
sheet_plural_name = "tiles"
|
||||
|
||||
/material/cotton
|
||||
name = "cotton"
|
||||
|
||||
Reference in New Issue
Block a user