New WIP feature
Prevent scav karma gain/lose
This commit is contained in:
parent
76c13d8d0a
commit
0abe190363
@ -37,13 +37,11 @@ class PlayerModifications {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Remove fall damages
|
//Remove fall damages
|
||||||
if(config.player.DisableFallDamage === true){
|
if (config.player.DisableFallDamage === true) {
|
||||||
globals.Health.Falling.SafeHeight = 200
|
globals.Health.Falling.SafeHeight = 200
|
||||||
globals.Health.Falling.DamagePerMeter = 0
|
globals.Health.Falling.DamagePerMeter = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
//PreventScavKarma
|
|
||||||
|
|
||||||
//Change staminas (unlimited or no)
|
//Change staminas (unlimited or no)
|
||||||
if (typeof config.player.ChangeMaxStamina == "number" && config.player.UnlimitedStamina === false) {
|
if (typeof config.player.ChangeMaxStamina == "number" && config.player.UnlimitedStamina === false) {
|
||||||
globals.Stamina.Capacity = config.player.ChangeMaxStamina
|
globals.Stamina.Capacity = config.player.ChangeMaxStamina
|
||||||
@ -77,6 +75,12 @@ class PlayerModifications {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//PreventScavKarma
|
||||||
|
if (config.player.RemoveScavKarma == true) {
|
||||||
|
ProfileController.generateScav = this.generateScav
|
||||||
|
}
|
||||||
|
|
||||||
function maxSkills(url, info, sessionID) {
|
function maxSkills(url, info, sessionID) {
|
||||||
const config = require("../config/config.json")
|
const config = require("../config/config.json")
|
||||||
let pmcData = null
|
let pmcData = null
|
||||||
@ -118,6 +122,35 @@ class PlayerModifications {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static generateScav(sessionID) {
|
||||||
|
const pmcData = ProfileController.getPmcProfile(sessionID);
|
||||||
|
let scavData = BotController.generate({
|
||||||
|
"conditions": [{
|
||||||
|
"Role": "playerScav",
|
||||||
|
"Limit": 1,
|
||||||
|
"Difficulty": "normal"
|
||||||
|
}]
|
||||||
|
})[0];
|
||||||
|
|
||||||
|
// add proper metadata
|
||||||
|
scavData._id = pmcData.savage;
|
||||||
|
scavData.aid = sessionID;
|
||||||
|
scavData.Info.Settings = {
|
||||||
|
"StandingForKill": 0,
|
||||||
|
"AggressorBonus": 0
|
||||||
|
};
|
||||||
|
|
||||||
|
// remove secure container
|
||||||
|
scavData = InventoryHelper.removeSecureContainer(scavData);
|
||||||
|
|
||||||
|
// set cooldown timer
|
||||||
|
scavData = ProfileController.setScavCooldownTimer(scavData, pmcData);
|
||||||
|
|
||||||
|
// add scav to the profile
|
||||||
|
ProfileController.setScavProfile(sessionID, scavData);
|
||||||
|
return scavData;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user