Files
Bubberstation/code/datums/materials/basemats.dm
T
ac7ddd1dcc [MIRROR] ArCargo: Adds the Galactic Materials Stock Market V1.2 (Free Market Edition) [MDB IGNORE] (#24038)
* ArCargo: Adds the Galactic Materials Stock Market V1.2 (Free Market Edition) (#78500)

## About The Pull Request

**This PR is a rerelease of #78164, with some bells and whistles.** As
such, most of the core functionality is the same, but with some tweaks
to balance the gameplay and prevent bike levels of profit. I've tried to
bold the new additions to make it easier to read for those coming back
for the second pass.

![image](https://github.com/tgstation/tgstation/assets/41715314/ff9bf038-524d-44fc-81bb-c6ff97fef6dd)
This PR adds a new machine that can be bought called the **Galactic
Mineral Market** (GMM). The Galactic Mineral Market (GMM) allows you to
buy and sell minerals wholesale from the market machine. It goes
something like this:

### 1. Getting the Machine:
The GMM can be bought as an un-assembled machine for 600 credits from
cargo. It's a low cost, but its not mapped in standard, so if you're
confident in your miners, you shouldn't necessarily need one for the
department. Otherwise, it's available for other crewmembers to buy for
cost.

The cargo pack comes will all supplies necessary to finish the machine.
Tools not included.

### 2. Buying Low
Using the machine's UI, you can see all traded minerals and their
associated prices. Buy prices are played straight, and can be bought for
material price, times the quantity. The order is then instantly placed
on the cargo shuttle, and will be deducted from the buyer's account on
shuttle send. **A single order can only have 10 different stacks of
materials in it. So, that can be 100 sheets of iron and 1 of everything
else, or 500 sheets of iron. After that you're blocked from buying more
sheets until you've sent the order.**

Cargo staff with standard cargo access may toggle the machine to order
directly from the cargo budget. Otherwise, materials are only purchased
from private accounts.

All purchases are treated as private and must be opened by the recipient
like private orders.

### 3. Selling High

It's stocks time. To sell minerals on the market, simply insert any
relevant metal stock into the machine. This produces a totally original
and not-a-bounty-cube stock block, which can be sold on the cargo
shuttle for cargo funds. Stock blocks can also be price-tagged as well
following their standard process.

**Stock blocks start out a bright pink and are worth the value of that
material at that time, but over time their color will degrade. After a
full 5 minutes, stock blocks will switch over to a purple hue, and their
value will once again become liquid, subject to the current market
value. This encourages players to be a bit more fast on their feet than
before instead of just waiting forever for all of their investments to
arrive at the perfect value, before the inevitable "rest of the game"
tries to upend your investing.**

Sold cargo stocks are subject at a 20% processing fee as part of the
galactic mineral market.
### 4. Outside Factors

**In-game events like the Crab-17 or the Market crash event will cause
stocks to bottom out completely, and for the market to become
unavailable until the market stabilizes. Thankfully, once the market has
crashed, typically stocks will recovery and gain back some value,
allowing for fast acting market movers to capitalize on rough markets.**

**Additionally, low value materials like iron and glass have an extra
stipulation, as their value goes all the way down to 0 credits. In that
case, you are unable to buy them at that value as a market protection.
Be careful that you don't see a reset or crash when you're planning on
selling your horde of iron and glass stocks!**

Additionally, market events can occur during the round that can more
sharply adjust a single stock's price and completely rebound it's
trajectory. These events are always mentioned in the station
announcement's economics report.

### Other notes:
The market does not cover all minerals, partially for consistency
purposes as well as for balance reasons. Plasma, being a unique material
that only Nanotrasen has their hands on, is the sole exporter of plasma
in the system, so it stands to reason that it's not on the market, and
remains a solo export. Bananium, as it has a rare and expensive
conversion rate, works the opposite way, and as such isn't listed on the
market either, with the sole source being single cargo sales. All others
just don't make much sense to include into the market at this second, so
I left them out for now.

**Alright now below I'm going to cover the math and shit so if that's
not what you care about then please scroll past.**
<details>
  <summary>Warning: Arcane is about to talk about the math</summary>
Alright.
So this adds a new stock_market subsystem, which fires once every 20
seconds. I'm still fairly new to subsystem design so I'm probably going
to need some feedback on cleaning this up to make it look nicer and run
smoother.

So we have 4 associated lists, each attached to the relevant traded
datum; this tracks prices, market trends, how long that trend is going
to last in SS fires, and market quantity.

Prices fluctuate between 0.5x and 3x the material's single sheet value.
This could be tweaked even farther in the future, but for now I'm
keeping it at this nice clean margin. Prices fluctuate based on a
gaussian normal distribution that is centered on different points based
on their **trend**. Upward trending materials are centered in such a way
that they'll almost certainly go upwards, but being that it's based on a
random chance, not always. Vis versa, downward trends should tend to
lose value at about the same rate. We also change our rounding based on
this trend data, in order to prevent low price values like iron and
glass from getting stuck in the same value or freefall drop over time
just because of rounding down. Similarly, neutral trending materials
will not change nearly as much, and will generally stay at around the
same amount.

When buying or selling a material, the quantity of that material will
change on the market. The magnitude of that change depends on how much
of that material currently exists on the market. Buying a low quantity
material like diamond for example will tangibly increase that material's
cost, while buying stacks and stacks of iron and glass won't do much
damage to the price of iron as there's usually around 500 full stacks on
the market to start with. It's applied at a relative percentage of
(qty_changed / new_total_on_market) * price of goods bought/sold at.

In addition to that, there are random "market events" that can occur
randomly, which you might miss if you don't follow the newscaster
economy news. These three events are fairly barebones now, but in
general they have a 1% chance of happening per material, and can more
dramatically increase, decrease, or fully reset the value of a material
on the market back to it's standard value. This opens up for doing more
with it in the future, but that's a later problem.
</details>

## Why It's Good For The Game

This independently resolves some issues related to #78040, that being
that lowpop stations, or shifts with few miners would have a new way to
be able to still get some access to minerals in a given round. This also
provides a unique minigame and alternative way to acquire money in a
given shift, using minerals.

**"But Arcane,** I hear you ask. **"Isn't this just the same thing you
tried doing way back when and then reverted in #50537?**
Well, fuck man, how you doing I haven't see you around in forever also
no you're completely wrong and here's why

**This PR is no longer contingent on the rest of ArcMining in it's
current iteration.** I have introduced some extra factors into the
gameplay as well to try and curb the creation of bikes within gameplay.
This also provides a massive benefit to round progression and gives the
QM and the cargo members the ability to prevent round progress from
stalling by buying round-critical resources.

Not to mention, as the GMM is not cargo required, more cargo integrated,
it also functions as economy content for the rest of the crew.

## Changelog
🆑
add: A new export has arrived in the imports section, the Galactic
Materials Market! You can use this to buy and sell minerals for profit
or cost, as well as stock your station when you don't have any miners.
add: Insert sheets of minerals into the Galactic Materials Market to
convert them into a stock block, allowing you to lock in your price for
5 minutes. Wait too long and it'll be subject to market value again!
add: Minerals can be bought on the market either using the station's
cargo budget by cargo crew, or privately by everyone else.
del: Any material stacks that can be bought and sold on the market
before have been removed from the cargo catalog.
/🆑

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@ users.noreply.github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@ users.noreply.github.com>

* ArCargo: Adds the Galactic Materials Stock Market V1.2 (Free Market Edition)

---------

Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@ users.noreply.github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@ users.noreply.github.com>
2023-09-30 18:57:19 -04:00

577 lines
24 KiB
Plaintext

///Has no special properties.
/datum/material/iron
name = "iron"
desc = "Common iron ore often found in sedimentary and igneous layers of the crust."
color = "#878687"
greyscale_colors = "#878687"
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/iron
value_per_unit = 5 / SHEET_MATERIAL_AMOUNT
minimum_value_override = 0
tradable = TRUE
tradable_base_quantity = MATERIAL_QUANTITY_COMMON
/datum/material/iron/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.apply_damage(10, BRUTE, BODY_ZONE_HEAD, wound_bonus = 5)
return TRUE
///Breaks extremely easily but is transparent.
/datum/material/glass
name = "glass"
desc = "Glass forged by melting sand."
color = "#88cdf1"
greyscale_colors = "#88cdf196"
alpha = 150
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
integrity_modifier = 0.1
sheet_type = /obj/item/stack/sheet/glass
shard_type = /obj/item/shard
debris_type = /obj/effect/decal/cleanable/glass
value_per_unit = 5 / SHEET_MATERIAL_AMOUNT
minimum_value_override = 0
tradable = TRUE
tradable_base_quantity = MATERIAL_QUANTITY_COMMON
beauty_modifier = 0.05
armor_modifiers = list(MELEE = 0.2, BULLET = 0.2, ENERGY = 1, BIO = 0.2, FIRE = 1, ACID = 0.2)
/datum/material/glass/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.apply_damage(10, BRUTE, BODY_ZONE_HEAD, wound_bonus = 5, sharpness = TRUE) //cronch
return TRUE
/datum/material/glass/on_applied_obj(atom/source, amount, material_flags)
. = ..()
if(!isstack(source))
source.AddElement(/datum/element/shatters_when_thrown, shard_type, round(amount / SHEET_MATERIAL_AMOUNT), SFX_SHATTER)
/datum/material/glass/on_removed(atom/source, amount, material_flags)
. = ..()
source.RemoveElement(/datum/element/shatters_when_thrown, shard_type)
/*
Color matrices are like regular colors but unlike with normal colors, you can go over 255 on a channel.
Unless you know what you're doing, only use the first three numbers. They're in RGB order.
*/
///Has no special properties. Could be good against vampires in the future perhaps.
/datum/material/silver
name = "silver"
desc = "Silver"
color = list(255/255, 284/255, 302/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
greyscale_colors = "#e3f1f8"
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/mineral/silver
value_per_unit = 50 / SHEET_MATERIAL_AMOUNT
tradable = TRUE
tradable_base_quantity = MATERIAL_QUANTITY_UNCOMMON
beauty_modifier = 0.075
/datum/material/silver/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.apply_damage(10, BRUTE, BODY_ZONE_HEAD, wound_bonus = 5)
return TRUE
///Slight force increase
/datum/material/gold
name = "gold"
desc = "Gold"
color = list(340/255, 240/255, 50/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0) //gold is shiny, but not as bright as bananium
greyscale_colors = "#dbdd4c"
strength_modifier = 1.2
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/mineral/gold
value_per_unit = 125 / SHEET_MATERIAL_AMOUNT
tradable = TRUE
tradable_base_quantity = MATERIAL_QUANTITY_RARE
beauty_modifier = 0.15
armor_modifiers = list(MELEE = 1.1, BULLET = 1.1, LASER = 1.15, ENERGY = 1.15, BOMB = 1, BIO = 1, FIRE = 0.7, ACID = 1.1)
/datum/material/gold/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.apply_damage(10, BRUTE, BODY_ZONE_HEAD, wound_bonus = 5)
return TRUE
///Has no special properties
/datum/material/diamond
name = "diamond"
desc = "Highly pressurized carbon"
color = list(48/255, 272/255, 301/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
greyscale_colors = "#71c8f784"
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/mineral/diamond
alpha = 132
starlight_color = COLOR_BLUE_LIGHT
value_per_unit = 500 / SHEET_MATERIAL_AMOUNT
tradable = TRUE
tradable_base_quantity = MATERIAL_QUANTITY_EXOTIC
beauty_modifier = 0.3
armor_modifiers = list(MELEE = 1.3, BULLET = 1.3, LASER = 0.6, ENERGY = 1, BOMB = 1.2, BIO = 1, FIRE = 1, ACID = 1)
/datum/material/diamond/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.apply_damage(15, BRUTE, BODY_ZONE_HEAD, wound_bonus = 7)
return TRUE
///Is slightly radioactive
/datum/material/uranium
name = "uranium"
desc = "Uranium"
color = rgb(48, 237, 26)
greyscale_colors = rgb(48, 237, 26)
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/mineral/uranium
value_per_unit = 100 / SHEET_MATERIAL_AMOUNT
tradable = TRUE
tradable_base_quantity = MATERIAL_QUANTITY_RARE
beauty_modifier = 0.3 //It shines so beautiful
armor_modifiers = list(MELEE = 1.5, BULLET = 1.4, LASER = 0.5, ENERGY = 0.5, FIRE = 1, ACID = 1)
/datum/material/uranium/on_applied(atom/source, amount, material_flags)
. = ..()
// Uranium structures should irradiate, but not items, because item irradiation is a lot more annoying.
// For example, consider picking up uranium as a miner.
if (isitem(source))
return
source.AddElement(/datum/element/radioactive)
/datum/material/uranium/on_removed(atom/source, amount, material_flags)
. = ..()
if (isitem(source))
return
source.RemoveElement(/datum/element/radioactive)
/datum/material/uranium/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.reagents.add_reagent(/datum/reagent/uranium, rand(4, 6))
source_item?.reagents?.add_reagent(/datum/reagent/uranium, source_item.reagents.total_volume*(2/5))
return TRUE
///Adds firestacks on hit (Still needs support to turn into gas on destruction)
/datum/material/plasma
name = "plasma"
desc = "Isn't plasma a state of matter? Oh whatever."
color = list(298/255, 46/255, 352/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
greyscale_colors = "#c162ec"
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/mineral/plasma
value_per_unit = 200 / SHEET_MATERIAL_AMOUNT
beauty_modifier = 0.15
armor_modifiers = list(MELEE = 1.4, BULLET = 0.7, ENERGY = 1.2, BIO = 1.2, ACID = 0.5)
/datum/material/plasma/on_applied(atom/source, amount, material_flags)
. = ..()
if(ismovable(source))
source.AddElement(/datum/element/firestacker, amount=1)
source.AddComponent(/datum/component/combustible_flooder, "plasma", amount*0.05) //Empty temp arg, fully dependent on whatever ignited it.
/datum/material/plasma/on_removed(atom/source, amount, material_flags)
. = ..()
source.RemoveElement(/datum/element/firestacker, amount=1)
qdel(source.GetComponent(/datum/component/combustible_flooder))
qdel(source.GetComponent(/datum/component/explodable))
/datum/material/plasma/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.reagents.add_reagent(/datum/reagent/toxin/plasma, rand(6, 8))
source_item?.reagents?.add_reagent(/datum/reagent/toxin/plasma, source_item.reagents.total_volume*(2/5))
return TRUE
///Can cause bluespace effects on use. (Teleportation) (Not yet implemented)
/datum/material/bluespace
name = "bluespace crystal"
desc = "Crystals with bluespace properties"
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)
greyscale_colors = "#4e7dffC8"
alpha = 200
starlight_color = COLOR_BLUE
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_ITEM_MATERIAL = TRUE)
beauty_modifier = 0.5
sheet_type = /obj/item/stack/sheet/bluespace_crystal
value_per_unit = 300 / SHEET_MATERIAL_AMOUNT
tradable = TRUE
tradable_base_quantity = MATERIAL_QUANTITY_EXOTIC
/datum/material/bluespace/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.reagents.add_reagent(/datum/reagent/bluespace, rand(5, 8))
source_item?.reagents?.add_reagent(/datum/reagent/bluespace, source_item.reagents.total_volume*(2/5))
return TRUE
///Honks and slips
/datum/material/bananium
name = "bananium"
desc = "Material with hilarious properties"
color = list(460/255, 464/255, 0, 0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0) //obnoxiously bright yellow
greyscale_colors = "#ffff00"
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/mineral/bananium
value_per_unit = 1000 / SHEET_MATERIAL_AMOUNT
beauty_modifier = 0.5
armor_modifiers = list(BOMB = 100, FIRE = 10) //Clowns cant be blown away.
/datum/material/bananium/on_applied(atom/source, amount, material_flags)
. = ..()
source.LoadComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50, falloff_exponent = 20)
source.AddComponent(/datum/component/slippery, min(amount / 10, 80))
/datum/material/bananium/on_removed(atom/source, amount, material_flags)
. = ..()
qdel(source.GetComponent(/datum/component/slippery))
qdel(source.GetComponent(/datum/component/squeak))
/datum/material/bananium/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.reagents.add_reagent(/datum/reagent/consumable/banana, rand(8, 12))
source_item?.reagents?.add_reagent(/datum/reagent/consumable/banana, source_item.reagents.total_volume*(2/5))
return TRUE
///Mediocre force increase
/datum/material/titanium
name = "titanium"
desc = "Titanium"
color = "#b3c0c7"
greyscale_colors = "#b3c0c7"
strength_modifier = 1.3
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/mineral/titanium
value_per_unit = 125 / SHEET_MATERIAL_AMOUNT
tradable = TRUE
tradable_base_quantity = MATERIAL_QUANTITY_UNCOMMON
beauty_modifier = 0.05
armor_modifiers = list(MELEE = 1.35, BULLET = 1.3, LASER = 1.3, ENERGY = 1.25, BOMB = 1.25, BIO = 1, FIRE = 0.7, ACID = 1)
/datum/material/titanium/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.apply_damage(15, BRUTE, BODY_ZONE_HEAD, wound_bonus = 7)
return TRUE
/datum/material/runite
name = "runite"
desc = "Runite"
color = "#3F9995"
greyscale_colors = "#3F9995"
strength_modifier = 1.3
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/mineral/runite
value_per_unit = 600 / SHEET_MATERIAL_AMOUNT
beauty_modifier = 0.5
armor_modifiers = list(MELEE = 1.35, BULLET = 2, LASER = 0.5, ENERGY = 1.25, BOMB = 1.25, BIO = 1, FIRE = 1.4, ACID = 1) //rune is weak against magic lasers but strong against bullets. This is the combat triangle.
/datum/material/runite/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.apply_damage(20, BRUTE, BODY_ZONE_HEAD, wound_bonus = 10)
return TRUE
///Force decrease
/datum/material/plastic
name = "plastic"
desc = "Plastic"
color = "#caccd9"
greyscale_colors = "#caccd9"
strength_modifier = 0.85
sheet_type = /obj/item/stack/sheet/plastic
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
value_per_unit = 25 / SHEET_MATERIAL_AMOUNT
beauty_modifier = -0.01
armor_modifiers = list(MELEE = 1.5, BULLET = 1.1, LASER = 0.3, ENERGY = 0.5, BOMB = 1, BIO = 1, FIRE = 1.1, ACID = 1)
/datum/material/plastic/on_accidental_mat_consumption(mob/living/carbon/eater, obj/item/food)
eater.reagents.add_reagent(/datum/reagent/plastic_polymers, rand(6, 8))
food?.reagents?.add_reagent(/datum/reagent/plastic_polymers, food.reagents.total_volume*(2/5))
return TRUE
///Force decrease and mushy sound effect. (Not yet implemented)
/datum/material/biomass
name = "biomass"
desc = "Organic matter"
color = "#735b4d"
greyscale_colors = "#735b4d"
strength_modifier = 0.8
value_per_unit = 50 / SHEET_MATERIAL_AMOUNT
/datum/material/wood
name = "wood"
desc = "Flexible, durable, but flamable. Hard to come across in space."
color = "#bb8e53"
greyscale_colors = "#bb8e53"
strength_modifier = 0.5
sheet_type = /obj/item/stack/sheet/mineral/wood
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
value_per_unit = 20 / SHEET_MATERIAL_AMOUNT
beauty_modifier = 0.1
armor_modifiers = list(MELEE = 1.1, BULLET = 1.1, LASER = 0.4, ENERGY = 0.4, BOMB = 1, BIO = 0.2, ACID = 0.3)
texture_layer_icon_state = "woodgrain"
/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, amount, material_flags)
. = ..()
if(material_flags & MATERIAL_AFFECT_STATISTICS)
var/obj/wooden = source
wooden.resistance_flags &= ~FLAMMABLE
/datum/material/wood/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.apply_damage(5, BRUTE, BODY_ZONE_HEAD)
victim.reagents.add_reagent(/datum/reagent/cellulose, rand(8, 12))
source_item?.reagents?.add_reagent(/datum/reagent/cellulose, source_item.reagents.total_volume*(2/5))
return TRUE
///Stronk force increase
/datum/material/adamantine
name = "adamantine"
desc = "A powerful material made out of magic, I mean science!"
color = "#6d7e8e"
greyscale_colors = "#6d7e8e"
strength_modifier = 1.5
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/mineral/adamantine
value_per_unit = 500 / SHEET_MATERIAL_AMOUNT
beauty_modifier = 0.4
armor_modifiers = list(MELEE = 1.5, BULLET = 1.5, LASER = 1.3, ENERGY = 1.3, BOMB = 1, BIO = 1, FIRE = 2.5, ACID = 1)
/datum/material/adamantine/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.apply_damage(20, BRUTE, BODY_ZONE_HEAD, wound_bonus = 10)
return TRUE
///RPG Magic.
/datum/material/mythril
name = "mythril"
desc = "How this even exists is byond me"
color = "#f2d5d7"
greyscale_colors = "#f2d5d7"
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/mineral/mythril
value_per_unit = 1500 / SHEET_MATERIAL_AMOUNT
strength_modifier = 1.2
armor_modifiers = list(MELEE = 1.5, BULLET = 1.5, LASER = 1.5, ENERGY = 1.5, BOMB = 1.5, BIO = 1.5, FIRE = 1.5, ACID = 1.5)
beauty_modifier = 0.5
/datum/material/mythril/on_applied_obj(atom/source, amount, material_flags)
. = ..()
if(isitem(source))
source.AddComponent(/datum/component/fantasy)
ADD_TRAIT(source, TRAIT_INNATELY_FANTASTICAL_ITEM, REF(src)) // DO THIS LAST OR WE WILL NEVER GET OUR BONUSES!!!
/datum/material/mythril/on_removed_obj(atom/source, amount, material_flags)
. = ..()
if(isitem(source))
REMOVE_TRAIT(source, TRAIT_INNATELY_FANTASTICAL_ITEM, REF(src)) // DO THIS FIRST OR WE WILL NEVER GET OUR BONUSES DELETED!!!
qdel(source.GetComponent(/datum/component/fantasy))
/datum/material/mythril/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.apply_damage(20, BRUTE, BODY_ZONE_HEAD, wound_bonus = 10)
return TRUE
//formed when freon react with o2, emits a lot of plasma when heated
/datum/material/hot_ice
name = "hot ice"
desc = "A weird kind of ice, feels warm to the touch"
color = "#88cdf1"
greyscale_colors = "#88cdf196"
alpha = 150
starlight_color = COLOR_BLUE_LIGHT
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/hot_ice
value_per_unit = 400 / SHEET_MATERIAL_AMOUNT
beauty_modifier = 0.2
/datum/material/hot_ice/on_applied(atom/source, amount, material_flags)
. = ..()
source.AddComponent(/datum/component/combustible_flooder, "plasma", amount*1.5, amount*0.2+300)
/datum/material/hot_ice/on_removed(atom/source, amount, material_flags)
qdel(source.GetComponent(/datum/component/combustible_flooder))
return ..()
/datum/material/hot_ice/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.reagents.add_reagent(/datum/reagent/toxin/plasma, rand(5, 6))
source_item?.reagents?.add_reagent(/datum/reagent/toxin/plasma, source_item.reagents.total_volume*(3/5))
return TRUE
/datum/material/metalhydrogen
name = "Metal Hydrogen"
desc = "Solid metallic hydrogen. Some say it should be impossible"
color = "#f2d5d7"
greyscale_colors = "#f2d5d796"
alpha = 150
starlight_color = COLOR_MODERATE_BLUE
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/mineral/metal_hydrogen
value_per_unit = 700 / SHEET_MATERIAL_AMOUNT
beauty_modifier = 0.35
strength_modifier = 1.2
armor_modifiers = list(MELEE = 1.35, BULLET = 1.3, LASER = 1.3, ENERGY = 1.25, BOMB = 0.7, BIO = 1, FIRE = 1.3, ACID = 1)
/datum/material/metalhydrogen/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.apply_damage(15, BRUTE, BODY_ZONE_HEAD, wound_bonus = 7)
return TRUE
//I don't like sand. It's coarse, and rough, and irritating, and it gets everywhere.
/datum/material/sand
name = "sand"
desc = "You know, it's amazing just how structurally sound sand can be."
color = "#EDC9AF"
greyscale_colors = "#EDC9AF"
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/sandblock
value_per_unit = 2 / SHEET_MATERIAL_AMOUNT
strength_modifier = 0.5
integrity_modifier = 0.1
armor_modifiers = list(MELEE = 0.25, BULLET = 0.25, LASER = 1.25, ENERGY = 0.25, BOMB = 0.25, BIO = 0.25, FIRE = 1.5, ACID = 1.5)
beauty_modifier = 0.25
turf_sound_override = FOOTSTEP_SAND
texture_layer_icon_state = "sand"
/datum/material/sand/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.adjust_disgust(17)
return TRUE
//And now for our lavaland dwelling friends, sand, but in stone form! Truly revolutionary.
/datum/material/sandstone
name = "sandstone"
desc = "Bialtaakid 'ant taerif ma hdha."
color = "#B77D31"
greyscale_colors = "#B77D31"
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/mineral/sandstone
value_per_unit = 5 / SHEET_MATERIAL_AMOUNT
armor_modifiers = list(MELEE = 0.5, BULLET = 0.5, LASER = 1.25, ENERGY = 0.5, BOMB = 0.5, BIO = 0.25, FIRE = 1.5, ACID = 1.5)
beauty_modifier = 0.3
turf_sound_override = FOOTSTEP_WOOD
texture_layer_icon_state = "brick"
/datum/material/snow
name = "snow"
desc = "There's no business like snow business."
color = "#FFFFFF"
greyscale_colors = "#FFFFFF"
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/mineral/snow
value_per_unit = 5 / SHEET_MATERIAL_AMOUNT
armor_modifiers = list(MELEE = 0.25, BULLET = 0.25, LASER = 0.25, ENERGY = 0.25, BOMB = 0.25, BIO = 0.25, FIRE = 0.25, ACID = 1.5)
beauty_modifier = 0.3
turf_sound_override = FOOTSTEP_SAND
texture_layer_icon_state = "sand"
/datum/material/snow/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.reagents.add_reagent(/datum/reagent/water, rand(5, 10))
return TRUE
/datum/material/runedmetal
name = "runed metal"
desc = "Mir'ntrath barhah Nar'sie."
color = "#3C3434"
greyscale_colors = "#3C3434"
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/runed_metal
value_per_unit = 1500 / SHEET_MATERIAL_AMOUNT
armor_modifiers = list(MELEE = 1.2, BULLET = 1.2, LASER = 1, ENERGY = 1, BOMB = 1.2, BIO = 1.2, FIRE = 1.5, ACID = 1.5)
beauty_modifier = -0.15
texture_layer_icon_state = "runed"
/datum/material/runedmetal/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.reagents.add_reagent(/datum/reagent/fuel/unholywater, rand(8, 12))
victim.apply_damage(10, BRUTE, BODY_ZONE_HEAD, wound_bonus = 5)
return TRUE
/datum/material/bronze
name = "bronze"
desc = "Clock Cult? Never heard of it."
color = "#92661A"
greyscale_colors = "#92661A"
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/bronze
value_per_unit = 50 / SHEET_MATERIAL_AMOUNT
armor_modifiers = list(MELEE = 1, BULLET = 1, LASER = 1, ENERGY = 1, BOMB = 1, BIO = 1, FIRE = 1.5, ACID = 1.5)
beauty_modifier = 0.2
/datum/material/paper
name = "paper"
desc = "Ten thousand folds of pure starchy power."
color = "#E5DCD5"
greyscale_colors = "#E5DCD5"
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/paperframes
value_per_unit = 5 / SHEET_MATERIAL_AMOUNT
armor_modifiers = list(MELEE = 0.1, BULLET = 0.1, LASER = 0.1, ENERGY = 0.1, BOMB = 0.1, BIO = 0.1, ACID = 1.5)
beauty_modifier = 0.3
turf_sound_override = FOOTSTEP_SAND
texture_layer_icon_state = "paper"
/datum/material/paper/on_applied_obj(obj/source, amount, material_flags)
. = ..()
if(material_flags & MATERIAL_AFFECT_STATISTICS)
var/obj/paper = source
paper.resistance_flags |= FLAMMABLE
paper.obj_flags |= UNIQUE_RENAME
/datum/material/paper/on_removed_obj(obj/source, amount, material_flags)
if(material_flags & MATERIAL_AFFECT_STATISTICS)
var/obj/paper = source
paper.resistance_flags &= ~FLAMMABLE
return ..()
/datum/material/cardboard
name = "cardboard"
desc = "They say cardboard is used by hobos to make incredible things."
color = "#5F625C"
greyscale_colors = "#5F625C"
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/cardboard
value_per_unit = 6 / SHEET_MATERIAL_AMOUNT
armor_modifiers = list(MELEE = 0.25, BULLET = 0.25, LASER = 0.25, ENERGY = 0.25, BOMB = 0.25, BIO = 0.25, ACID = 1.5)
beauty_modifier = -0.1
/datum/material/cardboard/on_applied_obj(obj/source, amount, material_flags)
. = ..()
if(material_flags & MATERIAL_AFFECT_STATISTICS)
var/obj/cardboard = source
cardboard.resistance_flags |= FLAMMABLE
cardboard.obj_flags |= UNIQUE_RENAME
/datum/material/cardboard/on_removed_obj(obj/source, amount, material_flags)
if(material_flags & MATERIAL_AFFECT_STATISTICS)
var/obj/cardboard = source
cardboard.resistance_flags &= ~FLAMMABLE
return ..()
/datum/material/bone
name = "bone"
desc = "Man, building with this will make you the coolest caveman on the block."
color = "#e3dac9"
greyscale_colors = "#e3dac9"
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/bone
value_per_unit = 100 / SHEET_MATERIAL_AMOUNT
armor_modifiers = list(MELEE = 1.2, BULLET = 0.75, LASER = 0.75, ENERGY = 1.2, BOMB = 1, BIO = 1, FIRE = 1.5, ACID = 1.5)
beauty_modifier = -0.2
/datum/material/bamboo
name = "bamboo"
desc = "If it's good enough for pandas, it's good enough for you."
color = "#87a852"
greyscale_colors = "#87a852"
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/mineral/bamboo
value_per_unit = 5 / SHEET_MATERIAL_AMOUNT
armor_modifiers = list(MELEE = 0.5, BULLET = 0.5, LASER = 0.5, ENERGY = 0.5, BOMB = 0.5, BIO = 0.51, FIRE = 0.5, ACID = 1.5)
beauty_modifier = 0.2
turf_sound_override = FOOTSTEP_WOOD
texture_layer_icon_state = "bamboo"
/datum/material/zaukerite
name = "zaukerite"
desc = "A light absorbing crystal"
color = COLOR_ALMOST_BLACK
greyscale_colors = COLOR_ALMOST_BLACK
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE, MAT_CATEGORY_ITEM_MATERIAL=TRUE)
sheet_type = /obj/item/stack/sheet/mineral/zaukerite
value_per_unit = 900 / SHEET_MATERIAL_AMOUNT
armor_modifiers = list(MELEE = 0.9, BULLET = 0.9, LASER = 1.75, ENERGY = 1.75, BOMB = 0.5, BIO = 1, FIRE = 0.1, ACID = 1)
beauty_modifier = 0.001
/datum/material/zaukerite/on_accidental_mat_consumption(mob/living/carbon/victim, obj/item/source_item)
victim.apply_damage(30, BURN, BODY_ZONE_HEAD, wound_bonus = 5)
source_item?.reagents?.add_reagent(/datum/reagent/toxin/plasma, source_item.reagents.total_volume*5)
return TRUE