Talk:Tutorial:Modding Tutorial

From Official Factorio Wiki
Revision as of 22:26, 6 May 2013 by Rk84 (talk | contribs) (Created page with "== Chapter 6 The Lua code == I would like to point out that it is not mandatory to use require util/defines. Require gives no additional access to game. Just access to the fil...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Chapter 6 The Lua code

I would like to point out that it is not mandatory to use require util/defines. Require gives no additional access to game. Just access to the file it loads. In your code you need require defines because you use defines.events.ontick, but you could just use number to avoid need of defines just like you have in getinventory(). Now i dont remember what was in utils, but you can check it out in core/lualib -folder and if there is some function you need you have option to require the file, copy/paste the function or write your own function. Rk84 (talk) 00:26, 7 May 2013 (CEST)