Force handguards that take a sub-handguard to set handguard spawn chance to 100% - fixes split handguards appearing without the lower part
Only adds lower when weapon has no launcher attached Adjust sub stock adding code to trigger when stock has a subslot that starts with `mod_stock`, this means `mod_stock_akms` and `mod_stock_000` will be included
This commit is contained in:
parent
170a185928
commit
f4fce0612e
@ -13785,6 +13785,11 @@
|
||||
"5a800961159bd4315e3a1657"
|
||||
]
|
||||
},
|
||||
"637f57b78d137b27f70c496a": {
|
||||
"mod_foregrip": [
|
||||
"58c157c886f774032749fb06"
|
||||
]
|
||||
},
|
||||
"6386300124a1dc425c00577a": {
|
||||
"mod_stock": [
|
||||
"5a0c59791526d8dba737bba7"
|
||||
|
@ -4068,6 +4068,9 @@
|
||||
"5a800961159bd4315e3a1657"
|
||||
]
|
||||
},
|
||||
"637f57b78d137b27f70c496a": {
|
||||
"mod_foregrip": ["58c157c886f774032749fb06"]
|
||||
},
|
||||
"55d45f484bdc2d972f8b456d": {
|
||||
"mod_foregrip": [
|
||||
"5c1bc5af2e221602b412949b"
|
||||
|
@ -266,8 +266,16 @@ export class BotEquipmentModGenerator
|
||||
modSpawnChances.mod_sight_rear = 100;
|
||||
}
|
||||
|
||||
// Handguard mod can take a sub handguard mod + weapon has no UBGL (takes same slot)
|
||||
// Force spawn chance to be 100% to ensure it gets added
|
||||
if (modSlot === "mod_handguard" && modToAddTemplate._props.Slots.find(x => x._name === "mod_handguard") && !weapon.find(x => x.slotId === "mod_launcher"))
|
||||
{
|
||||
// Needed for handguards with lower
|
||||
modSpawnChances.mod_handguard = 100;
|
||||
}
|
||||
|
||||
// If stock mod can take a sub stock mod, force spawn chance to be 100% to ensure stock gets added
|
||||
if (modSlot === "mod_stock" && modToAddTemplate._props.Slots.find(x => x._name === "mod_stock"))
|
||||
if (modSlot === "mod_stock" && modToAddTemplate._props.Slots.find(x => x._name.includes("mod_stock")))
|
||||
{
|
||||
// Stock mod can take additional stocks, could be a locking device, force 100% chance
|
||||
modSpawnChances.mod_stock = 100;
|
||||
|
@ -82,6 +82,7 @@ export interface ModsChances
|
||||
mod_tactical_001: number
|
||||
mod_tactical_002: number
|
||||
mod_tactical_003: number
|
||||
mod_handguard: number
|
||||
}
|
||||
|
||||
export interface Difficulties
|
||||
|
Loading…
Reference in New Issue
Block a user