Too much stuff to fix.
This commit is contained in:
@@ -133,13 +133,15 @@ function ISHealthPanel:update()
|
||||
og_ISHealthPanel_update(self)
|
||||
-- TODO Listen for changes on other player side instead of looping this
|
||||
|
||||
|
||||
-- FIX Re-enable it, just for test
|
||||
if self.character then
|
||||
local locPlUsername = getPlayer():getUsername()
|
||||
local remPlUsername = self.character:getUsername()
|
||||
if locPlUsername ~= remPlUsername and self:isReallyVisible() then
|
||||
-- Request update for TOC DATA?
|
||||
-- Request update for TOC DATA
|
||||
local key = CommandsData.GetKey(remPlUsername)
|
||||
ModData.request(key)
|
||||
--ModData.request(key)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -208,7 +208,8 @@ end
|
||||
function CutLimbInteractionHandler:addToMenu(context)
|
||||
--TOC_DEBUG.print("CutLimbInteractionHandler addToMenu")
|
||||
local types = self:getAllItemTypes(self.items.ITEMS)
|
||||
if #types > 0 and StaticData.BODYLOCS_IND_BPT[self.limbName] and not DataController.GetInstance():getIsCut(self.limbName) then
|
||||
local patientUsername = self:getPatient():getUsername()
|
||||
if #types > 0 and StaticData.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])
|
||||
@@ -230,7 +231,8 @@ end
|
||||
function CutLimbInteractionHandler:isValid()
|
||||
--TOC_DEBUG.print("CutLimbInteractionHandler isValid")
|
||||
self:checkItems()
|
||||
return not DataController.GetInstance():getIsCut(self.limbName)
|
||||
local patientUsername = self:getPatient():getUsername()
|
||||
return not DataController.GetInstance(patientUsername):getIsCut(self.limbName)
|
||||
end
|
||||
|
||||
function CutLimbInteractionHandler:perform(previousAction, itemType)
|
||||
|
||||
@@ -126,10 +126,12 @@ function BaseHandler:toPlayerInventory(item, previousAction)
|
||||
return previousAction
|
||||
end
|
||||
|
||||
---@return IsoPlayer
|
||||
function BaseHandler:getDoctor()
|
||||
return self.panel.otherPlayer or self.panel.character
|
||||
end
|
||||
|
||||
---@return IsoPlayer
|
||||
function BaseHandler:getPatient()
|
||||
return self.panel.character
|
||||
end
|
||||
|
||||
@@ -35,6 +35,7 @@ end
|
||||
|
||||
function WoundCleaningInteractionHandler:addToMenu(context)
|
||||
--TOC_DEBUG.print("WoundCleaningInteraction addToMenu")
|
||||
|
||||
local types = self:getAllItemTypes(self.items.ITEMS)
|
||||
if #types > 0 and self:isValid() then
|
||||
TOC_DEBUG.print("WoundCleaningInteraction inside addToMenu")
|
||||
|
||||
Reference in New Issue
Block a user