refactor(repo)!: move apps, shared packages, and patch definitions

Everything sat in packages/: two programs next to the small libraries
they use, and the patch data loose at the root. The programs now live in
apps/ and the shared libraries in packages/:

  apps/server        the local server (was packages/local-service),
                     package @wto/server
  packages/patcher   builds the game copy (was packages/build),
                     package @wto/patcher
  patches/exe        exe patch definitions (was exe-patches)
  patches/gui        GUI script patches (was gui-patches)

Inside the server, the network layer folder becomes transport/ so it is
not server/server/, the entry module is server.ts, and startLocalService
and its types become startServer, ServerOptions and RunningServer. The
health answer names the app wto-server, and the TLS files in the data
folder are server.key and server.crt (made again on the next start).
Comments, logs and tool texts say "local server".

The patcher no longer reaches into the server's folder. It read the
default tuning/store.jsonc by a relative path to register bundle GUIDs
for the multi-vehicle packs, which also ignored the player's overrides
in <data>/tuning/. It now takes the pack ids from its caller; the
server exports multiVehiclePackIds(dataFolder), which reads them the way
the running server does. rebuildGuiPack takes the patch folder from its
caller as well.

The development build moves out of the patcher to
scripts/build-game-copy.ts, since it uses both the server and the
patcher. It needs --data (the folder the server will run with) and
defaults the patch folders and the hook library to this repository.


Checked with the root typecheck, check-patches, check-gui,
check-offsets, the native build, a run of build-game-copy.ts into a
scratch folder (12 exe patches, 35 GUI patches, 496 bundle GUIDs as
before) and a server start from apps/server answering wto-server.

BREAKING CHANGE: Use @wto/server and @wto/patcher from the new workspace paths. Run the development build with scripts/build-game-copy.ts and pass --data.
This commit is contained in:
N0VAN0M4LY committed 2026-11-29 03:20:54 +08:00
1 parent 9c813ccf7d
commit 930ea07630
476 files changed
+275 -251

No files matched your search

