2 Commits
v2.0 ... v2.0.1

Author SHA1 Message Date
ZioPao
beee6f409c bump to mod.info 2024-05-03 14:20:57 +02:00
ZioPao
540f510eb0 Fixed wearing items bug 2024-05-03 14:20:46 +02:00
3 changed files with 7 additions and 5 deletions

View File

@@ -268,7 +268,7 @@ end
local function CheckLimbFeasibility(limbName) local function CheckLimbFeasibility(limbName)
local dcInst = DataController.GetInstance() local dcInst = DataController.GetInstance()
local isFeasible = not dcInst:getIsCut(limbName) or dcInst:getIsProstEquipped(limbName) local isFeasible = not dcInst:getIsCut(limbName) or dcInst:getIsProstEquipped(limbName)
TOC_DEBUG.print("isFeasible="..tostring(isFeasible)) --TOC_DEBUG.print("isFeasible="..tostring(isFeasible))
return isFeasible return isFeasible
end end

View File

@@ -71,11 +71,13 @@ function TourniquetController.WrapClothingAction(obj, wrappedFunc)
group:setMultiItem(TourniquetController.bodyLoc, false) group:setMultiItem(TourniquetController.bodyLoc, false)
end end
wrappedFunc(obj) local ogValue = wrappedFunc(obj)
if isTourniquet then if isTourniquet then
group:setMultiItem(TourniquetController.bodyLoc, true) group:setMultiItem(TourniquetController.bodyLoc, true)
end end
return ogValue -- Needed for isValid
end end
@@ -98,12 +100,12 @@ end
local og_ISWearClothing_isValid = ISWearClothing.isValid local og_ISWearClothing_isValid = ISWearClothing.isValid
function ISWearClothing:isValid() function ISWearClothing:isValid()
TourniquetController.WrapClothingAction(self, og_ISWearClothing_isValid) return TourniquetController.WrapClothingAction(self, og_ISWearClothing_isValid)
end end
local og_ISUnequipAction_perform = ISUnequipAction.perform local og_ISUnequipAction_perform = ISUnequipAction.perform
function ISUnequipAction:perform() function ISUnequipAction:perform()
TourniquetController.WrapClothingAction(self, og_ISUnequipAction_perform) return TourniquetController.WrapClothingAction(self, og_ISUnequipAction_perform)
end end

View File

@@ -4,5 +4,5 @@ description=Bitten? Not a problem!
id=TheOnlyCure id=TheOnlyCure
icon=icon.png icon=icon.png
url=https://github.com/ZioPao/The-Only-Cure url=https://github.com/ZioPao/The-Only-Cure
modversion=2.0 modversion=2.0.1
pzversion=41.65 pzversion=41.65