安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题






I did put it in my normal save, but it made it just a bit too easy, so I removed it - that made the ore detectors stop working all together.
Now I have it in again.
I got to look for the config to make it less op ;P
03:25:27.4952 [DEBUG] Keen: Exception: System.ArgumentNullException: Value cannot be null.
at System.Threading.SemaphoreSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Collections.Concurrent.BlockingCollection`1.TryTakeWithNoTimeValidation(T& item, Int32 millisecondsTimeout, CancellationToken cancellationToken, CancellationTokenSource combinedTokenSource)
at System.Collections.Concurrent.BlockingCollection`1.TryTake(T& item, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Collections.Concurrent.BlockingCollection`1.Take()
at OreDetectorReforged.Detector.DetectorServer.ProcessTasks()
at ParallelTasks.DelegateWork.DoWork(WorkData workData)
at ParallelTasks.WorkItem.DoWork(Int32 expectedID)
First time I've seen this.
2024-05-18 17:43:16.104 - Thread: 31 -> Exception: System.OverflowException: Value was either too large or too small for a UInt16.
at System.Convert.ToUInt16(Int32 value)
at OreDetectorReforged.Detector.DetectorPagePlanet.Pop()
at OreDetectorReforged.Detector.DetectorServer.ProcessTasks()
I fixed this by editting detectorpageplanet.cs and updated this line...
pq.Push(new Node(dist, page, Convert.ToUInt16(plod1.X), Convert.ToUInt16(plod1.Y), Convert.ToUInt16(plod1.Z)));
To this...
// Clamp values to UInt16 range.
ushort clampedX = (ushort)Math.Max(0, Math.Min(plod1.X, UInt16.MaxValue));
ushort clampedY = (ushort)Math.Max(0, Math.Min(plod1.Y, UInt16.MaxValue));
ushort clampedZ = (ushort)Math.Max(0, Math.Min(plod1.Z, UInt16.MaxValue));
pq.Push(new Node(dist, page, clampedX, clampedY, clampedZ));
For example: if you set the display count to 3, whitelist Iron only, and exclusion range to 100m, it would only show 3 markers at 3 different iron deposits rather than 3 markers overlapping at the same location on different voxels of iron.
But on my new Server it doesn't seems to work right.
When i log in it works, or when the server restartet. But as soon as you leave the log in area or turn the ore detector off/on nothing happens besides the default Ore detector scan range.
I have Better Stone installed (The Full Modlist is 105 Mods long), which worked well on the previous Server.
I also played with the Load order of this mod but the behaviour remains the same.
Some Ideas?
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3044962040 is the link to the script. It will scan through all the ore types and write the first found ore to the custom data. If it doesn't find a specified ore, it moves to the next ore until it does find one or all the ores were depleted.
ReforgedDetectN(new BoundingSphereD(Me.GetPosition(), 3e4), Ore, 1, (vs) => Results += "\n" + vs.FirstOrDefault());
while (true) {
if (Results.Length > 0) {
break;
}
}
because it would compile. but then I tried to run it and I was told my script was too complex.
Looks like Task from System.Threading.Tasks is not allowed in space engineers. Meaning I can't for example
Task t = Task.Run(() => {
ReforgedDetectN(new BoundingSphereD(Me.GetPosition(), 3e4), Ore, 1, (vs) => Results += "\n" + vs.FirstOrDefault());
});
t.Wait();
Do something like that. Is there a built in method to wait until the task is complete?
string[] oreTypes = new string[]
{
"Gold",
"Iron",
"Ice",
"Cobalt",
};
void ReforgedDetectN(BoundingSphereD area, string minedOre, int count, Action<List<Vector3D>> callBack) {
Me.SetValue("ReforgedDetectN", new ValueTuple<BoundingSphereD, string, int, Action<List<Vector3D>>>(area, minedOre, count, callBack));
}
public void Main(string argument, UpdateType updateSource) {
string Results = "";
foreach (string Ore in oreTypes) {
ReforgedDetectN(new BoundingSphereD(Me.GetPosition(), 3e4), Ore, 1, (vs) => Results += "\n" + vs.FirstOrDefault());
Echo("Results for " + Ore + ": " + Results);
if (Results.Length > 11) {//X:0 Y:0 Z:0 is 11 characters
Echo("Writing to custom data: " + Results);
Me.CustomData = Results;
break;
}
Me.CustomData = "";
}
Echo("Done");
}
@thorman I would guess it's the other mod. Nanite had similar issue.
@ WGTaP No I don't have discord.
@AnonaMoose What api stuff?
The ingame script example is linked in description and in the readme file: `steam://openurl/https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2810169765`
The mod message handler is registered by the code `RegisterMessageHandler(modMsgId`.
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2976762253
Can i use this in conjunction with say an auto miner and plug in a bunch of gps locations and send it to mine it all?