- Fixed some MP checks
- New prost for lower arm males
This commit is contained in:
@@ -30,22 +30,17 @@ function CheckIfCanBeOperated(part_name, limbs_data)
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function CheckIfProsthesisCanBeEquipped(part_name, item)
|
function CheckIfProsthesisCanBeEquipped(part_name)
|
||||||
local part_data = getPlayer():getModData().TOC.Limbs
|
local limbs_data = getPlayer():getModData().TOC.Limbs
|
||||||
|
return limbs_data[part_name].is_cauterized or limbs_data[part_name].is_cicatrized
|
||||||
|
|
||||||
if item ~= nil then
|
|
||||||
if part_data[part_name].is_operated then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
else
|
|
||||||
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- check if prosthesis is in the surgeon inventory... we need to get it before
|
-- check if prosthesis is in the surgeon inventory... we need to get it before
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function CheckIfProsthesisCanBeUnequipped(part_name)
|
||||||
|
|
||||||
|
-- TODO we should get item here to be sure that we can do this action instead of relying on some later checks
|
||||||
|
return true
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ function AskCanEquipProsthesis(player, part_name)
|
|||||||
arg["From"] = getPlayer():getOnlineID()
|
arg["From"] = getPlayer():getOnlineID()
|
||||||
arg["To"] = player:getOnlineID()
|
arg["To"] = player:getOnlineID()
|
||||||
arg["command"] = "CanEquipProsthesis"
|
arg["command"] = "CanEquipProsthesis"
|
||||||
arg["toSend"] = part_name
|
arg["toSend"] = part_name -- TODO to be more precise there should be prosthesis item here too to check
|
||||||
|
|
||||||
sendClientCommand("TOC", "SendServer", arg)
|
sendClientCommand("TOC", "SendServer", arg)
|
||||||
end
|
end
|
||||||
@@ -152,10 +152,12 @@ end
|
|||||||
|
|
||||||
Commands["CanEquipProsthesis"] = function(arg)
|
Commands["CanEquipProsthesis"] = function(arg)
|
||||||
local part_name = arg["toSend"]
|
local part_name = arg["toSend"]
|
||||||
|
--local item = arg["toSend"][2] -- TODO Add item prosth here
|
||||||
|
|
||||||
arg["To"] = arg["From"]
|
arg["To"] = arg["From"]
|
||||||
arg["From"] = getPlayer():getOnlineID()
|
arg["From"] = getPlayer():getOnlineID()
|
||||||
arg["command"] = "ResponseCanAct"
|
arg["command"] = "ResponseCanAct"
|
||||||
arg["toSend"] = { part_name, "Equip", true } -- FIXME true just for test
|
arg["toSend"] = {part_name, "Equip", CheckIfProsthesisCanBeEquipped(part_name) }
|
||||||
sendClientCommand("TOC", "SendServer", arg)
|
sendClientCommand("TOC", "SendServer", arg)
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -165,7 +167,7 @@ Commands["CanUnequipProsthesis"] = function(arg)
|
|||||||
arg["To"] = arg["From"]
|
arg["To"] = arg["From"]
|
||||||
arg["From"] = getPlayer():getOnlineID()
|
arg["From"] = getPlayer():getOnlineID()
|
||||||
arg["command"] = "ResponseCanAct"
|
arg["command"] = "ResponseCanAct"
|
||||||
arg["toSend"] = { part_name, "Unequip", true } -- FIXME true just for test
|
arg["toSend"] = { part_name, "Unequip", CheckIfProsthesisCanBeUnequipped(part_name)}
|
||||||
sendClientCommand("TOC", "SendServer", arg)
|
sendClientCommand("TOC", "SendServer", arg)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ local og_ISInventoryPaneGetActualItems = ISInventoryPane.getActualItems
|
|||||||
function ISInventoryPane.getActualItems(items)
|
function ISInventoryPane.getActualItems(items)
|
||||||
|
|
||||||
-- TODO add an exception for installed prosthesis, make them unequippable automatically from here and get the correct obj
|
-- TODO add an exception for installed prosthesis, make them unequippable automatically from here and get the correct obj
|
||||||
|
|
||||||
local ret = og_ISInventoryPaneGetActualItems(items)
|
local ret = og_ISInventoryPaneGetActualItems(items)
|
||||||
|
|
||||||
-- This is gonna be slower than just overriding the function but hey it's more compatible
|
-- This is gonna be slower than just overriding the function but hey it's more compatible
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 79 KiB |
BIN
models_stuff/working_left_lowerarm_male.blend
Normal file
BIN
models_stuff/working_left_lowerarm_male.blend
Normal file
Binary file not shown.
BIN
models_stuff/working_right_lowerarm_male.blend
Normal file
BIN
models_stuff/working_right_lowerarm_male.blend
Normal file
Binary file not shown.
Reference in New Issue
Block a user