1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
use serde::{Deserialize, Serialize};
/// A material template
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Default, specta::Type)]
pub enum MaterialType {
/// An inorganic material
Inorganic,
/// A stone material
Stone,
/// A metal material
Metal,
/// A coal material
Coal,
/// A creature material
CreatureMaterial,
/// A creature material for the current creature token only
LocalCreatureMaterial,
/// A plant material
PlantMaterial,
/// A plant material for the current plant token only
LocalPlantMaterial,
/// A material from a reaction
GetMaterialFromReagent,
// Special "Hardcoded" Materials
// Inorganic -> Magma
/// Amber
Amber,
/// Coral
Coral,
/// Green Glass
GlassGreen,
/// Clear Glass
GlassClear,
/// Crystal Glass
GlassCrystal,
/// Water
Water,
// Coal -> Coal
/// Potash
Potash,
/// Ash
Ash,
/// Pearl Ash
PearlAsh,
/// Lye
Lye,
/// Mud
Mud,
/// Vomit
Vomit,
/// Salt
Salt,
/// Brown Filth
FilthB,
/// Yellow Filth
FilthY,
/// Unnknown Substance
UnknownSubstance,
/// Grime
Grime,
/// An unknown token
#[default]
Unknown,
}
/// A material fuel type that can be set in a material definition.
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Default, specta::Type)]
pub enum FuelType {
/// Charcoal or coal
Charcoal,
/// Coal coke
Coke,
/// No glass furnace fuel
NoMaterialGloss,
/// None is an invalid option, so its a hint that this is not set.
#[default]
None,
}
/// A material state that can be set in a material definition.
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Default, specta::Type)]
pub enum MaterialState {
/// Solid state of the material
Solid,
/// Liquid state of the material
Liquid,
/// Gas state of the material
Gas,
/// `POWDER` or `SOLID_POWDER`
Powder,
/// `PASTE` or `SOLID_PASTE`
Paste,
/// `PRESSED` or `SOLID_PRESSED`
Pressed,
/// Default value is invalid, so its a hint that this is not set.
#[default]
Unknown,
/// Denotes all possible material states
All,
/// Denotes '`Solid`', '`Powder`', '`Paste`', and '`Pressed`'
AllSolid,
}
/// A material usage that can be set in a material definition.
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Default, specta::Type)]
pub enum MaterialUsage {
/// Lets the game know that an animal was likely killed in the production of this item.
/// Entities opposed to killing animals (ElvesĀ in vanilla) will refuse to accept these items in trade.
ImpliesAnimalKill,
/// Classifies the material as plant-based alcohol, allowing its storage in food stockpiles under "Drink (Plant)".
AlcoholPlant,
/// Classifies the material as animal-based alcohol, allowing its storage in food stockpiles under "Drink (Animal)".
AlcoholCreature,
/// Classifies the material as generic alcohol. Implied by both `ALCOHOL_PLANT` and `ALCOHOL_CREATURE`. Exact behavior unknown, possibly vestigial.
Alcohol,
/// Classifies the material as plant-based cheese, allowing its storage in food stockpiles under "Cheese (Plant)".
CheesePlant,
/// Classifies the material as animal-based cheese, allowing its storage in food stockpiles under "Cheese (Animal)".
CheeseCreature,
/// Classifies the material as generic cheese. Implied by both `CHEESE_PLANT` and `CHEESE_CREATURE`. Exact behavior unknown, possibly vestigial.
Cheese,
/// Classifies the material as plant powder, allowing its storage in food stockpiles under "Milled Plant".
PowderMiscPlant,
/// Classifies the material as creature powder, allowing its storage in food stockpiles under "Bone Meal".
/// Unlike milled plants, such as sugar and flour, "Bone Meal" barrels or pots may not contain bags.
/// Custom reactions using this product better use buckets or jugs instead.
PowderMiscCreature,
/// Classifies the material as generic powder. Implied by both `POWDER_MISC_PLANT` and `POWDER_MISC_CREATURE`.
/// Exact behavior unknown, possibly vestigial.
PowderMisc,
/// Permits globs of the material in solid form to be stored in food stockpiles under "Fat" - without it,
/// dwarves will come by and "clean" the items, destroying them (unless `DO_NOT_CLEAN_GLOB` is also included).
StockpileGlobOrStockpileGlobSolid,
/// Classifies the material as milled paste, allowing its storage in food stockpiles under "Paste".
StockpileGlobPaste,
/// Classifies the material as pressed goods, allowing its storage in food stockpiles under "Pressed Material".
StockpileGlobPressed,
/// Classifies the material as a plant growth (e.g. fruits, leaves), allowing its storage in food stockpiles under Plant Growth/Fruit.
StockpilePlantGrowth,
/// Classifies the material as a plant extract, allowing its storage in food stockpiles under "Extract (Plant)".
LiquidMiscPlant,
/// Classifies the material as a creature extract, allowing its storage in food stockpiles under "Extract (Animal)".
LiquidMiscCreature,
/// Classifies the material as a miscellaneous liquid, allowing its storage in food stockpiles under "Misc. Liquid" along with lye.
LiquidMiscOther,
/// Classifies the material as a generic liquid. Implied by `LIQUID_MISC_PLANT`, `LIQUID_MISC_CREATURE`, and `LIQUID_MISC_OTHER`. Exact behavior unknown, possibly vestigial.
LiquidMisc,
/// Classifies the material as a plant, allowing its storage in food stockpiles under "Plants".
StructuralPlantMat,
/// Classifies the material as a plant seed, allowing its storage in food stockpiles under "Seeds".
SeedMat,
/// Classifies the material as bone, allowing its use for bone carvers and restriction from stockpiles by material.
Bone,
/// Classifies the material as wood, allowing its use for carpenters and storage in wood stockpiles.
/// Entities opposed to killing plants (i.e. Elves) will refuse to accept these items in trade.
Wood,
/// Classifies the material as plant fiber, allowing its use for clothiers and storage in cloth stockpiles under "Thread (Plant)" and "Cloth (Plant)".
ThreadPlant,
/// Classifies the material as tooth, allowing its use for bone carvers and restriction from stockpiles by material.
Tooth,
/// Classifies the material as horn, allowing its use for bone carvers and restriction from stockpiles by material.
Horn,
/// Classifies the material as hair, allowing for its use for spinners and restriction from refuse stockpiles by material.
Hair,
/// Classifies the material as pearl, allowing its use for bone carvers and restriction from stockpiles by material.
Pearl,
/// Classifies the material as shell, allowing its use for bone carvers and restriction from stockpiles by material.
Shell,
/// Classifies the material as leather, allowing its use for leatherworkers and storage in leather stockpiles.
Leather,
/// Classifies the material as silk, allowing its use for clothiers and storage in cloth stockpiles under "Thread (Silk)" and "Cloth (Silk)".
Silk,
/// Classifies the material as soap, allowing it to be used as a bath detergent and stored in bar/block stockpiles under "Bars: Other Materials".
Soap,
/// Material generates miasma when it rots.
GeneratesMiasma,
/// Classifies the material as edible meat.
Meat,
/// Material will rot if not stockpiled appropriately. Currently only affects food and refuse, other items made of this material will not rot.
Rots,
/// In most living creatures, it controls many bodily functions and movements by sending signals around the body. See: Nervous tissue
NervousTissue,
/// Tells the game to classify contaminants of this material as being "blood" in Adventurer mode tile descriptions ("Here we have a Dwarf in a slurry of blood.").
BloodMapDescriptor,
/// Tells the game to classify contaminants of this material as being "ichor".
IchorMapDescriptor,
/// Tells the game to classify contaminants of this material as being "goo".
GooMapDescriptor,
/// Tells the game to classify contaminants of this material as being "slime".
SlimeMapDescriptor,
/// Tells the game to classify contaminants of this material as being "pus".
PusMapDescriptor,
/// Tells the game to classify contaminants of this material as being "sweat".
SweatMapDescriptor,
/// Tells the game to classify contaminants of this material as being "tears".
TearsMapDescriptor,
/// Tells the game to classify contaminants of this material as being "spit".
SpitMapDescriptor,
/// Contaminants composed of this material evaporate over time, slowly disappearing from the map. Used internally by water.
Evaporates,
/// Used for materials which cause syndromes, causes it to enter the creature's blood instead of simply spattering on the surface.
EntersBlood,
/// Can be eaten by vermin.
EdibleVermin,
/// Can be eaten raw.
EdibleRaw,
/// Can be cooked and then eaten.
EdibleCooked,
/// Prevents globs made of this material from being cleaned up and destroyed.
DoNotCleanGlob,
/// Prevents the material from showing up in Stone stockpile settings.
NoStoneStockpile,
/// The material can be made into minecarts, wheelbarrows, and stepladders at the metalsmith's forge.
ItemsMetal,
/// Equivalent to `ITEMS_HARD`. Given to bone.
ItemsBarred,
/// Equivalent to `ITEMS_HARD`. Given to shell.
ItemsScaled,
/// Equivalent to `ITEMS_SOFT`. Given to leather.
ItemsLeather,
/// The material can be made into clothing, amulets, bracelets, earrings, backpacks, and quivers, contingent
/// on which workshops accept the material. Given to plant fiber, silk and wool.
ItemsSoft,
/// The material can be made into furniture, crafts, mechanisms, and blocks, contingent on which workshops accept the material.
/// Random crafts made from this material include all seven items. Given to stone, wood, bone, shell, chitin, claws, teeth,
/// horns, hooves and beeswax. Hair, pearls and eggshells also have the tag.
ItemsHard,
/// Used to define that the material is a stone. Allows its usage in masonry and stonecrafting and storage in stone stockpiles, among other effects.
IsStone,
/// Defines the material is a ceramic.
IsCeramic,
/// Used for a stone that cannot be dug into.
Undiggable,
/// Causes containers made of this material to be prefixed with "unglazed" if they have not yet been glazed.
DisplayUnglazed,
/// Classifies the material as yarn, allowing its use for clothiers and its storage in cloth stockpiles under "Thread (Yarn)" and "Cloth (Yarn)".
Yarn,
/// Classifies the material as metal thread, permitting thread and cloth to be stored in cloth stockpiles under "Thread (Metal)" and "Cloth (Metal)".
StockpileThreadMetal,
/// Defines the material as being metal, allowing it to be used at forges.
IsMetal,
/// Used internally by green glass, clear glass, and crystal glass. Appears to only affect the `GLASS_MATERIAL` reaction token. Does not cause the game
/// to treat the material like glass, i.e being referred to as "raw" instead of "rough" in its raw form or being displayed in the "glass" trade/embark category.
IsGlass,
/// Can be used in the production of crystal glass.
CrystalGlassable,
/// Melee weapons can be made out of this material.
ItemsWeapon,
/// Ranged weapons can be made out of this material.
ItemsWeaponRanged,
/// Anvils can be made out of this material.
ItemsAnvil,
/// Ammunition can be made out of this material.
ItemsAmmo,
/// Picks can be made out of this material.
ItemsDigger,
/// Armor can be made out of this material.
ItemsArmor,
/// Used internally by amber and coral. Functionally equivalent to `ITEMS_HARD`.
ItemsDelicate,
/// Siege engine parts can be made out of this material. Does not appear to work.
ItemsSiegeEngine,
/// Querns and millstones can be made out of this material. Does not appear to work.
ItemsQuern,
/// An unknown token
#[default]
Unknown,
}
/// A material property that can be set in a material definition.
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Default, specta::Type)]
pub enum MaterialProperty {
/// Imports the properties of the specified preexisting material template.
UseMaterialTemplate,
/// Applies a prefix to all items made from the material. For `PLANT` and `CREATURE` materials, this defaults to the plant/creature name.
/// Not permitted in material template definitions.
Prefix,
/// Overrides the name of `BOULDER` items (i.e. mined-out stones) made of the material (used for native copper/silver/gold/platinum
/// to make them be called "nuggets" instead of "boulders").
StoneName,
/// Used to indicate that said material is a gemstone - when tiles are mined out, rough gems will be yielded instead of boulders.
/// Plural can be "STP" to automatically append an "s" to the singular form, and `OVERWRITE_SOLID` will override the relevant `STATE_NAME` and `STATE_ADJ` values.
IsGem,
/// Specifies what the material should be treated as when drinking water contaminated by it, for generating unhappy thoughts.
/// Valid values are `BLOOD`, `SLIME`, `VOMIT`, `ICHOR`, `PUS`, `GOO`, `GRIME`, and `FILTH`.
TempDietInfo,
/// Allows the material to be used as dye, and defines color of dyed items.
PowderDye,
/// Specifies the tile that will be used to represent unmined tiles made of this material. Generally only used with stones. Defaults to 219 ('ā').
Tile,
/// Specifies the tile that will be used to represent BOULDER items made of this material. Generally only used with stones. Defaults to 7 ('ā¢').
ItemSymbol,
/// The on-screen color of the material. Uses a standard 3-digit color token. Equivalent to `TILE_COLOR:a:b:c`,
/// `BUILD_COLOR:b:a:X` (X = 1 if 'a' equals 'b', 0 otherwise), and `BASIC_COLOR:a:c`
DisplayColor,
/// The color of objects made of this material which use both the foreground and background color: doors, floodgates, hatch covers, bins, barrels, and cages.
/// Defaults to `7:7:1` (white).
BuildColor,
/// The color of unmined tiles containing this material (for stone and soil), as well as engravings in this material. Defaults to `7:7:1` (white).
TileColor,
/// The color of objects made of this material which use only the foreground color, including workshops, floors and boulders, and smoothed walls. Defaults to `7:1` (white).
BasicColor,
/// Determines the color of the material at the specified state. See below for a list of valid material states. Color comes from `descriptor_color_standard.txt`.
/// The nearest color value is used to display contaminants and body parts made of this material in ASCII and to color items and constructions made from this
/// material with graphics.
/// Example:`STATE_COLOR:ALL_SOLID:GRAY`
StateColor,
/// Determines the name of the material at the specified state, as displayed in-game. `STATE_NAME:ALL_SOLID:stone`
StateName,
/// Like `STATE_NAME`, but used in different situations. Equipment made from the material uses the state adjective and not the state name.
StateAdjective,
/// Sets both `STATE_NAME` and `STATE_ADJ` at the same time.
StateNameAdjective,
/// The material's tendency to absorb liquids. Containers made of materials with nonzero absorption cannot hold liquids unless they have been glazed.
/// Defaults to 0.
Absorption,
/// Specifies how hard of an impact (in kilopascals) the material can withstand before it will start deforming permanently.
/// Used for blunt-force combat. Defaults to `10_000`.
ImpactYield,
/// Specifies how hard of an impact the material can withstand before it will fail entirely. Used for blunt-force combat. Defaults to `10_000`.
ImpactFracture,
/// Specifies how much the material will have given (in parts-per-`100_000`) when the yield point is reached. Used for blunt-force combat. Defaults to 0.
/// Apparently affects in combat whether the corresponding tissue is bruised (`value >= 50_000`), torn (value between `25_000` and `49_999`), or fractured (`value <= 24_999`)
ImpactElasticity,
/// Specifies how hard the material can be compressed before it will start deforming permanently. Determines a tissue's resistance to pinching and response to strangulation.
/// Defaults to `10_000`.
CompressiveYield,
/// Specifies how hard the material can be compressed before it will fail entirely. Determines a tissue's resistance to pinching and response to strangulation.
/// Defaults to `10_000`.
CompressiveFracture,
/// Specifies how much the material will have given when it has been compressed to its yield point. Determines a tissue's resistance to pinching and
/// response to strangulation. Defaults to 0.
CompressiveElasticity,
/// Specifies how hard the material can be stretched before it will start deforming permanently. Determines a tissue's resistance to a latching and tearing bite.
/// Defaults to `10_000`.
TensileYield,
/// Specifies how hard the material can be stretched before it will fail entirely. Determines a tissue's resistance to a latching and tearing bite. Defaults to `10_000`.
TensileFracture,
/// Specifies how much the material will have given when it is stretched to its yield point. Determines a tissue's resistance to a latching and tearing bite.
/// Defaults to 0.
TensileElasticity,
/// Specifies how hard the material can be twisted before it will start deforming permanently. Used for latching and shaking with a blunt attack
/// (no default creature has such an attack, but they can be modded in). Defaults to `10_000`.
TorsionYield,
/// Specifies how hard the material can be twisted before it will fail entirely. Used for latching and shaking with a blunt attack
/// (no default creature has such an attack, but they can be modded in). Defaults to `10_000`.
TorsionFracture,
/// Specifies how much the material will have given when it is twisted to its yield point. Used for latching and shaking with a blunt attack
/// (no default creature has such an attack, but they can be modded in). Defaults to 0.
TorsionElasticity,
/// Specifies how hard the material can be sheared before it will start deforming permanently. Used for cutting calculations. Defaults to `10_000`.
ShearYield,
/// Specifies how hard the material can be sheared before it will fail entirely. Used for cutting calculations. Defaults to `10_000`.
ShearFracture,
/// Specifies how much the material will have given when sheared to its yield point. Used for cutting calculations. Defaults to 0.
ShearElasticity,
/// Specifies how hard the material can be bent before it will start deforming permanently. Determines a tissue's resistance to being mangled with a joint lock.
/// Defaults to `10_000`.
BendingYield,
/// Specifies how hard the material can be bent before it will fail entirely. Determines a tissue's resistance to being mangled with a joint lock. Defaults to `10_000`.
BendingFracture,
/// Specifies how much the material will have given when bent to its yield point. Determines a tissue's resistance to being mangled with a joint lock. Defaults to 0.
BendingElasticity,
/// How sharp the material is. Used in cutting calculations. Applying a value of at least `10_000` to a stone will allow weapons to be made from that stone. Defaults to `10_000`.
MaxEdge,
/// Value modifier for the material. Defaults to 1. This number can be made negative by placing a "-" in front, resulting in things that you are paid to buy and
/// must pay to sell.
MaterialValue,
/// Multiplies the value of the material. Not permitted in material template definitions.
MultiplyValue,
/// Rate at which the material heats up or cools down (in joules/kilogram-kelvin). If set to `NONE`, the temperature will be fixed at its initial value.
/// Defaults to `NONE`.
SpecificHeat,
/// Temperature above which the material takes damage from heat. Defaults to `NONE`.
/// If the material has an ignite point but no heatdam point, it will burn for a very long time (9 months and 16.8 days).
HeatDamagePoint,
/// Temperature below which the material takes damage from cold. Defaults to `NONE`.
ColdDamagePoint,
/// Temperature at which the material will catch fire. Defaults to `NONE`.
IgnitionPoint,
/// Temperature at which the material melts. Defaults to `NONE`.
MeltingPoint,
/// Temperature at which the material boils. Defaults to `NONE`.
BoilingPoint,
/// Items composed of this material will initially have this temperature.
/// Used in conjunction with `SPEC_HEAT:NONE` to make material's temperature fixed at the specified value.
/// Defaults to `NONE`.
MaterialFixedTemperature,
/// Changes a material's `HEATDAM_POINT`, but only if it was not set to `NONE`. Not permitted in material template definitions.
IfExistsSetHeatDamagePoint,
/// Changes a material's `COLDDAM_POINT`, but only if it was not set to `NONE`. Not permitted in material template definitions.
IfExistsSetColdDamagePoint,
/// Changes a material's `IGNITE_POINT`, but only if it was not set to `NONE`. Not permitted in material template definitions.
IfExistsSetIgnitePoint,
/// Changes a material's `MELTING_POINT`, but only if it was not set to `NONE`. Not permitted in material template definitions.
IfExistsSetMeltingPoint,
/// Changes a material's `BOILING_POINT`, but only if it was not set to `NONE`. Not permitted in material template definitions.
IfExistsSetBoilingPoint,
/// Changes a material's `MAT_FIXED_TEMP`, but only if it was not set to `NONE`. Not permitted in material template definitions.
IfExistsSetMatFixedTemp,
/// Specifies the density (in kilograms per cubic meter) of the material when in solid form. Also affects combat calculations;
/// affects blunt-force damage and ability of weak-in-impact-yield blunt attacks to pierce armor. Defaults to `NONE`.
SolidDensity,
/// Specifies the density of the material when in liquid form. Defaults to `NONE`. Also affects combat calculations;
/// affects blunt force damage like `SOLID_DENSITY`, but only for attacks made by liquids (e.g. forgotten beasts made of water).
LiquidDensity,
/// Specifies (in kg/mol) the molar mass of the material in gaseous form. Also affects combat calculations like the densities,
/// but only for attacks made by gases (e.g. forgotten beasts made of steam).
MolarMass,
/// Specifies the type of container used to store the material. Used in conjunction with the `EXTRACT_BARREL`, `EXTRACT_VIAL`,
/// or `EXTRACT_STILL_VIAL` plant tokens.
/// Defaults to `BARREL`.
ExtractStorage,
/// Specifies the item type used for butchering results made of this material. Stock raws use `GLOB:NONE` for fat and `MEAT:NONE` for other meat materials.
ButcherSpecial,
/// When a creature is butchered, meat yielded from organs made from this material will be named via this token.
MeatName,
/// Specifies the name of blocks made from this material.
BlockName,
/// The material forms "wafers" instead of "bars".
Wafers,
/// Used with reaction raws to associate a reagent material with a product material. The first argument is used by `HAS_MATERIAL_REACTION_PRODUCT` and `GET_MATERIAL_FROM_REAGENT` in reaction raws.
/// The remainder is a material reference, generally `LOCAL_CREATURE_MAT:SUBTYPE` or `LOCAL_PLANT_MAT:SUBTYPE` or `INORGANIC:STONETYPE`.
/// `MATERIAL_REACTION_PRODUCT:TAN_MAT:LOCAL_CREATURE_MAT:LEATHER`
MaterialReactionProduct,
/// Used with reaction raws to associate a reagent material with a complete item. The first argument is used by `HAS_ITEM_REACTION_PRODUCT` and `GET_ITEM_DATA_FROM_REAGENT` in reaction raws.
/// The rest refers to the type of item, then its material.
/// `ITEM_REACTION_PRODUCT:BAG_ITEM:PLANT_GROWTH:LEAVES:LOCAL_PLANT_MAT:LEAF`
ItemReactionProduct,
/// "Used to classify all items made of the material, so that reactions can use them as generic reagents.In default raws, the following are used:
/// `FAT`, `TALLOW`, `SOAP`, `PARCHMENT`, `PAPER_PLANT`, `PAPER_SLURRY`, `MILK`, `CHEESE`, `WAX`.
/// `CAN_GLAZE` - items made from this material can be glazed.
/// `FLUX` - can be used as flux in pig iron and steel making.
/// `GYPSUM` - can be processed into gypsum plaster.
/// `CALCIUM_CARBONATE` - can be used in production of quicklime."
ReactionClass,
/// Makes `BOULDER` acceptable as a reagent in reactions that require `METAL_ORE:MATERIAL_NAME`, as well as smelting directly into metal bars.
/// Places the material under Metal Ores in Stone stockpiles. The specified value determines the probability for this product (see Tetrahedrite or Galena for details).
MetalOre,
/// Makes `BOULDER` items made of the material acceptable for strand extraction into threads; see also `STOCKPILE_THREAD_METAL`.
/// Value presumably determines the probability of this product extracted.
ThreadMetal,
/// Allows the material to be used to make casts.
HardensWithWater,
/// Determines effectiveness of soap - if the amount of grime on a body part is more than 3-SOAP_LEVEL, it sets it to 3-SOAP_LEVEL; as such setting it above 3 is bad.
/// Soap has `[SOAP_LEVEL:2]`. Defaults to 0.
SoapLevel,
/// Begins defining a syndrome applied by the material. Multiple syndromes can be specified. See Syndrome token.
Syndrome,
/// This is since .50 in the raws of several antler-wielding animals. It is used to show an antler as bodypart.
Antler,
// Additional tokens from 50.x
/// Hair material
Hair,
/// Feather material
Feather,
/// Scale material
Scale,
/// Hoof material
Hoof,
/// Chitin material
Chitin,
/// Cartilage material
Cartilage,
/// Nervous tissue
NervousTissue,
/// Category of meat
MeatCategory,
/// For default value, use unknown.
#[default]
Unknown,
}
impl FuelType {
/// Returns true if the fuel type is the default value
///
/// # Returns
///
/// * `true` if the fuel type is `FuelType::None`
#[must_use]
pub const fn is_default(&self) -> bool {
matches!(self, Self::None)
}
}
impl MaterialType {
/// Returns true if the material type is the default value
///
/// # Returns
///
/// * `true` if the material type is `Self::Unknown`
#[must_use]
pub const fn is_default(&self) -> bool {
matches!(self, Self::Unknown)
}
}
impl std::fmt::Display for MaterialType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Inorganic => write!(f, "Inorganic"),
Self::Stone => write!(f, "Stone"),
Self::Metal => write!(f, "Metal"),
Self::Coal => write!(f, "Coal"),
Self::CreatureMaterial => write!(f, "CreatureMaterial"),
Self::LocalCreatureMaterial => write!(f, "LocalCreatureMaterial"),
Self::PlantMaterial => write!(f, "PlantMaterial"),
Self::LocalPlantMaterial => write!(f, "LocalPlantMaterial"),
Self::GetMaterialFromReagent => write!(f, "GetMaterialFromReagent"),
Self::Amber => write!(f, "Amber"),
Self::Coral => write!(f, "Coral"),
Self::GlassGreen => write!(f, "GlassGreen"),
Self::GlassClear => write!(f, "GlassClear"),
Self::GlassCrystal => write!(f, "GlassCrystal"),
Self::Water => write!(f, "Water"),
Self::Potash => write!(f, "Potash"),
Self::Ash => write!(f, "Ash"),
Self::PearlAsh => write!(f, "PearlAsh"),
Self::Lye => write!(f, "Lye"),
Self::Mud => write!(f, "Mud"),
Self::Vomit => write!(f, "Vomit"),
Self::Salt => write!(f, "Salt"),
Self::FilthB => write!(f, "FilthB"),
Self::FilthY => write!(f, "FilthY"),
Self::UnknownSubstance => write!(f, "UnknownSubstance"),
Self::Grime => write!(f, "Grime"),
Self::Unknown => write!(f, "Unknown"),
}
}
}
impl std::fmt::Display for MaterialUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::ImpliesAnimalKill => write!(f, "ImpliesAnimalKill"),
Self::AlcoholPlant => write!(f, "AlcoholPlant"),
Self::AlcoholCreature => write!(f, "AlcoholCreature"),
Self::Alcohol => write!(f, "Alcohol"),
Self::CheesePlant => write!(f, "CheesePlant"),
Self::CheeseCreature => write!(f, "CheeseCreature"),
Self::Cheese => write!(f, "Cheese"),
Self::PowderMiscPlant => write!(f, "PowderMiscPlant"),
Self::PowderMiscCreature => write!(f, "PowderMiscCreature"),
Self::PowderMisc => write!(f, "PowderMisc"),
Self::StockpileGlobOrStockpileGlobSolid => {
write!(f, "StockpileGlobOrStockpileGlobSolid")
}
Self::StockpileGlobPaste => write!(f, "StockpileGlobPaste"),
Self::StockpileGlobPressed => write!(f, "StockpileGlobPressed"),
Self::StockpilePlantGrowth => write!(f, "StockpilePlantGrowth"),
Self::LiquidMiscPlant => write!(f, "LiquidMiscPlant"),
Self::LiquidMiscCreature => write!(f, "LiquidMiscCreature"),
Self::LiquidMiscOther => write!(f, "LiquidMiscOther"),
Self::LiquidMisc => write!(f, "LiquidMisc"),
Self::StructuralPlantMat => write!(f, "StructuralPlantMat"),
Self::SeedMat => write!(f, "SeedMat"),
Self::Bone => write!(f, "Bone"),
Self::Wood => write!(f, "Wood"),
Self::ThreadPlant => write!(f, "ThreadPlant"),
Self::Tooth => write!(f, "Tooth"),
Self::Horn => write!(f, "Horn"),
Self::Hair => write!(f, "Hair"),
Self::Pearl => write!(f, "Pearl"),
Self::Shell => write!(f, "Shell"),
Self::Leather => write!(f, "Leather"),
Self::Silk => write!(f, "Silk"),
Self::Soap => write!(f, "Soap"),
Self::GeneratesMiasma => write!(f, "GeneratesMiasma"),
Self::Meat => write!(f, "Meat"),
Self::Rots => write!(f, "Rots"),
Self::NervousTissue => write!(f, "NervousTissue"),
Self::BloodMapDescriptor => write!(f, "BloodMapDescriptor"),
Self::IchorMapDescriptor => write!(f, "IchorMapDescriptor"),
Self::GooMapDescriptor => write!(f, "GooMapDescriptor"),
Self::SlimeMapDescriptor => write!(f, "SlimeMapDescriptor"),
Self::PusMapDescriptor => write!(f, "PusMapDescriptor"),
Self::SweatMapDescriptor => write!(f, "SweatMapDescriptor"),
Self::TearsMapDescriptor => write!(f, "TearsMapDescriptor"),
Self::SpitMapDescriptor => write!(f, "SpitMapDescriptor"),
Self::Evaporates => write!(f, "Evaporates"),
Self::EntersBlood => write!(f, "EntersBlood"),
Self::EdibleVermin => write!(f, "EdibleVermin"),
Self::EdibleRaw => write!(f, "EdibleRaw"),
Self::EdibleCooked => write!(f, "EdibleCooked"),
Self::DoNotCleanGlob => write!(f, "DoNotCleanGlob"),
Self::NoStoneStockpile => write!(f, "NoStoneStockpile"),
Self::ItemsMetal => write!(f, "ItemsMetal"),
Self::ItemsBarred => write!(f, "ItemsBarred"),
Self::ItemsScaled => write!(f, "ItemsScaled"),
Self::ItemsLeather => write!(f, "ItemsLeather"),
Self::ItemsSoft => write!(f, "ItemsSoft"),
Self::ItemsHard => write!(f, "ItemsHard"),
Self::IsStone => write!(f, "IsStone"),
Self::IsCeramic => write!(f, "IsCeramic"),
Self::Undiggable => write!(f, "Undiggable"),
Self::DisplayUnglazed => write!(f, "DisplayUnglazed"),
Self::Yarn => write!(f, "Yarn"),
Self::StockpileThreadMetal => write!(f, "StockpileThreadMetal"),
Self::IsMetal => write!(f, "IsMetal"),
Self::IsGlass => write!(f, "IsGlass"),
Self::CrystalGlassable => write!(f, "CrystalGlassable"),
Self::ItemsWeapon => write!(f, "ItemsWeapon"),
Self::ItemsWeaponRanged => write!(f, "ItemsWeaponRanged"),
Self::ItemsAnvil => write!(f, "ItemsAnvil"),
Self::ItemsAmmo => write!(f, "ItemsAmmo"),
Self::ItemsDigger => write!(f, "ItemsDigger"),
Self::ItemsArmor => write!(f, "ItemsArmor"),
Self::ItemsDelicate => write!(f, "ItemsDelicate"),
Self::ItemsSiegeEngine => write!(f, "ItemsSiegeEngine"),
Self::ItemsQuern => write!(f, "ItemsQuern"),
Self::Unknown => write!(f, "Unknown"),
}
}
}