@@ -0,0 +1,7 @@
let res = crewInfo.filter(@(v) v.country == curCountry)
if (res.len() == 1)
return res.map(
@(countryInfo) countryInfo.__merge({
crews = countryInfo.crews.map(@(crew) crew.__merge({idCountry = 0}))
})
)
@@ -0,0 +1,22 @@
// Add the extra vehicles the local server chose for a LocalMP battle (nuclear carrier, strike UCAV,
// the RandomSpawnUnits tank / SPAA / naval aircraft) to the in-battle crew list.
// Why the client: online the battle server adds them to the player's crews; a LocalMP host has no
// battle server, and the in-battle crew list comes from the native get_crew_info.
// Without it: the lineup holds only the player's own vehicles.
{
"id": "battle/append-extra-battle-slots",
"title": "Add the LocalMP battle's extra vehicles to the in-battle crew list",
"file": "scripts/slotbar/crewslist.nut",
"features": [
"K-补充载具"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,40 @@
let appendWtoExtraBattleCrews = function(baseCrews) {
let { ndbTryRead } = require("nestdb")
let wtoBattle = ndbTryRead(["wto", "activeBattle"])
let extraSlots = wtoBattle?.extraBattleSlots
if (extraSlots == null || extraSlots.len() == 0)
return baseCrews
if ((wtoBattle?.country ?? "") != "" && wtoBattle.country != curCountry)
return baseCrews
let merged = [].extend(baseCrews)
foreach (idx, slot in extraSlots) {
if (merged.len() >= 32)
break
let unitName = slot?.unitName ?? ""
if (unitName == "")
continue
merged.append({
id = -1 - idx
idCountry = 0
idInCountry = merged.len()
country = curCountry
aircraft = unitName
isEmpty = 0
trainedSpec = { [unitName] = 2 }
trained = [unitName]
skillPoints = 0
lockedTillSec = 0
isLocked = 0
})
}
return merged
}
let res = crewInfo.filter(@(v) v.country == curCountry)
if (res.len() == 1)
return res.map(
@(countryInfo) countryInfo.__merge({
crews = appendWtoExtraBattleCrews(
countryInfo.crews.map(@(crew) crew.__merge({idCountry = 0}))
)
})
)
@@ -0,0 +1,7 @@
function getForcedUnitWeapon(unit) {
let groupName = this.getRandomUnitsGroupName(unit.name)
if (groupName == null)
return this.missionParams?.editSlotbar[unit.shopCountry][unit.name]["forceWeapon"]
return getRandomUnitsForceWeapon(getEventEconomicName(getRoomEvent()), unit.name)
}
@@ -0,0 +1,22 @@
// Lock the weapon preset the local server set for an extra LocalMP vehicle (the nuclear carrier's
// bomb, the RandomSpawnUnits forceWeapon of a naval extra aircraft).
// Why the client: online the battle server sends the extra vehicles with their weapon; on a LocalMP
// host the local server chooses them, and getForcedUnitWeapon only knows mission and room data.
// Without it: the extra vehicles spawn with whatever preset the respawn screen picks.
{
"id": "battle/force-extra-slot-weapons",
"title": "Lock the weapon presets of LocalMP extra vehicles",
"file": "scripts/miscustomrules/rulebase.nut",
"features": [
"K-补充载具"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,12 @@
function getForcedUnitWeapon(unit) {
// WTOffline: the extra vehicles the local server added to a LocalMP lineup carry their forced
// weapon (nuclear carrier, RandomSpawnUnits forceWeapon); online the battle server sends it.
foreach (wtoSlot in (require("nestdb").ndbTryRead(["wto", "activeBattle"])?.extraBattleSlots ?? []))
if (wtoSlot?.unitName == unit.name && (wtoSlot?.forceWeapon ?? "") != "")
return wtoSlot.forceWeapon
let groupName = this.getRandomUnitsGroupName(unit.name)
if (groupName == null)
return this.missionParams?.editSlotbar[unit.shopCountry][unit.name]["forceWeapon"]
return getRandomUnitsForceWeapon(getEventEconomicName(getRoomEvent()), unit.name)
}
@@ -0,0 +1,4 @@
matchingApiFunc("match.enqueue", cb, params)
}
matchingRpcSubscribe("match.notify_clusters_changed", onClustersChanged)
@@ -0,0 +1,24 @@
// Start a local battle pushed by the local server: rebuild the mission settings it sends and host
// the battle as an in-process LocalMP session (select_training_mission + guiStartFlight).
// Why the client: the stock queue only ever joins a remote room (connect_to_host_list, peer mode);
// nothing in it enters LocalMP, so no answer from the service can start a hosted battle.
// Without it: "To Battle!" queues forever.
{
"id": "battle/launch-local-battle-from-queue",
"title": "Launch local authoritative multiplayer battle on queue notification",
"file": "scripts/matching/servicenotifications/match.nut",
"features": [
"J-陆战 街机 / 历史",
"J-空战 街机 / 历史",
"J-海战 街机 / 历史"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,75 @@
matchingApiFunc("match.enqueue", cb, params)
}
// WTOffline: rebuild a DataBlock sent by the local server as { p = [[name, type, value]], b = [[name, node]] }.
// The type ("t", "i", "r", "b") travels with each value because the engine reads ints and reals with typed getters.
function wtoBlkFromWire(blk, node) {
foreach (param in (node?.p ?? [])) {
let [name, kind, value] = param
blk[name] <- kind == "i" ? value.tointeger()
: kind == "r" ? value.tofloat()
: kind == "b" ? value == true
: value.tostring()
}
foreach (child in (node?.b ?? []))
wtoBlkFromWire(blk.addNewBlock(child[0]), child[1])
return blk
}
// WTOffline: start a local battle pushed by the local server (mrpc.generic_notify, from = "wto_battle").
// The service sends the complete mission settings; the client hosts the battle as a LocalMP session.
function onWtoBattleNotify(ev) {
if (ev?.func != "launch" || isInFlight())
return
let DataBlock = require("DataBlock")
let { ndbWrite, ndbExists, ndbDelete } = require("nestdb")
let guiMis = require("guiMission")
let { set_game_mode } = require("mission")
let { GM_DOMINATION } = require("%globalScripts/gameModeNativeConsts.nut")
let { reset_cur_mission_mode } = require("%appGlobals/ranks_common_shared.nut")
let { notifyQueueLeave } = require("%scripts/queue/queueManager.nut")
let destroySessionScripted = require("%scripts/matchingRooms/destroySessionScripted.nut")
let { invalidateCrewsList } = require("%scripts/slotbar/crewsList.nut")
let { guiStartFlight } = require("%scripts/missions/startMissionsList.nut")
let { currentCampaignMission } = require("%scripts/missions/missionsStates.nut")
let lobbyStates = require("%scripts/matchingRooms/lobbyStates.nut")
let { setSessionLobbySettings, switchSessionLobbyStatus } = require("%scripts/matchingRooms/sessionLobbyManager.nut")
notifyQueueLeave({})
destroySessionScripted("on start wto local battle")
ndbWrite(["wto", "activeBattle"], ev.battle)
if (ndbExists(["wto", "battleLog"]))
ndbDelete(["wto", "battleLog"])
invalidateCrewsList(true)
let misBlk = wtoBlkFromWire(DataBlock(), ev.mission)
misBlk._gameMode = GM_DOMINATION
let lobby = ev.lobby
lobby.mission._gameMode <- GM_DOMINATION
currentCampaignMission.set(misBlk.name)
set_game_mode(GM_DOMINATION)
setSessionLobbySettings(lobby, true, false)
switchSessionLobbyStatus(lobbyStates.IN_SESSION)
reset_cur_mission_mode()
guiMis.select_training_mission(misBlk)
reset_cur_mission_mode()
guiStartFlight()
}
// WTOffline: forget the battle record when the session ends outside a battle (left before loading).
require("%sqStdLibs/helpers/subscriptions.nut").addListenersWithoutEnv({
SessionDestroyed = function(_p) {
if (!isInFlight()) {
let { ndbExists, ndbDelete } = require("nestdb")
if (ndbExists(["wto", "activeBattle"])) {
ndbDelete(["wto", "activeBattle"])
require("%scripts/slotbar/crewsList.nut").invalidateCrewsList(true)
}
}
}
})
require("%scripts/matching/serviceNotifications/mrpc.nut").mnSubscribe("wto_battle", onWtoBattleNotify)
matchingRpcSubscribe("match.notify_clusters_changed", onClustersChanged)
@@ -0,0 +1,7 @@
function getCurRank(event) {
if (isInSquad())
return getRecentSquadMrank()
let unit = getPlayerCurUnit()
return unit == null ? null : getEffectiveMrank(unit, events.getEDiffByEvent(event))
}
@@ -0,0 +1,21 @@
// Decide the extra game modes (night battles and the like) by the lineup's battle rating, also out of a squad.
// Why the client: 2.61.0.37 scripts/events/secondGameModesUtils.nut uses the matching server's
// battle rating only in a squad and the selected vehicle otherwise; the live game uses the lineup.
// Without it: the extra modes follow whichever vehicle is selected.
{
"id": "battle/lineup-br-for-submodes",
"title": "Decide extra game modes by the matching server's lineup battle rating",
"file": "scripts/events/secondgamemodesutils.nut",
"features": [
"J-附加子模式"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,10 @@
function getCurRank(event) {
// WTOffline: also out of a squad, use the battle rating the matching server computed for the
// lineup (wtmm_static.calc_ranks, answered by the local server with the lineup's highest
// rank), as the live game decides the extra modes by the whole lineup.
if (isInSquad() || getRecentSquadMrank() >= 0)
return getRecentSquadMrank()
let unit = getPlayerCurUnit()
return unit == null ? null : getEffectiveMrank(unit, events.getEDiffByEvent(event))
}
@@ -0,0 +1,2 @@
registerRespondent("get_spawn_score_type_mul", get_spawn_score_type_mul)
registerRespondent("get_unit_spawn_score_weapon_mul", get_unit_spawn_score_weapon_mul)
@@ -0,0 +1,22 @@
// Supply the missing get_max_spawn_score and get_unit_spawn_score callbacks from the battle launch plan.
// Fixed support costs (customSpawnScore/persistent_costs) ignore the current weapon multiplier.
// Why the client: on a dedicated server these callbacks are server scripts; a LocalMP host has none.
// Without it: LocalMP ground realistic starts with zero points and has no base vehicle costs.
// aces.exe 2.61.0.37: initSpawnScoreFunction at 0x2e4559, getSpawnScoreFunction at 0x2e2463.
{
"id": "battle/local-host-spawn-score",
"title": "Register the LocalMP host's spawn score callbacks",
"file": "scripts/respawn/respawnstate.nut",
"features": [
"K-出生点数 / 重生"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,15 @@
let { ndbTryRead } = require("nestdb")
let wtoSpawnScore = @() ndbTryRead(["wto", "activeBattle"])?.spawnScore
function wtoUnitSpawnScoreWeaponMul(unitname, weapon, bulletArray, presetTbl = {}) {
let { get_current_mission_info_cached } = require("blkGetters")
let persistentCost = get_current_mission_info_cached()?.customSpawnScore?.persistent_costs?[unitname] ?? 0
if (persistentCost > 0)
return 1.0
return get_unit_spawn_score_weapon_mul(unitname, weapon, bulletArray, presetTbl)
}
registerRespondent("get_max_spawn_score", @(_userId, _maxRank) wtoSpawnScore()?.maxScore ?? 0)
registerRespondent("get_unit_spawn_score", @(_userId, unitName, _unitRank) wtoSpawnScore()?.unitCosts?[unitName] ?? 0)
registerRespondent("get_spawn_score_type_mul", get_spawn_score_type_mul)
registerRespondent("get_unit_spawn_score_weapon_mul", wtoUnitSpawnScoreWeaponMul)
@@ -0,0 +1 @@
if ((filter?.currentRoomOnly ?? false) && !is_user_log_for_current_room(idx))
@@ -0,0 +1 @@
function isUserlogVisible(blk, filter, idx) {
@@ -0,0 +1,29 @@
// Let the debriefing of a settled LocalMP battle find that battle's logs: session result, awards,
// research breakdown, boosters and wager.
// Why the client: every "this battle's logs" query goes through is_user_log_for_current_room
// (aces.exe 2.61.0.37 0x1799d30), which compares with the matching room id or GameSaveData+0x3f370;
// a LocalMP host is in no matching room, so nothing matches.
// Without it: the debriefing shows no research breakdown, awards, used boosters or wager stage.
{
"id": "battle/match-settled-battle-room-logs",
"title": "Match the logs of a settled LocalMP battle by its room id",
"file": "scripts/userlog/userlogutils.nut",
"features": [
"L-结算页",
"G-加成道具",
"H-合同 / 赌注"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
},
{
"find": "find-room-check.nut",
"replace": "replace-room-check.nut"
}
]
}
@@ -0,0 +1 @@
if ((filter?.currentRoomOnly ?? false) && !isLogOfCurrentRoom(blk, idx))
@@ -0,0 +1,9 @@
// WTOffline: while the debriefing of a settled LocalMP battle is gathered, nestdb wto.settled names
// the battle's room (written by report-local-battle-settlement). The client is in no matching
// room, so is_user_log_for_current_room cannot match that room's logs; match them by room id.
function isLogOfCurrentRoom(blk, idx) {
let settledRoomId = require("nestdb").ndbTryRead(["wto", "settled"])?.roomId
return settledRoomId != null ? blk?.roomId == settledRoomId : is_user_log_for_current_room(idx)
}
function isUserlogVisible(blk, filter, idx) {
@@ -0,0 +1,41 @@
function requestAircraftAndWeapon(requestData) {
if (this.requestInProgress)
return
set_aircraft_accepted_cb(this, this.aircraftAcceptedCb);
let _taskId = requestAircraftAndWeaponWithSpare(requestData, requestData.idInCountry,
requestData.respBaseId, requestData.spareUid)
if (_taskId < 0)
set_aircraft_accepted_cb(null, null);
else {
this.requestInProgress = true
this.showTaskProgressBox(loc("charServer/purchase0"), function() { this.requestInProgress = false })
this.lastRequestData = requestData
}
}
function requestChangeUnitSilent() {
let unit = this.getCurSlotUnit()
if (!unit?.isHuman() || !this.canChangeAircraft || this.isApplyPressed) {
this.isSilentRequestPending = false
return
}
this.isSilentRequestPending = this.requestInProgress || !canRequestAircraftNow()
if (this.isSilentRequestPending)
return
let requestData = this.getSelectedRequestData(true)
if (!requestData)
return
set_aircraft_accepted_cb(this, this.silentAircraftAcceptedCb);
let _taskId = requestAircraftAndWeaponWithSpare(requestData, requestData.idInCountry,
requestData.respBaseId, requestData.spareUid)
if (_taskId < 0)
set_aircraft_accepted_cb(null, null);
else {
this.requestInProgress = true
this.lastRequestData = requestData
}
}
@@ -0,0 +1,22 @@
// Send the vehicle's enabled and disabled modifications with every LocalMP spawn request, and count
// backup vehicles used for the settlement.
// Why the client: the battle server would read the modifications from the profile; on a LocalMP host
// the native spawn receiver (wto_ws.dll local_mp_loadout.c) only gets what this request carries.
// Without it: every spawned vehicle is stock (no fire extinguisher, smoke, repair kit, upgrades).
{
"id": "battle/pass-spawn-modifications-blk",
"title": "Pass enabled modifications and extra-slot loadout on LocalMP spawn",
"file": "scripts/respawn/respawn.nut",
"features": [
"K-出生点数 / 重生"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,87 @@
function sendWtoAircraftAndWeaponRequest(requestData, isSilent = false) {
let wtoNdb = require("nestdb")
if (!wtoNdb.ndbExists(["wto", "activeBattle"]))
return requestAircraftAndWeaponWithSpare(requestData, requestData.idInCountry,
requestData.respBaseId, requestData.spareUid)
let wtoBattle = wtoNdb.ndbTryRead(["wto", "activeBattle"])
let wtoGuiRespawn = require("guiRespawn")
let wtoChardRes = require("chardResearch")
let wtoUnitName = requestData?.name ?? ""
local wtoExtraSlot = null
foreach (slot in (wtoBattle?.extraBattleSlots ?? [])) {
if (slot?.unitName == wtoUnitName) {
wtoExtraSlot = slot
break
}
}
if ((wtoExtraSlot?.forceWeapon ?? "") != "")
requestData.weapon = wtoExtraSlot.forceWeapon
let wtoSlotMods = wtoExtraSlot?.modifications ?? []
let wtoUnit = getAircraftByName(wtoUnitName) ?? this.getCurSlotUnit()
let wtoEnabledMods = []
let wtoDisabledMods = []
foreach (wtoMod in (wtoUnit?.getModifications() ?? [])) {
let wtoModName = wtoMod?.name ?? ""
if (wtoModName == "")
continue
let wtoIsEnabled = wtoExtraSlot == null
? wtoChardRes.shopIsModificationEnabled(wtoUnitName, wtoModName)
: (wtoExtraSlot?.allModifications == true || wtoSlotMods.contains(wtoModName))
if (wtoIsEnabled)
wtoEnabledMods.append(wtoModName)
else if (wtoExtraSlot == null && wtoChardRes.shopIsModificationPurchased(wtoUnitName, wtoModName))
wtoDisabledMods.append(wtoModName)
}
let wtoBlk = DataBlock()
wtoBlk.enabledMods = ";".join(wtoEnabledMods)
wtoBlk.disabledMods = ";".join(wtoDisabledMods)
wtoBlk.isSilentPreview = isSilent ? "1" : "0"
if (!isSilent && (requestData?.spareUid ?? "") != "" && wtoUnitName != "") {
let prevSpares = wtoBattle?.usedSpares ?? {}
prevSpares[wtoUnitName] <- (prevSpares?[wtoUnitName] ?? 0) + 1
wtoBattle.usedSpares <- prevSpares
wtoNdb.ndbWrite(["wto", "activeBattle"], wtoBattle)
}
return wtoGuiRespawn.requestAircraftAndWeaponWithSlots(requestData, requestData.idInCountry,
requestData.respBaseId, requestData.spareUid, wtoBlk, DataBlock())
}
function requestAircraftAndWeapon(requestData) {
if (this.requestInProgress)
return
set_aircraft_accepted_cb(this, this.aircraftAcceptedCb);
let _taskId = this.sendWtoAircraftAndWeaponRequest(requestData, false)
if (_taskId < 0)
set_aircraft_accepted_cb(null, null);
else {
this.requestInProgress = true
this.showTaskProgressBox(loc("charServer/purchase0"), function() { this.requestInProgress = false })
this.lastRequestData = requestData
}
}
function requestChangeUnitSilent() {
let unit = this.getCurSlotUnit()
if (!unit?.isHuman() || !this.canChangeAircraft || this.isApplyPressed) {
this.isSilentRequestPending = false
return
}
this.isSilentRequestPending = this.requestInProgress || !canRequestAircraftNow()
if (this.isSilentRequestPending)
return
let requestData = this.getSelectedRequestData(true)
if (!requestData)
return
set_aircraft_accepted_cb(this, this.silentAircraftAcceptedCb);
let _taskId = this.sendWtoAircraftAndWeaponRequest(requestData, true)
if (_taskId < 0)
set_aircraft_accepted_cb(null, null);
else {
this.requestInProgress = true
this.lastRequestData = requestData
}
}
@@ -0,0 +1,2 @@
if (is_multiplayer())
return leave_mp_session()
@@ -0,0 +1,22 @@
// Leave a LocalMP battle from the respawn or spectator screen to the debriefing (quitMission in starthud.nut).
// Why the client: quitMission calls leave_mp_session for every multiplayer session, and the native
// leave_mp_session (0x17909a0) returns at once on a host.
// Without it: "Return to hangar" on the respawn or spectator screen does nothing.
// Kept from the baseline; not re-reviewed in the LocalMP rework.
{
"id": "battle/quit-local-host-spectator-to-debriefing",
"title": "Quit a LocalMP battle from the respawn screen to the debriefing",
"file": "scripts/hud/starthud.nut",
"features": [
"L-结算页"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,2 @@
if (is_multiplayer() && !require("multiplayer").is_mplayer_host())
return leave_mp_session()
@@ -0,0 +1,29 @@
function sendDisconnectMessage() {
broadcastEvent("PlayerQuitMission")
if (is_multiplayer()) {
leave_mp_session()
this.onResumeRaw()
}
else
this.quitToDebriefing()
}
function quitToDebriefing() {
disableOrders()
quit_to_debriefing()
interrupt_multiplayer(true)
HudBattleLog.reset()
this.onResumeRaw()
}
function onQuitMission(_obj) {
if (is_offline_version() && !ludeo?.is_running())
return restart_mission()
if (is_replay_playing()) {
this.quitToDebriefing()
}
else if (get_mission_status() == MISSION_STATUS_RUNNING) {
local text = ""
if (is_mplayer_host())
text = loc("flightmenu/questionQuitMissionHost")
@@ -0,0 +1,23 @@
// In a LocalMP random battle show the normal quit confirmation (crews left, early leave) instead of the
// custom-room host warning, and quit to the debriefing on confirm (flightmenu.nut).
// Why the client: the flight menu tests is_mplayer_host before GM_DOMINATION, and the native
// leave_mp_session (0x17909a0) returns at once on a host.
// Without it: Esc -> Return to hangar shows the host warning and cannot leave the battle.
// Kept from the baseline; not re-reviewed in the LocalMP rework.
{
"id": "battle/quit-local-host-to-debriefing",
"title": "Quit a LocalMP battle from the flight menu to the debriefing",
"file": "scripts/flightmenu/flightmenu.nut",
"features": [
"L-结算页"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,31 @@
function sendDisconnectMessage() {
broadcastEvent("PlayerQuitMission")
if (is_multiplayer() && !is_mplayer_host()) {
leave_mp_session()
this.onResumeRaw()
}
else
this.quitToDebriefing()
}
function quitToDebriefing() {
disableOrders()
quit_to_debriefing()
interrupt_multiplayer(true)
// The LocalMP debriefing can still show this log after the host has stopped.
if (require("nestdb").ndbTryRead(["wto", "activeBattle"]) == null)
HudBattleLog.reset()
this.onResumeRaw()
}
function onQuitMission(_obj) {
if (is_offline_version() && !ludeo?.is_running())
return restart_mission()
if (is_replay_playing()) {
this.quitToDebriefing()
}
else if (get_mission_status() == MISSION_STATUS_RUNNING) {
local text = ""
if (is_mplayer_host() && get_game_mode() != GM_DOMINATION)
text = loc("flightmenu/questionQuitMissionHost")
@@ -0,0 +1,24 @@
g_mis_loading_state.isReadyToShowRespawn <- function isReadyToShowRespawn() {
return (getCurState() & MIS_LOAD.RESPAWN_DATA_LOADED) == MIS_LOAD.RESPAWN_DATA_LOADED
}
g_mis_loading_state.isCrewsListReceived <- function isCrewsListReceived() {
return (getCurState() & MIS_LOAD.ECONOMIC_STATE) != 0
}
g_mis_loading_state.onEventUpdateEsFromHost <- function onEventUpdateEsFromHost(_p) {
if (getCurState() & MIS_LOAD.ECONOMIC_STATE)
return
log("misLoadState: received initial economicState")
setCurState(getCurState() | MIS_LOAD.ECONOMIC_STATE)
this.checkRespawnBases()
}
g_mis_loading_state.onEventLoadingStateChange <- function onEventLoadingStateChange(_p) {
if (!isInFlight()) {
if (getCurState() != 0)
log("misLoadState: reset mision loading state")
setCurState(0)
}
}
@@ -0,0 +1,22 @@
// Mark the economic state ready on a LocalMP host and re-check the spawn bases, so the respawn screen opens.
// Why the client: misloadingstate.nut waits for on_update_es_from_host, which only the battle server's sync
// packet raises; a LocalMP host sends no such packet to itself.
// Without it: the battle stays on "Waiting for the server..." and the crew list never appears.
// Kept from the baseline; not re-reviewed in the LocalMP rework.
{
"id": "battle/ready-local-host-respawn",
"title": "Open the respawn screen on a LocalMP host",
"file": "scripts/respawn/misloadingstate.nut",
"features": [
"K-出生点数 / 重生"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,40 @@
function syncWtoLocalHostLoadingState() {
if (!isInFlight() || !require("multiplayer").is_mplayer_host())
return
if (!(getCurState() & MIS_LOAD.ECONOMIC_STATE))
setCurState(getCurState() | MIS_LOAD.ECONOMIC_STATE)
if (!(getCurState() & MIS_LOAD.RESPAWN_BASES)) {
g_mis_loading_state.checkRespawnBases()
if (getCurState() & MIS_LOAD.RESPAWN_BASES)
require("dagor.workcycle").defer(@() broadcastEvent("ChangedMissionRespawnBasesStatus"))
}
}
g_mis_loading_state.isReadyToShowRespawn <- function isReadyToShowRespawn() {
syncWtoLocalHostLoadingState()
return (getCurState() & MIS_LOAD.RESPAWN_DATA_LOADED) == MIS_LOAD.RESPAWN_DATA_LOADED
}
g_mis_loading_state.isCrewsListReceived <- function isCrewsListReceived() {
syncWtoLocalHostLoadingState()
return (getCurState() & MIS_LOAD.ECONOMIC_STATE) != 0
}
g_mis_loading_state.onEventUpdateEsFromHost <- function onEventUpdateEsFromHost(_p) {
if (getCurState() & MIS_LOAD.ECONOMIC_STATE)
return
log("misLoadState: received initial economicState")
setCurState(getCurState() | MIS_LOAD.ECONOMIC_STATE)
this.checkRespawnBases()
}
g_mis_loading_state.onEventLoadingStateChange <- function onEventLoadingStateChange(_p) {
if (!isInFlight()) {
if (getCurState() != 0)
log("misLoadState: reset mision loading state")
setCurState(0)
}
else
syncWtoLocalHostLoadingState()
}
@@ -0,0 +1,3 @@
return {
g_hud_reward_message
}
@@ -0,0 +1,26 @@
// Record the local player's lives, combat events, the battle's kill log and how the battle ended
// in a LocalMP battle, show the reward banner, and pass each fact to the local server live to
// show the battle awards (streaks) it completes.
// Why the client: online the battle server prices each event, judges the awards and sends both
// banners (packet 0xb03d, streak messages); a LocalMP host has no battle server, so the native
// bridge reports the facts as the HUD event "wtoLocalMpExpEvent" and only the client sees spawns,
// deaths and the kill log.
// Without it: no reward or award banners in battle and nothing to settle after it.
{
"id": "battle/record-local-battle-awards",
"title": "Record LocalMP battle facts and show their reward and award banners",
"file": "scripts/hud/hudrewardmessage.nut",
"features": [
"K-击杀、助攻、占点计分",
"L-战斗奖章"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,194 @@
// WTOffline: record the local player's lives and combat events in a LocalMP battle and show the
// reward banner. A LocalMP host has no battle server to price events: the native bridge raises the
// HUD event "wtoLocalMpExpEvent" with the facts, the banner amount comes from the parameters the
// local server sent at launch (nestdb wto.activeBattle.awards, battle-economy.ts BannerParams), and
// the record (nestdb wto.battleLog) is settled by the local server after the battle.
// Each fact is also sent to the local server as it happens (matching request wto_battle.fact);
// the battle awards (streaks) it completed come back and are shown with the stock award banner,
// as the battle server's award messages are online.
function wtoShowLiveStreaks(resp) {
let streaks = resp?.streaks ?? []
if (streaks.len() == 0)
return
let { add_streak_message, getLocForStreak } = require("%scripts/streaks.nut")
let { SNT_MY_STREAK_HEADER } = require("%globalScripts/battleMetaConsts.nut")
let { HUD_MSG_STREAK } = require("hudMessages")
let { g_hud_event_manager } = require("%scripts/hud/hudEventManager.nut")
let localId = require("mission").get_local_mplayer()?.id ?? -1
foreach (streak in streaks) {
let stageParam = streak?.stageParam ?? 0
add_streak_message({
header = getLocForStreak(SNT_MY_STREAK_HEADER, streak.id, stageParam)
wp = streak?.wp ?? 0
exp = streak?.exp ?? 0
id = streak.id
})
g_hud_event_manager.onHudEvent("HudMessage", { type = HUD_MSG_STREAK, unlockId = streak.id, stage = stageParam, playerId = localId })
}
}
function wtoSendLiveFact(kind, fact) {
let battle = require("nestdb").ndbTryRead(["wto", "activeBattle"])
if (battle == null)
return
let { matchingApiFunc } = require("%scripts/matching/api.nut")
matchingApiFunc("wto_battle.fact", wtoShowLiveStreaks, fact.__merge({
sessionId = battle.sessionId
kind
localPlayerId = require("mission").get_local_mplayer()?.id ?? -1
localTeam = require("mission").get_mp_local_team()
}))
}
function wtoAppendBattleLog(key, entry) {
let { ndbTryRead, ndbWrite } = require("nestdb")
let list = (ndbTryRead(["wto", "battleLog", key]) ?? []).map(@(v) v)
list.append(entry)
ndbWrite(["wto", "battleLog", key], list)
}
function wtoBannerReward(awards, unit, ev) {
let code = ev?.messageCode ?? -1
let isCapture = code == EXP_EVENT_CAPTURE_ZONE
let expClass = ev?.expClass ?? ""
let group = isCapture ? "own" : (awards?.groups?[expClass] ?? "ground")
let baseReward = awards?.vehicles?[unit]?[$"{code}:{group}"]
if (baseReward == null)
return null
let ai = (isCapture || (ev?.victimIsPlayer ?? 0) != 0) ? 1.0 : awards.aiKillK
let slClass = isCapture ? 1.0 : (awards?.slClass?[expClass] ?? 1.0)
let rpClass = isCapture ? 1.0 : (awards?.rpClass?[expClass] ?? 1.0)
if ((ev?.friendly ?? 0) != 0)
return { wp = -(baseReward[0] * slClass * ai * awards.friendlyKillPenaltyMul + 0.5).tointeger(), exp = 0 }
let count = code == EXP_EVENT_UNIT_DAMAGE ? (ev?.damage ?? 0) : 1
return {
wp = (baseReward[0] * slClass * ai * count + 0.5).tointeger()
exp = (baseReward[1] * rpClass * ai * count + 0.5).tointeger()
}
}
function wtoOnLocalMpExpEvent(ev) {
let { ndbTryRead } = require("nestdb")
let battle = ndbTryRead(["wto", "activeBattle"])
if (battle == null)
return
let wtoMission = require("mission")
let unit = ndbTryRead(["wto", "battleLog", "openLife"])?.unit ?? require("unit").get_player_unit_name()
let entry = {
time = wtoMission.get_mission_time()
unit
code = ev?.messageCode ?? -1
expClass = ev?.expClass ?? ""
victim = ev?.victim ?? ""
victimIsPlayer = (ev?.victimIsPlayer ?? 0) != 0
friendly = (ev?.friendly ?? 0) != 0
modifier = ev?.messageModifier ?? ""
damage = ev?.damage ?? 0
}
wtoAppendBattleLog("events", entry)
wtoSendLiveFact("event", entry)
let reward = wtoBannerReward(battle?.awards, unit, ev)
if (reward == null)
return
let { g_hud_event_manager } = require("%scripts/hud/hudEventManager.nut")
g_hud_event_manager.onHudEvent("InBattleReward", {
messageCode = ev?.messageCode ?? -1
warpoints = reward.wp
experience = reward.exp
counter = 1
expClass = ev?.expClass ?? ""
messageModifier = ev?.messageModifier ?? ""
})
}
function wtoCloseBattleLife(died) {
let { ndbTryRead, ndbDelete } = require("nestdb")
let life = ndbTryRead(["wto", "battleLog", "openLife"])
if (life == null)
return
ndbDelete(["wto", "battleLog", "openLife"])
let closed = life.__merge({ end = require("mission").get_mission_time(), died })
wtoAppendBattleLog("lives", closed)
wtoSendLiveFact("life", closed)
}
function wtoOnLocalPlayerAlive(_ev) {
let { ndbExists, ndbWrite } = require("nestdb")
if (!ndbExists(["wto", "activeBattle"]))
return
wtoCloseBattleLife(false)
let unit = require("unit").get_player_unit_name()
if ((unit ?? "") != "")
ndbWrite(["wto", "battleLog", "openLife"], { unit, start = require("mission").get_mission_time() })
}
function wtoOnLocalPlayerDead(_ev) {
if (require("nestdb").ndbExists(["wto", "activeBattle"]))
wtoCloseBattleLife(true)
}
// Every kill of the HUD kill log, for the awards that depend on who killed whom (first kill,
// avenging). A message without player ids is about the local player (scripts/hud/hudBattleLog.nut).
function wtoOnHudMessage(msg) {
let { HUD_MSG_MULTIPLAYER_DMG } = require("hudMessages")
if (msg?.type != HUD_MSG_MULTIPLAYER_DMG || !(msg?.isKill ?? true))
return
if (!require("nestdb").ndbExists(["wto", "activeBattle"]))
return
let wtoMission = require("mission")
let localId = wtoMission.get_local_mplayer()?.id ?? -1
let localTeam = wtoMission.get_mp_local_team()
let killer = msg?.playerId ?? localId
let victim = msg?.victimPlayerId ?? localId
let kill = {
time = wtoMission.get_mission_time()
killer
killerTeam = msg?.team ?? (killer == localId ? localTeam : 0)
victim
victimTeam = msg?.victimTeam ?? (victim == localId ? localTeam : 0)
}
wtoAppendBattleLog("feed", kill)
wtoSendLiveFact("kill", kill)
}
// The local player's nuclear bomb exploded (raised by the native bridge, local_mp_nuke.c).
function wtoOnLocalMpNuclearStrike(_ev) {
if (!require("nestdb").ndbExists(["wto", "activeBattle"]))
return
let strike = { time = require("mission").get_mission_time() }
wtoAppendBattleLog("strikes", strike)
wtoSendLiveFact("strike", strike)
}
function wtoSubscribeBattleAwards() {
let { g_hud_event_manager } = require("%scripts/hud/hudEventManager.nut")
g_hud_event_manager.subscribe("wtoLocalMpExpEvent", wtoOnLocalMpExpEvent)
g_hud_event_manager.subscribe("LocalPlayerAlive", wtoOnLocalPlayerAlive)
g_hud_event_manager.subscribe("LocalPlayerDead", wtoOnLocalPlayerDead)
g_hud_event_manager.subscribe("HudMessage", wtoOnHudMessage)
g_hud_event_manager.subscribe("wtoLocalMpNuclearStrike", wtoOnLocalMpNuclearStrike)
}
// The local player leaves the battle, after its end (the fade to the debriefing) or from the menu
// before it. The mission still exists here and is unloaded before the debriefing opens, so this is
// where the settlement report gets the end time and the outcome, as the stock debriefing gathers
// its result on this event (debriefingFull.nut). Leaving a running battle records no outcome.
function wtoOnQuitToDebriefing(_p) {
let { ndbExists, ndbWrite } = require("nestdb")
if (!ndbExists(["wto", "activeBattle"]) || ndbExists(["wto", "battleLog", "sessionEnd"]))
return
wtoCloseBattleLife(false)
ndbWrite(["wto", "battleLog", "sessionEnd"], require("mission").get_mission_time())
let guiMis = require("guiMission")
let status = guiMis.get_mission_status()
if (status == guiMis.MISSION_STATUS_SUCCESS || status == guiMis.MISSION_STATUS_FAIL)
ndbWrite(["wto", "battleLog", "outcome"], status == guiMis.MISSION_STATUS_SUCCESS ? "win" : "lose")
}
wtoSubscribeBattleAwards()
require("%sqStdLibs/helpers/subscriptions.nut").add_event_listener("HudEventManagerReset", @(_p) wtoSubscribeBattleAwards())
require("eventbus").eventbus_subscribe("onQuitToDebriefing", wtoOnQuitToDebriefing)
return {
g_hud_reward_message
}
@@ -0,0 +1 @@
let isSingleRow = visible < 3
@@ -0,0 +1,3 @@
function guiStartDebriefingFull(params = {}) {
loadHandler(get_gui_handler("DebriefingModal"), params)
}
@@ -0,0 +1,27 @@
// Report a finished LocalMP battle to the local server (cln_wto_finish_battle) and open the
// debriefing with the statistics it settled.
// Why the client: online the battle server reports the battle to the char server by itself; on a
// LocalMP host only the client knows the battle has ended, and there is no stock char action for it.
// Without it: battles pay nothing and the debriefing stays empty.
{
"id": "battle/report-local-battle-settlement",
"title": "Report LocalMP battle facts to local server and show the settled debriefing",
"file": "scripts/debriefing/debriefingmodal.nut",
"features": [
"L-结算页",
"L-战斗奖章"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
},
{
"find": "find-summary-layout.nut",
"replace": "replace-summary-layout.nut"
}
]
}
@@ -0,0 +1 @@
let isSingleRow = this.debriefingResult?.wtoSettled == true || visible < 3
@@ -0,0 +1,125 @@
// WTOffline: report a finished LocalMP battle to the local server as facts (lives and combat events
// recorded by record-local-battle-awards, the outcome and the team scores), then build the debriefing
// from the statistics the service settled (see use-settled-debriefing-stats). The client computes
// no rewards itself.
function buildWtoBattleReport(wtoBattle, res) {
let { ndbTryRead } = require("nestdb")
let battleLog = ndbTryRead(["wto", "battleLog"]) ?? {}
let blk = DataBlock()
blk.sessionId = wtoBattle.sessionId
// Recorded when the battle ended (record-local-battle-awards); none when it was left before.
blk.outcome = battleLog?.outcome ?? "running"
blk.localTeam = (res?.localTeam ?? 1).tointeger()
blk.teamAScore = (res?.mpTblTeams?[0]?.score ?? 0).tointeger()
blk.teamBScore = (res?.mpTblTeams?[1]?.score ?? 0).tointeger()
let lives = battleLog?.lives ?? []
let sessionEnd = battleLog?.sessionEnd ?? lives.reduce(@(acc, life) life.end > acc ? life.end : acc, 0.0)
blk.sessionStart = 0.0
blk.sessionEnd = sessionEnd.tofloat()
blk.localPlayerId = (require("mission").get_local_mplayer()?.id ?? -1).tointeger()
let livesBlk = blk.addNewBlock("lives")
foreach (life in lives) {
let lifeBlk = livesBlk.addNewBlock("life")
lifeBlk.unit = life.unit
lifeBlk.start = life.start.tofloat()
lifeBlk.end = life.end.tofloat()
lifeBlk.died = life?.died ?? false
}
let feedBlk = blk.addNewBlock("feed")
foreach (kill in (battleLog?.feed ?? [])) {
let killBlk = feedBlk.addNewBlock("k")
killBlk.time = kill.time.tofloat()
foreach (key in ["killer", "killerTeam", "victim", "victimTeam"])
killBlk[key] = kill[key].tointeger()
}
// The final scoreboard, for the awards given to the best player of the battle.
let playersBlk = blk.addNewBlock("players")
foreach (player in (res?.mplayers_list ?? [])) {
let playerBlk = playersBlk.addNewBlock("p")
playerBlk.id = (player?.id ?? -1).tointeger()
playerBlk.team = (player?.team ?? 0).tointeger()
foreach (key in ["score", "kills", "groundKills", "humanKills", "navalKills", "aiKills", "aiGroundKills",
"aiNavalKills", "assists", "deaths"])
playerBlk[key] = (player?[key] ?? 0).tointeger()
}
let eventsBlk = blk.addNewBlock("events")
foreach (ev in (battleLog?.events ?? [])) {
let evBlk = eventsBlk.addNewBlock("e")
evBlk.time = ev.time.tofloat()
evBlk.unit = ev.unit
evBlk.code = ev.code.tointeger()
evBlk.expClass = ev.expClass
evBlk.victim = ev.victim
evBlk.victimIsPlayer = ev.victimIsPlayer
evBlk.friendly = ev.friendly
evBlk.modifier = ev.modifier
evBlk.damage = ev.damage.tointeger()
}
let strikesBlk = blk.addNewBlock("strikes")
foreach (strike in (battleLog?.strikes ?? [])) {
let strikeBlk = strikesBlk.addNewBlock("s")
strikeBlk.time = strike.time.tofloat()
}
let sparesBlk = blk.addNewBlock("spares")
foreach (spUnit, spCnt in (wtoBattle?.usedSpares ?? {}))
if (spUnit != "" && spCnt > 0)
sparesBlk[spUnit] = spCnt.tointeger()
return blk
}
function applyWtoSettledDebriefing(wtoBattle) {
let { ndbWrite, ndbDelete } = require("nestdb")
let sessionLog = getUserLogsList({ show = [EULT_SESSION_RESULT], disableVisible = true })
.findvalue(@(l) l?.wtoSessionId == wtoBattle.sessionId)
if (sessionLog?.wtoDebriefing == null)
return
let evObj = events.getEvent(wtoBattle?.modeName ?? "")
let roomEvent = evObj == null ? null : {
name = evObj?.name
economicName = evObj?.economicName
difficulty = evObj?.difficulty
chapter = evObj?.chapter
gameModeId = evObj?.gameModeId
}
ndbWrite(["wto", "settled"], {
exp = sessionLog.wtoDebriefing
roomId = sessionLog.roomId
win = sessionLog?.win ?? false
roomEvent
})
gatherDebriefingResult()
ndbDelete(["wto", "settled"])
}
function settleWtoBattleAndOpen(wtoBattle, params) {
let { charSendBlk } = require("chard")
let { addTask } = require("%scripts/tasker.nut")
let openModal = function() {
updateGamercards()
loadHandler(get_gui_handler("DebriefingModal"), params)
}
let onSuccess = function() {
applyWtoSettledDebriefing(wtoBattle)
openModal()
}
let taskId = charSendBlk("cln_wto_finish_battle", buildWtoBattleReport(wtoBattle, getDebriefingResult()))
if (taskId < 0 || !addTask(taskId, { showProgressBox = true, showErrorMsgBox = true }, onSuccess, @(_) openModal()))
openModal()
}
function guiStartDebriefingFull(params = {}) {
let { ndbTryRead, ndbDelete } = require("nestdb")
let wtoBattle = ndbTryRead(["wto", "activeBattle"])
if (wtoBattle != null) {
ndbDelete(["wto", "activeBattle"])
if (getDebriefingResult() == null)
gatherDebriefingResult()
let curMis = getDebriefingResult()?.missionName ?? ""
let expectedMis = wtoBattle?.missionName ?? ""
if (get_game_mode() == GM_DOMINATION && (expectedMis == "" || curMis == expectedMis)) {
settleWtoBattleAndOpen(wtoBattle, params)
return
}
}
loadHandler(get_gui_handler("DebriefingModal"), params)
}
@@ -0,0 +1,5 @@
let country = useOperatorFlagsInBattle ? unit.getOperatorCountry() : getCountryOverride(getUnitCountry(unit))
u.appendOnce(getCountryFlagSubstitute(country), countries, true)
}
return countries
}
@@ -0,0 +1,22 @@
// Show the battle's configured countries as a team's flags on the scoreboard while none of its players has a vehicle.
// Why the client: scripts/statistics/mpStatistics.nut getCountriesByTeam derives flags only from the
// players' living vehicles, which nobody has before the first spawn (offline design: the live
// game's look during the countdown cannot be checked).
// Without it: no team flags during the start countdown.
{
"id": "battle/scoreboard-team-country-flags",
"title": "Fall back to the battle's countries for scoreboard flags before anyone spawns",
"file": "scripts/statistics/mpstatistics.nut",
"features": [
"K-计分板"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,10 @@
let country = useOperatorFlagsInBattle ? unit.getOperatorCountry() : getCountryOverride(getUnitCountry(unit))
u.appendOnce(getCountryFlagSubstitute(country), countries, true)
}
if (countries.len() == 0) {
let roomKey = team == Team.B ? "country_axis" : "country_allies"
foreach (country in getSessionLobbyPublicParam(roomKey, []))
u.appendOnce(getCountryFlagSubstitute(getCountryOverride(country)), countries, true)
}
return countries
}
@@ -0,0 +1,2 @@
foreach (btnId in this.mainButtonsId) {
let buttonSelectObj = setColoredDoubleTextToButton(this.scene.findObject("nav-help"), btnId, this.applyText)
@@ -0,0 +1,22 @@
// Keep the respawn countdown in the "Cancel" button text whenever the button text is rebuilt.
// Why the client: on a LocalMP host updateApplyText (scripts/respawn/respawn.nut) runs again during
// the countdown and resets the text to "Cancel", which updateCountdown turns back into "Cancel (N s)"
// on the next frame; the trigger on the host is not yet known.
// Without it: the button flickers between "Cancel" and "Cancel (N s)" while waiting to spawn.
{
"id": "battle/stabilize-respawn-countdown-button",
"title": "Keep the respawn countdown in the rebuilt Cancel button text",
"file": "scripts/respawn/respawn.nut",
"features": [
"K-出生点数 / 重生"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,9 @@
local mainBtnText = this.applyText
if (!this.stayOnRespScreen && this.readyForRespawn && this.isApplyPressed) {
let countdown = get_mp_respawn_countdown()
if (countdown > 0)
mainBtnText = "".concat(mainBtnText, loc("ui/parentheses/space", { text = "".concat(countdown, loc("mainmenu/seconds")) }))
}
foreach (btnId in this.mainButtonsId) {
let buttonSelectObj = setColoredDoubleTextToButton(this.scene.findObject("nav-help"), btnId, mainBtnText)
@@ -0,0 +1,9 @@
debriefingResult.country <- get_local_player_country()
debriefingResult.localTeam <- get_mp_local_team()
debriefingResult.friendlyTeam <- get_player_army_for_hud()
debriefingResult.haveTeamkills <- debriefingResultHaveTeamkills()
debriefingResult.activeBoosters <- getDebriefingActiveBoosters()
debriefingResult.activeWager <- getDebriefingActiveWager()
debriefingResult.eventId <- getDebriefingEventId()
debriefingResult.chatLog <- getGameChatLogText()
debriefingResult.logForBanhammer <- getLogForBanhammer()
@@ -0,0 +1,12 @@
function gatherDebriefingResult() {
let gm = get_game_mode()
let gameType = get_game_type()
if (gm == GM_DYNAMIC)
dynamicResult = dynamicApplyStatus()
debriefingResult = {
roomUserlogs = getUserLogsList({
currentRoomOnly = true
needStackItems = false
disableVisible = true
})
@@ -0,0 +1 @@
let exp = stat_get_exp() ?? {}
@@ -0,0 +1,30 @@
// Build the debriefing of a settled LocalMP battle from the statistics table the local server
// settled, using the multiplayer state captured while leaving the battle.
// Why the client: the debriefing reads stat_get_exp() (aces.exe 0x1053b70, the battle's
// SessionStatsNet), which online the battle server fills; a LocalMP host has no battle server.
// Without it: the debriefing shows no rewards or activity.
{
"id": "battle/use-settled-debriefing-stats",
"title": "Use the local server's settled battle in the LocalMP debriefing",
"file": "scripts/debriefing/debriefingfull.nut",
"features": [
"L-结算页"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find-gather.nut",
"replace": "replace-gather.nut"
},
{
"find": "find.nut",
"replace": "replace.nut"
},
{
"find": "find-after-exp.nut",
"replace": "replace-after-exp.nut"
}
]
}
@@ -0,0 +1,4 @@
debriefingResult.haveTeamkills <- debriefingResultHaveTeamkills()
debriefingResult.activeBoosters <- getDebriefingActiveBoosters()
debriefingResult.activeWager <- getDebriefingActiveWager()
debriefingResult.eventId <- getDebriefingEventId()
@@ -0,0 +1,12 @@
function getDebriefingRoomLogs() {
return getUserLogsList({ currentRoomOnly = true, needStackItems = false, disableVisible = true })
}
function gatherDebriefingFlightState() {
let gm = get_game_mode()
let gameType = get_game_type()
if (gm == GM_DYNAMIC)
dynamicResult = dynamicApplyStatus()
debriefingResult = {
roomUserlogs = getDebriefingRoomLogs()
@@ -0,0 +1,20 @@
debriefingResult.country <- get_local_player_country()
debriefingResult.localTeam <- get_mp_local_team()
debriefingResult.friendlyTeam <- get_player_army_for_hud()
debriefingResult.chatLog <- getGameChatLogText()
debriefingResult.logForBanhammer <- getLogForBanhammer()
}
function gatherDebriefingResult() {
let wtoSettled = require("nestdb").ndbTryRead(["wto", "settled"])
if (wtoSettled == null || debriefingResult == null)
gatherDebriefingFlightState()
if (wtoSettled != null) {
// The LocalMP host and its player table are gone by the time the service replies.
debriefingResult.roomUserlogs = getDebriefingRoomLogs()
debriefingResult.roomEvent = debriefingResult.roomEvent ?? wtoSettled.roomEvent
debriefingResult.isSucceed = wtoSettled.win
debriefingResult.wtoSettled <- true
}
let gameType = debriefingResult.gameType
let exp = wtoSettled != null ? u.copy(wtoSettled.exp) : (stat_get_exp() ?? {})
@@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBKDANBgkqhkiG9w0BAQEFAAOCARUAMIIBEAKCAQcAy9WagPn8/uLbbPHebobA
ftDiwrGpi23Ed0fQsSCZfGYupBkYl3mZD3fgOMgmLSYsTqFHDe0CMTQKpHYGFfT3
EuvTHKwwyo2ckpaLNI/flZysDXRuoWXvwd6FzGBx3l2/I1Yw+cAle/aWB9YZnQtX
fy3j3k/fJfiv7+72Sm95h3Dg715XuBILC4vSYVqvCn+UlQyrJkAZrIahWR9Gzsm6
ovxSaduvosn83Hx1ZixD+U5wcn1hoTT0niwnrqiPuEUV3wC887JIR4KzMXYpyzvF
nEhlqTKoGN7oGS7vqN4tCH6/l3hAomxfVGT+5UHGugQEauNqccYq44Hfu3t3tY1r
j+eTYc35NQIDAQAB
-----END PUBLIC KEY-----
@@ -0,0 +1,23 @@
// Replace the inventory content-signing public key with the local server's key; native verification stays on.
// Why the client: the key is hard-coded in the script and the service cannot sign with Gaijin's private key.
// Without it: GetItemDefsClient fails CONTENT_SIGN_VALIDATION_FAILED and every external item definition is dropped.
{
"id": "inventory/local-content-public-key",
"title": "外部库存内容验签公钥替换为本地服务的固定公钥",
"file": "scripts/inventory/inventorycontentsign.nut",
"features": [
"G-市场",
"H-补给箱",
"H-物品回收与合成",
"H-兑换券"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5U86nI/1f8us73a5Tn8K
NjcrWyT6oZzz18uC4eH4LM+VaIJlGvzA0UWMMv8/otX+u8M3wBl/uONv39wc382d
eKxTPmo0gWb1cwZ8SeqNUvQJl5HxD0zSPlA2LbQFwoA3aI4nSYcaFV7at7XGph/N
HdYbtSCJei0N7hiqWeeIHcSYjZpmBk5KUs/E+OODquII5liol5LiC9AnvFCVHcT4
1mliTgdHt/LKiLbc0AoVCDHdVMBPEPuZAn9MQJpfIPJdexU8Hzn4xBQ9K2NyISYS
7eRwxratNPdNUHixaw6tyuUCDEV2ELAYw5rwoaFsqP7M76SubBRZObZ8DUgsZZaE
lQIDAQAB
-----END PUBLIC KEY-----
@@ -0,0 +1,18 @@
let taskCallback = function() {
let item = findItemByUid(uid)
if (item && item.amountByUids[uid] == itemAmountByUid) {
item.amountByUids[uid] -= consumeAmount
item.amount -= consumeAmount
if (item.amountByUids[uid] <= 0) {
inventoryClient.removeItem(uid)
if (item.uids?[0] == uid)
item.uids.remove(0)
}
}
if (cb)
cb({ success = true })
}
let itemId = this.id
let taskId = char_send_blk("cln_consume_inventory_item", blk)
@@ -0,0 +1,21 @@
// Open the existing native reward window after a manual coupon redemption succeeds.
// Why the client: the stock success handler never opens a reward window, whatever the service answers.
// Without it: a redeemed coupon updates the inventory without any receipt.
{
"id": "inventory/show-coupon-redemption-reward",
"title": "Show the granted reward after manual coupon redemption",
"file": "scripts/items/itemsclasses/itemexternal.nut",
"features": [
"G-Marketplace",
"H-External inventory"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,33 @@
let couponReward = this.shouldAutoConsume || this.metaBlk == null
? null
: require("%sqstd/datablock.nut").convertBlk(this.metaBlk)
if (couponReward != null)
couponReward.itemDefId <- this.id
let taskCallback = function() {
let item = findItemByUid(uid)
if (item && item.amountByUids[uid] == itemAmountByUid) {
item.amountByUids[uid] -= consumeAmount
item.amount -= consumeAmount
if (item.amountByUids[uid] <= 0) {
inventoryClient.removeItem(uid)
if (item.uids?[0] == uid)
item.uids.remove(0)
}
}
if (cb)
cb({ success = true })
if (couponReward != null) {
let { eventbus_send } = require("eventbus")
eventbus_send("guiStartOpenTrophy", {
[couponReward.itemDefId.tostring()] = [couponReward]
rewardTitle = loc("mainmenu/you_received")
isHidePrizeActionBtn = true
})
}
}
let itemId = this.id
let taskId = char_send_blk("cln_consume_inventory_item", blk)
@@ -0,0 +1 @@
let shouldLogin = isInArray(URL_TAG_AUTO_LOGIN, urlTags)
@@ -0,0 +1,22 @@
// Skip the yuplay2 single sign-on wrapper for URLs that point at the local server.
// Why the client: SsoLoggedUrlAction always wraps the URL in https://login.gaijin.net and the embedded browser does not load wto_ws.dll.
// Without it: opening the local store or marketplace sends the browser to the real Gaijin login server.
{
"id": "online-shop/bypass-external-sso-for-local-urls",
"title": "本地服务地址打开网页时跳过 Gaijin 外网单点登录跳转",
"file": "scripts/onlineshop/url.nut",
"features": [
"A-不连 Gaijin",
"G-礼包商店",
"G-市场"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1 @@
let shouldLogin = isInArray(URL_TAG_AUTO_LOGIN, urlTags) && url.indexof("://{{LOCAL_ENDPOINT}}") == null
@@ -0,0 +1,2 @@
let entitlementRewards = {}
@@ -0,0 +1,21 @@
// Collect entitlement purchases per user log entry so every purchase opens its own receipt.
// Why the client: the stock scan merges purchases of the same entitlement that arrive in one refresh.
// Without it: repeated purchases in one profile update are under-reported.
{
"id": "online-shop/collect-entitlement-purchase-rewards",
"title": "Track entitlement purchases by user log",
"file": "scripts/userlog/userlogdata.nut",
"features": [
"G-Store",
"G-Premium Account"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,3 @@
let entitlementRewards = {}
let purchaseReceipts = []
@@ -0,0 +1,2 @@
function browserCloseAndUpdateEntitlements() {
addTask(updateEntitlementsLimited(),
@@ -0,0 +1,21 @@
// For local commerce pages, close the browser and leave the refresh to the close handler.
// Why the client: the stock control already starts an update before the close handler starts another.
// Without it: the close-and-update control can queue a redundant profile refresh.
{
"id": "online-shop/defer-explicit-browser-update-to-close",
"title": "Refresh local commerce once from the browser close handler",
"file": "scripts/onlineshop/browserwnd.nut",
"features": [
"G-Store",
"G-Marketplace"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,5 @@
function browserCloseAndUpdateEntitlements() {
if (this.isLocalCommercePage())
return this.goBack()
addTask(updateEntitlementsLimited(),
@@ -0,0 +1,2 @@
let name = "yuNetwork/payMethod/other"
items.append({
@@ -0,0 +1,22 @@
// Add a text-only payment option that purchases with YU2_PAY_NONE (no GJN charge).
// Why the client: payMethodsCfg only lists four icon-only methods; a login bitmask cannot add a named option.
// Without it: the in-game payment window offers no free offline purchase.
{
"id": "online-shop/free-offline-payment-method",
"title": "游戏内支付方式窗口增加「老福爷付过了」免 GJN 直接购买选项",
"file": "scripts/onlineshop/onlinepurchase.nut",
"features": [
"G-货币",
"G-高级账户",
"G-礼包商店"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,9 @@
let freePayName = "老福爷付过了"
items.append({
name = freePayName
icon = ""
callback = @() onYuplayPurchase(product, YU2_PAY_NONE, freePayName)
})
let name = "yuNetwork/payMethod/other"
items.append({
@@ -0,0 +1,2 @@
function getEntitlementShortName(ent) {
local name = ""
@@ -0,0 +1,20 @@
// Use the catalogue title for offline vehicle packs in the current game language.
// Why the client: the localization tables have no entries for locally generated pack ids.
// Without it: vehicle pack receipts show raw localization keys.
{
"id": "online-shop/localize-vehicle-pack-titles",
"title": "Display localized titles for offline vehicle packs",
"file": "scripts/onlineshop/entitlements.nut",
"features": [
"G-Store"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,9 @@
function getEntitlementShortName(ent) {
let catalogueTitle = ent?.wtoTitleEn
if (catalogueTitle != null) {
let { isChineseVersion, isChineseHarmonized } = require("%scripts/langUtils/language.nut")
let isChinese = isChineseVersion() || isChineseHarmonized()
return isChinese ? (ent?.wtoTitleZh ?? catalogueTitle) : catalogueTitle
}
local name = ""
@@ -0,0 +1,2 @@
entitlementRewards.each(
@(_, entId) handler.doWhenActive(@() showEntitlement(entId, { ignoreAvailability = true })))
@@ -0,0 +1,21 @@
// Queue each saved purchase once per handler and acknowledge it after its receipt opens.
// Why the client: one refresh can return several purchases before the price table is available.
// Without it: repeated purchases or products missing from the catalogue lose their unread notification.
{
"id": "online-shop/open-entitlement-purchase-receipts",
"title": "Acknowledge each purchase after its receipt opens",
"file": "scripts/userlog/userlogdata.nut",
"features": [
"G-Store",
"G-Premium Account"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,27 @@
entitlementRewards.each(
@(_, entId) handler.doWhenActive(@() showEntitlement(entId, { ignoreAvailability = true })))
if (purchaseReceipts.len() > 0 && !ENTITLEMENTS_PRICE.isActual()) {
waitingForPurchasePrices = true
ENTITLEMENTS_PRICE.checkUpdate()
}
foreach (logId, owner in clone queuedPurchaseReceipts)
if (!handlersManager.isHandlerValid(owner))
queuedPurchaseReceipts.$rawdelete(logId)
foreach (entry in purchaseReceipts) {
let receipt = entry
if (receipt.logId in queuedPurchaseReceipts)
continue
queuedPurchaseReceipts[receipt.logId] <- handler.weakref()
handler.doWhenActive(function() {
if (!shownUserlogNotifications.get().contains(receipt.logId)
&& ENTITLEMENTS_PRICE.isActual()
&& showPurchaseReceipt(receipt) != null)
disableSeenUserlogs([receipt.logId])
queuedPurchaseReceipts.$rawdelete(receipt.logId)
})
}
@@ -0,0 +1,2 @@
let { ENTITLEMENTS_PRICE } = require("%scripts/utils/configs.nut")
@@ -0,0 +1,21 @@
// Show the grant recorded with the purchase instead of the current catalogue contents.
// Why the client: the stock receipt reads the catalogue, which lists already owned vehicles and can retire products.
// Without it: owned vehicles are shown as new and receipts of removed products do not open.
{
"id": "online-shop/present-saved-entitlement-grants",
"title": "Present the benefits recorded by the purchase",
"file": "scripts/userlog/userlogdata.nut",
"features": [
"G-Store",
"G-Premium Account"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,22 @@
let { ENTITLEMENTS_PRICE } = require("%scripts/utils/configs.nut")
let queuedPurchaseReceipts = {}
local waitingForPurchasePrices = false
function showPurchaseReceipt(receipt) {
let { getEntitlementConfig } = require("%scripts/onlineShop/entitlements.nut")
if (getEntitlementConfig(receipt.entitlement) == null)
return scene_msg_box("purchase_done", get_cur_gui_scene(),
format(loc("userlog/buy_entitlement"), receipt.entitlement),
[["ok", @() null]], "ok", { cancel_fn = @() null })
let granted = receipt.granted
let premiumDays = granted?.premiumDays ?? 0
return showEntitlement(receipt.entitlement, { ignoreAvailability = true }, {
goldIncome = granted?.goldIncome
wpIncome = granted?.wpIncome
aircraftGift = granted % "aircraftGift"
entitlementGift = premiumDays > 0 ? [{ alias = "PremiumAccount", ttl = premiumDays }] : []
})
}
@@ -0,0 +1,3 @@
function onDestroy() {
broadcastEvent("DestroyEmbeddedBrowser")
}
@@ -0,0 +1,21 @@
// Request a profile update whenever the embedded commerce browser closes.
// Why the client: the service cannot observe the browser closing, and the stock update has a 20 s cooldown.
// Without it: the hangar can show stale purchases after the local store closes.
{
"id": "online-shop/refresh-profile-after-browser-close",
"title": "Refresh the current profile when the embedded commerce browser closes",
"file": "scripts/onlineshop/browserwnd.nut",
"features": [
"G-Store",
"G-Marketplace"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,14 @@
function isLocalCommercePage() {
let queryStart = this.url.indexof("?")
let page = queryStart == null ? this.url : this.url.slice(0, queryStart)
return page == "http://{{LOCAL_ENDPOINT}}/store"
|| page == "http://{{LOCAL_ENDPOINT}}/store/"
|| page == "http://{{LOCAL_ENDPOINT}}/trade.gaijin.net"
|| page == "http://{{LOCAL_ENDPOINT}}/trade.gaijin.net/"
}
function onDestroy() {
broadcastEvent("DestroyEmbeddedBrowser")
if (this.isLocalCommercePage())
addTask(updateEntitlementsLimited(true), null, @() updateGamercards())
}
@@ -0,0 +1,3 @@
function onDestroy() {
this.popCloseFunc()
}
@@ -0,0 +1,21 @@
// Schedule a full profile update when the native currency shop closes.
// Why the client: the shop can close without the focus transition that starts the stock refresh.
// Without it: closing the currency shop does not always refresh the profile.
{
"id": "online-shop/refresh-profile-after-currency-shop-close",
"title": "Refresh the current profile after the currency shop closes",
"file": "scripts/onlineshop/onlineshop.nut",
"features": [
"G-Store",
"G-Premium Account"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,4 @@
function onDestroy() {
this.popCloseFunc()
addTask(updateEntitlementsLimited(true), null, @() updateGamercards())
}
@@ -0,0 +1,3 @@
function onDestroy() {
this.popCloseFunc()
}
@@ -0,0 +1,21 @@
// Schedule a full profile update when the Premium Account shop closes.
// Why the client: the shop can close without the focus transition that starts the stock refresh.
// Without it: closing the Premium Account shop does not always refresh the profile.
{
"id": "online-shop/refresh-profile-after-premium-shop-close",
"title": "Refresh the current profile after the Premium Account shop closes",
"file": "scripts/onlineshop/buypremiumhandler.nut",
"features": [
"G-Store",
"G-Premium Account"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,4 @@
function onDestroy() {
this.popCloseFunc()
addTask(updateEntitlementsLimited(true), null, @() updateGamercards())
}
@@ -0,0 +1,8 @@
let ent = getEntitlementConfig(logObj.name)
if ("cost" in logObj)
ent["goldCost"] <- logObj.cost
local costText = getEntitlementPrice(ent)
if (costText != "")
costText = $" ({costText})"
res.name = "".concat(format(loc($"userlog/{logName}"), getEntitlementName(ent)), costText)
@@ -0,0 +1,21 @@
// Fall back to the recorded product id when the catalogue no longer has the entry.
// Why the client: getEntitlementConfig returns null for removed products and the formatter expects a table.
// Without it: an old purchase log raises a script error once its product is retired.
{
"id": "online-shop/render-retired-entitlement-log",
"title": "Keep purchase history readable after a product is removed",
"file": "scripts/userlog/userlogviewdata.nut",
"features": [
"G-Store",
"G-Premium Account"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,9 @@
let ent = getEntitlementConfig(logObj.name)
if (ent != null && "cost" in logObj)
ent["goldCost"] <- logObj.cost
local costText = ent != null ? getEntitlementPrice(ent) : ""
if (costText != "")
costText = $" ({costText})"
let productName = ent != null ? getEntitlementName(ent) : logObj.name
res.name = "".concat(format(loc($"userlog/{logName}"), productName), costText)
@@ -0,0 +1,2 @@
UpdateGamercard = @(_p) checkNewNotificationUserlogs()
})
@@ -0,0 +1,21 @@
// Resume the pending receipt scan when a price table update completes.
// Why the client: the catalogue and the profile arrive through separate native tasks.
// Without it: a recorded receipt stays unread until an unrelated profile update.
{
"id": "online-shop/resume-purchase-receipts-after-price-update",
"title": "Open pending receipts when the price table arrives",
"file": "scripts/userlog/userlogdata.nut",
"features": [
"G-Store",
"G-Premium Account"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,9 @@
UpdateGamercard = @(_p) checkNewNotificationUserlogs()
EntitlementsPriceUpdated = function(_p) {
if (!waitingForPurchasePrices)
return
waitingForPurchasePrices = false
checkNewNotificationUserlogs()
}
})
@@ -0,0 +1,12 @@
function showEntitlement(entitlementId, params = {}) {
let config = getEntitlementConfig(entitlementId)
if (!config) {
logerr($"Entitlement Reward: Could not find entitlement config {entitlementId}")
return
}
handlersManager.loadHandler(EntitlementRewardWnd, {
entitlementConfig = config
viewParams = params
})
}
@@ -0,0 +1,21 @@
// Accept a grant override for saved purchases and return the opened handler.
// Why the client: the stock function neither takes the saved grant nor reports whether the window opened.
// Without it: callers cannot tell a shown receipt from an unavailable one.
{
"id": "online-shop/return-entitlement-reward-handler",
"title": "Open a receipt using the persisted grant",
"file": "scripts/onlineshop/entitlementrewardwnd.nut",
"features": [
"G-Store",
"G-Premium Account"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
@@ -0,0 +1,12 @@
function showEntitlement(entitlementId, params = {}, granted = null) {
let config = getEntitlementConfig(entitlementId)
if (!config) {
logerr($"Entitlement Reward: Could not find entitlement config {entitlementId}")
return
}
return handlersManager.loadHandler(EntitlementRewardWnd, {
entitlementConfig = granted == null ? config : config.__merge(granted)
viewParams = params
})
}
@@ -0,0 +1,2 @@
.filter(@(entId) getEntitlementConfig(entId) != null)
@@ -0,0 +1,21 @@
// Use the entitlement gift resolver for the receipt icon list as well.
// Why the client: a recorded Premium Account duration need not match a current product id.
// Without it: receipt art omits awarded Premium Account days.
{
"id": "online-shop/show-direct-entitlement-gift-icons",
"title": "Include awarded Premium Account days in the receipt icon list",
"file": "scripts/onlineshop/entitlementview.nut",
"features": [
"G-Store",
"G-Premium Account"
],
"verified_on": [
"2.61.0.37"
],
"edits": [
{
"find": "find.nut",
"replace": "replace.nut"
}
]
}
Loaded 100 of 476 files, more files were not shown because too many files have changed in this diff. Show more