Too much stuff to fix.

This commit is contained in:
ZioPao
2024-03-29 18:46:44 +01:00
parent 883a84412b
commit d73b1a3f43
13 changed files with 120 additions and 28 deletions

View File

@@ -25,8 +25,10 @@ function CleanWoundAction:new(doctor, otherPlayer, bandage, bodyPart)
o.bandage = bandage
o.stopOnWalk = true
o.stopOnRun = true
o.bandagedPlayerX = otherPlayer:getX()
o.bandagedPlayerY = otherPlayer:getY()
o.maxTime = 250 - (o.doctorLevel * 6)
if doctor:isTimedActionInstant() then
o.maxTime = 1
@@ -79,8 +81,8 @@ function CleanWoundAction:stop()
end
function CleanWoundAction:perform()
-- needed to remove from queue / start next.
ISBaseTimedAction.perform(self)
TOC_DEBUG.print("CleanWound for " .. self.otherPlayer:getUsername())
if self.character:HasTrait("Hemophobic") then
self.character:getStats():setPanic(self.character:getStats():getPanic() + 15)
@@ -113,6 +115,9 @@ function CleanWoundAction:perform()
visual:setBlood(bbptEnum, 0)
ISHealthPanel.setBodyPartActionForPlayer(self.otherPlayer, self.bodyPart, nil, nil, nil)
-- needed to remove from queue / start next.
ISBaseTimedAction.perform(self)
end
return CleanWoundAction

View File

@@ -7,6 +7,8 @@ local CommandsData = require("TOC/CommandsData")
---@class CutLimbAction : ISBaseTimedAction
---@field patient IsoPlayer
---@field character IsoPlayer
---@field patientX number
---@field patientY number
---@field limbName string
---@field item InventoryItem
---@field stitchesItem InventoryItem?
@@ -32,6 +34,9 @@ function CutLimbAction:new(surgeon, patient, limbName, item, stitchesItem, banda
o.limbName = limbName
o.item = item
o.patientX = patient:getX()
o.patientY = patient:getY()
o.stitchesItem = stitchesItem or nil
o.bandageItem = bandageItem or nil
@@ -45,7 +50,7 @@ function CutLimbAction:new(surgeon, patient, limbName, item, stitchesItem, banda
end
function CutLimbAction:isValid()
return not ISHealthPanel.DidPatientMove(self.patient, self.character, self.patient:getX(), self.patient:getY())
return not ISHealthPanel.DidPatientMove(self.character,self.patient, self.patientX, self.patientY)
end
function CutLimbAction:start()