Equip saw before cutting
This commit is contained in:
@@ -331,4 +331,19 @@ end
|
||||
Events.OnPuttingTourniquet.Add(LocalPlayerController.HandleTourniquet)
|
||||
|
||||
|
||||
--* Object drop handling when amputation occurs
|
||||
|
||||
function LocalPlayerController.DropItemsAfterAmputation(limbName)
|
||||
|
||||
-- TODO Check for watches and stuff like that
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
Events.OnAmputatedLimb.Add(LocalPlayerController.DropItemsAfterAmputation)
|
||||
|
||||
|
||||
|
||||
|
||||
return LocalPlayerController
|
||||
@@ -182,7 +182,7 @@ function AmputationHandler:execute(damagePlayer)
|
||||
self:damageAfterAmputation(surgeonFactor)
|
||||
|
||||
-- Trigger this event
|
||||
triggerEvent("OnAmputatedLimb")
|
||||
triggerEvent("OnAmputatedLimb", self.limbName)
|
||||
end
|
||||
|
||||
---Deletes the instance
|
||||
|
||||
@@ -69,6 +69,16 @@ end
|
||||
---@param stitchesItem InventoryItem?
|
||||
---@param bandageItem InventoryItem?
|
||||
local function PerformAction(surgeon, patient, limbName, sawItem, stitchesItem, bandageItem)
|
||||
-- get saw in hand
|
||||
-- todo primary or secondary depending on amputation status of surgeon
|
||||
ISTimedActionQueue.add(ISEquipWeaponAction:new(surgeon, sawItem, 50, true, false))
|
||||
|
||||
local lHandItem = surgeon:getSecondaryHandItem()
|
||||
if lHandItem then
|
||||
ISTimedActionQueue.add(ISUnequipAction:new(surgeon, lHandItem, 50))
|
||||
end
|
||||
|
||||
|
||||
ISTimedActionQueue.add(CutLimbAction:new(surgeon, patient, limbName, sawItem, stitchesItem, bandageItem))
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user