First stuff for prosthesis rewrite

This commit is contained in:
Pao
2023-01-15 15:48:14 +01:00
parent 81cd386457
commit eeb7076c13
7 changed files with 101 additions and 147 deletions

View File

@@ -2,6 +2,7 @@ require "TimedActions/ISBaseTimedAction"
ISCutLimb = ISBaseTimedAction:derive("ISCutLimb")
-- TODO Add a check so you can't cut your arm if you don't have hands or if you only have one arm and want to cut that same arm.
function ISCutLimb:isValid()
return self.patientX == self.patient:getX() and self.patientY == self.patient:getY()
@@ -43,6 +44,9 @@ function ISCutLimb:start()
body_damage_part:setCut(true)
body_damage_part:setBleedingTime(ZombRand(10,20))
-- TODO Make the object currently on the hand return to the inventory
end

View File

@@ -51,33 +51,6 @@ function ISInstallProsthesis:perform()
}
-- print(self.item)
-- TODO there is something wrong with how I'm managing prosthesis. they don't apply
-- TODO cheatMenu are fucked up, admin access is wrong
-- TODO make a parser or something I dont care
-- Check Item before doing any of this shit maybe
-- Assemble the correct name for the object
--local prosthesis_name = self.item:getname() .. "_" .. Right .. "_" .. Forearm
-- for _, v in ipairs(GetLimbsBodyPartTypes()) do
-- if v ~= BodyPartType.UpperArm_L or v ~= BodyPartType.UpperArm_R then
-- if self.bodyPart:getType() == v then
-- --local item_name = "TOC."
-- --local weight = math.floor(self.item:getWeight() * 10 + 0.5) / 10
-- TODO why do we need this?
-- end
-- end
-- end
if self.bodyPart:getType() == BodyPartType.Hand_R then lor = 1; foh = 1
elseif self.bodyPart:getType() == BodyPartType.ForeArm_R then lor = 1; foh = 2
elseif self.bodyPart:getType() == BodyPartType.Hand_L then lor = 0; foh = 1

View File

@@ -49,12 +49,6 @@ function ISUninstallProsthesis:perform()
return -- should never happen
end
--if accepting_body_parts[body_part_type] then
-- toc_data[TOC_getBodyPart(body_part_type)]
--end
for _, v in ipairs(GetAcceptingProsthesisBodyParts()) do
if self.bodyPart:getType() == v then
local part_name = FindTocBodyPartNameFromBodyPartType(v)
@@ -96,6 +90,8 @@ function ISUninstallProsthesis:perform()
end
end
-- TODO Make the object currently on the hand return to the inventory
end
function ISUninstallProsthesis:new(character, item, bodyPart)