import { DependencyContainer } from “tsyringe”;
import { IPostDBLoadMod } from “@spt-aki/models/external/IPostDBLoadMod”;
import { DatabaseServer } from “@spt-aki/servers/DatabaseServer”;
import { IDatabaseTables } from “@spt-aki/models/spt/server/IDatabaseTables”;
class Mod implements IPostDBLoadMod
{
public postDBLoad(container: DependencyContainer): void
{
// get database from server
const databaseServer = container.resolve<DatabaseServer>(“DatabaseServer”);
// Get all the in-memory json found in /assets/database
const tables: IDatabaseTables = databaseServer.getTables();
const factoryLootSpawnPoints = tables.locations.factory4_day.looseLoot.spawnpoints
for (let i = 0; i < factoryLootSpawnPoints.length; i++)
{
factoryLootSpawnPoints[i].template.Position =
{
x:60 + Math.random()–0.5,
y:2 + Math.random()–0.5,
z:36 + Math.random()–0.5
}
}
const labLootSpawnPoints = tables.locations.laboratory.looseLoot.spawnpoints
for (let i = 0; i < labLootSpawnPoints.length; i++)
{
labLootSpawnPoints[i].template.Position =
{
x:–261 + Math.random()–0.5,
y:1 + Math.random()–0.5,
z:–343 + Math.random()–0.5
}
}
}
}
module.exports = { mod: new Mod() }
工厂白天的所有容器外物资在三号门门口,实验室的在问询台和楼梯之间
666666
66666
大佬 这个怎么用啊
看不懂啊.........................