void Object::Readin(Ainfile *f, AList *facs, ATL_VER v) { AString *temp; num = f->GetInt(); temp = f->GetStr(); type = LookupObject(temp); delete temp; incomplete = f->GetInt(); if (name) delete name; name = f->GetStr(); describe = f->GetStr(); if (*describe == "none") { delete describe; describe = 0; } inner = f->GetInt(); prevdir = f->GetInt(); runes = f->GetInt(); // Now, fix up a save file if ALLOW_TRIVIAL_PORTAGE is allowed, just // in case it wasn't when the save file was made. if (Globals->ALLOW_TRIVIAL_PORTAGE) prevdir = -1; int i = f->GetInt(); for (int j=0; j<i; j++) { Unit *temp = new Unit; temp->Readin(f, facs, v); if (!temp->faction) continue; temp->MoveUnit(this); if (!(temp->faction->IsNPC())) region->visited = 1; } mages = ObjectDefs[type].maxMages; ReadinFleet(f); }
void Object::Readin(Ainfile *f, AList *facs, ATL_VER v) { AString *temp; num = f->GetInt(); temp = f->GetStr(); type = LookupObject(temp); delete temp; incomplete = f->GetInt(); if (name) delete name; name = f->GetStr(); describe = f->GetStr(); if (*describe == "none") { delete describe; describe = 0; } inner = f->GetInt(); if(type == O_ESEAPORTAL) mageowner = f->GetInt(); hexside = f->GetInt(); /* Hexside Patch 030825 BS */ prevdir = f->GetInt(); runes = f->GetInt(); // Now, fix up a save file if ALLOW_TRIVIAL_PORTAGE is allowed, just // in case it wasn't when the save file was made. if (Globals->ALLOW_TRIVIAL_PORTAGE) prevdir = -1; int i = f->GetInt(); for (int j=0; j<i; j++) { Unit *temp = new Unit; temp->Readin(f, facs, v); temp->MoveUnit(this); } mages = ObjectDefs[type].maxMages; }