aboutsummaryrefslogtreecommitdiff
path: root/advtrains_train_japan
Commit message (Collapse)AuthorAge
* Move driving_ctrl_access property to seat grouporwell962018-01-09
| | | | | there's now a more strict check for the train_operator privilege Also added custom reasons on getting on a train.
* Implement sound api and some soundsorwell962017-12-06
| | | | | | | - Level crossing bell - Horns - Subway train driving and door sounds ...to be continued...
* Moved default train track to separate mod, for integration with advcarts.Gabriel Pérez-Cerezo2017-10-25
|
* Remove zip release files, move mod to root, exclude assets from Makefile (#92)rubenwardy2017-09-20
|
* Restructure mod directoryorwell962017-01-04
|
* remove train type concept and calculate train's capabilities based on used ↵orwell962016-12-22
| | | | wagons
* Turning mod into a modpack and separating the trains from the core modorwell962016-12-20
class="hl kwa">else atltrans = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end end --Privilege --Only trusted players should be enabled to build stuff which can break the server. atlatc = { envs = {}} minetest.register_privilege("atlatc", { description = "Player can place and modify LUA ATC components. Grant with care! Allows to execute bad LUA code.", give_to_singleplayer = false, default= false }) --assertt helper. error if a variable is not of a type function assertt(var, typ) if type(var)~=typ then error("Assertion failed, variable has to be of type "..typ) end end local mp=minetest.get_modpath("advtrains_luaautomation") if not mp then error("Mod name error: Mod folder is not named 'advtrains_luaautomation'!") end dofile(mp.."/environment.lua") dofile(mp.."/interrupt.lua") dofile(mp.."/active_common.lua") dofile(mp.."/atc_rail.lua") dofile(mp.."/operation_panel.lua") dofile(mp.."/pcnaming.lua") if mesecon then dofile(mp.."/p_mesecon_iface.lua") end dofile(mp.."/chatcmds.lua") local filename=minetest.get_worldpath().."/advtrains_luaautomation" function atlatc.load() local file, err = io.open(filename, "r") if not file then minetest.log("error", " Failed to read advtrains_luaautomation save data from file "..filename..": "..(err or "Unknown Error")) else atprint("luaautomation reading file:",filename) local tbl = minetest.deserialize(file:read("*a")) if type(tbl) == "table" then if tbl.version==1 then for envname, data in pairs(tbl.envs) do atlatc.envs[envname]=atlatc.env_load(envname, data) end atlatc.active.load(tbl.active) atlatc.interrupt.load(tbl.interrupt) atlatc.pcnaming.load(tbl.pcnaming) end else minetest.log("error", " Failed to read advtrains_luaautomation save data from file "..filename..": Not a table!") end file:close() end -- run init code of all environments atlatc.run_initcode() end atlatc.save = function() --versions: -- 1 - Initial save format.