67 return base.GetText(str);
75 public override string GetText(
string str =
"")
86 text = text.TagColor(
Color.gray);
104 task.SetTarget(c, t);
105 if (task.efficiency > best)
107 best = task.efficiency;
126 string[] array =
null;
128 switch (this.harvestType)
131 array = pos.sourceObj.reqHarvest;
132 row = pos.cell.matObj;
143 array =
new string[2] {
"handicraft",
"1" };
147 if (pos.cell.HasBridge)
149 array = pos.sourceBridge.reqHarvest;
154 array = pos.sourceFloor.reqHarvest;
161 array = pos.sourceBlock.reqHarvest;
165 array =
new string[pos.sourceFloor.reqHarvest.Length];
166 Array.Copy(pos.sourceFloor.reqHarvest, array, pos.sourceFloor.reqHarvest.Length);
174 matHardness = matHardness * ((pos.growth !=
null) ? pos.growth.GetHp() : pos.sourceObj.hp) / 100;
176 if (row.
tag.Contains(
"hard"))
181 if ((uint)harvestType <= 1u && row.id == 0)
187 int num = array[1].ToInt();
188 reqLv = matHardness + num;
189 isToolRequired = ((!IsHarvest && idEle != 250) ?
true :
false);
193 int num2 = ((idEle == 220 || idEle == 225) ? GetToolEfficiency(
tool, row) : 100);
194 toolLv += tool.material.hardness * num2 / 100;
195 toolLv += (int)(
tool.encLV +
tool.blessedState);
197 toolLv += c.
Evalue(idEle) * 3 / 2;
202 efficiency = (toolLv + 5) * 100 / ((reqLv + 5) * 140 / 100);
211 else if (efficiency > 150)
215 else if (efficiency > 100)
224 if (this.harvestType ==
HarvestType.Obj && IsHarvest && plantData !=
null && plantData.
size > 0)
226 maxProgress = (int)Mathf.Clamp(
Rand.
Range(8f, 10f) * (float)(100 + plantData.
size * 100 + plantData.
size * plantData.
size * 30) / (float)efficiency, 2f, 1000f);
230 maxProgress = (int)Mathf.Clamp(
Rand.
Range(8f, 16f) * 100f / (float)efficiency, 2f, 30f);
236 string[] array = _raw.Split(
',');
242 int[] toolEfficiency = GetToolEfficiency(mat);
246 toolEfficiency[0] = 0;
250 toolEfficiency[1] = 0;
254 toolEfficiency[0] = 50 + owner.Evalue(261);
257 int[] array = toolEfficiency;
258 foreach (
int num2
in array)
270 if (
tool != owner.Tool)
274 return base.CanProgress();
279 switch (mat.category)
282 return new int[2] { 100, 50 };
287 return new int[2] { 100, 25 };
290 return new int[2] { 50, 100 };
294 return new int[2] { 25, 100 };
297 return new int[2] { 100, 100 };
299 return new int[2] { 100, 100 };
override CursorInfo CursorIcon
string GetTextDifficulty()
override string GetTextSmall(Card c)
int GetToolEfficiency(Thing t, SourceMaterial.Row mat)
static Thing GetBestTool(Chara c, Point p)
virtual string GetBaseText(string str)
override bool CanPressRepeat
virtual HarvestType harvestType
override bool CanProgress()
int[] GetToolEfficiency(SourceMaterial.Row mat)
override string GetText(string str="")
void SetTarget(Chara c, Thing _tool=null)
static int GetReqEle(string _raw)
bool HasElement(int ele, int req=1)
SourceMaterial.Row material
static SourceManager sources
static Element Create(int id, int v=0)
static string[] GetList(string id)
PlantData TryGetPlant(Point p)
static int Range(int min, int max)
void Foreach(Action< Thing > action, bool onlyAccessible=true)
virtual string ReqHarvest