Added toggle for Zombie amputations

This commit is contained in:
ZioPao
2024-07-15 12:19:11 +02:00
parent 11622795e1
commit 940f5486aa
3 changed files with 13 additions and 2 deletions

View File

@@ -1,3 +1,6 @@
if not SandboxVars.TOC.EnableZombieAmputations then return end
require "lua_timers" require "lua_timers"
local ItemsController = require("TOC/Controllers/ItemsController") local ItemsController = require("TOC/Controllers/ItemsController")
@@ -39,8 +42,6 @@ local function PredicateAmputationItemRight(item)
return item:getType():contains("Amputation_") and item:getType():contains("_R") return item:getType():contains("Amputation_") and item:getType():contains("_R")
end end
---@param zombie IsoZombie ---@param zombie IsoZombie
local function SpawnAmputation(zombie, side) local function SpawnAmputation(zombie, side)
local index = ZombRand(1, #StaticData.PARTS_STR) local index = ZombRand(1, #StaticData.PARTS_STR)

View File

@@ -3,6 +3,7 @@ Sandbox_EN = {
Sandbox_TOC_CicatrizationSpeed = "Cicatrization Speed", Sandbox_TOC_CicatrizationSpeed = "Cicatrization Speed",
Sandbox_TOC_WoundDirtynessMultiplier = "Wound Dirtyness Multiplier", Sandbox_TOC_WoundDirtynessMultiplier = "Wound Dirtyness Multiplier",
Sandbox_TOC_SurgeonAbilityImportance = "Relevance of surgeon doctor ability", Sandbox_TOC_SurgeonAbilityImportance = "Relevance of surgeon doctor ability",
Sandbox_TOC_EnableZombieAmputations = "Enable Zombie amputations",
Sandbox_TOC_ZombieAmputationDamageThreshold = "Zombie amputations damage treshold", Sandbox_TOC_ZombieAmputationDamageThreshold = "Zombie amputations damage treshold",
Sandbox_TOC_ZombieAmputationDamageChance = "Zombie amputations damage chance", Sandbox_TOC_ZombieAmputationDamageChance = "Zombie amputations damage chance",

View File

@@ -28,6 +28,15 @@ option TOC.SurgeonAbilityImportance
translation = TOC_SurgeonAbilityImportance, translation = TOC_SurgeonAbilityImportance,
} }
option TOC.EnableZombieAmputations
{
type = boolean,
default = true,
page = TOC,
translation= TOC_EnableZombieAmputations,
}
option TOC.ZombieAmputationDamageThreshold option TOC.ZombieAmputationDamageThreshold
{ {
type = integer, type = integer,