安装 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(越南语)
Українська(乌克兰语)
报告翻译问题
============
Hi :),
I am French, so I will do a slightly improved "translate.google".
I tested your code. Seeing that my game is in French, with my little test, I have this return on this line of code:
----
Code :
GridTerminalSystem.GetBlocksOfType<IMyProjector>(list);
if (list.Count > 0)
monImprimante.debugTextSurface.WriteText(((IMyProjector)list[0]).DetailedInfo);
----
Back :
Modèle: Projecteur
Apport Max requis: 100 W
WARNING! Projection out of bounds!
Build progress: 0/318
Blocks remaining:
Armor blocks: 276
Propulseurs Atmosphérique: 18
Conteneur de Marchandises Moyen: 2
Connecteur: 1
Batterie: 4
Balise: 1
Coin léger: 8
Train d'atterrissage: 1
Gyroscope: 3
Cockpit de chasseur: 1
Projecteur: 2
Foreuse: 1
----
Of course, your code does not work.
But I have a solution, these lines on the other hand return a dictionary of type of block and a quantity (one can like your "parse"):
----
Code :
GridTerminalSystem.GetBlocksOfType<IMyProjector>(list);
if (list.Count > 0)
{
monImprimante.debugTextSurface.WriteText("RemainingArmorBlocks : " + ((IMyProjector)list[0]).RemainingArmorBlocks.ToString() + "\n", false);
var dicRB_PerType = ((IMyProjector)list[0]).RemainingBlocksPerType;
foreach (var itemToPrint in dicRB_PerType)
{
monImprimante.debugTextSurface.WriteText(itemToPrint.Key.ToString() + "/" + itemToPrint.Value.ToString() + "\n", true);
}
}
Back :
RemainingArmorBlocks : 276
MyObjectBuilder_Thrust/SmallBlockSmallAtmosphericThrust/18
MyObjectBuilder_CargoContainer/SmallBlockMediumContainer/2
MyObjectBuilder_ShipConnector/ConnectorMedium/1
MyObjectBuilder_BatteryBlock/SmallBlockBatteryBlock/4
MyObjectBuilder_Beacon/SmallBlockBeacon/1
MyObjectBuilder_InteriorLight/SmallBlockLight_1corner/8
MyObjectBuilder_LandingGear/SmallBlockLandingGear/1
MyObjectBuilder_Gyro/SmallBlockGyro/3
MyObjectBuilder_Cockpit/DBSmallBlockFighterCockpit/1
MyObjectBuilder_ReflectorLight/SmallBlockFrontLight/2
MyObjectBuilder_Drill/SmallBlockDrill/1
----
On the other hand, except for "ToString" I did not get much from the "VRage.Game.MyDefinitionBase" class, and I also did not find how to differentiate heavy armor blocks from light armor blocks (or even sides of the sides).
So I have two questions:
1) I'm looking for a "ship printer". Can I reuse your code to develop my printer ?
2) Do you think you are changing your code to make it internationalizable ?
thank you in advance :)
====
Fr version :
============
Salut :),
Je suis français, donc je vais faire un "translate.google" légèrement amélioré.
J'ai tester ton code, je cherche de mon coté à faire une "imprimante à vaisseau". Vue que mon jeu est en français, avec mon petit test, j'ai ce retour sur cette ligne de code :
----
Code :
GridTerminalSystem.GetBlocksOfType<IMyProjector>(list);
if (list.Count > 0)
monImprimante.debugTextSurface.WriteText(((IMyProjector)list[0]).DetailedInfo);
----
Retour :
Modèle: Projecteur
Apport Max requis: 100 W
WARNING! Projection out of bounds!
Build progress: 0/318
Blocks remaining:
Armor blocks: 276
Propulseurs Atmosphérique: 18
Conteneur de Marchandises Moyen: 2
Connecteur: 1
Batterie: 4
Balise: 1
Coin léger: 8
Train d'atterrissage: 1
Gyroscope: 3
Cockpit de chasseur: 1
Projecteur: 2
Foreuse: 1
----
Forcément, ton code ne fonctionne pas.
Mais j'ai une solution, cette ligne par contre retourne un dictionnaire de type de bloc et une quantité (un peut comme ton "parse") :
----
Code :
GridTerminalSystem.GetBlocksOfType<IMyProjector>(list);
if (list.Count > 0)
{
monImprimante.debugTextSurface.WriteText("RemainingArmorBlocks : " + ((IMyProjector)list[0]).RemainingArmorBlocks.ToString() + "\n", false);
var dicRB_PerType = ((IMyProjector)list[0]).RemainingBlocksPerType;
foreach (var itemToPrint in dicRB_PerType)
{
monImprimante.debugTextSurface.WriteText(itemToPrint.Key.ToString() + "/" + itemToPrint.Value.ToString() + "\n", true);
}
}
RemainingArmorBlocks : 276
MyObjectBuilder_Thrust/SmallBlockSmallAtmosphericThrust/18
MyObjectBuilder_CargoContainer/SmallBlockMediumContainer/2
MyObjectBuilder_ShipConnector/ConnectorMedium/1
MyObjectBuilder_BatteryBlock/SmallBlockBatteryBlock/4
MyObjectBuilder_Beacon/SmallBlockBeacon/1
MyObjectBuilder_InteriorLight/SmallBlockLight_1corner/8
MyObjectBuilder_LandingGear/SmallBlockLandingGear/1
MyObjectBuilder_Gyro/SmallBlockGyro/3
MyObjectBuilder_Cockpit/DBSmallBlockFighterCockpit/1
MyObjectBuilder_ReflectorLight/SmallBlockFrontLight/2
MyObjectBuilder_Drill/SmallBlockDrill/1
----
Retour :
RemainingArmorBlocks : 276
MyObjectBuilder_Thrust/SmallBlockSmallAtmosphericThrust/18
MyObjectBuilder_CargoContainer/SmallBlockMediumContainer/2
MyObjectBuilder_ShipConnector/ConnectorMedium/1
MyObjectBuilder_BatteryBlock/SmallBlockBatteryBlock/4
MyObjectBuilder_Beacon/SmallBlockBeacon/1
MyObjectBuilder_InteriorLight/SmallBlockLight_1corner/8
MyObjectBuilder_LandingGear/SmallBlockLandingGear/1
MyObjectBuilder_Gyro/SmallBlockGyro/3
MyObjectBuilder_Cockpit/DBSmallBlockFighterCockpit/1
MyObjectBuilder_ReflectorLight/SmallBlockFrontLight/2
MyObjectBuilder_Drill/SmallBlockDrill/1
----
Du coup j'ai deux questions :
Puis-je réutilisé ton code pour développer mon imprimante ?
Pense tu modifier ton code pour le rendre internationalisable ?
Merci d'avance :)
============