Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
40f78e2775 |
@ -4,5 +4,6 @@
|
||||
"LooseKeyPileProbability": 0.2,
|
||||
"AlterKeyCardProbability": true,
|
||||
"LooseKeycardProbability": 0.02,
|
||||
"staticRelativeProbability": 1658
|
||||
"drawerStaticRelativeProbability": 1658,
|
||||
"jacketStaticRelativeProbability": 829
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "LooseKeyModifier",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"main": "src/mod.js",
|
||||
"license": "See License file",
|
||||
"author": "Kaeno",
|
||||
"akiVersion": "^3.5.1",
|
||||
"akiVersion": "^3.6.1",
|
||||
|
||||
"devDependencies": {
|
||||
"@types/node": "16.18.10",
|
||||
|
38
src/mod.ts
38
src/mod.ts
@ -30,18 +30,40 @@ class Lkm implements IPostDBLoadMod
|
||||
{
|
||||
continue;
|
||||
}
|
||||
for (const itemDistribution of staticy)
|
||||
if (staticName === "578f87b7245977356274f2cd") // Drawer
|
||||
{
|
||||
if (itemHelper.isOfBaseclass(itemDistribution.tpl, BaseClasses.KEY_MECHANICAL))
|
||||
for (const itemDistribution of staticy)
|
||||
{
|
||||
const matchingItem = staticy.find(s => s.tpl === itemDistribution.tpl);
|
||||
if (matchingItem)
|
||||
if (itemHelper.isOfBaseclass(itemDistribution.tpl, BaseClasses.KEY_MECHANICAL))
|
||||
{
|
||||
if (itemDistribution.relativeProbability < config.staticRelativeProbability)
|
||||
const matchingItem = staticy.find(s => s.tpl === itemDistribution.tpl);
|
||||
if (matchingItem)
|
||||
{
|
||||
// By Default this is based of the Yotota Key and been divided by 2
|
||||
itemDistribution.relativeProbability = config.staticRelativeProbability;
|
||||
count++;
|
||||
if (itemDistribution.relativeProbability < config.drawerStaticRelativeProbability)
|
||||
{
|
||||
// By Default this is based of the Yotota Key and been divided by 2
|
||||
itemDistribution.relativeProbability = config.drawerStaticRelativeProbability;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (staticName === "578f8778245977358849a9b5") // Jackets
|
||||
{
|
||||
for (const itemDistribution of staticy)
|
||||
{
|
||||
if (itemHelper.isOfBaseclass(itemDistribution.tpl, BaseClasses.KEY_MECHANICAL))
|
||||
{
|
||||
const matchingItem = staticy.find(s => s.tpl === itemDistribution.tpl);
|
||||
if (matchingItem)
|
||||
{
|
||||
if (itemDistribution.relativeProbability < (config.jacketStaticRelativeProbability))
|
||||
{
|
||||
// By Default this is based of the Yotota Key and been divided by 4
|
||||
itemDistribution.relativeProbability = (config.jacketStaticRelativeProbability);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user