void FDependsNode::PrintNode() const { UE_LOG(LogAssetRegistry, Log, TEXT("*** Printing DependsNode: %s ***"), *PackageName.ToString()); UE_LOG(LogAssetRegistry, Log, TEXT("*** Dependencies:")); PrintDependencies(); UE_LOG(LogAssetRegistry, Log, TEXT("*** Referencers:")); PrintReferencers(); }
/** ** Tell if we can show the popup content. ** verify each sub condition for that. ** ** @param condition condition to verify. ** @param unit unit that certain condition can refer. ** ** @return 0 if we can't show the content, else 1. */ static bool CanShowPopupContent(const PopupConditionPanel *condition, const ButtonAction &button, CUnitType *type) { if (!condition) { return true; } if (condition->HasHint && button.Hint.empty()) { return false; } if (condition->HasDescription && button.Description.empty()) { return false; } if (condition->HasDependencies && PrintDependencies(*ThisPlayer, button).empty()) { return false; } if (condition->ButtonAction != -1 && button.Action != condition->ButtonAction) { return false; } if (condition->ButtonValue.empty() == false && button.ValueStr != condition->ButtonValue) { return false; } if (type && condition->BoolFlags && !type->CheckUserBoolFlags(condition->BoolFlags)) { return false; } if (condition->Variables && type) { for (unsigned int i = 0; i < UnitTypeVar.GetNumberVariable(); ++i) { if (condition->Variables[i] != CONDITION_TRUE) { if ((condition->Variables[i] == CONDITION_ONLY) ^ type->Stats[ThisPlayer->Index].Variables[i].Enable) { return false; } } } } return true; }