MCPcopy Create free account
hub / github.com/Shazbot/WH3-Mod-Manager / createAutoStartCustomBattleData

Function createAutoStartCustomBattleData

src/packFileSerializer.ts:904–918  ·  view source on GitHub ↗
(pack_files: PackedFile[])

Source from the content-addressed store, hash-verified

902 } as PackedFile);
903};
904const createAutoStartCustomBattleData = (pack_files: PackedFile[]) => {
905 const scriptBuffer = Buffer.from(autoStartCustomBattleScript, "utf-8");
906 pack_files.push({
907 name: "script\\frontend\\mod\\pj_auto_custom_battles.lua",
908 file_size: scriptBuffer.byteLength,
909 start_pos: 0,
910 is_compressed: false,
911 schemaFields: [
912 {
913 type: "Buffer",
914 fields: [{ type: "Buffer", val: scriptBuffer }],
915 },
916 ],
917 } as PackedFile);
918};
919const sortByPackName = (packFirst: Pack, packSecond: Pack) => {
920 return compareModNames(packFirst.name, packSecond.name);
921};

Callers 1

writeStartGamePackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected