安裝 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 :)
============