fix sim.loadStamp return value, remove VINE_MODE
This commit is contained in:
parent
776b2f6607
commit
c1320d2007
@ -1366,13 +1366,14 @@ int LuaScriptInterface::simulation_loadStamp(lua_State * l)
|
|||||||
}
|
}
|
||||||
if (tempfile)
|
if (tempfile)
|
||||||
{
|
{
|
||||||
if (luacon_sim->Load(x, y, tempfile->GetGameSave()))
|
if (!luacon_sim->Load(x, y, tempfile->GetGameSave()))
|
||||||
{
|
{
|
||||||
//luacon_sim->sys_pause = (tempfile->GetGameSave()->paused | luacon_model->GetPaused())?1:0;
|
//luacon_sim->sys_pause = (tempfile->GetGameSave()->paused | luacon_model->GetPaused())?1:0;
|
||||||
lua_pushinteger(l, 1);
|
lua_pushinteger(l, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lua_pushnil(l);
|
lua_pushnil(l);
|
||||||
|
delete tempfile;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lua_pushnil(l);
|
lua_pushnil(l);
|
||||||
|
@ -1338,7 +1338,7 @@ LoginStatus Client::Login(std::string username, std::string password, User & use
|
|||||||
}
|
}
|
||||||
catch (json::Exception &e)
|
catch (json::Exception &e)
|
||||||
{
|
{
|
||||||
lastError = "Server responded with crap";
|
lastError = "Could not read response";
|
||||||
return LoginError;
|
return LoginError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ int Simulation::Load(int fullX, int fullY, GameSave * save)
|
|||||||
{
|
{
|
||||||
int blockX, blockY, x, y, r;
|
int blockX, blockY, x, y, r;
|
||||||
|
|
||||||
if(!save) return 0;
|
if(!save) return 1;
|
||||||
save->Expand();
|
save->Expand();
|
||||||
|
|
||||||
//Align to blockMap
|
//Align to blockMap
|
||||||
@ -4758,7 +4758,6 @@ Simulation::Simulation():
|
|||||||
lighting_recreate(0),
|
lighting_recreate(0),
|
||||||
force_stacking_check(0),
|
force_stacking_check(0),
|
||||||
ISWIRE(0),
|
ISWIRE(0),
|
||||||
VINE_MODE(0),
|
|
||||||
gravWallChanged(false),
|
gravWallChanged(false),
|
||||||
replaceModeSelected(0),
|
replaceModeSelected(0),
|
||||||
replaceModeFlags(0)
|
replaceModeFlags(0)
|
||||||
|
@ -108,7 +108,6 @@ public:
|
|||||||
int gravityMode;
|
int gravityMode;
|
||||||
int legacy_enable;
|
int legacy_enable;
|
||||||
int aheat_enable;
|
int aheat_enable;
|
||||||
int VINE_MODE;
|
|
||||||
int water_equal_test;
|
int water_equal_test;
|
||||||
int sys_pause;
|
int sys_pause;
|
||||||
int framerender;
|
int framerender;
|
||||||
|
@ -81,7 +81,7 @@ int Element_PLNT::update(UPDATE_FUNC_ARGS)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PT_WOOD:
|
case PT_WOOD:
|
||||||
if (surround_space && !(rand()%4) && (abs(rx+ry)<=2) && (sim->VINE_MODE || parts[i].tmp==1))
|
if (surround_space && !(rand()%4) && (abs(rx+ry)<=2) && parts[i].tmp==1)
|
||||||
{
|
{
|
||||||
int nnx = rand()%3 -1;
|
int nnx = rand()%3 -1;
|
||||||
int nny = rand()%3 -1;
|
int nny = rand()%3 -1;
|
||||||
|
Reference in New Issue
Block a user