OnFogOfWarCleared
OxideCarbonPlayervoid OnFogOfWarCleared(BasePlayer basePlayer, bool mainland, bool deepSea)Работает — метод игры в этой сборке тот же, под который написан хук.
Параметры
- basePlayer
- BasePlayer
- mainland
- bool
- deepSea
- bool
Возвращаемое значение
voidВозвращаемое значение игнорируется — хук только уведомляет.
Пример
private void OnFogOfWarCleared(BasePlayer basePlayer, bool mainland, bool deepSea)
{
Puts("OnFogOfWarCleared");
}Работает и в Oxide, и в Carbon: Carbon загружает плагины Oxide без изменений.
Место встраивания
Rust.opj (Oxide)
void BasePlayer.ServerClearFog(bool, bool)
Передаёт: BasePlayer basePlayer, bool mainland, bool deepSea
РаботаетReturnBehavior: ContinueArgumentBehavior: UseArgumentString (this, a0, a1)Assembly-CSharp.dll
Где вызывается (код игры этой ветки)
// …
if (mainland)
{
ClearFogList(ref State.fogImagesMainland);
}
if (deepSea)
{
ClearFogList(ref State.fogImagesDeepSea);
}
Interface.CallHook("OnFogOfWarCleared", this, mainland, deepSea);
DirtyPlayerState();
SendFogImagesToClient();
void ClearFogList(ref List<uint> fog)
{
if (fog == null || fog.Count != 16)
{
fog = Pool.Get<PooledList<uint>>();
for (int i = 0; i < 16; i++)
// …Источники: Rust.opj из OxideMod/Oxide.Rust (MIT) и метаданные хуков документации Carbon (MIT). Код методов — декомпиляция сервера этой ветки.