Fixed Cheats and TOC interactability

This commit is contained in:
ZioPao
2024-05-02 12:46:47 +02:00
parent b1adefe8f3
commit 5dc328ebc2
6 changed files with 43 additions and 12 deletions

View File

@@ -219,7 +219,7 @@ function CutLimbInteractionHandler:addToMenu(context)
--TOC_DEBUG.print("CutLimbInteractionHandler addToMenu")
local types = self:getAllItemTypes(self.items.ITEMS)
local patientUsername = self:getPatient():getUsername()
if #types > 0 and StaticData.BODYLOCS_IND_BPT[self.limbName] and not DataController.GetInstance(patientUsername):getIsCut(self.limbName) then
if #types > 0 and StaticData.LIMBS_TO_BODYLOCS_IND_BPT[self.limbName] and not DataController.GetInstance(patientUsername):getIsCut(self.limbName) then
TOC_DEBUG.print("addToMenu, types > 0")
for i=1, #types do
context:addOption(getText("ContextMenu_Amputate"), self, self.onMenuOptionSelected, types[i])
@@ -229,7 +229,7 @@ end
function CutLimbInteractionHandler:dropItems(items)
local types = self:getAllItemTypes(items)
if #self.items.ITEMS > 0 and #types == 1 and StaticData.BODYLOCS_IND_BPT[self.limbName] then
if #self.items.ITEMS > 0 and #types == 1 and StaticData.LIMBS_TO_BODYLOCS_IND_BPT[self.limbName] then
self:onMenuOptionSelected(types[1])
return true
end