Fixes after first test
This commit is contained in:
@@ -3,6 +3,10 @@
|
|||||||
------------------------------------------
|
------------------------------------------
|
||||||
----------- CUT LIMB FUNCTIONS -----------
|
----------- CUT LIMB FUNCTIONS -----------
|
||||||
|
|
||||||
|
-- Seems to be the first file loaded, so let's add this
|
||||||
|
if JCIO == nil then
|
||||||
|
JCIO = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -592,7 +592,7 @@ JCIO.RefreshClientMenu = function(_)
|
|||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
local limbs_data = JCIO_UI.onlineTempTable.patient:getModData().TOC.Limbs
|
local limbs_data = JCIO_UI.onlineTempTable.patient:getModData().JCIO.limbs
|
||||||
JCIO_UI.SetupMainUI(JCIO_UI.onlineTempTable.patient, JCIO_UI.onlineTempTable.patient, limbs_data)
|
JCIO_UI.SetupMainUI(JCIO_UI.onlineTempTable.patient, JCIO_UI.onlineTempTable.patient, limbs_data)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ JCIO_Common.GeneratePartNames = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
JCIO_Common.GetPartNames = function()
|
JCIO_Common.GetPartNames = function()
|
||||||
if JCIO_Common.partNames.size() == nil then
|
if JCIO_Common.partNames[1] == nil then
|
||||||
JCIO_Common.GeneratePartNames()
|
JCIO_Common.GeneratePartNames()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -30,13 +30,13 @@ local function PartNameToBodyLocationAmputation(name)
|
|||||||
if name == "Right_Foot" then return "JCIO_LegRight" end
|
if name == "Right_Foot" then return "JCIO_LegRight" end
|
||||||
end
|
end
|
||||||
|
|
||||||
function TocFindItemInProstBodyLocation(part_name, patient)
|
function TocFindItemInProstBodyLocation(partName, patient)
|
||||||
-- Can't be used for online purposes, since we can't get the online inventory of another player
|
-- Can't be used for online purposes, since we can't get the online inventory of another player
|
||||||
local worn_items = patient:getWornItems()
|
local worn_items = patient:getWornItems()
|
||||||
|
|
||||||
for i = 1, worn_items:size() - 1 do -- Maybe wornItems:size()-1
|
for i = 1, worn_items:size() - 1 do -- Maybe wornItems:size()-1
|
||||||
local item = worn_items:get(i):getItem()
|
local item = worn_items:get(i):getItem()
|
||||||
if item:getBodyLocation() == PartNameToBodyLocationProsthesis(part_name) then
|
if item:getBodyLocation() == PartNameToBodyLocationProsthesis(partName) then
|
||||||
return item
|
return item
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -44,19 +44,19 @@ function TocFindItemInProstBodyLocation(part_name, patient)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Debug cheat and update every minute for cicatrization
|
-- Debug cheat and update every minute for cicatrization
|
||||||
function TocFindAmputationOrProsthesisName(part_name, player, choice)
|
function TocFindAmputationOrProsthesisName(partName, player, choice)
|
||||||
local worn_items = player:getWornItems()
|
local worn_items = player:getWornItems()
|
||||||
for i = 1, worn_items:size() - 1 do
|
for i = 1, worn_items:size() - 1 do
|
||||||
local item = worn_items:get(i):getItem()
|
local item = worn_items:get(i):getItem()
|
||||||
|
|
||||||
if choice == "Amputation" then
|
if choice == "Amputation" then
|
||||||
|
|
||||||
if item:getBodyLocation() == PartNameToBodyLocationAmputation(part_name) then
|
if item:getBodyLocation() == PartNameToBodyLocationAmputation(partName) then
|
||||||
return item:getFullType()
|
return item:getFullType()
|
||||||
end
|
end
|
||||||
elseif choice == "Prosthesis" then
|
elseif choice == "Prosthesis" then
|
||||||
|
|
||||||
if item:getBodyLocation() == PartNameToBodyLocationProsthesis(part_name) then
|
if item:getBodyLocation() == PartNameToBodyLocationProsthesis(partName) then
|
||||||
return item:getFullType()
|
return item:getFullType()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -123,9 +123,9 @@ function ISEquipWeaponAction:perform()
|
|||||||
--TODO Block it before even performing
|
--TODO Block it before even performing
|
||||||
-- TODO in the inventory menu there is something broken, even though this works
|
-- TODO in the inventory menu there is something broken, even though this works
|
||||||
og_ISEquipWeaponActionPerform(self)
|
og_ISEquipWeaponActionPerform(self)
|
||||||
local limbs_data = self.character:getModData().TOC.Limbs
|
local limbs_data = self.character:getModData().JCIO.limbs
|
||||||
local can_be_held = {}
|
local can_be_held = JCIO_Common.GetCanBeHeldTable(limbs_data)
|
||||||
JCIO_Common.GetCanBeHeldTable(can_be_held, limbs_data)
|
|
||||||
|
|
||||||
if not self.item:isRequiresEquippedBothHands() then
|
if not self.item:isRequiresEquippedBothHands() then
|
||||||
if can_be_held["Right"] and not can_be_held["Left"] then
|
if can_be_held["Right"] and not can_be_held["Left"] then
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
------------- UPDATE EVENTS --------------
|
------------- UPDATE EVENTS --------------
|
||||||
|
|
||||||
|
|
||||||
require "TOC_Init"
|
require "JCIO_Init"
|
||||||
|
|
||||||
local function CheckIfPlayerIsInfected(player, limbsData)
|
local function CheckIfPlayerIsInfected(player, limbsData)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user