Began bringing the client into line with the server's changes
Several parts of the client already built correctly. Updated LobbyMenu, it not builds.
This commit is contained in:
@@ -64,6 +64,11 @@ Region* RegionPager::FindRegion(int x, int y) {
|
||||
}
|
||||
|
||||
Region* RegionPager::LoadRegion(int x, int y) {
|
||||
//only work if using lua
|
||||
if (!luaState) {
|
||||
throw(std::runtime_error("RegionPager::luaState is null"));
|
||||
}
|
||||
|
||||
//load the region if possible
|
||||
|
||||
//snap the coords
|
||||
@@ -97,6 +102,11 @@ Region* RegionPager::LoadRegion(int x, int y) {
|
||||
}
|
||||
|
||||
Region* RegionPager::SaveRegion(int x, int y) {
|
||||
//only work if using lua
|
||||
if (!luaState) {
|
||||
throw(std::runtime_error("RegionPager::luaState is null"));
|
||||
}
|
||||
|
||||
//snap the coords
|
||||
x = snapToBase(REGION_WIDTH, x);
|
||||
y = snapToBase(REGION_HEIGHT, y);
|
||||
@@ -118,6 +128,11 @@ Region* RegionPager::SaveRegion(int x, int y) {
|
||||
}
|
||||
|
||||
Region* RegionPager::CreateRegion(int x, int y) {
|
||||
//only work if using lua
|
||||
if (!luaState) {
|
||||
throw(std::runtime_error("RegionPager::luaState is null"));
|
||||
}
|
||||
|
||||
//snap the coords
|
||||
x = snapToBase(REGION_WIDTH, x);
|
||||
y = snapToBase(REGION_HEIGHT, y);
|
||||
@@ -143,6 +158,11 @@ Region* RegionPager::CreateRegion(int x, int y) {
|
||||
}
|
||||
|
||||
void RegionPager::UnloadRegion(int x, int y) {
|
||||
//only work if using lua
|
||||
if (!luaState) {
|
||||
throw(std::runtime_error("RegionPager::luaState is null"));
|
||||
}
|
||||
|
||||
//snap the coords
|
||||
x = snapToBase(REGION_WIDTH, x);
|
||||
y = snapToBase(REGION_HEIGHT, y);
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
||||
//TODO: split this into two: "RegionPagerBase" and "RegionPagerLua"
|
||||
class RegionPager {
|
||||
public:
|
||||
RegionPager() = default;
|
||||
|
||||
Reference in New Issue
Block a user