Space Engineers

Space Engineers

Projections To Assembler
Update Discussion
hello!

thought i would open up a discussion about current and future update status.

On that note for the latest update 07 March 2019, projector blocks are causing crashes when selecting them in the terminal.
< >
Showing 1-3 of 3 comments
Freddy McCraggy Mar 7, 2019 @ 2:40pm 
I can select them, but if I turn one on, crash. Also, I tried to grind and weld/repair it and the game crashed.
[SASR] Ryan Mar 7, 2019 @ 6:21pm 
ooof that is a rough one! i removed the mod and im back to working normally now. but you could also try to open your world in SEtoolbox and change the projectors to another type of block that way if you dont wanna get rid of the mod haha
Polack77 Nov 25, 2019 @ 1:07pm 
translate.google :
============
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 :)
============
< >
Showing 1-3 of 3 comments
Per page: 1530 50