I said, changed some todos.
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
function ResetEverything()
|
function ResetEverything()
|
||||||
|
|
||||||
local player = getPlayer()
|
local player = getPlayer()
|
||||||
local mod_data = player:getModData() -- TODO we need to send data...
|
local mod_data = player:getModData()
|
||||||
mod_data.TOC = nil
|
mod_data.TOC = nil
|
||||||
TheOnlyCure.InitTheOnlyCure(_, player)
|
TheOnlyCure.InitTheOnlyCure(_, player)
|
||||||
|
|
||||||
-- Destroy the amputation model
|
-- Destroy the amputation model
|
||||||
|
|
||||||
for _,v in ipairs(GetBodyParts()) do
|
for _,v in ipairs(GetBodyParts()) do
|
||||||
local cloth = player:getInventory():FindAndReturn(TocFindAmputatedClothingFromPartName(v))
|
local cloth = player:getInventory():FindAndReturn(TocFindAmputatedClothingFromPartName(v))
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ function FixSingleBodyPartType(body_part_type, use_oven)
|
|||||||
body_part_type:setBleeding(false)
|
body_part_type:setBleeding(false)
|
||||||
body_part_type:setBleedingTime(0) -- no bleeding since it's been cauterized
|
body_part_type:setBleedingTime(0) -- no bleeding since it's been cauterized
|
||||||
else
|
else
|
||||||
-- TODO Think a little better about this
|
-- TODO Think a little better about this, do we want to trigger bleeding or not?
|
||||||
body_part_type:setBleeding(false)
|
body_part_type:setBleeding(false)
|
||||||
|
|
||||||
--body_part_type:setBleedingTime(ZombRand(1, 5)) -- Reset the bleeding, maybe make it random
|
--body_part_type:setBleedingTime(ZombRand(1, 5)) -- Reset the bleeding, maybe make it random
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ function TocOperateLocal(_, patient, surgeon, part_name, use_oven)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function TocEquipProsthesisLocal(_, patient, surgeon, part_name)
|
function TocEquipProsthesisLocal(_, patient, surgeon, part_name)
|
||||||
-- TODO probably completely broken for MP
|
-- TODO probably completely broken for MP
|
||||||
-- TODO this is really janky
|
-- TODO this is really janky
|
||||||
local surgeon_inventory = surgeon:getInventory()
|
local surgeon_inventory = surgeon:getInventory()
|
||||||
local prosthesis_to_equip = surgeon_inventory:getItemFromType('TOC.MetalHand') or
|
local prosthesis_to_equip = surgeon_inventory:getItemFromType('TOC.MetalHand') or
|
||||||
surgeon_inventory:getItemFromType('TOC.MetalHook') or
|
surgeon_inventory:getItemFromType('TOC.MetalHook') or
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ function TheOnlyCure.HealSpecificPart(toc_data, part_name, player)
|
|||||||
local bandage_life = 0
|
local bandage_life = 0
|
||||||
local bandage_type = ""
|
local bandage_type = ""
|
||||||
|
|
||||||
|
-- TODO Bandages should have some disadvantage when not operated... Like getting drenched or something
|
||||||
if body_part_type:bandaged() then
|
if body_part_type:bandaged() then
|
||||||
is_bandaged = true -- this is useless
|
is_bandaged = true -- this is useless
|
||||||
bandage_life = body_part_type:getBandageLife()
|
bandage_life = body_part_type:getBandageLife()
|
||||||
@@ -143,6 +144,10 @@ function TheOnlyCure.HealSpecificPart(toc_data, part_name, player)
|
|||||||
|
|
||||||
-- TODO make this random if the player gets it or not
|
-- TODO make this random if the player gets it or not
|
||||||
--FIXME they're gonna stack!!!!
|
--FIXME they're gonna stack!!!!
|
||||||
|
|
||||||
|
-- if player does not have brave then add it
|
||||||
|
-- if player does not have insensitve then add it
|
||||||
|
|
||||||
player:getTraits():add("Brave")
|
player:getTraits():add("Brave")
|
||||||
player:getTraits():add("Insensitive")
|
player:getTraits():add("Insensitive")
|
||||||
body_part_type:setBleeding(false);
|
body_part_type:setBleeding(false);
|
||||||
@@ -193,7 +198,7 @@ function TheOnlyCure.UpdateEveryOneMinute()
|
|||||||
local toc_data = player:getModData().TOC
|
local toc_data = player:getModData().TOC
|
||||||
|
|
||||||
if toc_data ~= nil then
|
if toc_data ~= nil then
|
||||||
--TheOnlyCure.TryDropItem(player, toc_data) -- TODO this is kinda useless I think
|
--TheOnlyCure.TryDropItem(player, toc_data) -- TODO this must be set only in the cut\equipping function, not here
|
||||||
TheOnlyCure.CheckIfPlayerIsInfected(player, toc_data)
|
TheOnlyCure.CheckIfPlayerIsInfected(player, toc_data)
|
||||||
TheOnlyCure.UpdatePlayerHealth(player, toc_data)
|
TheOnlyCure.UpdatePlayerHealth(player, toc_data)
|
||||||
end
|
end
|
||||||
@@ -223,7 +228,7 @@ function TheOnlyCure.UpdateEveryTenMinutes()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
player:transmitModData() -- TODO if we do this every minutes, do we need to re do it here?
|
player:transmitModData()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -25,10 +25,11 @@ function ISBaseTimedAction:adjustMaxTime(maxTime)
|
|||||||
local protPartNames = {"RightHand", "RightForearm", "LeftHand", "LeftForearm"}
|
local protPartNames = {"RightHand", "RightForearm", "LeftHand", "LeftForearm"}
|
||||||
local otherPartNames = {"RightArm", "LeftArm"}
|
local otherPartNames = {"RightArm", "LeftArm"}
|
||||||
|
|
||||||
|
--TODO this is dumb, it just makes action a lot slower, without checking for special cases like reading. Find a better way
|
||||||
for i,name in ipairs(protPartNames) do
|
for i,name in ipairs(protPartNames) do
|
||||||
if modData.TOC[name].is_cut then
|
if modData.TOC[name].is_cut then
|
||||||
if modData.TOC[name].is_prosthesis_equipped then
|
if modData.TOC[name].is_prosthesis_equipped then
|
||||||
maxTime = maxTime * modData.TOC[name].prosthesis_factor --TODO this is dumb
|
maxTime = maxTime * modData.TOC[name].prosthesis_factor
|
||||||
else
|
else
|
||||||
maxTime = maxTime * 2;
|
maxTime = maxTime * 2;
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user