a5b68cf1fd
I've added lua hooks for both pager functor classes. Hopefully, I haven't missed any corner cases, because it took me a while to hunt everything down. One issue is that the map's save directory needs to be set in the Format class, but it'll do for now. I'll review this again when I've got more than one map running at one time. There should be enough here for a lua-driven map generator to be implemented, even if it's a bit rough. I think I'll test this out in the editor eventually, but getting the base branch's network map code going comes first. The current process is extremely convulted, so I need to document everything that I've done so far, including C++ and lua functions.
20 lines
510 B
Lua
20 lines
510 B
Lua
print("Lua script check OK (./rsc)")
|
|
|
|
function Region.Create(r)
|
|
print("Region:Create(r", Region.GetX(r), Region.GetY(r), ")")
|
|
end
|
|
|
|
function Region.Unload(r)
|
|
print("Region:Unload(r", Region.GetX(r), Region.GetY(r), ")")
|
|
end
|
|
|
|
--return true if file loaded, otherwise return false
|
|
function Region.Load(r, saveDir)
|
|
print("Region:Load(r,", saveDir, Region.GetX(r), Region.GetY(r), ")")
|
|
return false
|
|
end
|
|
|
|
function Region.Save(r, saveDir)
|
|
print("Region:Save(r,", saveDir, Region.GetX(r), Region.GetY(r), ")")
|
|
end
|