Page 1 of 1

[posila] [1.1.19] surface.create_entities_from_blueprint_string does not include train fuel

Posted: Sat Jan 30, 2021 2:48 am
by Xorimuth
This API is technically internal, but very useful for anyone making modded simulations, eg with https://mods.factorio.com/mod/simhelper. I spent a long time working out why my train wasn't driving, because there aren't any 'missing fuel' alerts in the simulation.

To reproduce, see attached mod (requires simhelper). In particular, "prototypes/simulations.lua".

Re: [1.1.19] surface.create_entities_from_blueprint_string does not include train fuel

Posted: Sun Jan 31, 2021 10:04 am
by Klonan
Posting the code here so its easier to test:

Code: Select all

        local bp="0eNq9mc1u2zAMx99FZ2cwRX3YOe8NdhyKwnW8VJhjB7aTrijy7pPipGlTFiGBdZcWiu2fSVF/kaZe1EO7a7ZD6Ca1fFGh7rtRLX++qDGsu6pNv03P20YtVZiajcpUV23SaKhCqw6ZCt2q+aOWcLjLVNNNYQrN/Pxx8Hzf7TYPzRBveH2y3g37ZrU4AjK17cf4TN+lF0WOztSzWi6giOhVGJp6vuYO2Qei5hEhp5FIIPEVOU6Rtn6cPoEu4AS176GegBouFJCGAgG1POcX5oTUt5GObael7bQE1IuheNvSgg31NJSytBRD4balafExqSVNpUwFkFJLhqlMPdmznvLbEgVkMguaSWkU2HrSQDpPzqiVQj1jRtmKMp6EUrsJsBXlBJZeFNX2db/pp7BviN3kpFETif0QIqSar8YlUfdtP6T7huNwHf9+02Bd4bR31trcAZocUecIOnIejimhSreZssixjDfHf2AcOo25cYVP20tKOmPCjn0bVotfu6ZNS8AfKC/YEj47QmL0RbOJ0i3Gqd8SDLxM73ieCPWj3w11mrovmQ/KWvZeoJFcD5QctJZCGSlLs7OrsSSUkoM2Uqi/vcVoZnZ15qwHCuKkq5GOL1vvmp41Mr6FFMrIypotP4MklIov5lKoZZR5IA0NUqFBvko86TAVGmSmTJzTcM6YQsMkFhRRU0R2tjRAOk4GRawXIINy0UtdDet+8VSt45OfQZBIZaHbx3E/xMvdrm2plxRCW2lTS9E2Y24vHpML7SLXtZHKg9y4jBYF4lj6ySNhUGgrmfKNEdWpwNCIscI6jZGXjFQiJemsZ9U3ujwh3lf5b4ud7804hW4e/b+Kx4jFR6rPMNWnZ/Vdf0FTnzuWLb/T5F5/7FELybLViMCHslMXIh/K1iJaPpRd4KHnQ9niREGgnDArsqBeWP+woIWwaGZBS+HXLgfq+OUfP1COrSjLD5RjK8ryA+Wk2Q3IhO6kLRNOW9PJWpDX7VdDIZ2wrwWMhonzUijjC8JJW5BQMiyVtiCBUTP4XNiB1XDbUg9C6LX7pKVa2H3XjFapR8m5gzYM343o3OEaScncW+ERwbXnmE5fxvqxWe3a0/HLpY+XxlC8uWE+3vnYsnqqwnRf993q+MYZEyHbamjuT2dAscDLzudBU9ikp6ZQ/x6TvvPDXfLts/LwH9DvkpvHY6jlm1OrTO2bYZwntwDjS+11qRHQHQ5/AUT7vSY="
        game.surfaces[1].create_entities_from_blueprint_string{string = bp, position = {0, 0}}

Re: [1.1.19] surface.create_entities_from_blueprint_string does not include train fuel

Posted: Mon Feb 01, 2021 3:07 pm
by Xorimuth

Re: [posila] [1.1.19] surface.create_entities_from_blueprint_string does not include train fuel

Posted: Mon Feb 01, 2021 4:20 pm
by posila
Thanks for the report.
Fixed for 1.1.20