save pause state in stamps, load pause state from local saves and stamps correctly, remove accidental inclusion
This commit is contained in:
parent
1e32c545d9
commit
16e4c5f717
@ -219,7 +219,7 @@ AnyType TPTScriptInterface::tptS_set(std::deque<std::string> * words)
|
||||
newValue = GetParticleType(((StringType)value).Value());
|
||||
if (newValue < 0 || newValue >= PT_NUM)
|
||||
{
|
||||
if (((StringType)value).Value() == "GOLD")
|
||||
if (((StringType)value).Value() == "GOLD" || ((StringType)value).Value() == "gold")
|
||||
throw GeneralException("No, GOLD will not be an element");
|
||||
else
|
||||
throw GeneralException("Invalid element");
|
||||
|
@ -240,7 +240,7 @@ void GameController::PlaceSave(ui::Point position)
|
||||
if(gameModel->GetPlaceSave())
|
||||
{
|
||||
gameModel->GetSimulation()->Load(position.X, position.Y, gameModel->GetPlaceSave());
|
||||
gameModel->SetPaused(gameModel->GetPaused());
|
||||
gameModel->SetPaused(gameModel->GetPlaceSave()->paused | gameModel->GetPaused());
|
||||
}
|
||||
}
|
||||
|
||||
@ -489,7 +489,10 @@ void GameController::StampRegion(ui::Point point1, ui::Point point2)
|
||||
GameSave * newSave;
|
||||
newSave = gameModel->GetSimulation()->Save(point1.X, point1.Y, point2.X, point2.Y);
|
||||
if(newSave)
|
||||
{
|
||||
newSave->paused = gameModel->GetPaused();
|
||||
gameModel->AddStamp(newSave);
|
||||
}
|
||||
else
|
||||
new ErrorMessage("Could not create stamp", "Error generating save file");
|
||||
}
|
||||
@ -499,7 +502,10 @@ void GameController::CopyRegion(ui::Point point1, ui::Point point2)
|
||||
GameSave * newSave;
|
||||
newSave = gameModel->GetSimulation()->Save(point1.X, point1.Y, point2.X, point2.Y);
|
||||
if(newSave)
|
||||
{
|
||||
newSave->paused = gameModel->GetPaused();
|
||||
gameModel->SetClipboard(newSave);
|
||||
}
|
||||
}
|
||||
|
||||
void GameController::CutRegion(ui::Point point1, ui::Point point2)
|
||||
|
@ -587,7 +587,7 @@ void GameModel::SetSaveFile(SaveFile * newSave)
|
||||
if(newSave && newSave->GetGameSave())
|
||||
{
|
||||
GameSave * saveData = newSave->GetGameSave();
|
||||
SetPaused(saveData->paused & GetPaused());
|
||||
SetPaused(saveData->paused | GetPaused());
|
||||
sim->gravityMode = saveData->gravityMode;
|
||||
sim->air->airMode = saveData->airMode;
|
||||
sim->legacy_enable = saveData->legacyEnable;
|
||||
|
@ -96,12 +96,6 @@ int Element_FIRE::update(UPDATE_FUNC_ARGS)
|
||||
(rt!=PT_SPNG || parts[r>>8].life==0) &&
|
||||
sim->elements[rt].Flammable && (sim->elements[rt].Flammable + (int)(sim->pv[(y+ry)/CELL][(x+rx)/CELL]*10.0f))>(rand()%1000))
|
||||
{
|
||||
int j = sim->create_part(-1, x-1+rand()%3, y-1+rand()%3, PT_SMKE);
|
||||
if (j != -1)
|
||||
{
|
||||
parts[r>>8].temp = restrict_flt(sim->elements[PT_FIRE].Temperature + (sim->elements[rt].Flammable/2), MIN_TEMP, MAX_TEMP);
|
||||
parts[j].life = rand()%80+480;
|
||||
}
|
||||
sim->part_change_type(r>>8,x+rx,y+ry,PT_FIRE);
|
||||
parts[r>>8].temp = restrict_flt(sim->elements[PT_FIRE].Temperature + (sim->elements[rt].Flammable/2), MIN_TEMP, MAX_TEMP);
|
||||
parts[r>>8].life = rand()%80+180;
|
||||
|
Loading…
Reference in New Issue
Block a user