Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

template Sticky Locked

A topic by Oblerion Studio created 93 days ago Views: 29
This topic is locked
Viewing posts 1 to 1
Developer (2 edits)

Template

local name = "template"

local interpreter={} --your interpreter table
local api={}         --your api table

-- add lua basic to api
local lua = dofile("api/lua/baselib.lua")
for item, def in pairs(lua) do
  if included[item] then
    api[item] = def
  end
end

-- package template
return {
  name = name,
  description = "Implements "..name,
  author = "you",
  version = 0.1,
  onRegister = function(self)
    ide:AddInterpreter(interpreter.name, interpreter)
    ide:AddAPI("lua", api.name, api)
  end,
  onUnRegister = function(self)
    ide:RemoveInterpreter(interpreter.name, interpreter)
    ide:RemoveAPI("lua", api.name)
  end,
  onMenuEditor = function(self, menu, editor, event)
    -- menu editor code
  end
}