DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ SetPartFromSyncData()

void ItemBase::SetPartFromSyncData ( ConstructionPart part)
inlineprotected

См. определение в файле BaseBuildingBase.c строка 265

266 {
267 string key = part.GetPartName();
268 bool is_base = part.IsBase();
269 bool is_part_built_sync = IsPartBuildInSyncData( part.GetId() );
270 bsbDebugSpam("[bsb] " + GetDebugName(this) + " SetPartFromSyncData try to sync: built=" + is_part_built_sync + " key=" + key + " part=" + part.GetPartName() + " part_built=" + part.IsBuilt());
271 if ( is_part_built_sync )
272 {
273 if ( !part.IsBuilt() )
274 {
275 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + " SetPartsFromSyncData +++ " + key);
276 GetConstruction().AddToConstructedParts( key );
277 GetConstruction().ShowConstructionPartPhysics(part.GetPartName());
278
279 if (is_base)
280 {
281 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + ANIMATION_DEPLOYED + " RM");
282 RemoveProxyPhysics( ANIMATION_DEPLOYED );
283 }
284 }
285 }
286 else
287 {
288 if ( part.IsBuilt() )
289 {
290 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + " SetPartsFromSyncData --- " + key);
291 GetConstruction().RemoveFromConstructedParts( key );
292 GetConstruction().HideConstructionPartPhysics(part.GetPartName());
293
294 if (is_base)
295 {
296 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] " + GetDebugName(this) + ANIMATION_DEPLOYED + " ADD");
297 AddProxyPhysics( ANIMATION_DEPLOYED );
298 }
299 }
300 }
301
302 //check slot lock for material attachments
303 GetConstruction().SetLockOnAttachedMaterials( part.GetPartName(), part.IsBuilt() ); //failsafe for corrupted sync/storage data
304 }
void bsbDebugSpam(string s)
Определения BaseBuildingBase.c:1299
class BaseBuildingBase extends ItemBase bsbDebugPrint(string s)
Определения BaseBuildingBase.c:1291
int GetId()
Определения ConstructionPart.c:208
string GetPartName()
Определения ConstructionPart.c:198
bool IsBase()
Определения ConstructionPart.c:273
bool IsBuilt()
Определения ConstructionPart.c:160
const string ANIMATION_DEPLOYED
Определения BaseBuildingBase.c:4
Construction GetConstruction()
Определения BaseBuildingBase.c:883
bool IsPartBuildInSyncData(int part_id)
Определения BaseBuildingBase.c:195
override string GetDebugName()
Определения dayzplayer.c:1191

Перекрестные ссылки ANIMATION_DEPLOYED, bsbDebugPrint(), bsbDebugSpam(), GetConstruction(), GetDebugName(), ConstructionPart::GetId(), ConstructionPart::GetPartName(), ConstructionPart::IsBase(), LogManager::IsBaseBuildingLogEnable(), ConstructionPart::IsBuilt() и IsPartBuildInSyncData().