Porting updates related to material datums. (#12317)
* Porting updates related to material datums. * art_type * oh oh
This commit is contained in:
@@ -24,6 +24,8 @@ Simple datum which is instanced once per type and is used for every object of sa
|
||||
var/value_per_unit = 0
|
||||
///Armor modifiers, multiplies an items normal armor vars by these amounts.
|
||||
var/armor_modifiers = list("melee" = 1, "bullet" = 1, "laser" = 1, "energy" = 1, "bomb" = 1, "bio" = 1, "rad" = 1, "fire" = 1, "acid" = 1)
|
||||
///How beautiful is this material per unit?
|
||||
var/beauty_modifier = 0
|
||||
|
||||
///This proc is called when the material is added to an object.
|
||||
/datum/material/proc/on_applied(atom/source, amount, material_flags)
|
||||
@@ -39,6 +41,9 @@ Simple datum which is instanced once per type and is used for every object of sa
|
||||
if(istype(source, /obj)) //objs
|
||||
on_applied_obj(source, amount, material_flags)
|
||||
|
||||
if(beauty_modifier)
|
||||
addtimer(CALLBACK(source, /datum.proc/_AddElement, list(/datum/element/beauty, beauty_modifier * amount)), 0)
|
||||
|
||||
///This proc is called when the material is added to an object specifically.
|
||||
/datum/material/proc/on_applied_obj(var/obj/o, amount, material_flags)
|
||||
if(material_flags & MATERIAL_AFFECT_STATISTICS)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
integrity_modifier = 0.1
|
||||
sheet_type = /obj/item/stack/sheet/glass
|
||||
value_per_unit = 0.0025
|
||||
beauty_modifier = 0.05
|
||||
armor_modifiers = list("melee" = 0.2, "bullet" = 0.2, "laser" = 0, "energy" = 1, "bomb" = 0, "bio" = 0.2, "rad" = 0.2, "fire" = 1, "acid" = 0.2) // yeah ok
|
||||
|
||||
/*
|
||||
@@ -35,6 +36,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/silver
|
||||
value_per_unit = 0.025
|
||||
beauty_modifier = 0.075
|
||||
|
||||
///Slight force increase
|
||||
/datum/material/gold
|
||||
@@ -46,6 +48,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/gold
|
||||
value_per_unit = 0.0625
|
||||
beauty_modifier = 0.15
|
||||
armor_modifiers = list("melee" = 1.1, "bullet" = 1.1, "laser" = 1.15, "energy" = 1.15, "bomb" = 1, "bio" = 1, "rad" = 1, "fire" = 0.7, "acid" = 1.1)
|
||||
|
||||
///Has no special properties
|
||||
@@ -58,6 +61,8 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/diamond
|
||||
value_per_unit = 0.25
|
||||
beauty_modifier = 0.3
|
||||
armor_modifiers = list("melee" = 1.3, "bullet" = 1.3, "laser" = 0.6, "energy" = 1, "bomb" = 1.2, "bio" = 1, "rad" = 1, "fire" = 1, "acid" = 1)
|
||||
|
||||
///Is slightly radioactive
|
||||
/datum/material/uranium
|
||||
@@ -68,6 +73,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/uranium
|
||||
value_per_unit = 0.05
|
||||
beauty_modifier = 0.3 //It shines so beautiful
|
||||
armor_modifiers = list("melee" = 1.5, "bullet" = 1.4, "laser" = 0.5, "energy" = 0.5, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 1, "acid" = 1)
|
||||
|
||||
/datum/material/uranium/on_applied(atom/source, amount, material_flags)
|
||||
@@ -88,6 +94,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/plasma
|
||||
value_per_unit = 0.1
|
||||
beauty_modifier = 0.15
|
||||
armor_modifiers = list("melee" = 1.4, "bullet" = 0.7, "laser" = 0, "energy" = 1.2, "bomb" = 0, "bio" = 1.2, "rad" = 1, "fire" = 0, "acid" = 0.5)
|
||||
|
||||
/datum/material/plasma/on_applied(atom/source, amount, material_flags)
|
||||
@@ -109,6 +116,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
color = list(119/255, 217/255, 396/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
|
||||
alpha = 200
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE)
|
||||
beauty_modifier = 0.5
|
||||
sheet_type = /obj/item/stack/sheet/bluespace_crystal
|
||||
value_per_unit = 0.15
|
||||
|
||||
@@ -121,6 +129,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/bananium
|
||||
value_per_unit = 0.5
|
||||
beauty_modifier = 0.5
|
||||
armor_modifiers = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 100, "bio" = 0, "rad" = 0, "fire" = 10, "acid" = 0) //Clowns cant be blown away
|
||||
|
||||
/datum/material/bananium/on_applied(atom/source, amount, material_flags)
|
||||
@@ -144,6 +153,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/titanium
|
||||
value_per_unit = 0.0625
|
||||
beauty_modifier = 0.05
|
||||
armor_modifiers = list("melee" = 1.35, "bullet" = 1.3, "laser" = 1.3, "energy" = 1.25, "bomb" = 1.25, "bio" = 1, "rad" = 1, "fire" = 0.7, "acid" = 1)
|
||||
|
||||
/datum/material/runite
|
||||
@@ -154,6 +164,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
strength_modifier = 1.3
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/runite
|
||||
beauty_modifier = 0.5
|
||||
armor_modifiers = list("melee" = 1.35, "bullet" = 2, "laser" = 0.5, "energy" = 1.25, "bomb" = 1.25, "bio" = 1, "rad" = 1, "fire" = 1.4, "acid" = 1) //rune is weak against magic lasers but strong against bullets. This is the combat triangle.
|
||||
|
||||
///Force decrease
|
||||
@@ -165,6 +176,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
strength_modifier = 0.85
|
||||
sheet_type = /obj/item/stack/sheet/plastic
|
||||
value_per_unit = 0.0125
|
||||
beauty_modifier = -0.01
|
||||
armor_modifiers = list("melee" = 1.5, "bullet" = 1.1, "laser" = 0.3, "energy" = 0.5, "bomb" = 1, "bio" = 1, "rad" = 1, "fire" = 1.1, "acid" = 1)
|
||||
|
||||
///Force decrease and mushy sound effect. (Not yet implemented)
|
||||
@@ -176,6 +188,30 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
strength_modifier = 0.8
|
||||
value_per_unit = 0.025
|
||||
|
||||
/datum/material/wood
|
||||
name = "wood"
|
||||
id = "wood"
|
||||
desc = "Flexible, durable, but flamable. Hard to come across in space."
|
||||
color = "#bb8e53"
|
||||
strength_modifier = 0.5
|
||||
sheet_type = /obj/item/stack/sheet/mineral/wood
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE)
|
||||
value_per_unit = 0.06
|
||||
beauty_modifier = 0.1
|
||||
armor_modifiers = list("melee" = 1.1, "bullet" = 1.1, "laser" = 0.4, "energy" = 0.4, "bomb" = 1, "bio" = 0.2, "rad" = 0, "fire" = 0, "acid" = 0.3)
|
||||
|
||||
/datum/material/wood/on_applied_obj(obj/source, amount, material_flags)
|
||||
. = ..()
|
||||
if(material_flags & MATERIAL_AFFECT_STATISTICS)
|
||||
var/obj/wooden = source
|
||||
wooden.resistance_flags |= FLAMMABLE
|
||||
|
||||
/datum/material/wood/on_removed_obj(obj/source, material_flags)
|
||||
. = ..()
|
||||
if(material_flags & MATERIAL_AFFECT_STATISTICS)
|
||||
var/obj/wooden = source
|
||||
wooden.resistance_flags &= ~FLAMMABLE
|
||||
|
||||
///Stronk force increase
|
||||
/datum/material/adamantine
|
||||
name = "adamantine"
|
||||
@@ -186,6 +222,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/adamantine
|
||||
value_per_unit = 0.25
|
||||
beauty_modifier = 0.4
|
||||
armor_modifiers = list("melee" = 1.5, "bullet" = 1.5, "laser" = 1.3, "energy" = 1.3, "bomb" = 1, "bio" = 1, "rad" = 1, "fire" = 2.5, "acid" = 1)
|
||||
|
||||
///RPG Magic. (Admin only)
|
||||
@@ -197,6 +234,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/mythril
|
||||
value_per_unit = 0.75
|
||||
beauty_modifier = 0.5
|
||||
armor_modifiers = list("melee" = 2, "bullet" = 2, "laser" = 2, "energy" = 2, "bomb" = 2, "bio" = 2, "rad" = 2, "fire" = 2, "acid" = 2)
|
||||
|
||||
/datum/material/mythril/on_applied_obj(atom/source, amount, material_flags)
|
||||
|
||||
Reference in New Issue
Block a user