local ISHealthPanel_Old_doBodyPartContextMenu = ISHealthPanel.doBodyPartContextMenu
function ISHealthPanel:doBodyPartContextMenu(bodyPart, x, y)
local playerNum = self.otherPlayer and self.otherPlayer:getPlayerNum() or self.character:getPlayerNum()
ISHealthPanel_Old_doBodyPartContextMenu(self, bodyPart, x, y)
local context = getPlayerContextMenu(playerNum);
local handlers = {}
table.insert(handlers, H_Algol_Syringe:new(self, bodyPart))
self:checkItems(handlers)
for _,handler in ipairs(handlers) do
handler:addToMenu(context)
end
end
This code works for my own mods that add new health panel actions.