reformatted everything

This commit is contained in:
Pao
2023-01-22 04:09:03 +01:00
parent b6b010705a
commit 713c250af9
21 changed files with 325 additions and 348 deletions

View File

@@ -51,13 +51,12 @@ function ISCutLimb:start()
body_damage_part:setBleeding(true)
body_damage_part:setCut(true)
body_damage_part:setBleedingTime(ZombRand(10,20))
body_damage_part:setBleedingTime(ZombRand(10, 20))
end
function ISCutLimb:findArgs()
local surgeon_factor = self.surgeon:getPerkLevel(Perks.Doctor)
if self.surgeon:getDescriptor():getProfession() == "surgeon" then surgeon_factor = surgeon_factor + 15 end
@@ -67,10 +66,11 @@ function ISCutLimb:findArgs()
local bandage_table = {
use_bandage = false,
bandage_type = nil,
is_bandage_sterilized = nil}
is_bandage_sterilized = nil
}
local painkiller_table = {}
local bandage = self.surgeon:getInventory():FindAndReturn('Bandage')
local sterilized_bandage = self.surgeon:getInventory():FindAndReturn('AlcoholBandage')
@@ -102,7 +102,6 @@ function ISCutLimb:findArgs()
return surgeon_factor, bandage_table, painkiller_table
end
function ISCutLimb:perform()
local surgeon_factor, bandage_table, painkiller_table = self:findArgs()
@@ -125,7 +124,6 @@ function ISCutLimb:perform()
end
function ISCutLimb:new(patient, surgeon, part_name)
local o = {}
setmetatable(o, self)
@@ -146,4 +144,4 @@ function ISCutLimb:new(patient, surgeon, part_name)
o.fromHotbar = true
if o.patient:isTimedActionInstant() then o.maxTime = 1 end
return o
end
end

View File

@@ -47,9 +47,9 @@ function ISInstallProsthesis:perform()
if part_name then
toc_data.Limbs[part_name].is_prosthesis_equipped = true -- TODO should we show that the hand has a prost too if it's installed in the forearm?
toc_data.Limbs[part_name].is_prosthesis_equipped = true -- TODO should we show that the hand has a prost too if it's installed in the forearm?
toc_data.Limbs[part_name].equipped_prosthesis = toc_data.Prosthesis[prosthesis_base_name][part_name]
self.character:getInventory():Remove(self.item)
self.character:setWornItem(self.cloth:getBodyLocation(), self.cloth)
end

View File

@@ -44,7 +44,7 @@ function ISOperateLimb:findArgs()
surgeon_factor = surgeon_factor + 6
end
end
if self.surgeon:getDescriptor():getProfession() == "surgeon" then surgeon_factor = surgeon_factor + 10 end
if self.surgeon:getDescriptor():getProfession() == "doctor" then surgeon_factor = surgeon_factor + 5 end
if self.surgeon:getDescriptor():getProfession() == "nurse" then surgeon_factor = surgeon_factor + 2 end
@@ -88,16 +88,16 @@ function ISOperateLimb:new(patient, surgeon, kit, part_name, use_oven)
--o.use_oven = use_oven;
if use_oven then
o.maxTime = 30
else
else
o.maxTime = 200 - (surgeon:getPerkLevel(Perks.Doctor) * 10)
end
o.stopOnWalk = true
o.stopOnRun = true
o.ignoreHandsWounds = false
o.fromHotbar = true
if o.patient:isTimedActionInstant()then
o.maxTime = 1
if o.patient:isTimedActionInstant() then
o.maxTime = 1
end
return o
end

View File

@@ -46,7 +46,7 @@ function ISUninstallProsthesis:perform()
local accepting_body_parts = GetAcceptingProsthesisBodyPartTypes()
if accepting_body_parts == nil then
return -- should never happen
return -- should never happen
end
for _, v in ipairs(GetAcceptingProsthesisBodyPartTypes()) do
@@ -54,7 +54,7 @@ function ISUninstallProsthesis:perform()
local part_name = TocGetPartNameFromBodyPartType(v)
print("Found prost in " .. part_name)
if part_name then
if part_name then
toc_data.Limbs[part_name].is_prosthesis_equipped = false
local item_full_type = self.item:getFullType()
print("Searching for " .. item_full_type)
@@ -67,10 +67,10 @@ function ISUninstallProsthesis:perform()
self.character:setWornItem(self.item:getBodyLocation(), nil)
self.character:getInventory():Remove(self.item)
self.character:transmitModData()
-- needed to remove from queue / start next.
ISBaseTimedAction.perform(self)
end
end
@@ -104,5 +104,3 @@ function ISUninstallProsthesis:new(character, item, bodyPart)
if o.character:isTimedActionInstant() then o.maxTime = 1; end
return o;
end