View Single Post
  #2  
Unread 09-10-2023, 10:18 AM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 343
Quote:
Originally Posted by Morgantine
Where is the "import" command defined? It doesn't seem to be a standard Lua command; standard Lua seems to use "require" instead. Is it a Turbine thing?
Yes, it is a Turbine thing. Note, it does not only allow gaining access to user defined .lua source files, it also determines what portion of the built-in tables/methods (and their underlying C objects) are accessible to each apartment - if you don't import Turbine.Gameplay, for instance, you will not have access to anything defined there, but your plugin will have a smaller memory footprint (unless another plugin loaded into the same apartment did import Turbine.Gameplay).
Reply With Quote