mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-10 15:45:05 +01:00
21b4095dfd
Upstream 04/17/2026 fixes https://github.com/Bubberstation/Bubberstation/issues/5549 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com> Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com> Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com> Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com> Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com> Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com> Co-authored-by: loganuk <fakeemail123@aol.com> Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com> Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com> Co-authored-by: Lucy <lucy@absolucy.moe> Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com> Co-authored-by: Isratosh <Isratosh@hotmail.com> Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com> Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com> Co-authored-by: Alexander V. <volas@ya.ru> Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com> Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Iamgoofball <iamgoofball@gmail.com> Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com> Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com> Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com> Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com> Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com> Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com> Co-authored-by: Josh <josh.adam.powell@gmail.com> Co-authored-by: Josh Powell <josh.powell@softwire.com> Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com> Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com> Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com> Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
179 lines
4.6 KiB
Plaintext
179 lines
4.6 KiB
Plaintext
/// Singleton datums used to hold material property info
|
|
/datum/material_property
|
|
abstract_type = /datum/material_property
|
|
var/name = "Error"
|
|
/// Associated property ID
|
|
var/id = null
|
|
/// Should this property be inherited by child materials?
|
|
var/inherited = TRUE
|
|
|
|
/// Returns a string to display to sci glasses wearers when the material is examined
|
|
/datum/material_property/proc/get_descriptor(value)
|
|
return null
|
|
|
|
/// Returns the contents of the tooltip under our descriptor
|
|
/datum/material_property/proc/get_tooltip(value)
|
|
return "[value < 0 ? "-" : ""]\Roman[round(abs(value), 1)]"
|
|
|
|
/// Called whenever a material with this property initializes. Mostly used for behavior tracking on optional properties
|
|
/datum/material_property/proc/attach_to(datum/material/material)
|
|
return
|
|
|
|
/// How dense a material is
|
|
/datum/material_property/density
|
|
name = "Density"
|
|
id = MATERIAL_DENSITY
|
|
|
|
/datum/material_property/density/get_descriptor(value)
|
|
// Just for reference, IRL density of ABS plastic and water is ~1g/cm3, glass is 2.5, iron is 7.5 and lead is 11
|
|
// So 0 ~ 1 would be paper/cardboard, then wood at 2, plastic at 3, glass at 4, iron at 6 and lead at 8 ~ 9
|
|
switch(value)
|
|
if (0 to 1)
|
|
return "extremely light"
|
|
if (1 to 2)
|
|
return "very light"
|
|
if (2 to 3)
|
|
return "light"
|
|
if (3 to 4)
|
|
return "slightly dense"
|
|
if (4 to 6)
|
|
return "dense"
|
|
if (6 to 8)
|
|
return "very dense"
|
|
if (8 to INFINITY)
|
|
return "extremely dense"
|
|
|
|
/// How hard to deformation a material is, pierce/slashing impacts
|
|
/datum/material_property/hardness
|
|
name = "Hardness"
|
|
id = MATERIAL_HARDNESS
|
|
|
|
/datum/material_property/hardness/get_descriptor(value)
|
|
switch(value)
|
|
if (0 to 1)
|
|
return "extremely soft"
|
|
if (1 to 2)
|
|
return "very soft"
|
|
if (2 to 3)
|
|
return "soft"
|
|
if (3 to 4)
|
|
return "slightly hard"
|
|
if (4 to 6)
|
|
return "hard"
|
|
if (6 to 8)
|
|
return "very hard"
|
|
if (8 to INFINITY)
|
|
return "extremely hard"
|
|
|
|
/// How well a material bends and sustains deformation
|
|
/datum/material_property/flexibility
|
|
name = "Flexibility"
|
|
id = MATERIAL_FLEXIBILITY
|
|
|
|
/datum/material_property/flexibility/get_descriptor(value)
|
|
switch(value)
|
|
if (0 to 1)
|
|
return "extremely rigid"
|
|
if (1 to 2)
|
|
return "very rigid"
|
|
if (2 to 3)
|
|
return "rigid"
|
|
if (3 to 4)
|
|
return "slightly flexible"
|
|
if (4 to 6)
|
|
return "flexible"
|
|
if (6 to 8)
|
|
return "very flexible"
|
|
if (8 to INFINITY)
|
|
return "extremely flexible"
|
|
|
|
/// How shiny a material is
|
|
/datum/material_property/reflectivity
|
|
name = "Reflectivity"
|
|
id = MATERIAL_REFLECTIVITY
|
|
|
|
/datum/material_property/reflectivity/get_descriptor(value)
|
|
switch(value)
|
|
if (0 to 1)
|
|
return "extremely dull"
|
|
if (1 to 2)
|
|
return "very dull"
|
|
if (2 to 3)
|
|
return "dull"
|
|
if (3 to 4)
|
|
return "matte"
|
|
if (4 to 6)
|
|
return "reflective"
|
|
if (6 to 8)
|
|
return "very reflective"
|
|
if (8 to INFINITY)
|
|
return "extremely reflective"
|
|
|
|
/// How electrically conductive a material is (siemens coeff)
|
|
/datum/material_property/electric_conductivity
|
|
name = "Electric Conductivity"
|
|
id = MATERIAL_ELECTRICAL
|
|
|
|
/datum/material_property/electric_conductivity/get_descriptor(value)
|
|
switch(value)
|
|
if (0)
|
|
return "perfectly insulating"
|
|
if (0 to 1)
|
|
return "highly insulating"
|
|
if (1 to 2)
|
|
return "insulating"
|
|
if (2 to 3)
|
|
return "poorly insulating"
|
|
if (3 to 4)
|
|
return "mildly conductive"
|
|
if (4 to 6)
|
|
return "conductive"
|
|
if (6 to 8)
|
|
return "highly conductive"
|
|
if (8 to INFINITY)
|
|
return "extremely conductive"
|
|
|
|
/// How well a material conducts heat
|
|
/datum/material_property/thermal_conductivity
|
|
name = "Thermal Conductivity"
|
|
id = MATERIAL_THERMAL
|
|
|
|
/datum/material_property/thermal_conductivity/get_descriptor(value)
|
|
switch(value)
|
|
if (0 to 1)
|
|
return "extremely temperature-resistant"
|
|
if (1 to 2)
|
|
return "very temperature-resistant"
|
|
if (2 to 3)
|
|
return "temperature-resistant"
|
|
if (3 to 4)
|
|
return "slightly thermally conductive"
|
|
if (4 to 6)
|
|
return "thermally conductive"
|
|
if (6 to 8)
|
|
return "very thermally conductive"
|
|
if (8 to INFINITY)
|
|
return "extremely thermally conductive"
|
|
|
|
/// How well the material resists acids and other similar chemicals
|
|
/datum/material_property/chemical_resistance
|
|
name = "Chemical Resistance"
|
|
id = MATERIAL_CHEMICAL
|
|
|
|
/datum/material_property/chemical_resistance/get_descriptor(value)
|
|
switch(value)
|
|
if (0 to 1)
|
|
return "extremely reactive"
|
|
if (1 to 2)
|
|
return "reactive"
|
|
if (2 to 3)
|
|
return "slightly reactive"
|
|
if (3 to 4)
|
|
return "mildly chemically resistant"
|
|
if (4 to 6)
|
|
return "chemically resistant"
|
|
if (6 to 8)
|
|
return "highly chemically resistant"
|
|
if (8 to INFINITY)
|
|
return "extremely chemically resistant"
|