2using System.Collections.Generic;
8 public class Row : BaseRow
86 public static string[]
IDPick =
new string[5] {
"rock",
"ore",
"gem",
"crystal",
"bone" };
88 public static string[]
IDAxe =
new string[1] {
"wood" };
109 base.OnImportData(data);
116 if (matColors ==
null)
119 string[] array =
tag;
120 foreach (
string text
in array)
122 if (text.StartsWith(
"addCol"))
124 if (text.Contains(
"_Main"))
126 matColors.main = text.ExtractInBetween(
'(',
')').ToColor();
128 if (text.Contains(
"_Alt"))
130 matColors.alt = text.ExtractInBetween(
'(',
')').ToColor();
167 for (
int i = 0; i < a; i++)
189 return soundImpact +
"_" + suffx;
208 return "build_progress";
215 if (c !=
null && !c.idSound.IsEmpty())
217 return "Material/" + c.idSound;
272 string[] array =
goods;
273 foreach (
string text
in array)
282 container.AddThing(thing2);
294 for (
int i = 0; i < 8; i++)
305 public List<Row>
list =
new List<Row>();
319 return list.RandomItem();
323 public static Dictionary<string, TierList>
tierMap =
new Dictionary<string, TierList>();
379 foreach (
Row row
in rows)
383 if (!row.
groups.IsEmpty())
385 string[] groups = row.
groups;
386 foreach (
string key
in groups)
389 if (tierList ==
null)
400 if (!(category ==
"gem"))
402 if (category ==
"ore")
425 List<int> list =
new List<int>(r.
elements);
426 for (
int i = 0; i < r.
elements.Length; i += 2)
431 r.elements = list.ToArray();
432 void Add(
int ele,
int a)
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
Thing AddThing(string id, int lv=-1)
void ModNum(int a, bool notify=true)
UD_String_MatData matColors
static int[] ParseElements(string str)
static SoundManager Sound
static Effect Get(Effect original)
void Play(float delay, Point from, float fixY=0f, Point to=null, Sprite sprite=null)
static Dictionary< int, int > GetElementMap(int[] list)
static SourceMaterial.Row sourceSnow
void AddDecal(int x, int z, int id, int amount=1, bool refresh=true)
static string[] GetStringArray(int id)
static string GetString(int id)
static int GetInt(int id)
static string GetStr(int id, bool useDefault=false)
string TryGetSound(string suffx, RenderRow c=null)
void CreateByProduct(Thing container, int num)
string GetSoundImpact(RenderRow c=null)
string GetSoundCraft(RenderRow c=null)
void AddBlood(Point p, int a=1)
override void OnImportData(SourceData data)
string GetSoundDead(RenderRow c=null)
string GetSoundDrop(RenderRow c=null)
Dictionary< int, int > elementMap
void PlayHitEffect(Point p, int emit=2)
static Dictionary< string, TierList > tierMap
override void SetRow(Row r)
override void OnAfterImportData()
override string[] ImportFields
static Thing CreateRawMaterial(SourceMaterial.Row m)
static Thing Create(string id, int idMat=-1, int lv=-1)
bool TryGetValue(TKey key, out TValue value)