More stuff that needed to be changed
This commit is contained in:
@@ -6,7 +6,7 @@ end
|
||||
|
||||
function CheckIfCanBeCut(part_name)
|
||||
-- This is just for MP handling... Not enough to check everything
|
||||
return not getPlayer():getModData().TOC[part_name].is_cut
|
||||
return not getPlayer():getModData().TOC.Limbs[part_name].is_cut
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -441,11 +441,11 @@ function SetupTocDescUI(surgeon, patient, toc_data, part_name)
|
||||
-- TODO add check for cuts and scratches
|
||||
desc_ui["status"]:setText("Not cut")
|
||||
desc_ui["status"]:setColor(1, 1, 1, 1)
|
||||
if GetSawInInventory(surgeon) and not CheckIfProsthesisAlreadyInstalled(toc_data, part_name) then
|
||||
if GetSawInInventory(surgeon) and not CheckIfProsthesisAlreadyInstalled(toc_data.Limbs, part_name) then
|
||||
desc_ui["b1"]:setVisible(true)
|
||||
desc_ui["b1"]:setText("Cut")
|
||||
desc_ui["b1"]:addArg("option", "Cut")
|
||||
elseif GetSawInInventory(surgeon) and CheckIfProsthesisAlreadyInstalled(toc_data, part_name) then
|
||||
elseif GetSawInInventory(surgeon) and CheckIfProsthesisAlreadyInstalled(toc_data.Limbs, part_name) then
|
||||
desc_ui["b1"]:setVisible(true)
|
||||
desc_ui["b1"]:setText("Remove prosthesis before")
|
||||
desc_ui["b1"]:addArg("option", "Nothing")
|
||||
|
||||
@@ -16,14 +16,26 @@ function TheOnlyCure.InitTheOnlyCure(_, player)
|
||||
local mod_data = player:getModData()
|
||||
|
||||
if mod_data.TOC == nil then
|
||||
mod_data.TOC = {}
|
||||
|
||||
print("TOC: Creating mod_data.TOC")
|
||||
|
||||
mod_data.TOC = {
|
||||
|
||||
Limbs = {
|
||||
Right_Hand = {},
|
||||
Right_LowerArm = {},
|
||||
Right_UpperArm = {},
|
||||
|
||||
Left_Hand = {},
|
||||
Left_LowerArm = {},
|
||||
Left_UpperArm = {},
|
||||
is_other_bodypart_infected = false
|
||||
},
|
||||
Prosthesis = {},
|
||||
Prosthesis = {
|
||||
WoodenHook = {},
|
||||
MetalHook = {},
|
||||
MetalHand = {}
|
||||
},
|
||||
Generic = {},
|
||||
}
|
||||
--------
|
||||
|
||||
Reference in New Issue
Block a user