أضف Flock إلى لعبتك في Godot عبر الإضافة الرسمية — من GDScript أو من C#.
تربط حزمة تطوير Flock لـGodot لعبتك بالواجهة الخلفية لـFlock: مصادقة اللاعبين، وبيانات الحفظ، والاقتصاد،
والإعدادات عن بُعد، ولوحات الصدارة، والإشعارات، والأصول القابلة للتنزيل، والتحليلات — كل ذلك يُضبط من نافذة
واحدة داخل المحرّر، مع أصناف GDScript وC# مُحدَّدة الأنواع تُولَّد من محتوى لوحة التحكم الخاصة بك.
نزّل حزمة تطوير Godot
احصل على أحدث إصدار من الإضافة عبر GitHub.
المتطلّبات
Godot من 4.4.1 إلى 4.7.2، بالبناء القياسي، أو بناء .NET من أجل C#. ويُختبر كل تغيير في الحزمة على
4.4.1 و4.5.2 و4.6.3 و4.7.2؛ ولا يُدعم Godot 4.3 وما قبله.
لا شيء غير ذلك: تحمل الإضافة كل ما تحتاج إليه، بما في ذلك C#.
الإعداد
1
ثبّت الإضافة
نزّل flock-godot-sdk-v<version>.zip من أحدث إصدار
(لا أرشيف Source code الذي يضيفه GitHub)، وفكّ ضغطه في مجلد مشروعك، بحيث يصبح لديك res://addons/flock/.ثم فعّل Flock تحت Project → Project Settings → Plugins. فيُضيف ذلك إلى مشروعك كائنًا عامًّا اسمه
Flock (من نوع autoload)، فلا عقدة تضيفها إلى أي مشهد. ولا يحتاج مشروع C# إلى خطوة إضافية: إذ يلتقط ملف
.csproj لديك ملفات C# داخل الإضافة من تلقاء نفسه.
2
اضبط الإعدادات
افتح Project → Tools → Flock → Open Flock setup. وفي مشروع جديد، اضغط Create config في تبويب
Setup فيها: فيُنشئ ذلك res://flock_config.tres، الملف الذي تقرأ الحزمة إعداداتها منه. ثم املأ الحقول
من صفحة لعبتك على لوحة التحكم:
الحقل
القيمة
API URL
اترك القيمة الافتراضية (https://api-flock.qwacks.com) ما لم يُطلب منك غير ذلك
API key
يُعرّف لعبتك — تعامَل معه كما تتعامل مع كلمة المرور
Game
اسم لعبتك، تمامًا كما تعرضه لوحة التحكم
Game version
اسم إصدار موجود على لوحة التحكم (مثل 1.0.0)
ويُحفظ كل تعديل في flock_config.tres حين تغادر الحقل أو تضغط Enter. وتجد الحزمة هذا الملف حين تبدأ اللعبة، فتهيّئ نفسها.
3
حُلّ إصدار اللعبة
اضغط Resolve version. فيُبحث عن اسم الإصدار ويُكتب معرّفه في flock_config.tres، فلا تحتاج
اللعبة أبدًا إلى سؤال الخادم عنه، واللعبة التي تبدأ دون اتصال تحصل مع ذلك على حزمة تعمل. ولن تبدأ الحزمة
دون هذا المعرّف.والضغطة نفسها تتحقّق من أن اسم Game يطابق اللعبة التي ينتمي إليها مفتاح الواجهة البرمجية، ولا تكتب
شيئًا حين لا يطابقها، فيُكتشف مفتاح اللعبة الخاطئة هنا.وتعرض قائمة التحقّق في النافذة ما زال ناقصًا. ويتحقّق Test connection (تحت
Project → Tools → Flock أيضًا) من API URL والمفتاح (ومن اسم Game، إن كتبته)، قبل أن تعرف اسم
إصدار.
تبويب Setup: بيانات الاعتماد بعد حلّ الإصدار، وأزرار Create config وResolve version وTest connection، وقائمة التحقّق.
يُشحن مفتاح الواجهة البرمجية داخل لعبتك المُصدَّرة: فملف flock_config.tres جزء منها ويمكن قراءته.
استخدم مفتاحًا للبيئة الصحيحة، وبدّله من لوحة التحكم إن تسرّب.
أول استدعاء لك
مع وجود flock_config.tres في مكانه، تبدأ الحزمة من تلقاء نفسها حين تبدأ اللعبة. أضف هذا السكربت إلى عقدة
في أول مشهد لديك: ما إن تبدأ الحزمة، يلتقط تسجيل دخول اللاعب المحفوظ، ولا يُدخل اللاعب بهذا الجهاز إلا حين
لا يكون هناك تسجيل دخول محفوظ.
GDScript
C#
extends Nodefunc _ready() -> void: Flock.events.when_initialized(_on_flock_ready)func _on_flock_ready() -> void: # التقط تسجيل الدخول المحفوظ في تشغيل سابق. وتكون value هي false حين لا يوجد. var restored: FlockResult = await Flock.auth.restore_sign_in().completed if not restored.value: var signed_in: FlockResult = await Flock.auth.sign_in_with_device().completed if signed_in.error_code() == "player.invalid_login_credentials": # أول تشغيل على هذا الجهاز: التسجيل يُنشئ اللاعب ويُدخله. signed_in = await Flock.auth.register_with_device().completed if not signed_in.ok: push_error(signed_in.error.describe()) # ما الخطأ، ثم سطر Fix:. return var game: FlockResult = await Flock.game.get_game().completed if game.ok: print("Signed in as ", Flock.auth.player_id(), ", playing ", game.value.name) else: push_error(game.error.describe())
using Flock;using Godot;public partial class FlockFirstCall : Node{ public override void _Ready() { FlockClient.Events.WhenInitialized(OnFlockReady); } private async void OnFlockReady() { // التقط تسجيل الدخول المحفوظ في تشغيل سابق. وتكون Value هي false حين لا يوجد. var restored = await FlockClient.Auth.RestoreSignInAsync(); if (!restored.Value) { var signedIn = await FlockClient.Auth.SignInWithDeviceAsync(); if (signedIn.ErrorCode == "player.invalid_login_credentials") { // أول تشغيل على هذا الجهاز: التسجيل يُنشئ اللاعب ويُدخله. signedIn = await FlockClient.Auth.RegisterWithDeviceAsync(); } if (!signedIn.Ok) { GD.PushError(signedIn.Error.ToString()); // ما الخطأ، ثم سطر Fix:. return; } } var game = await FlockClient.Game.GetGameAsync(); if (game.Ok) GD.Print($"Signed in as {FlockClient.Auth.PlayerId}, playing {game.Value.Name}"); else GD.PushError(game.Error.ToString()); }}
النجاح هو ظهور Signed in as ومعرّف اللاعب في لوحة Output.دون تمرير معرّف، تستعمل استدعاءات الجهاز المعرّف الذي يعطيه Godot لهذا الجهاز (OS.get_unique_id()). ولا
يعطي Godot معرّفًا على الويب ولا على iOS، فتفشل الاستدعاءات هناك بالرمز flock.invalid_argument ولا ترسل
شيئًا: فاصنع معرّفًا بنفسك، واحفظه في ملفات اللعبة، ومرّره إلى sign_in_with_device(id)
وregister_with_device(id). ونسختان من اللعبة على حاسوب واحد لهما معرّف الجهاز نفسه، فهما لاعب واحد: مرّر
معرّفًا مختلفًا في إحداهما. ومع الجهاز الجديد يأتي لاعب جديد، فاعرض ربط الحسابات
(بالبريد الإلكتروني أو بحساب منصّة) على اللاعبين الذين يريدون العودة إلى حسابهم من جهاز آخر.
التهيئة
يمكن أن تبدأ الحزمة بطريقتين. التلقائية هي الافتراضية وتناسب معظم الألعاب؛ أما اليدوية فتمنحك
تحكّمًا في وقت بدئها (بعد شاشة البداية، أو بعد أن يجيب اللاعب عن سؤال الموافقة).
تلقائيًا (الوضع الافتراضي)
يدويًا
لا شيء عليك استدعاؤه: حين تبدأ اللعبة، يقرأ الـ autoload Flock ملف res://flock_config.tres ويهيّئ
الحزمة منه. وترسل الحزمة إشاراتها في الإطار التالي، فيستقبل المعالج الموصول في _ready() ما أعلنته الحزمة
أثناء بدئها. ويشغّل Flock.events.when_initialized() الدالة الممرَّرة إليه حتى حين تكون الحزمة قد بدأت
قبل استدعائه، وهو ما لا يستطيعه connect() العادي.
واستعادة تسجيل دخول محفوظ أمر تبدؤه أنت: استدعِ Flock.auth.restore_sign_in()، كما يفعل
أول استدعاء لك.
ألغِ تحديد Auto initialize في تبويب Configuration من نافذة الإعداد (auto_initialize في
flock_config.tres)، ثم ابدأ الحزمة بنفسك. ويعود initialize() فورًا.
var config: FlockConfig = load("res://flock_config.tres")var started: FlockResult = Flock.initialize(config)if not started.ok: push_error(started.error.describe())
FlockResult started = FlockClient.Initialize(); // يقرأ res://flock_config.tresif (!started.Ok) GD.PushError(started.Error.ToString());
الإعداد الذي لا تستطيع الحزمة أن تبدأ منه (لا API URL ولا مفتاح، أو لا معرّف لإصدار اللعبة) يُفشل
initialize() بالرمز flock.not_initialized ورسالة تسمّي الناقص، ويرفع البدء التلقائي
Flock.events.initialization_failed. وإلى أن تبدأ الحزمة، لا وجود لخدماتها: ففي GDScript تكون Flock.auth
وأخواتها null، وفي C# ترمي FlockClient.Auth وأخواتها استثناء InvalidOperationException يطلب التهيئة
أولًا. تحقّق من Flock.is_initialized() (FlockClient.IsInitialized في C#)، أو انتظر
when_initialized() كما في الأعلى.
GDScript وC#
الحزمة عميل واحد له مدخلان. نواتها مكتوبة بـGDScript، ويُوصَل إليها عبر الـ autoload Flock؛ ولـC#
طبقة مُحدَّدة الأنواع، FlockClient، تُولَّد من تلك النواة وتُشحن داخل الإضافة. وكلاهما يستعمل العميل نفسه،
فاللاعب الذي سجّل دخوله من GDScript مسجَّل الدخول في C#، والعكس كذلك.كل استدعاء يصل إلى الخادم يُعيد FlockRequest في GDScript: انتظر بـawait إشارته completed (لا الدالة
نفسها)، أو صِلها بمعالج. والجواب FlockResult فيه ok وvalue وerror. وفي C# يكون الاستدعاء نفسه
دالة …Async تُعيد FlockResult<T> فيه Ok وValue وError، وتأخذ CancellationToken اختياريًا.
var result: FlockResult = await Flock.auth.sign_in_with_email(email, password).completed
var result = await FlockClient.Auth.SignInWithEmailAsync(email, password);
ما إن تبدأ الحزمة، لا ترمي الاستدعاءات استثناءات. إذ يكون الاستدعاء الفاشل نتيجةً تكون قيمة ok فيها false، في
اللغتين، فيعالج المشروع الذي يستعمل كلتيهما الإخفاق بالطريقة نفسها في كل جانب. تحقّق من ok: فالاستدعاء
الناجح قد يُجيب مع ذلك بـnull (لاعب لم تُحفظ له بيانات بعد، مثلًا).الأسماء تتقابل واحدًا لواحد، فاسم GDScript يدلّك على اسم C#:
GDScript
C#
مثال
استدعاء يصل إلى الخادم
PascalCase + Async
get_standings → GetStandingsAsync
خاصية
PascalCase
player_name → PlayerName
فحص بلا وسائط
خاصية
is_signed_in() → IsSignedIn
ثابت
بالتهجئة نفسها
STATUS_UNUSED → STATUS_UNUSED
int، float
long، double
size_bytes → long SizeBytes
تحتاج شيفرة C# إلى using Flock;، وإلى using Flock.Generated; للأصناف المصنوعة من محتوى لوحة التحكم
(اعمل مع بيانات لعبتك). والمشروع الذي لا يستعمل بناء .NET يتجاهل ملفات C# في
الإضافة.
صادِق لاعبًا
تسجيل الدخول لا يُنشئ حسابًا: فالتسجيل استدعاء منفصل من نوع register_with_*، والتسجيل الذي يُنشئ الحساب
يُدخل اللاعب أيضًا.
الجهاز
البريد الإلكتروني
Google / Apple / Steam
سجّل الدخول، وسجّل الجهاز عند أول تشغيل، كما يُظهر أول استدعاء لك.
يأتي email وpassword من شاشتَي الدخول وإنشاء الحساب لديك.
# شاشة إنشاء الحساب: تُنشئ الحساب وتُدخل اللاعب. والاسم اختياري.await Flock.auth.register_with_email(email, password, display_name).completed# شاشة الدخول، في التشغيلات اللاحقة:await Flock.auth.sign_in_with_email(email, password).completed
أسماء اللاعبين فريدة داخل اللعبة: يتحقّق Flock.auth.is_name_available(name) من اسم قبل أن تسجّل به.
وتغطّي forgot_password() وreset_password() وsend_email_verification() وverify_email() استعادة
الحساب.
مرّر بيانات الاعتماد التي أنتجها تسجيل الدخول في المنصّة إلى الاستدعاء المقابل: Google رمز هوية
(ID token، sign_in_with_google)، وApple رمز هوية (identity token، sign_in_with_apple)، وSteam تذكرة
جلسة (sign_in_with_steam). ولكلٍّ منها استدعاء register_with_* أيضًا. ولا تجلب الحزمة بيانات الاعتماد
هذه نيابةً عنك، إذ لا يأتي Godot بتسجيل دخول لـGoogle أو Apple أو Steam: فاحصل عليها من إضافة المنصّة التي
تستعملها.
وكل استدعاء لتسجيل الدخول أو التسجيل يكتمل بـFlockAuthInfo (معرّف اللاعب، وطريقة دخوله، وهل استُعيد
تسجيل الدخول). أما الرموز فتبقى داخل الحزمة.ويستطيع اللاعب أن يضيف طرقًا أخرى لتسجيل الدخول إلى حساب واحد (link_email، link_device، link_oauth)،
وأن يسردها (list_linked_accounts) ويزيل إحداها (unlink)؛ انظر ربط الحسابات.حفظ تسجيل الدخول. يُحفظ تسجيل الدخول في ملف مشفَّر تحت user:// (لا في التخزين الآمن الخاص بالمنصّة، إذ لا وصول
لـGodot إليه)، ويلتقطه Flock.auth.restore_sign_in() في التشغيل التالي. ألغِ تحديد persist_sign_in
لتُبقي تسجيل الدخول في الذاكرة وحدها، فيسجّل اللاعبون دخولهم في كل تشغيل. وتسجيل الدخول المحفوظ يخصّ مفتاح
الواجهة البرمجية الذي صُنع به: فبعد تغيّر المفتاح يسجّل اللاعب دخوله من جديد.وتتجدّد الرموز المنتهية نيابةً عنك، ولا يُخرج اللاعبَ إلا رفضُ الخادم لتسجيل الدخول: أما انقطاع الاتصال أو خادم يُعاد
تشغيله فلا يُخرجه أبدًا. صِل الأحداث لتقود بها واجهتك:
# يُرفع عند تسجيل دخول، أو تسجيل أدخل اللاعب، أو دخول مُستعاد.Flock.events.signed_in.connect(func(info: FlockAuthInfo) -> void: print(info.player_id, " signed in (", info.method, ")"))# لم يعد تسجيل الدخول المحفوظ قابلًا للتجديد: اعرض شاشة الدخول لديك.Flock.events.sign_in_expired.connect(func() -> void: print("Sign in again"))
FlockClient.Events.SignedIn += info => GD.Print($"{info.PlayerId} signed in ({info.Method})");FlockClient.Events.SignInExpired += () => GD.Print("Sign in again");
اعمل مع بيانات لعبتك
يحوّل Project → Tools → Flock → Generate content code إعدادات لوحة التحكم، وقوالب اللاعبين، وعناصر
المتاجر، والعملات، والإنجازات إلى أصناف مُحدَّدة الأنواع. ويقرأ إصدار اللعبة المضبوط في flock_config.tres
بمفتاح الواجهة البرمجية (بلا تسجيل دخول لاعب) ويكتب في Generated code path الخاص بالإعداد، وهو
res://flock/generated افتراضيًا. وفي مشروع C# يكتب الأصناف نفسها بـC# (نطاق الأسماء Flock.Generated)
بجانبها؛ فابنِ المشروع بعد ذلك.
ما يكتبه
لعنصر في لوحة التحكم اسمه
ما يعطيك
صنف لكل إعداد
Gameplay
GameplayConfig، وعضو مُحدَّد النوع لكل حقل، وfetch()
صنف لكل قالب لاعب
PlayerProgress
PlayerProgressTemplate، وعضو مُحدَّد النوع لكل حقل، وfetch_mine() وsave()
FlockShopItemId
عنصر متجر Gem Pack
FlockShopItemId.GEM_PACK (GemPack في C#)، وهو معرّف العنصر
FlockCurrencyId
عملة Gold
FlockCurrencyId.GOLD (Gold في C#)
FlockAchievementId
إنجاز First Win
FlockAchievementId.FIRST_WIN (FirstWin في C#)
يفترض المثال أدناه وجود قالب لاعب اسمه PlayerProgress (فيه حقل level)، وإعداد اسمه Gameplay (فيه
spawn_rate)، وعنصر متجر Gem Pack في لوحة التحكم. وهذه أمثلة: أنشئها أولًا
(بيانات اللاعب، والإعدادات عن بُعد،
والمتاجر والمخزون)، أو استعمل أسماءك أنت.
GDScript
C#
# بيانات اللاعب: قيمتها null حتى يكون للاعب صفّ في هذا القالب.var progress: FlockResult = await PlayerProgressTemplate.fetch_mine().completedif progress.ok and progress.value != null: var row: PlayerProgressTemplate = progress.value row.level = 5 await row.save().completed # يكتب كل الحقول في الصف من جديد.# الإعدادات عن بُعد: غيّر القيم من لوحة التحكم دون بناء جديد.var gameplay: FlockResult = await GameplayConfig.fetch().completedif gameplay.ok: var spawn_rate: float = gameplay.value.spawn_rate# المتجر: المعرّف المُولَّد يسمّي العنصر.var bought: FlockResult = await Flock.shop.purchase(FlockShopItemId.GEM_PACK).completed
using Flock;using Flock.Generated;// بيانات اللاعب: قيمتها null حتى يكون للاعب صفّ في هذا القالب.var progress = await PlayerProgressTemplate.FetchMineAsync();if (progress.Ok && progress.Value != null){ progress.Value.Level = 5; await progress.Value.SaveAsync(); // يكتب كل الحقول في الصف من جديد.}// الإعدادات عن بُعد: غيّر القيم من لوحة التحكم دون بناء جديد.var gameplay = await GameplayConfig.FetchAsync();if (gameplay.Ok){ double spawnRate = gameplay.Value.SpawnRate;}// المتجر: المعرّف المُولَّد يسمّي العنصر.var bought = await FlockClient.Shop.PurchaseAsync(FlockShopItemId.GemPack);
يعطي fetch() قيم الإعداد بعد تطبيق رقعته (patch). ومع لاعب مسجَّل الدخول، يأتي إعداد اللعب (gameplay) أو
الميزات (feature) كما يحسبه الخادم لذلك اللاعب: أحدث رقعة له، ثم تجاوزات الشرائح التي ينتمي إليها اللاعب، ثم
تجاوزاته هو. ويكتب save()كل الحقول، لأن الخادم يرفض كتابةً تُغفل أحدها.
هذه الأصناف غير موجودة حتى تولّدها. شغّل Generate content code من جديد كلما تغيّرت لوحة التحكم
(قالب جديد، أو حقل أُعيدت تسميته، أو عنصر متجر جديد)؛ وتقول نافذة الإعداد كم ملفًا كتبت وكم ملفًا أزالت.
ولا يستبدل المولّد إلا الملفات التي كتبها بنفسه، فيبقى ملفك الخاص في ذلك المجلد.
الفحص في CI
قد تتأخّر الملفات المُولَّدة عن لوحة التحكم. وهذا الأمر، المخصّص لخطّ البناء لديك (CI)، يخبرك متى حدث ذلك،
دون فتح المحرّر. استورد المشروع أولًا، إذ ليس في النسخة المسحوبة حديثًا قائمة أصناف بعد:
لا تطابقها: ولّدها من جديد (لم تُولَّد قط، أو إصدار لعبة آخر، أو تغيّر المحتوى، أو عُدّل ملف مُولَّد أو حُذف يدويًا)
1
تعذّر الحكم: لا ملف flock_config.tres، أو لا إصدار لعبة مضبوط، أو تعذّرت القراءة من الخادم
و-- --write بدل -- --check يولّد الملفات دون المحرّر. استعمل إصدار Godot نفسه الذي تولّد به في المحرّر.
وتغيّر سعر أو قيمة في لوحة التحكم لا يُعدّ تغييرًا: فلا يُكتب أي سعر أو قيمة في الشيفرة.
استكشف الميزات
تسجيل الدخول
ربط الحسابات
بيانات اللاعب
المتاجر والمخزون
لوحات الصدارة
الإشعارات
الإعدادات عن بُعد
الأصول
التحليلات والأحداث
الإنجازات
العملات والمحافظ
الحظر
تحديثات اللعبة
ليست في حزمة Godot بعد: اللعب الجماعي، والمشتريات بالمال الحقيقي والدفع عبر الويب، واستدعاءات خطة التتبّع
مُحدَّدة الأنواع، وأحداث التشغيل ومعاملات الأحداث القياسية، والالتقاط التلقائي للاستثناءات. ويبيّن تبويب Godot
في كل دليل أين تقف كل ميزة.
الإعدادات المتقدّمة
يحمل تبويب Configuration في نافذة الإعداد الإعدادات التي يجب أن يضبطها المشروع بدقّة (الاتصال، وHTTP،
والتهيئة)؛ ويحمل تبويب Advanced الباقي: ذاكرة وضع عدم الاتصال، وذاكرة الأصول، والتحليلات، ومجلد شيفرة
المحتوى، وفحوص المحرّر، وسجلّات التصحيح. وكل حقل إعدادٌ في flock_config.tres، ولوحة Inspector تعدّل القيم
نفسها. والقيم الافتراضية معقولة — فلا تغيّرها إلا عند الحاجة.
تبويب Advanced من الأعلى إلى الأسفل: Offline Cache ثم Assets ثم Analytics، ثم Content Code وEditor وDiagnostics في الأسفل.
Offline cache enabled (مفعّل افتراضيًا) يحفظ محتوى اللعبة على القرص حين يُقرأ، فتبدأ اللعبة التي اتصلت
مرة واحدة دون اتصال، وتبقى كتابات بيانات اللاعب المنتظرة في الطابور وقت انقطاع الاتصال محفوظة عبر إعادة
التشغيل. والمال لا ينتظر في ذلك الطابور أبدًا: فمنح الأموال أو الشراء يُرسل مرة واحدة. ويذكر تبويب Godot في
كل دليل ما تحتفظ به ميزته دون اتصال؛ ويشرح دليل بيانات اللاعب الطابور.فحصان للمحرّر مفعّلان افتراضيًا. Play mode guard enabled يوقف التشغيل من المحرّر حين لا يستطيع بدء الحزمة
(لا autoload، أو لا إصدار لعبة، أو إعداد غير صالح) ويعرض نافذة حوار فيها زرّ يفتح نافذة الإعداد. وFail
export if version unresolved يتحقّق من إصدار اللعبة عند التصدير؛ انظر ملاحظات المنصّات.ويطبع Verbose logging تشخيصات الحزمة في لوحة Output، دون أجسام الطلبات والاستجابات أبدًا، لأنها تحمل
كلمات المرور والرموز.وللتحليلات (الجلسات والأحداث والموافقة وتقارير الإغلاق والانهيار) انظر
التحليلات والأحداث.
ملاحظات المنصّات
تُختبر الألعاب المُصدَّرة على Windows وLinux وAndroid والويب، في البناء القياسي وبناء .NET (والويب في
البناء القياسي وحده، إذ لا تصدير .NET للويب في Godot). ولم يُختبر macOS وiOS بعد.
Android: لا شيء تضبطه. فتصدير Android في Godot يترك إذن الإنترنت معطّلًا، لذا تفعّل الإضافة، ما دامت
مفعّلة، permissions/internet لكل تصدير Android.
الويب وiOS: لا معرّف جهاز، فمرّر معرّفك أنت إلى استدعاءات تسجيل الدخول بالجهاز (انظر
أول استدعاء لك).
كل المنصّات: التصدير الذي ليس في flock_config.tres الخاص به إصدار لعبة، أو فيه إصدار غير الذي وُلّدت
له شيفرة المحتوى، ينتهي بخطأ يسمّي الإصلاح. ويكتب التصدير ملفاته مع ذلك (إذ لا يعطي Godot الإضافة أي طريقة
لإيقافه)، فاقرأ نتيجة التصدير، أو شغّل الفحص في CI.
معالجة الأخطاء
كل استدعاء فاشل يُجيب بـFlockResult تكون قيمة error فيه FlockError. ويعطي describe() ما الخطأ (سبب
الخادم نفسه حين يذكره)، ثم سطر Fix: يخبرك بما تفعله تاليًا. وفي C# يعطي Error.ToString() الشيء نفسه مع
الرمز في أوّله.
var signed_in: FlockResult = await Flock.auth.sign_in_with_device().completedif not signed_in.ok: push_error(signed_in.error.describe())
describe() في تصدير للويب، حيث لا يعطي Godot معرّفًا للجهاز
This platform reports no device id (OS.get_unique_id() is unsupported on web and iOS). Pass a device_id you generate and persist yourself.Fix: Change the argument the message names, then make the call again.
العضو
ما يحمله
message
ما الخطأ: سبب الخادم نفسه حين يذكره.
hint()
الإصلاح وحده. ولا يكون فارغًا أبدًا: فالرمز الذي لا نصيحة خاصة به يحصل على نصيحة نوع إخفاقه.
describe()
message، ثم سطر Fix: فيه hint().
code
رمز الخطأ كنصّ ("shop.insufficient_funds").
status
حالة HTTP، أو 0 حين لم يتلقَّ الطلب جوابًا من الخادم قط.
وفي C# هي Message وHint وCode وStatus.
تفرّع على الرمز لا على نصّ الرسالة أبدًا. فالرموز عقد ثابت، أما الصياغة فليست كذلك وستتغيّر بين
الإصدارات.
وresult.error_code() (ErrorCode في C#) هو الرمز، أو نصّ فارغ عند النجاح، فيمكنك مقارنته مباشرةً:
رموز الخادم مسمّاة بحسب الميزة (shop.insufficient_funds، player.invalid_login_credentials). أما رموز الحزمة
نفسها فتبدأ بـflock.، فيقول سطر السجلّ أيّ جانب وجد المشكلة:
الرمز
المعنى
flock.network_unreachable
لم يصل الطلب إلى الخادم قط.
flock.timeout
لم يأتِ جواب في الوقت المحدّد. وغالبًا ما يظهر الخادم الذي يتعذّر الوصول إليه بهذه الطريقة أيضًا.
flock.invalid_response
جاء جواب لكن تعذّرت قراءته، أو نقصه ما ينبغي أن يحمله.
flock.not_initialized
تعذّر بدء الحزمة، أو استُعمل صنف مُولَّد قبل أن تبدأ.
flock.not_signed_in
يحتاج الاستدعاء إلى لاعب مسجَّل الدخول، ولا يوجد أحد.
flock.player_already_signed_in
حاول لاعب محلّي (Flock.add_local_player()، لعدّة لاعبين على جهاز واحد) أن يسجّل الدخول بحساب لاعب مسجَّل الدخول أصلًا هنا.
جواب بحالة HTTP المقابلة دون رمز Flock خاص به. فكل إخفاق ترسله واجهة Flock البرمجية للألعاب يحمل رمزًا، فهذه أتت من شيء في الطريق بينهما (وكيل proxy، أو صفحة تسجيل دخول إلى الشبكة، أو API URL يشير إلى خادم آخر)، ويقول الإصلاح ذلك.
flock.unknown
أي شيء آخر.
الإصلاح مكتوب لك أنت لا للاعبيك — فهو يذكر استدعاءات الحزمة والإعدادات وخطوات لوحة التحكم. اعرضه في
سجلّاتك أو في طبقة التصحيح لديك، واكتب نصًّا منفصلًا موجّهًا للاعبين. وفي GDScript، يعطي
FlockErrorHints.for_code(code) نصيحة الرمز الخاصة به، أو نصًّا فارغًا حين لا نصيحة له.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Qwacks","description":"Developer documentation for the Qwacks platform — Flock, Protokite, and Data Duck.","colors":{"primary":"#0099FF","light":"#33ADFF","dark":"#0077CC"},"logo":{"light":"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9","dark":"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9"},"favicon":"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9","appearance":{"default":"dark","strict":true},"background":{"image":{"light":"https://mintcdn.com/qwacks/YCE61raZ52-QoE_F/officalbg.jpg?fit=max\u0026auto=format\u0026n=YCE61raZ52-QoE_F\u0026q=85\u0026s=5be5500ff5788565cf90d6a3e2111d47","dark":"https://mintcdn.com/qwacks/YCE61raZ52-QoE_F/officalbg.jpg?fit=max\u0026auto=format\u0026n=YCE61raZ52-QoE_F\u0026q=85\u0026s=5be5500ff5788565cf90d6a3e2111d47"},"color":{"light":"#FFFFFF","dark":"#181E2E"}},"navbar":{"links":[{"href":"https://www.qwacks.com/pricing","label":"Pricing"},{"href":"https://github.com/QwackStack/FlockUnitySdk/releases","label":"Unity SDK"},{"href":"https://github.com/QwackStack/FlockUnrealSdk/releases","label":"Unreal SDK"},{"href":"https://github.com/QwackStack/FlockGodotSDK/releases","label":"Godot SDK"}],"primary":{"type":"button","label":"Dashboard","href":"https://flock-saas.qwacks.com"}},"fonts":{"heading":{"family":"Readex Pro"},"body":{"family":"Inter"}},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"welcome"},{"language":"ar","navbar":{"links":[{"href":"https://www.qwacks.com/pricing","label":"الأسعار"},{"href":"https://github.com/QwackStack/FlockUnitySdk/releases","label":"حزمة Unity"},{"href":"https://github.com/QwackStack/FlockUnrealSdk/releases","label":"حزمة Unreal"},{"href":"https://github.com/QwackStack/FlockGodotSDK/releases","label":"حزمة Godot"}],"primary":{"type":"button","label":"لوحة التحكم","href":"https://flock-saas.qwacks.com"}},"href":"ar/welcome"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"qwacks","hasAudioNarration":false,"actualSubdomain":"qwacks","customDomains":["docs.qwacks.com"],"gitSource":{"type":"github","owner":"qwackstack","repo":"qwacksdocs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b10b3a69ffae5051c3ffc73"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6b0f533cec7806446d977181","clientVersion":"0.0.4428","searchFilterCounts":[{"language":"ar","tag":"Flock","count":33},{"language":"en","tag":"Flock","count":33},{"language":"ar","tag":"الميزات","count":23},{"language":"en","tag":"Features","count":23},{"language":"ar","tag":"بدء الاستخدام","count":12},{"language":"ar","tag":"Qwacks","count":12},{"language":"en","tag":"Getting Started","count":12},{"language":"en","tag":"Qwacks","count":12},{"language":"ar","tag":"اللعب الجماعي","count":5},{"language":"ar","tag":"Protokite","count":5},{"language":"ar","tag":"المدفوعات والفوترة","count":5},{"language":"en","tag":"Multiplayer","count":5},{"language":"en","tag":"Protokite","count":5},{"language":"en","tag":"Payments \u0026 Billing","count":5},{"language":"ar","tag":"اللاعبون","count":4},{"language":"ar","tag":"الاقتصاد والمدفوعات","count":4},{"language":"en","tag":"Players","count":4},{"language":"en","tag":"Economy and Payments","count":4},{"language":"ar","tag":"المفاهيم","count":3},{"language":"en","tag":"Concepts","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":".nav-logo{height:2.5rem!important;max-width:none!important}#topbar-cta-button .bg-primary-dark{background-color:#feca13!important}#topbar-cta-button:hover .bg-primary-dark{background-color:#f89c1c!important}#topbar-cta-button a,#topbar-cta-button a *{color:#1a1206!important}.qwacks-lang-toggle{display:inline-flex;align-items:center;align-self:center;gap:0.5rem;padding:0.25rem 1rem;border:1px solid rgba(255, 255, 255, 0.1);border-radius:56px;background:transparent;color:#fafafa;font-family:\"Readex Pro\", sans-serif;font-size:0.875rem;line-height:1.25rem;white-space:nowrap;margin-inline-start:auto;margin-inline-end:1rem}.qwacks-lang-toggle__option{color:inherit;text-decoration:none;font-weight:400;opacity:0.3}.qwacks-lang-toggle__option:hover{opacity:0.7}.qwacks-lang-toggle__option.is-active{font-weight:700;opacity:1}@media (min-width: 1024px){#localization-select-trigger{display:none!important}}:is(h1,h2,h3,h4){position:relative}:is(h1,h2,h3,h4)>div.absolute{left:auto;right:auto;inset-inline-end:0}:is(h1,h2,h3,h4)>div.absolute>a{margin-inline:0!important}"},{"filePath":"rtl.css","content":"html[data-current-path^=\"/ar\"]{direction:rtl}[dir=\"rtl\"]{direction:rtl}html[lang=\"ar\"]{direction:rtl}@media (min-width: 1024px){html[lang=\"ar\"] .lg\\:-ml-12{margin-left:0;margin-right:-3rem}html[lang=\"ar\"] .lg\\:pl-\\[5\\.7rem\\]{padding-left:0.25rem;padding-right:5.7rem}html[lang=\"ar\"] .lg\\:pl-\\[23\\.7rem\\]{padding-left:0.25rem;padding-right:23.7rem}}[dir=\"rtl\"] :is(pre,code,kbd,samp){direction:ltr;text-align:left}[dir=\"rtl\"] :not(pre)>code{unicode-bidi:isolate}[dir=\"rtl\"] pre>*{direction:ltr}[dir=\"rtl\"] .pl-3\\.5{padding-left:0;padding-right:0.875rem}[dir=\"rtl\"] .pl-3{padding-left:0;padding-right:0.75rem}[dir=\"rtl\"] .pl-4{padding-left:0;padding-right:1rem}[dir=\"rtl\"] .pr-3{padding-right:0;padding-left:0.75rem}[dir=\"rtl\"] .pr-4{padding-right:0;padding-left:1rem}[dir=\"rtl\"] .pr-8{padding-right:0;padding-left:2rem}[dir=\"rtl\"] .ml-2{margin-left:0;margin-right:0.5rem}[dir=\"rtl\"] .ml-4{margin-left:0;margin-right:1rem}[dir=\"rtl\"] .-ml-4{margin-left:0;margin-right:-1rem}[dir=\"rtl\"] .-ml-10{margin-left:0;margin-right:-2.5rem}[dir=\"rtl\"] .mr-2{margin-right:0;margin-left:0.5rem}[dir=\"rtl\"] .mr-4{margin-right:0;margin-left:1rem}[dir=\"rtl\"] .text-left{text-align:right}[dir=\"rtl\"] .text-right{text-align:left}[dir=\"rtl\"] .left-0{left:auto;right:0}[dir=\"rtl\"] .right-0{right:auto;left:0}[dir=\"rtl\"] .space-x-2>:not([hidden])~:not([hidden]),[dir=\"rtl\"] .space-x-3>:not([hidden])~:not([hidden]),[dir=\"rtl\"] .space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}[dir=\"rtl\"] .border-l{border-left-width:0;border-right-width:1px}[dir=\"rtl\"] .border-r{border-right-width:0;border-left-width:1px}@media (min-width: 1024px){[dir=\"rtl\"] .lg\\:-ml-12{margin-left:0;margin-right:-3rem}}[dir=\"rtl\"] :is(ul,ol){padding-left:0;padding-right:1.5rem}[dir=\"rtl\"] blockquote{border-left:0;border-right:4px solid currentColor;padding-left:0;padding-right:1rem}[dir=\"rtl\"] :is(th,td){text-align:right}[dir=\"rtl\"] .steps{margin-left:0;margin-right:0.875rem}[dir=\"rtl\"] .step>.absolute:not(.w-px){margin-left:0;margin-right:-13px}[dir=\"rtl\"] .step>:not(.absolute){padding-left:1px;padding-right:2rem}[dir=\"rtl\"] #table-of-contents{padding-inline-start:0.75rem;scrollbar-gutter:stable}[dir=\"rtl\"] #sidebar-content a[style*=\"padding-left\"]{padding-left:0!important;padding-right:1rem!important}[dir=\"rtl\"] .card .absolute{right:auto;left:1.25rem}[dir=\"rtl\"] .card .absolute svg{transform:scaleX(-1)}[dir=\"rtl\"] :is(.qwacks-flip-icon,[data-flip-rtl]) svg{transform:scaleX(-1)}[dir=\"rtl\"] #topbar-cta-button svg{transform:scaleX(-1)}[dir=\"rtl\"] .qwacks-lang-toggle svg{transform:none}[dir=\"rtl\"],[dir=\"rtl\"] body{font-family:\"Readex Pro\", system-ui, sans-serif;letter-spacing:normal;line-height:1.85}[dir=\"rtl\"] :is(h1,h2,h3,h4,h5,h6){font-family:\"Readex Pro\", system-ui, sans-serif;letter-spacing:normal;line-height:1.5}[dir=\"rtl\"] :is(pre,code,kbd,samp){font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;line-height:1.6}[dir=\"rtl\"]{font-variant-numeric:lining-nums}"}]}
{"page":{"pagePath":"ar/sdk/godot","slug":"/ar/sdk/godot","pageMetadata":{"title":"حزمة تطوير Godot","description":"أضف Flock إلى لعبتك في Godot عبر الإضافة الرسمية — من GDScript أو من C#.","href":"/ar/sdk/godot"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"أضف Flock إلى لعبتك في Godot عبر الإضافة الرسمية — من GDScript أو من C#.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,Frame,Heading,Note,OptimizedImage,Step,Steps,Tab,Table,Tabs,Tip,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`تربط حزمة تطوير Flock لـGodot لعبتك بالواجهة الخلفية لـFlock: مصادقة اللاعبين، وبيانات الحفظ، والاقتصاد،\nوالإعدادات عن بُعد، ولوحات الصدارة، والإشعارات، والأصول القابلة للتنزيل، والتحليلات — كل ذلك يُضبط من نافذة\nواحدة داخل المحرّر، مع أصناف GDScript وC# مُحدَّدة الأنواع تُولَّد من محتوى لوحة التحكم الخاصة بك.`}),`\n`,_jsx(Card,{title:`نزّل حزمة تطوير Godot`,icon:`download`,href:`https://github.com/QwackStack/FlockGodotSDK/releases`,children:_jsx(_components.p,{children:`احصل على أحدث إصدار من الإضافة عبر GitHub.`})}),`\n`,_jsx(Heading,{level:`2`,id:`requirements`,children:`المتطلّبات`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Godot من `,_jsx(_components.strong,{children:`4.4.1 إلى 4.7.2`}),`، بالبناء القياسي، أو `,_jsx(_components.strong,{children:`بناء .NET`}),` من أجل C#. ويُختبر كل تغيير في الحزمة على\n4.4.1 و4.5.2 و4.6.3 و4.7.2؛ ولا يُدعم Godot 4.3 وما قبله.`]}),`\n`,_jsx(_components.li,{children:`لا شيء غير ذلك: تحمل الإضافة كل ما تحتاج إليه، بما في ذلك C#.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`setup`,children:`الإعداد`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`ثبّت الإضافة`,children:[_jsxs(_components.p,{children:[`نزّل `,_jsx(_components.code,{children:`flock-godot-sdk-v\u003cversion>.zip`}),` من أحدث `,_jsx(_components.a,{href:`https://github.com/QwackStack/FlockGodotSDK/releases`,children:`إصدار`}),`\n(لا أرشيف `,_jsx(_components.strong,{children:`Source code`}),` الذي يضيفه GitHub)، وفكّ ضغطه في مجلد مشروعك، بحيث يصبح لديك `,_jsx(_components.code,{children:`res://addons/flock/`}),`.`]}),_jsxs(_components.p,{children:[`ثم فعّل `,_jsx(_components.strong,{children:`Flock`}),` تحت `,_jsx(_components.strong,{children:`Project → Project Settings → Plugins`}),`. فيُضيف ذلك إلى مشروعك كائنًا عامًّا اسمه\n`,_jsx(_components.code,{children:`Flock`}),` (من نوع autoload)، فلا عقدة تضيفها إلى أي مشهد. ولا يحتاج مشروع C# إلى خطوة إضافية: إذ يلتقط ملف\n`,_jsx(_components.code,{children:`.csproj`}),` لديك ملفات C# داخل الإضافة من تلقاء نفسه.`]})]}),_jsxs(Step,{title:`اضبط الإعدادات`,children:[_jsxs(_components.p,{children:[`افتح `,_jsx(_components.strong,{children:`Project → Tools → Flock → Open Flock setup`}),`. وفي مشروع جديد، اضغط `,_jsx(_components.strong,{children:`Create config`}),` في تبويب\n`,_jsx(_components.strong,{children:`Setup`}),` فيها: فيُنشئ ذلك `,_jsx(_components.code,{children:`res://flock_config.tres`}),`، الملف الذي تقرأ الحزمة إعداداتها منه. ثم املأ الحقول\nمن صفحة لعبتك على `,_jsx(_components.a,{href:`https://flock-saas.qwacks.com`,children:`لوحة التحكم`}),`:`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`الحقل`}),_jsx(_components.th,{children:`القيمة`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`API URL`})}),_jsxs(_components.td,{children:[`اترك القيمة الافتراضية (`,_jsx(_components.code,{children:`https://api-flock.qwacks.com`}),`) ما لم يُطلب منك غير ذلك`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`API key`})}),_jsx(_components.td,{children:`يُعرّف لعبتك — تعامَل معه كما تتعامل مع كلمة المرور`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Game`})}),_jsx(_components.td,{children:`اسم لعبتك، تمامًا كما تعرضه لوحة التحكم`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Game version`})}),_jsxs(_components.td,{children:[`اسم إصدار موجود على لوحة التحكم (مثل `,_jsx(_components.code,{children:`1.0.0`}),`)`]})]})]})]}),_jsxs(_components.p,{children:[`ويُحفظ كل تعديل في `,_jsx(_components.code,{children:`flock_config.tres`}),` حين تغادر الحقل أو تضغط Enter. وتجد الحزمة هذا الملف حين تبدأ اللعبة، فتهيّئ نفسها.`]})]}),_jsxs(Step,{title:`حُلّ إصدار اللعبة`,children:[_jsxs(_components.p,{children:[`اضغط `,_jsx(_components.strong,{children:`Resolve version`}),`. فيُبحث عن اسم الإصدار و`,_jsxs(_components.strong,{children:[`يُكتب معرّفه في `,_jsx(_components.code,{children:`flock_config.tres`})]}),`، فلا تحتاج\nاللعبة أبدًا إلى سؤال الخادم عنه، واللعبة التي تبدأ دون اتصال تحصل مع ذلك على حزمة تعمل. ولن تبدأ الحزمة\nدون هذا المعرّف.`]}),_jsxs(_components.p,{children:[`والضغطة نفسها تتحقّق من أن اسم `,_jsx(_components.strong,{children:`Game`}),` يطابق اللعبة التي ينتمي إليها مفتاح الواجهة البرمجية، ولا تكتب\nشيئًا حين لا يطابقها، فيُكتشف مفتاح اللعبة الخاطئة هنا.`]}),_jsxs(_components.p,{children:[`وتعرض قائمة التحقّق في النافذة ما زال ناقصًا. ويتحقّق `,_jsx(_components.strong,{children:`Test connection`}),` (تحت\n`,_jsx(_components.strong,{children:`Project → Tools → Flock`}),` أيضًا) من API URL والمفتاح (ومن اسم `,_jsx(_components.strong,{children:`Game`}),`، إن كتبته)، قبل أن تعرف اسم\nإصدار.`]}),_jsx(Frame,{caption:`تبويب Setup: بيانات الاعتماد بعد حلّ الإصدار، وأزرار Create config وResolve version وTest connection، وقائمة التحقّق.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-setup.png?fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=999337f84d89ef08ee1e4717bc3de175`,alt:`نافذة إعداد Flock، تبويب Setup، وقد مُلئت بيانات الاعتماد وظهرت قائمة التحقّق`,\"data-og-width\":`760`,width:`760`,\"data-og-height\":`930`,height:`930`,\"data-path\":`images/godot/setup-setup.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-setup.png?w=280\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=fa5ad4c3609d3ff9d8d97080bb3cca91 280w, https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-setup.png?w=560\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=356c31aeacff066b470f5c19e5ce03cc 560w, https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-setup.png?w=840\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=950a497b1c9dfeb05ff3a5a3ca784981 840w, https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-setup.png?w=1100\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=62b5b148b2a3522bd90d3058c61e3111 1100w, https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-setup.png?w=1650\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=087f487483d4c435148eb3474c5468fc 1650w, https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-setup.png?w=2500\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=8b8515e3c88f3cb2ee52cb1e2b7d6b40 2500w`})})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`يُشحن مفتاح الواجهة البرمجية داخل لعبتك المُصدَّرة: فملف `,_jsx(_components.code,{children:`flock_config.tres`}),` جزء منها ويمكن قراءته.\nاستخدم مفتاحًا للبيئة الصحيحة، وبدّله من لوحة التحكم إن تسرّب.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`your-first-call`,children:`أول استدعاء لك`}),`\n`,_jsxs(_components.p,{children:[`مع وجود `,_jsx(_components.code,{children:`flock_config.tres`}),` في مكانه، تبدأ الحزمة من تلقاء نفسها حين تبدأ اللعبة. أضف هذا السكربت إلى عقدة\nفي أول مشهد لديك: ما إن تبدأ الحزمة، يلتقط تسجيل دخول اللاعب المحفوظ، ولا يُدخل اللاعب بهذا الجهاز إلا حين\nلا يكون هناك تسجيل دخول محفوظ.`]}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`GDScript`,id:`gdscript`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`22`,language:`gdscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`gdscript`,children:_jsxs(_components.code,{language:`gdscript`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`extends`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Node`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _ready`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`events`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`when_initialized`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`_on_flock_ready`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _on_flock_ready`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # التقط تسجيل الدخول المحفوظ في تشغيل سابق. وتكون value هي false حين لا يوجد.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`restore_sign_in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completed`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signed_in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sign_in_with_device`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completed`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signed_in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`error_code`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"player.invalid_login_credentials\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # أول تشغيل على هذا الجهاز: التسجيل يُنشئ اللاعب ويُدخله.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signed_in`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`register_with_device`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completed`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signed_in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` push_error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`signed_in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`describe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# ما الخطأ، ثم سطر Fix:.`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` game`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`game`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get_game`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completed`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` game`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Signed in as \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`player_id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(), `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\", playing \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`game`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` push_error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`game`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`describe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`())`})]}),`\n`]})})})}),_jsx(Tab,{title:`C#`,id:`c%23`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`36`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`36`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Godot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` partial`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` FlockFirstCall`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` : `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Node`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` override`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` void`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _Ready`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Events`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`WhenInitialized`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OnFlockReady`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` private`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` void`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` OnFlockReady`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // التقط تسجيل الدخول المحفوظ في تشغيل سابق. وتكون Value هي false حين لا يوجد.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` restored`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`RestoreSignInAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` signedIn`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`SignInWithDeviceAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`signedIn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ErrorCode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"player.invalid_login_credentials\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // أول تشغيل على هذا الجهاز: التسجيل يُنشئ اللاعب ويُدخله.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signedIn`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`RegisterWithDeviceAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`signedIn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` GD`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`PushError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`signedIn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// ما الخطأ، ثم سطر Fix:.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` game`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Game`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetGameAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`game`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` GD`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`$\"Signed in as `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`FlockClient`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Auth`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`PlayerId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`, playing `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`game`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` else`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` GD`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`PushError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`game`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`النجاح`}),` هو ظهور `,_jsx(_components.code,{children:`Signed in as`}),` ومعرّف اللاعب في لوحة Output.`]}),`\n`,_jsxs(_components.p,{children:[`دون تمرير معرّف، تستعمل استدعاءات الجهاز المعرّف الذي يعطيه Godot لهذا الجهاز (`,_jsx(_components.code,{children:`OS.get_unique_id()`}),`). ولا\nيعطي Godot معرّفًا على الويب ولا على iOS، فتفشل الاستدعاءات هناك بالرمز `,_jsx(_components.code,{children:`flock.invalid_argument`}),` ولا ترسل\nشيئًا: فاصنع معرّفًا بنفسك، واحفظه في ملفات اللعبة، ومرّره إلى `,_jsx(_components.code,{children:`sign_in_with_device(id)`}),`\nو`,_jsx(_components.code,{children:`register_with_device(id)`}),`. ونسختان من اللعبة على حاسوب واحد لهما معرّف الجهاز نفسه، فهما لاعب واحد: مرّر\nمعرّفًا مختلفًا في إحداهما. ومع الجهاز الجديد يأتي لاعب جديد، فاعرض `,_jsx(_components.a,{href:`/ar/guides/account-linking`,children:`ربط الحسابات`}),`\n(بالبريد الإلكتروني أو بحساب منصّة) على اللاعبين الذين يريدون العودة إلى حسابهم من جهاز آخر.`]}),`\n`,_jsx(Heading,{level:`2`,id:`initialization`,children:`التهيئة`}),`\n`,_jsxs(_components.p,{children:[`يمكن أن تبدأ الحزمة بطريقتين. `,_jsx(_components.strong,{children:`التلقائية`}),` هي الافتراضية وتناسب معظم الألعاب؛ أما `,_jsx(_components.strong,{children:`اليدوية`}),` فتمنحك\nتحكّمًا في `,_jsx(_components.em,{children:`وقت`}),` بدئها (بعد شاشة البداية، أو بعد أن يجيب اللاعب عن سؤال الموافقة).`]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`تلقائيًا (الوضع الافتراضي)`,id:`%D8%AA%D9%84%D9%82%D8%A7%D8%A6%D9%8A%D9%8B%D8%A7-%D8%A7%D9%84%D9%88%D8%B6%D8%B9-%D8%A7%D9%84%D8%A7%D9%81%D8%AA%D8%B1%D8%A7%D8%B6%D9%8A`,children:[_jsxs(_components.p,{children:[`لا شيء عليك استدعاؤه: حين تبدأ اللعبة، يقرأ الـ autoload `,_jsx(_components.code,{children:`Flock`}),` ملف `,_jsx(_components.code,{children:`res://flock_config.tres`}),` ويهيّئ\nالحزمة منه. وترسل الحزمة إشاراتها في الإطار التالي، فيستقبل المعالج الموصول في `,_jsx(_components.code,{children:`_ready()`}),` ما أعلنته الحزمة\nأثناء بدئها. ويشغّل `,_jsx(_components.code,{children:`Flock.events.when_initialized()`}),` الدالة الممرَّرة إليه حتى حين تكون الحزمة قد بدأت\nقبل استدعائه، وهو ما لا يستطيعه `,_jsx(_components.code,{children:`connect()`}),` العادي.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`gdscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`gdscript`,children:_jsxs(_components.code,{language:`gdscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` _ready`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`events`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`when_initialized`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`_on_flock_ready`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`events`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`signed_in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`connect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`_on_signed_in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`events`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sign_in_expired`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`connect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`_on_sign_in_expired`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`واستعادة تسجيل دخول محفوظ أمر تبدؤه أنت: استدعِ `,_jsx(_components.code,{children:`Flock.auth.restore_sign_in()`}),`، كما يفعل\n`,_jsx(_components.a,{href:`#your-first-call`,children:`أول استدعاء لك`}),`.`]})]}),_jsxs(Tab,{title:`يدويًا`,id:`%D9%8A%D8%AF%D9%88%D9%8A%D9%8B%D8%A7`,children:[_jsxs(_components.p,{children:[`ألغِ تحديد `,_jsx(_components.strong,{children:`Auto initialize`}),` في تبويب `,_jsx(_components.strong,{children:`Configuration`}),` من نافذة الإعداد (`,_jsx(_components.code,{children:`auto_initialize`}),` في\n`,_jsx(_components.code,{children:`flock_config.tres`}),`)، ثم ابدأ الحزمة بنفسك. ويعود `,_jsx(_components.code,{children:`initialize()`}),` فورًا.`]}),_jsx(Frame,{caption:`تبويب Configuration: Connection وHTTP وInitialization، وفيه Persist sign in وAuto initialize.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-configuration.png?fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=e7ec5c2a840db6489114b51044f44a80`,alt:`نافذة إعداد Flock، تبويب Configuration`,\"data-og-width\":`760`,width:`760`,\"data-og-height\":`815`,height:`815`,\"data-path\":`images/godot/setup-configuration.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-configuration.png?w=280\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=c89121b815a5192190910960030b98a3 280w, https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-configuration.png?w=560\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=a957ed4de5a62eef2a44bc3be4a9ddb4 560w, https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-configuration.png?w=840\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=471bebf194a682cdff4f77c90fa8ac43 840w, https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-configuration.png?w=1100\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=e799c26083622b13658a5725e684e792 1100w, https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-configuration.png?w=1650\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=0309da0d667a3548e6eb04da5ac118a8 1650w, https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-configuration.png?w=2500\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=dd08f4913bacc0bc81871bb7bc84980e 2500w`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`gdscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`gdscript`,children:_jsxs(_components.code,{language:`gdscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` config`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` load`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"res://flock_config.tres\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` started`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`initialize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`config`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` started`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` push_error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`started`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`describe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`())`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockResult`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` started`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Initialize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// يقرأ res://flock_config.tres`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`started`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` GD`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`PushError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`started`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`]})})})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`الإعداد الذي لا تستطيع الحزمة أن تبدأ منه (لا API URL ولا مفتاح، أو لا معرّف لإصدار اللعبة) يُفشل\n`,_jsx(_components.code,{children:`initialize()`}),` بالرمز `,_jsx(_components.code,{children:`flock.not_initialized`}),` ورسالة تسمّي الناقص، ويرفع البدء التلقائي\n`,_jsx(_components.code,{children:`Flock.events.initialization_failed`}),`. وإلى أن تبدأ الحزمة، لا وجود لخدماتها: ففي GDScript تكون `,_jsx(_components.code,{children:`Flock.auth`}),`\nوأخواتها `,_jsx(_components.code,{children:`null`}),`، وفي C# ترمي `,_jsx(_components.code,{children:`FlockClient.Auth`}),` وأخواتها استثناء `,_jsx(_components.code,{children:`InvalidOperationException`}),` يطلب التهيئة\nأولًا. تحقّق من `,_jsx(_components.code,{children:`Flock.is_initialized()`}),` (`,_jsx(_components.code,{children:`FlockClient.IsInitialized`}),` في C#)، أو انتظر\n`,_jsx(_components.code,{children:`when_initialized()`}),` كما في الأعلى.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`gdscript-and-c#`,children:`GDScript وC#`}),`\n`,_jsxs(_components.p,{children:[`الحزمة `,_jsx(_components.strong,{children:`عميل واحد له مدخلان`}),`. نواتها مكتوبة بـGDScript، ويُوصَل إليها عبر الـ autoload `,_jsx(_components.code,{children:`Flock`}),`؛ ولـC#\nطبقة مُحدَّدة الأنواع، `,_jsx(_components.code,{children:`FlockClient`}),`، تُولَّد من تلك النواة وتُشحن داخل الإضافة. وكلاهما يستعمل العميل نفسه،\nفاللاعب الذي سجّل دخوله من GDScript مسجَّل الدخول في C#، والعكس كذلك.`]}),`\n`,_jsxs(_components.p,{children:[`كل استدعاء يصل إلى الخادم يُعيد `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`FlockRequest`})}),` في GDScript: انتظر بـ`,_jsx(_components.code,{children:`await`}),` إشارته `,_jsx(_components.code,{children:`completed`}),` (لا الدالة\nنفسها)، أو صِلها بمعالج. والجواب `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`FlockResult`})}),` فيه `,_jsx(_components.code,{children:`ok`}),` و`,_jsx(_components.code,{children:`value`}),` و`,_jsx(_components.code,{children:`error`}),`. وفي C# يكون الاستدعاء نفسه\nدالة `,_jsx(_components.code,{children:`…Async`}),` تُعيد `,_jsx(_components.code,{children:`FlockResult\u003cT>`}),` فيه `,_jsx(_components.code,{children:`Ok`}),` و`,_jsx(_components.code,{children:`Value`}),` و`,_jsx(_components.code,{children:`Error`}),`، وتأخذ `,_jsx(_components.code,{children:`CancellationToken`}),` اختياريًا.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`gdscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`gdscript`,children:_jsxs(_components.code,{language:`gdscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sign_in_with_email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`password`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completed`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`SignInWithEmailAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`password`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`ما إن تبدأ الحزمة، لا ترمي الاستدعاءات استثناءات.`}),` إذ يكون الاستدعاء الفاشل نتيجةً تكون قيمة `,_jsx(_components.code,{children:`ok`}),` فيها false، في\nاللغتين، فيعالج المشروع الذي يستعمل كلتيهما الإخفاق بالطريقة نفسها في كل جانب. تحقّق من `,_jsx(_components.code,{children:`ok`}),`: فالاستدعاء\nالناجح قد يُجيب مع ذلك بـ`,_jsx(_components.code,{children:`null`}),` (لاعب لم تُحفظ له بيانات بعد، مثلًا).`]}),`\n`,_jsx(_components.p,{children:`الأسماء تتقابل واحدًا لواحد، فاسم GDScript يدلّك على اسم C#:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`GDScript`}),_jsx(_components.th,{children:`C#`}),_jsx(_components.th,{children:`مثال`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`استدعاء يصل إلى الخادم`}),_jsxs(_components.td,{children:[`PascalCase + `,_jsx(_components.code,{children:`Async`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`get_standings`}),` → `,_jsx(_components.code,{children:`GetStandingsAsync`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`خاصية`}),_jsx(_components.td,{children:`PascalCase`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`player_name`}),` → `,_jsx(_components.code,{children:`PlayerName`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`فحص بلا وسائط`}),_jsx(_components.td,{children:`خاصية`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`is_signed_in()`}),` → `,_jsx(_components.code,{children:`IsSignedIn`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`ثابت`}),_jsx(_components.td,{children:`بالتهجئة نفسها`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`STATUS_UNUSED`}),` → `,_jsx(_components.code,{children:`STATUS_UNUSED`})]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`int`}),`، `,_jsx(_components.code,{children:`float`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`long`}),`، `,_jsx(_components.code,{children:`double`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`size_bytes`}),` → `,_jsx(_components.code,{children:`long SizeBytes`})]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`تحتاج شيفرة C# إلى `,_jsx(_components.code,{children:`using Flock;`}),`، وإلى `,_jsx(_components.code,{children:`using Flock.Generated;`}),` للأصناف المصنوعة من محتوى لوحة التحكم\n(`,_jsx(_components.a,{href:`#work-with-your-game-data`,children:`اعمل مع بيانات لعبتك`}),`). والمشروع الذي لا يستعمل بناء .NET يتجاهل ملفات C# في\nالإضافة.`]}),`\n`,_jsx(Heading,{level:`2`,id:`authenticate-a-player`,children:`صادِق لاعبًا`}),`\n`,_jsxs(_components.p,{children:[`تسجيل الدخول لا يُنشئ حسابًا: فالتسجيل استدعاء منفصل من نوع `,_jsx(_components.code,{children:`register_with_*`}),`، والتسجيل الذي يُنشئ الحساب\nيُدخل اللاعب أيضًا.`]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`الجهاز`,id:`%D8%A7%D9%84%D8%AC%D9%87%D8%A7%D8%B2`,children:[_jsxs(_components.p,{children:[`سجّل الدخول، وسجّل الجهاز عند أول تشغيل، كما يُظهر `,_jsx(_components.a,{href:`#your-first-call`,children:`أول استدعاء لك`}),`.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`gdscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`gdscript`,children:_jsxs(_components.code,{language:`gdscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signed_in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sign_in_with_device`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completed`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signed_in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`error_code`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"player.invalid_login_credentials\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signed_in`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`register_with_device`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completed`})]}),`\n`]})})})]}),_jsxs(Tab,{title:`البريد الإلكتروني`,id:`%D8%A7%D9%84%D8%A8%D8%B1%D9%8A%D8%AF-%D8%A7%D9%84%D8%A5%D9%84%D9%83%D8%AA%D8%B1%D9%88%D9%86%D9%8A`,children:[_jsxs(_components.p,{children:[`يأتي `,_jsx(_components.code,{children:`email`}),` و`,_jsx(_components.code,{children:`password`}),` من شاشتَي الدخول وإنشاء الحساب لديك.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`gdscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`gdscript`,children:_jsxs(_components.code,{language:`gdscript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# شاشة إنشاء الحساب: تُنشئ الحساب وتُدخل اللاعب. والاسم اختياري.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`register_with_email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`password`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`display_name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completed`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# شاشة الدخول، في التشغيلات اللاحقة:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sign_in_with_email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`password`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completed`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`أسماء اللاعبين فريدة داخل اللعبة: يتحقّق `,_jsx(_components.code,{children:`Flock.auth.is_name_available(name)`}),` من اسم قبل أن تسجّل به.\nوتغطّي `,_jsx(_components.code,{children:`forgot_password()`}),` و`,_jsx(_components.code,{children:`reset_password()`}),` و`,_jsx(_components.code,{children:`send_email_verification()`}),` و`,_jsx(_components.code,{children:`verify_email()`}),` استعادة\nالحساب.`]})]}),_jsx(Tab,{title:`Google / Apple / Steam`,id:`google-%2F-apple-%2F-steam`,children:_jsxs(_components.p,{children:[`مرّر بيانات الاعتماد التي أنتجها تسجيل الدخول في المنصّة إلى الاستدعاء المقابل: Google `,_jsx(_components.strong,{children:`رمز هوية`}),`\n(ID token، `,_jsx(_components.code,{children:`sign_in_with_google`}),`)، وApple `,_jsx(_components.strong,{children:`رمز هوية`}),` (identity token، `,_jsx(_components.code,{children:`sign_in_with_apple`}),`)، وSteam `,_jsx(_components.strong,{children:`تذكرة\nجلسة`}),` (`,_jsx(_components.code,{children:`sign_in_with_steam`}),`). ولكلٍّ منها استدعاء `,_jsx(_components.code,{children:`register_with_*`}),` أيضًا. ولا تجلب الحزمة بيانات الاعتماد\nهذه نيابةً عنك، إذ لا يأتي Godot بتسجيل دخول لـGoogle أو Apple أو Steam: فاحصل عليها من إضافة المنصّة التي\nتستعملها.`]})})]}),`\n`,_jsxs(_components.p,{children:[`وكل استدعاء لتسجيل الدخول أو التسجيل يكتمل بـ`,_jsx(_components.code,{children:`FlockAuthInfo`}),` (معرّف اللاعب، وطريقة دخوله، وهل استُعيد\nتسجيل الدخول). أما الرموز فتبقى داخل الحزمة.`]}),`\n`,_jsxs(_components.p,{children:[`ويستطيع اللاعب أن يضيف طرقًا أخرى لتسجيل الدخول إلى حساب واحد (`,_jsx(_components.code,{children:`link_email`}),`، `,_jsx(_components.code,{children:`link_device`}),`، `,_jsx(_components.code,{children:`link_oauth`}),`)،\nوأن يسردها (`,_jsx(_components.code,{children:`list_linked_accounts`}),`) ويزيل إحداها (`,_jsx(_components.code,{children:`unlink`}),`)؛ انظر `,_jsx(_components.a,{href:`/ar/guides/account-linking`,children:`ربط الحسابات`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`حفظ تسجيل الدخول.`}),` يُحفظ تسجيل الدخول في ملف مشفَّر تحت `,_jsx(_components.code,{children:`user://`}),` (لا في التخزين الآمن الخاص بالمنصّة، إذ لا وصول\nلـGodot إليه)، ويلتقطه `,_jsx(_components.code,{children:`Flock.auth.restore_sign_in()`}),` في التشغيل التالي. ألغِ تحديد `,_jsx(_components.code,{children:`persist_sign_in`}),`\nلتُبقي تسجيل الدخول في الذاكرة وحدها، فيسجّل اللاعبون دخولهم في كل تشغيل. وتسجيل الدخول المحفوظ يخصّ مفتاح\nالواجهة البرمجية الذي صُنع به: فبعد تغيّر المفتاح يسجّل اللاعب دخوله من جديد.`]}),`\n`,_jsx(_components.p,{children:`وتتجدّد الرموز المنتهية نيابةً عنك، ولا يُخرج اللاعبَ إلا رفضُ الخادم لتسجيل الدخول: أما انقطاع الاتصال أو خادم يُعاد\nتشغيله فلا يُخرجه أبدًا. صِل الأحداث لتقود بها واجهتك:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`gdscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`gdscript`,children:_jsxs(_components.code,{language:`gdscript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# يُرفع عند تسجيل دخول، أو تسجيل أدخل اللاعب، أو دخول مُستعاد.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`events`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`signed_in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`connect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`func`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`info`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockAuthInfo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`info`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`player_id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" signed in (\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`info`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`method`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\")\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# لم يعد تسجيل الدخول المحفوظ قابلًا للتجديد: اعرض شاشة الدخول لديك.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`events`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sign_in_expired`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`connect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`func`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Sign in again\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Events`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SignedIn`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` info`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` GD`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`$\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`info`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`PlayerId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` signed in (`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`info`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Method`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Events`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SignInExpired`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` GD`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Sign in again\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`work-with-your-game-data`,children:`اعمل مع بيانات لعبتك`}),`\n`,_jsxs(_components.p,{children:[`يحوّل `,_jsx(_components.strong,{children:`Project → Tools → Flock → Generate content code`}),` إعدادات لوحة التحكم، وقوالب اللاعبين، وعناصر\nالمتاجر، والعملات، والإنجازات إلى أصناف مُحدَّدة الأنواع. ويقرأ إصدار اللعبة المضبوط في `,_jsx(_components.code,{children:`flock_config.tres`}),`\nبمفتاح الواجهة البرمجية (بلا تسجيل دخول لاعب) ويكتب في `,_jsx(_components.strong,{children:`Generated code path`}),` الخاص بالإعداد، وهو\n`,_jsx(_components.code,{children:`res://flock/generated`}),` افتراضيًا. وفي مشروع C# يكتب الأصناف نفسها بـC# (نطاق الأسماء `,_jsx(_components.code,{children:`Flock.Generated`}),`)\nبجانبها؛ فابنِ المشروع بعد ذلك.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`ما يكتبه`}),_jsx(_components.th,{children:`لعنصر في لوحة التحكم اسمه`}),_jsx(_components.th,{children:`ما يعطيك`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`صنف لكل إعداد`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Gameplay`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`GameplayConfig`}),`، وعضو مُحدَّد النوع لكل حقل، و`,_jsx(_components.code,{children:`fetch()`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`صنف لكل قالب لاعب`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PlayerProgress`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`PlayerProgressTemplate`}),`، وعضو مُحدَّد النوع لكل حقل، و`,_jsx(_components.code,{children:`fetch_mine()`}),` و`,_jsx(_components.code,{children:`save()`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`FlockShopItemId`})}),_jsxs(_components.td,{children:[`عنصر متجر `,_jsx(_components.code,{children:`Gem Pack`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockShopItemId.GEM_PACK`}),` (`,_jsx(_components.code,{children:`GemPack`}),` في C#)، وهو معرّف العنصر`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`FlockCurrencyId`})}),_jsxs(_components.td,{children:[`عملة `,_jsx(_components.code,{children:`Gold`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockCurrencyId.GOLD`}),` (`,_jsx(_components.code,{children:`Gold`}),` في C#)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`FlockAchievementId`})}),_jsxs(_components.td,{children:[`إنجاز `,_jsx(_components.code,{children:`First Win`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockAchievementId.FIRST_WIN`}),` (`,_jsx(_components.code,{children:`FirstWin`}),` في C#)`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`يفترض المثال أدناه وجود قالب لاعب اسمه `,_jsx(_components.code,{children:`PlayerProgress`}),` (فيه حقل `,_jsx(_components.code,{children:`level`}),`)، وإعداد اسمه `,_jsx(_components.code,{children:`Gameplay`}),` (فيه\n`,_jsx(_components.code,{children:`spawn_rate`}),`)، وعنصر متجر `,_jsx(_components.code,{children:`Gem Pack`}),` في لوحة التحكم. وهذه أمثلة: أنشئها أولًا\n(`,_jsx(_components.a,{href:`/ar/guides/player-data`,children:`بيانات اللاعب`}),`، و`,_jsx(_components.a,{href:`/ar/guides/remote-config`,children:`الإعدادات عن بُعد`}),`،\nو`,_jsx(_components.a,{href:`/ar/guides/shops-and-inventory`,children:`المتاجر والمخزون`}),`)، أو استعمل أسماءك أنت.`]}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`GDScript`,id:`gdscript-2`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`gdscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`gdscript`,children:_jsxs(_components.code,{language:`gdscript`,numberOfLines:`14`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# بيانات اللاعب: قيمتها null حتى يكون للاعب صفّ في هذا القالب.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` progress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` PlayerProgressTemplate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fetch_mine`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completed`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` progress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ok`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` and`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` progress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` row`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`PlayerProgressTemplate`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` progress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` row`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`level`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 5`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` row`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`save`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completed`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # يكتب كل الحقول في الصف من جديد.`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# الإعدادات عن بُعد: غيّر القيم من لوحة التحكم دون بناء جديد.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` gameplay`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` GameplayConfig`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completed`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` gameplay`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` spawn_rate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`float`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` gameplay`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`spawn_rate`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# المتجر: المعرّف المُولَّد يسمّي العنصر.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockShopItemId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`GEM_PACK`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completed`})]}),`\n`]})})})}),_jsx(Tab,{title:`C#`,id:`c%23-2`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`20`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Generated`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// بيانات اللاعب: قيمتها null حتى يكون للاعب صفّ في هذا القالب.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` progress`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` PlayerProgressTemplate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`FetchMineAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`progress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Ok`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` progress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` progress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Level`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` progress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`SaveAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// يكتب كل الحقول في الصف من جديد.`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// الإعدادات عن بُعد: غيّر القيم من لوحة التحكم دون بناء جديد.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` gameplay`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` GameplayConfig`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`FetchAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`gameplay`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` double`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` spawnRate`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` gameplay`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SpawnRate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// المتجر: المعرّف المُولَّد يسمّي العنصر.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` bought`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`PurchaseAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`FlockShopItemId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`GemPack`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})})]}),`\n`,_jsxs(_components.p,{children:[`يعطي `,_jsx(_components.code,{children:`fetch()`}),` قيم الإعداد بعد تطبيق رقعته (patch). ومع لاعب مسجَّل الدخول، يأتي إعداد اللعب (gameplay) أو\nالميزات (feature) كما يحسبه الخادم لذلك اللاعب: أحدث رقعة له، ثم تجاوزات الشرائح التي ينتمي إليها اللاعب، ثم\nتجاوزاته هو. ويكتب `,_jsx(_components.code,{children:`save()`}),` `,_jsx(_components.strong,{children:`كل`}),` الحقول، لأن الخادم يرفض كتابةً تُغفل أحدها.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`هذه الأصناف غير موجودة حتى تولّدها.`}),` شغّل `,_jsx(_components.strong,{children:`Generate content code`}),` من جديد كلما تغيّرت لوحة التحكم\n(قالب جديد، أو حقل أُعيدت تسميته، أو عنصر متجر جديد)؛ وتقول نافذة الإعداد كم ملفًا كتبت وكم ملفًا أزالت.\nولا يستبدل المولّد إلا الملفات التي كتبها بنفسه، فيبقى ملفك الخاص في ذلك المجلد.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`checking-in-ci`,children:`الفحص في CI`}),`\n`,_jsx(_components.p,{children:`قد تتأخّر الملفات المُولَّدة عن لوحة التحكم. وهذا الأمر، المخصّص لخطّ البناء لديك (CI)، يخبرك متى حدث ذلك،\nدون فتح المحرّر. استورد المشروع أولًا، إذ ليس في النسخة المسحوبة حديثًا قائمة أصناف بعد:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`godot`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --headless`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --path`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` .`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --import`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`godot`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --headless`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --path`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` .`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --script`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` res://addons/flock/editor/content_code.gd`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --check`})]}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`رمز الخروج`}),_jsx(_components.th,{children:`المعنى`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0`})}),_jsx(_components.td,{children:`الملفات المُولَّدة تطابق لوحة التحكم`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2`})}),_jsx(_components.td,{children:`لا تطابقها: ولّدها من جديد (لم تُولَّد قط، أو إصدار لعبة آخر، أو تغيّر المحتوى، أو عُدّل ملف مُولَّد أو حُذف يدويًا)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1`})}),_jsxs(_components.td,{children:[`تعذّر الحكم: لا ملف `,_jsx(_components.code,{children:`flock_config.tres`}),`، أو لا إصدار لعبة مضبوط، أو تعذّرت القراءة من الخادم`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`و`,_jsx(_components.code,{children:`-- --write`}),` بدل `,_jsx(_components.code,{children:`-- --check`}),` يولّد الملفات دون المحرّر. استعمل إصدار Godot نفسه الذي تولّد به في المحرّر.\nوتغيّر سعر أو قيمة في لوحة التحكم لا يُعدّ تغييرًا: فلا يُكتب أي سعر أو قيمة في الشيفرة.`]}),`\n`,_jsx(Heading,{level:`2`,id:`explore-features`,children:`استكشف الميزات`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`تسجيل الدخول`,icon:`user`,href:`/ar/guides/players-and-auth`}),_jsx(Card,{title:`ربط الحسابات`,icon:`link`,href:`/ar/guides/account-linking`}),_jsx(Card,{title:`بيانات اللاعب`,icon:`database`,href:`/ar/guides/player-data`}),_jsx(Card,{title:`المتاجر والمخزون`,icon:`cart-shopping`,href:`/ar/guides/shops-and-inventory`}),_jsx(Card,{title:`لوحات الصدارة`,icon:`ranking-star`,href:`/ar/guides/leaderboards`}),_jsx(Card,{title:`الإشعارات`,icon:`bell`,href:`/ar/guides/notifications`}),_jsx(Card,{title:`الإعدادات عن بُعد`,icon:`sliders`,href:`/ar/guides/remote-config`}),_jsx(Card,{title:`الأصول`,icon:`box-archive`,href:`/ar/guides/assets`}),_jsx(Card,{title:`التحليلات والأحداث`,icon:`chart-line`,href:`/ar/guides/analytics-and-events`}),_jsx(Card,{title:`الإنجازات`,icon:`trophy`,href:`/ar/guides/achievements`}),_jsx(Card,{title:`العملات والمحافظ`,icon:`coins`,href:`/ar/guides/currencies-and-wallets`}),_jsx(Card,{title:`الحظر`,icon:`ban`,href:`/ar/guides/bans`}),_jsx(Card,{title:`تحديثات اللعبة`,icon:`code-branch`,href:`/ar/guides/game-patches`})]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`ليست في حزمة Godot بعد: اللعب الجماعي، والمشتريات بالمال الحقيقي والدفع عبر الويب، واستدعاءات خطة التتبّع\nمُحدَّدة الأنواع، وأحداث التشغيل ومعاملات الأحداث القياسية، والالتقاط التلقائي للاستثناءات. ويبيّن تبويب Godot\nفي كل دليل أين تقف كل ميزة.`})}),`\n`,_jsx(Heading,{level:`2`,id:`advanced-settings`,children:`الإعدادات المتقدّمة`}),`\n`,_jsxs(_components.p,{children:[`يحمل تبويب `,_jsx(_components.strong,{children:`Configuration`}),` في نافذة الإعداد الإعدادات التي يجب أن يضبطها المشروع بدقّة (الاتصال، وHTTP،\nوالتهيئة)؛ ويحمل تبويب `,_jsx(_components.strong,{children:`Advanced`}),` الباقي: ذاكرة وضع عدم الاتصال، وذاكرة الأصول، والتحليلات، ومجلد شيفرة\nالمحتوى، وفحوص المحرّر، وسجلّات التصحيح. وكل حقل إعدادٌ في `,_jsx(_components.code,{children:`flock_config.tres`}),`، ولوحة Inspector تعدّل القيم\nنفسها. والقيم الافتراضية معقولة — فلا تغيّرها إلا عند الحاجة.`]}),`\n`,_jsx(Frame,{caption:`تبويب Advanced من الأعلى إلى الأسفل: Offline Cache ثم Assets ثم Analytics، ثم Content Code وEditor وDiagnostics في الأسفل.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-advanced.png?fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=948b32241151d45b40687b54436c7707`,alt:`نافذة إعداد Flock، تبويب Advanced`,\"data-og-width\":`760`,width:`760`,\"data-og-height\":`985`,height:`985`,\"data-path\":`images/godot/setup-advanced.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-advanced.png?w=280\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=e7ff1566cad9fc663c5bf67f29746521 280w, https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-advanced.png?w=560\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=5679072310ef36ba36610a5dc40f584c 560w, https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-advanced.png?w=840\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=db10289c9c2708dce34dcad3360a309e 840w, https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-advanced.png?w=1100\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=d3d83f07c3cbad71c14fdc65f4de4fb9 1100w, https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-advanced.png?w=1650\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=9f13e3586881e97f081161a8a7ebcbbb 1650w, https://mintcdn.com/qwacks/OzMDMSJYBiNDPtqZ/images/godot/setup-advanced.png?w=2500\u0026fit=max\u0026auto=format\u0026n=OzMDMSJYBiNDPtqZ\u0026q=85\u0026s=db284584d25d48baec9283eb95a9cdc1 2500w`})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Offline cache enabled`}),` (مفعّل افتراضيًا) يحفظ محتوى اللعبة على القرص حين يُقرأ، فتبدأ اللعبة التي اتصلت\nمرة واحدة دون اتصال، وتبقى كتابات بيانات اللاعب المنتظرة في الطابور وقت انقطاع الاتصال محفوظة عبر إعادة\nالتشغيل. والمال لا ينتظر في ذلك الطابور أبدًا: فمنح الأموال أو الشراء يُرسل مرة واحدة. ويذكر تبويب Godot في\nكل دليل ما تحتفظ به ميزته دون اتصال؛ ويشرح دليل `,_jsx(_components.a,{href:`/ar/guides/player-data`,children:`بيانات اللاعب`}),` الطابور.`]}),`\n`,_jsxs(_components.p,{children:[`فحصان للمحرّر مفعّلان افتراضيًا. `,_jsx(_components.strong,{children:`Play mode guard enabled`}),` يوقف التشغيل من المحرّر حين لا يستطيع بدء الحزمة\n(لا autoload، أو لا إصدار لعبة، أو إعداد غير صالح) ويعرض نافذة حوار فيها زرّ يفتح نافذة الإعداد. و`,_jsx(_components.strong,{children:`Fail\nexport if version unresolved`}),` يتحقّق من إصدار اللعبة عند التصدير؛ انظر `,_jsx(_components.a,{href:`#platform-notes`,children:`ملاحظات المنصّات`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`ويطبع `,_jsx(_components.strong,{children:`Verbose logging`}),` تشخيصات الحزمة في لوحة Output، دون أجسام الطلبات والاستجابات أبدًا، لأنها تحمل\nكلمات المرور والرموز.`]}),`\n`,_jsxs(_components.p,{children:[`وللتحليلات (الجلسات والأحداث والموافقة وتقارير الإغلاق والانهيار) انظر\n`,_jsx(_components.a,{href:`/ar/guides/analytics-and-events`,children:`التحليلات والأحداث`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`platform-notes`,children:`ملاحظات المنصّات`}),`\n`,_jsxs(_components.p,{children:[`تُختبر الألعاب المُصدَّرة على `,_jsx(_components.strong,{children:`Windows وLinux وAndroid والويب`}),`، في البناء القياسي وبناء .NET (والويب في\nالبناء القياسي وحده، إذ لا تصدير .NET للويب في Godot). ولم يُختبر macOS وiOS بعد.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Android:`}),` لا شيء تضبطه. فتصدير Android في Godot يترك إذن الإنترنت معطّلًا، لذا تفعّل الإضافة، ما دامت\nمفعّلة، `,_jsx(_components.code,{children:`permissions/internet`}),` لكل تصدير Android.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`الويب وiOS:`}),` لا معرّف جهاز، فمرّر معرّفك أنت إلى استدعاءات تسجيل الدخول بالجهاز (انظر\n`,_jsx(_components.a,{href:`#your-first-call`,children:`أول استدعاء لك`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`كل المنصّات:`}),` التصدير الذي ليس في `,_jsx(_components.code,{children:`flock_config.tres`}),` الخاص به إصدار لعبة، أو فيه إصدار غير الذي وُلّدت\nله شيفرة المحتوى، ينتهي بخطأ يسمّي الإصلاح. ويكتب التصدير ملفاته مع ذلك (إذ لا يعطي Godot الإضافة أي طريقة\nلإيقافه)، فاقرأ نتيجة التصدير، أو شغّل `,_jsx(_components.a,{href:`#checking-in-ci`,children:`الفحص في CI`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`error-handling`,children:`معالجة الأخطاء`}),`\n`,_jsxs(_components.p,{children:[`كل استدعاء فاشل يُجيب بـ`,_jsx(_components.code,{children:`FlockResult`}),` تكون قيمة `,_jsx(_components.code,{children:`error`}),` فيه `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`FlockError`})}),`. ويعطي `,_jsx(_components.code,{children:`describe()`}),` ما الخطأ (سبب\nالخادم نفسه حين يذكره)، ثم سطر `,_jsx(_components.code,{children:`Fix:`}),` يخبرك بما تفعله تاليًا. وفي C# يعطي `,_jsx(_components.code,{children:`Error.ToString()`}),` الشيء نفسه مع\nالرمز في أوّله.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`gdscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`gdscript`,children:_jsxs(_components.code,{language:`gdscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signed_in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sign_in_with_device`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completed`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signed_in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` push_error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`signed_in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`describe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`())`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:`describe() في تصدير للويب، حيث لا يعطي Godot معرّفًا للجهاز`,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`This platform reports no device id (OS.get_unique_id() is unsupported on web and iOS). Pass a device_id you generate and persist yourself.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Fix: Change the argument the message names, then make the call again.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`العضو`}),_jsx(_components.th,{children:`ما يحمله`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`message`})}),_jsx(_components.td,{children:`ما الخطأ: سبب الخادم نفسه حين يذكره.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`hint()`})}),_jsx(_components.td,{children:`الإصلاح وحده. ولا يكون فارغًا أبدًا: فالرمز الذي لا نصيحة خاصة به يحصل على نصيحة نوع إخفاقه.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`describe()`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`message`}),`، ثم سطر `,_jsx(_components.code,{children:`Fix:`}),` فيه `,_jsx(_components.code,{children:`hint()`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`code`})}),_jsxs(_components.td,{children:[`رمز الخطأ كنصّ (`,_jsx(_components.code,{children:`\"shop.insufficient_funds\"`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`status`})}),_jsxs(_components.td,{children:[`حالة HTTP، أو `,_jsx(_components.code,{children:`0`}),` حين لم يتلقَّ الطلب جوابًا من الخادم قط.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`وفي C# هي `,_jsx(_components.code,{children:`Message`}),` و`,_jsx(_components.code,{children:`Hint`}),` و`,_jsx(_components.code,{children:`Code`}),` و`,_jsx(_components.code,{children:`Status`}),`.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`تفرّع على الرمز لا على نصّ الرسالة أبدًا. فالرموز عقد ثابت، أما الصياغة فليست كذلك وستتغيّر بين\nالإصدارات.`})}),`\n`,_jsxs(_components.p,{children:[`و`,_jsx(_components.code,{children:`result.error_code()`}),` (`,_jsx(_components.code,{children:`ErrorCode`}),` في C#) هو الرمز، أو نصّ فارغ عند النجاح، فيمكنك مقارنته مباشرةً:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`gdscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`gdscript`,children:_jsxs(_components.code,{language:`gdscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockShopItemId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`GEM_PACK`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completed`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`error_code`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"shop.insufficient_funds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` show_not_enough_coins`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# واجهتك أنت.`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`رموز الخادم مسمّاة بحسب الميزة (`,_jsx(_components.code,{children:`shop.insufficient_funds`}),`، `,_jsx(_components.code,{children:`player.invalid_login_credentials`}),`). أما رموز الحزمة\nنفسها فتبدأ بـ`,_jsx(_components.code,{children:`flock.`}),`، فيقول سطر السجلّ أيّ جانب وجد المشكلة:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`الرمز`}),_jsx(_components.th,{children:`المعنى`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`flock.network_unreachable`})}),_jsx(_components.td,{children:`لم يصل الطلب إلى الخادم قط.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`flock.timeout`})}),_jsx(_components.td,{children:`لم يأتِ جواب في الوقت المحدّد. وغالبًا ما يظهر الخادم الذي يتعذّر الوصول إليه بهذه الطريقة أيضًا.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`flock.invalid_response`})}),_jsx(_components.td,{children:`جاء جواب لكن تعذّرت قراءته، أو نقصه ما ينبغي أن يحمله.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`flock.not_initialized`})}),_jsx(_components.td,{children:`تعذّر بدء الحزمة، أو استُعمل صنف مُولَّد قبل أن تبدأ.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`flock.not_signed_in`})}),_jsx(_components.td,{children:`يحتاج الاستدعاء إلى لاعب مسجَّل الدخول، ولا يوجد أحد.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`flock.player_already_signed_in`})}),_jsxs(_components.td,{children:[`حاول لاعب محلّي (`,_jsx(_components.code,{children:`Flock.add_local_player()`}),`، لعدّة لاعبين على جهاز واحد) أن يسجّل الدخول بحساب لاعب مسجَّل الدخول أصلًا هنا.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`flock.invalid_argument`})}),_jsx(_components.td,{children:`رُفض وسيط قبل إرسال أي شيء.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`flock.cancelled`})}),_jsx(_components.td,{children:`أُلغي الاستدعاء.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`flock.asset_url_expired`}),`، `,_jsx(_components.code,{children:`flock.asset_decode_failed`}),`، `,_jsx(_components.code,{children:`flock.asset_not_saved`})]}),_jsx(_components.td,{children:`انتهت صلاحية رابط تنزيل أصل، أو لم يكن ملفه من النوع المطلوب، أو تعذّر حفظه على الجهاز.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`flock.unauthorized`}),`، `,_jsx(_components.code,{children:`flock.payment_required`}),`، `,_jsx(_components.code,{children:`flock.forbidden`}),`، `,_jsx(_components.code,{children:`flock.not_found`}),`، `,_jsx(_components.code,{children:`flock.conflict`}),`، `,_jsx(_components.code,{children:`flock.validation_failed`}),`، `,_jsx(_components.code,{children:`flock.rate_limited`}),`، `,_jsx(_components.code,{children:`flock.server_error`})]}),_jsx(_components.td,{children:`جواب بحالة HTTP المقابلة دون رمز Flock خاص به. فكل إخفاق ترسله واجهة Flock البرمجية للألعاب يحمل رمزًا، فهذه أتت من شيء في الطريق بينهما (وكيل proxy، أو صفحة تسجيل دخول إلى الشبكة، أو API URL يشير إلى خادم آخر)، ويقول الإصلاح ذلك.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`flock.unknown`})}),_jsx(_components.td,{children:`أي شيء آخر.`})]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`الإصلاح مكتوب `,_jsx(_components.strong,{children:`لك أنت`}),` لا للاعبيك — فهو يذكر استدعاءات الحزمة والإعدادات وخطوات لوحة التحكم. اعرضه في\nسجلّاتك أو في طبقة التصحيح لديك، واكتب نصًّا منفصلًا موجّهًا للاعبين. وفي GDScript، يعطي\n`,_jsx(_components.code,{children:`FlockErrorHints.for_code(code)`}),` نصيحة الرمز الخاصة به، أو نصًّا فارغًا حين لا نصيحة له.`]})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`تجد المرجع الكامل للواجهة البرمجية ودليلًا لكل ميزة في\n`,_jsx(_components.a,{href:`https://github.com/QwackStack/FlockGodotSDK#readme`,children:`ملف README الخاص بالحزمة`}),`.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"حزمة تطوير Godot","description":"أضف Flock إلى لعبتك في Godot عبر الإضافة الرسمية — من GDScript أو من C#.","href":"/ar/sdk/godot"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"المتطلّبات","slug":"requirements","depth":2,"children":[]},{"title":"الإعداد","slug":"setup","depth":2,"children":[]},{"title":"أول استدعاء لك","slug":"your-first-call","depth":2,"children":[]},{"title":"التهيئة","slug":"initialization","depth":2,"children":[]},{"title":"GDScript وC#","slug":"gdscript-and-c#","depth":2,"children":[]},{"title":"صادِق لاعبًا","slug":"authenticate-a-player","depth":2,"children":[]},{"title":"اعمل مع بيانات لعبتك","slug":"work-with-your-game-data","depth":2,"children":[{"title":"الفحص في CI","slug":"checking-in-ci","depth":3,"children":[]}]},{"title":"استكشف الميزات","slug":"explore-features","depth":2,"children":[]},{"title":"الإعدادات المتقدّمة","slug":"advanced-settings","depth":2,"children":[]},{"title":"ملاحظات المنصّات","slug":"platform-notes","depth":2,"children":[]},{"title":"معالجة الأخطاء","slug":"error-handling","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/qwacks/05763fd4e1d53e37/lang-toggle.js"],"subdomain":"qwacks","siteName":"Qwacks","title":"حزمة تطوير Godot - Qwacks","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/sdk/godot","matchLevel":1},"ar":{"href":"/ar/sdk/godot","matchLevel":0}}},"lastModified":"2026-12-01T23:07:45.605Z","originalFileLocation":"ar/sdk/godot.mdx","locale":"ar"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"أضف Flock إلى لعبتك في Godot عبر الإضافة الرسمية — من GDScript أو من C#.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Qwacks\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"حزمة تطوير Godot - Qwacks\">\u003cmeta data-mint-head property=\"og:description\" content=\"أضف Flock إلى لعبتك في Godot عبر الإضافة الرسمية — من GDScript أو من C#.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Qwacks\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.qwacks.com/ar/sdk/godot\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://qwacks.mintlify.site/_mintlify/api/og/v2?division=%D8%A8%D8%AF%D8%A1+%D8%A7%D9%84%D8%A7%D8%B3%D8%AA%D8%AE%D8%AF%D8%A7%D9%85\u0026amp;title=%D8%AD%D8%B2%D9%85%D8%A9+%D8%AA%D8%B7%D9%88%D9%8A%D8%B1+Godot\u0026amp;description=%D8%A3%D8%B6%D9%81+Flock+%D8%A5%D9%84%D9%89+%D9%84%D8%B9%D8%A8%D8%AA%D9%83+%D9%81%D9%8A+Godot+%D8%B9%D8%A8%D8%B1+%D8%A7%D9%84%D8%A5%D8%B6%D8%A7%D9%81%D8%A9+%D8%A7%D9%84%D8%B1%D8%B3%D9%85%D9%8A%D8%A9+%E2%80%94+%D9%85%D9%86+GDScript+%D8%A3%D9%88+%D9%85%D9%86+C%23.\u0026amp;theme=7cf102a658812adb3feebdf0\u0026amp;signature=e8bcc5180be48805c3800595f3768e5dfa3ac7d5c691cb0a0508b56b1255de75\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"حزمة تطوير Godot - Qwacks\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"أضف Flock إلى لعبتك في Godot عبر الإضافة الرسمية — من GDScript أو من C#.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://qwacks.mintlify.site/_mintlify/api/og/v2?division=%D8%A8%D8%AF%D8%A1+%D8%A7%D9%84%D8%A7%D8%B3%D8%AA%D8%AE%D8%AF%D8%A7%D9%85\u0026amp;title=%D8%AD%D8%B2%D9%85%D8%A9+%D8%AA%D8%B7%D9%88%D9%8A%D8%B1+Godot\u0026amp;description=%D8%A3%D8%B6%D9%81+Flock+%D8%A5%D9%84%D9%89+%D9%84%D8%B9%D8%A8%D8%AA%D9%83+%D9%81%D9%8A+Godot+%D8%B9%D8%A8%D8%B1+%D8%A7%D9%84%D8%A5%D8%B6%D8%A7%D9%81%D8%A9+%D8%A7%D9%84%D8%B1%D8%B3%D9%85%D9%8A%D8%A9+%E2%80%94+%D9%85%D9%86+GDScript+%D8%A3%D9%88+%D9%85%D9%86+C%23.\u0026amp;theme=7cf102a658812adb3feebdf0\u0026amp;signature=e8bcc5180be48805c3800595f3768e5dfa3ac7d5c691cb0a0508b56b1255de75\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Qwacks\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0099FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.qwacks.com/ar/sdk/godot\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/ar/sdk/godot.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ar\" href=\"https://docs.qwacks.com/ar/sdk/godot\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.qwacks.com/sdk/godot\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.qwacks.com/sdk/godot\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.qwacks.com/#organization\",\"name\":\"Qwacks\",\"url\":\"https://docs.qwacks.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.qwacks.com#website\",\"name\":\"Qwacks\",\"url\":\"https://docs.qwacks.com\",\"publisher\":{\"@id\":\"https://docs.qwacks.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.qwacks.com/ar/sdk/godot#webpage\",\"url\":\"https://docs.qwacks.com/ar/sdk/godot\",\"name\":\"حزمة تطوير Godot\",\"description\":\"أضف Flock إلى لعبتك في Godot عبر الإضافة الرسمية — من GDScript أو من C#.\",\"dateModified\":\"2026-12-01T23:07:45.605Z\",\"isPartOf\":{\"@id\":\"https://docs.qwacks.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.qwacks.com/ar/sdk/godot#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.qwacks.com/ar/sdk/godot#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"بدء الاستخدام\",\"item\":\"https://docs.qwacks.com/ar/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"حزمة تطوير Godot\",\"item\":\"https://docs.qwacks.com/ar/sdk/godot\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.qwacks.com/ar/sdk/godot#article\",\"headline\":\"حزمة تطوير Godot\",\"name\":\"حزمة تطوير Godot\",\"description\":\"أضف Flock إلى لعبتك في Godot عبر الإضافة الرسمية — من GDScript أو من C#.\",\"url\":\"https://docs.qwacks.com/ar/sdk/godot\",\"mainEntityOfPage\":{\"@id\":\"https://docs.qwacks.com/ar/sdk/godot#webpage\"},\"dateModified\":\"2026-12-01T23:07:45.605Z\",\"publisher\":{\"@id\":\"https://docs.qwacks.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.qwacks.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Qwacks\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Qwacks\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/ar/sdk/godot.md","siteName":"Qwacks","nav":{"global":null,"languages":[{"language":"en","default":true,"pages":[{"title":"en","href":"/sdk/godot"}]},{"language":"ar","navbar":{"links":[{"href":"https://www.qwacks.com/pricing","label":"الأسعار"},{"href":"https://github.com/QwackStack/FlockUnitySdk/releases","label":"حزمة Unity"},{"href":"https://github.com/QwackStack/FlockUnrealSdk/releases","label":"حزمة Unreal"},{"href":"https://github.com/QwackStack/FlockGodotSDK/releases","label":"حزمة Godot"}],"primary":{"type":"button","label":"لوحة التحكم","href":"https://flock-saas.qwacks.com"}},"tabs":[{"tab":"Qwacks","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/qwacks.svg","pages":[{"title":"Qwacks","href":"/ar/welcome"}]},{"tab":"Flock","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/flock.svg","groups":[{"group":"بدء الاستخدام","pages":[{"title":"Flock","href":"/ar/introduction"},{"title":"البداية السريعة","href":"/ar/quickstart"},{"title":"المصادقة","href":"/ar/authentication"},{"title":"حزمة تطوير Unity","href":"/ar/sdk/unity"},{"title":"حزمة تطوير Unreal","description":"أضف Flock إلى لعبتك في Unreal Engine عبر الإضافة الرسمية — من C++ أو من Blueprint.","href":"/ar/sdk/unreal"},{"title":"حزمة تطوير Godot","href":"/ar/sdk/godot"}]},{"group":"المفاهيم","pages":[{"title":"الاستوديوهات والألعاب","description":"الكيانان الرئيسيان اللذان يُبنى حولهما كل تكامل مع Flock.","href":"/ar/concepts/studios-and-games"},{"title":"الإصدارات","href":"/ar/concepts/versions"},{"title":"اللاعبون","href":"/ar/concepts/players"}]},{"group":"الميزات","pages":[{"group":"اللاعبون","pages":[{"title":"تسجيل الدخول","href":"/ar/guides/players-and-auth"},{"title":"ربط الحسابات","href":"/ar/guides/account-linking"},{"title":"بيانات اللاعب","href":"/ar/guides/player-data"},{"title":"الحظر","href":"/ar/guides/bans"}]},{"group":"التقدّم","pages":[{"title":"الإنجازات","href":"/ar/guides/achievements"},{"title":"لوحات الصدارة","href":"/ar/guides/leaderboards"}]},{"group":"الاقتصاد والمدفوعات","pages":[{"title":"العملات والمحافظ","href":"/ar/guides/currencies-and-wallets"},{"title":"المتاجر والمخزون","href":"/ar/guides/shops-and-inventory"},{"title":"الشراء داخل التطبيق","href":"/ar/guides/real-money-purchases"},{"title":"الدفع عبر الويب","href":"/ar/guides/web-checkout"}]},{"group":"محتوى اللعبة","pages":[{"title":"الإعدادات عن بُعد","href":"/ar/guides/remote-config"},{"title":"تحديثات اللعبة","href":"/ar/guides/game-patches"},{"title":"ملفات اللعبة","href":"/ar/guides/assets"}]},{"group":"التواصل مع اللاعبين","pages":[{"title":"شرائح اللاعبين","href":"/ar/guides/segments"},{"title":"الإشعارات","href":"/ar/guides/notifications"}]},{"group":"التحليلات","pages":[{"title":"التحليلات والأحداث","href":"/ar/guides/analytics-and-events"},{"title":"تعريفات المقاييس","href":"/ar/guides/metric-definitions"},{"title":"تنبيهات المطوّرين","href":"/ar/guides/developer-alerts"}]},{"group":"اللعب الجماعي","pages":[{"title":"اللعب الجماعي","sidebarTitle":"نظرة عامة","href":"/ar/guides/multiplayer"},{"title":"الفرق","href":"/ar/guides/parties"},{"title":"مطابقة اللاعبين","href":"/ar/guides/matchmaking"},{"title":"الجلسات","href":"/ar/guides/sessions"},{"title":"اتصال اللاعبين","href":"/ar/guides/connecting-players"}]}]},{"group":"المرجع","pages":[{"title":"سجل التغييرات","href":"/ar/changelog"}]}]},{"tab":"Protokite","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/protokite.svg","pages":[{"title":"Protokite","href":"/ar/protokite/getting-started"}]},{"tab":"Data Duck","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/data-duck.svg","pages":[{"title":"Data Duck","href":"/ar/data-duck/getting-started"}]}]}]},"basePath":"","title":"حزمة تطوير Godot - Qwacks","deploymentId":"dpl_4dgnk6TA5fUgboKHTvWWyeqm3idh","buildId":"dpl_4dgnk6TA5fUgboKHTvWWyeqm3idh","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-BhbIEdST.js","DynamicMarkdown-DoPsKgYC.js","zoom-image-lightbox-D-vTqM_C.js","lightbox-handle-r17bVUz3.js"]}