WoT 1.5.0.0 では多くの mod に影響しそうな重要な変更が scripts に対して行われました。

グローバル変数 g_appLoader の削除

LobbyEntry, BattleEntry を取得するのに使用されてきた g_appLoader (gui.app_loader.g_appLoader) は削除されました。 LobbyEntry, BattleEntry はそれぞれロビーアプリケーション、バトルアプリケーションの起点となるインスタンスです。

これまでは g_appLoader を使って以下のように BattleEntry を取得できました。

from gui.shared import g_eventBus, events
from gui.app_loader import g_appLoader
from gui.app_loader.settings import APP_NAME_SPACE

def onAppInitialized(event):
    if event.ns != APP_NAME_SPACE.SF_BATTLE:
        battleEntry = None
        return
    battleEntry = g_appLoader.getDefBattleApp()

g_eventBus.addListener(events.AppLifeCycleEvent.INITIALIZED, onAppInitialized)

1.5.0.0 では dependency を使って appLoader を取得します。

from gui.shared import g_eventBus, events
from gui.app_loader.settings import APP_NAME_SPACE
from helpers import dependency
from skeletons.gui.app_loader import IAppLoader

def onAppInitialized(event):
    if event.ns != APP_NAME_SPACE.SF_BATTLE:
        battleEntry = None
        return
    appLoader = dependency.instance(IAppLoader)
    battleEntry = appLoader.getDefBattleApp()

g_eventBus.addListener(events.AppLifeCycleEvent.INITIALIZED, onAppInitialized)

クラス Flash の置き換え

SWF ファイルを取り扱うためのクラス Flash はモジュール gui.Scaleform.Flash で定義されていましたが、 gui.Scaleform.flash_wrapper に移動しました。 新しい Flash は FlashComponentWrapper のサブクラスになっています。

クラス Flash を直接使って SWF ファイルを扱っている mod は修正が必要です。

getPitchLimits の修正

シージモードでの主砲ピッチ(仰俯角)範囲の計算が、砲塔の向きや車体角度を反映したものになりました。

ログ

Vehicle で使用しているログシステムが debug_utils から logging に変更されました。