void nobBaseMilitary::Serialize_nobBaseMilitary(SerializedGameData* sgd) const { Serialize_noBuilding(sgd); sgd->PushObjectContainer(leave_house, false); sgd->PushObject(leaving_event, true); sgd->PushBool(go_out); sgd->PushUnsignedInt(0); // former age, compatibility with 0.7, remove it in furher versions sgd->PushObjectContainer(troops_on_mission, false); sgd->PushObjectContainer(aggressors, true); sgd->PushObjectContainer(aggressive_defenders, true); sgd->PushObject(defender_, true); }
/** * * * @author OLiver */ void nobUsual::Serialize_nobUsual(SerializedGameData& sgd) const { Serialize_noBuilding(sgd); sgd.PushObject(worker, false); sgd.PushUnsignedShort(productivity); sgd.PushBool(disable_production); sgd.PushBool(disable_production_virtual); sgd.PushUnsignedChar(last_ordered_ware); sgd.PushObject(orderware_ev, true); sgd.PushObject(productivity_ev, true); sgd.PushBool(is_working); for(unsigned i = 0; i < 3; ++i) sgd.PushUnsignedChar(wares[i]); for(unsigned i = 0; i < USUAL_BUILDING_CONSTS[type_ - 10].wares_needed_count; ++i) sgd.PushObjectContainer(ordered_wares[i], true); for(unsigned i = 0; i < LAST_PRODUCTIVITIES_COUNT; ++i) sgd.PushUnsignedShort(last_productivities[i]); }
void nobUsual::Serialize_nobUsual(SerializedGameData& sgd) const { Serialize_noBuilding(sgd); sgd.PushObject(worker, false); sgd.PushUnsignedShort(productivity); sgd.PushBool(disable_production); sgd.PushUnsignedChar(last_ordered_ware); sgd.PushEvent(orderware_ev); sgd.PushEvent(productivity_ev); sgd.PushUnsignedShort(numGfNotWorking); sgd.PushUnsignedInt(since_not_working); sgd.PushBool(outOfRessourcesMsgSent); sgd.PushBool(is_working); for(unsigned i = 0; i < 3; ++i) sgd.PushUnsignedChar(numWares[i]); for(const std::list<Ware*>& orderedWare : ordered_wares) sgd.PushObjectContainer(orderedWare, true); for(unsigned short last_productivitie : last_productivities) sgd.PushUnsignedShort(last_productivitie); }