Fixed Interact Key bug
This commit is contained in:
@@ -135,6 +135,8 @@ function CachedDataHandler.CalculateBothHandsFeasibility()
|
||||
getCore():addKeyBinding(interactStr, Keyboard.KEY_NONE)
|
||||
else
|
||||
TOC_DEBUG.print("Re-enabling interact key")
|
||||
|
||||
if not CachedDataHandler.interactKey then CachedDataHandler.interactKey = getCore():getKey(interactStr) end
|
||||
getCore():addKeyBinding(interactStr, CachedDataHandler.interactKey)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -60,13 +60,21 @@ end
|
||||
|
||||
---@param player IsoGameCharacter
|
||||
---@param zombie IsoZombie
|
||||
---@param handWeapon HandWeapon
|
||||
function HandleZombiesAmputations(player, zombie, handWeapon, damage)
|
||||
if not instanceof(zombie, "IsoZombie") or not instanceof(player, "IsoPlayer") then return end
|
||||
if player ~= getPlayer() then return end
|
||||
|
||||
-- TODO Check type of weapon. No hands, only knifes or such
|
||||
|
||||
if damage < 3 or ZombRand(0,100) < 25 then return end
|
||||
|
||||
TOC_DEBUG.print(handWeapon:getName())
|
||||
|
||||
|
||||
local zombieInv = zombie:getInventory()
|
||||
|
||||
|
||||
-- Check left or right
|
||||
local leftItem = zombieInv:containsEval(PredicateAmputationItemLeft)
|
||||
|
||||
|
||||
@@ -1,25 +1,22 @@
|
||||
require('Items/Distributions')
|
||||
require('Items/SuburbsDistributions')
|
||||
|
||||
|
||||
--SuburbsDistributions = SuburbsDistributions or {}
|
||||
|
||||
-- Insert Prosts and various items in the Medical Clinic loot table
|
||||
|
||||
local prosthesisLoot = {
|
||||
[1] = {
|
||||
name = "TOC.Prost_HookArm_L",
|
||||
chance = 10
|
||||
chance = 3
|
||||
},
|
||||
|
||||
[2] = {
|
||||
name = "TOC.Prost_NormalArm_L",
|
||||
chance = 10
|
||||
chance = 2
|
||||
},
|
||||
|
||||
[3] = {
|
||||
name = "TOC.Surg_Arm_Tourniquet_L",
|
||||
chance = 25
|
||||
chance = 20
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user