reformatted everything
This commit is contained in:
@@ -22,14 +22,15 @@ function TocOperateLocal(_, patient, surgeon, part_name, use_oven)
|
||||
end
|
||||
|
||||
function TocEquipProsthesisLocal(_, patient, surgeon, part_name)
|
||||
-- TODO probably completely broken for MP
|
||||
-- TODO probably completely broken for MP
|
||||
-- TODO this is really janky
|
||||
local surgeon_inventory = surgeon:getInventory()
|
||||
local prosthesis_to_equip = surgeon_inventory:getItemFromType('TOC.MetalHand') or
|
||||
surgeon_inventory:getItemFromType('TOC.MetalHook') or
|
||||
surgeon_inventory:getItemFromType('TOC.WoodenHook')
|
||||
local prosthesis_to_equip = surgeon_inventory:getItemFromType('TOC.MetalHand') or
|
||||
surgeon_inventory:getItemFromType('TOC.MetalHook') or
|
||||
surgeon_inventory:getItemFromType('TOC.WoodenHook')
|
||||
if prosthesis_to_equip then
|
||||
ISTimedActionQueue.add(ISInstallProsthesis:new(patient, prosthesis_to_equip, patient:getBodyDamage():getBodyPart(TocGetBodyPartTypeFromPartName(part_name))))
|
||||
ISTimedActionQueue.add(ISInstallProsthesis:new(patient, prosthesis_to_equip,
|
||||
patient:getBodyDamage():getBodyPart(TocGetBodyPartTypeFromPartName(part_name))))
|
||||
else
|
||||
surgeon:Say("I need a prosthesis")
|
||||
end
|
||||
@@ -37,5 +38,6 @@ end
|
||||
|
||||
function TocUnequipProsthesisLocal(_, patient, part_name)
|
||||
local equipped_prosthesis = TocFindItemInProstBodyLocation(part_name, patient)
|
||||
ISTimedActionQueue.add(ISUninstallProsthesis:new(patient, equipped_prosthesis, patient:getBodyDamage():getBodyPart(TocGetBodyPartTypeFromPartName(part_name))))
|
||||
end
|
||||
ISTimedActionQueue.add(ISUninstallProsthesis:new(patient, equipped_prosthesis,
|
||||
patient:getBodyDamage():getBodyPart(TocGetBodyPartTypeFromPartName(part_name))))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user