Fixed some bugs
This commit is contained in:
@@ -51,6 +51,20 @@ function TryTheOnlyCureActionOnAnotherPlayer(_, part_name, action, surgeon, pati
|
||||
end
|
||||
|
||||
|
||||
|
||||
function TryTocActionOnAnotherPlayer(_, part_name, action, surgeon, patient)
|
||||
|
||||
|
||||
if action == "Cut" then
|
||||
AskCanCutLimb(patient, part_name)
|
||||
|
||||
elseif action == "Operate" then
|
||||
AskCanOperateLimb(patient, part_name)
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
local function CheckIfCanBeOperated(modData)
|
||||
if modData.TOC.RightHand.is_cut and not modData.TOC.RightHand.is_operated
|
||||
or modData.TOC.RightForearm.is_cut and not modData.TOC.RightForearm.is_operated
|
||||
@@ -74,21 +88,6 @@ local function CloseAllMenus(player_index)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- Declare context menus here so we can access them later
|
||||
function ISWorldObjectContextMenu.OnFillTOCMenu(player, context, worldObjects, test)
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
function ISWorldObjectContextMenu.OnFillOperateWithOven(player, context, worldObjects, test)
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
----------------------------------------------------------------------------------------------------------
|
||||
|
||||
TocContextMenus = {}
|
||||
|
||||
@@ -35,8 +35,8 @@ function TheOnlyCure.CheckIfPlayerIsInfected(player, toc_data)
|
||||
for _, v in ipairs(GetLimbsBodyPartTypes()) do
|
||||
local toc_bodypart = FindTocDataPartNameFromBodyPartType(toc_data, v)
|
||||
if body_damage:getBodyPart(v):bitten() and toc_bodypart ~= nil then
|
||||
if toc_bodypart.is_cut then
|
||||
toc_data[toc_bodypart].is_infected = true
|
||||
if toc_bodypart.is_cut == false then
|
||||
toc_bodypart.is_infected = true
|
||||
player:transmitModData()
|
||||
end
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ function ISBaseTimedAction:adjustMaxTime(maxTime)
|
||||
for i,name in ipairs(protPartNames) do
|
||||
if modData.TOC[name].is_cut then
|
||||
if modData.TOC[name].is_prosthesis_equipped then
|
||||
maxTime = maxTime * modData.TOC[name].EquipFact --todo this is dumb
|
||||
maxTime = maxTime * modData.TOC[name].prothesis_factor --TODO this is dumb
|
||||
else
|
||||
maxTime = maxTime * 2;
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user