Bunch of cleaning on old todos

This commit is contained in:
Pao
2023-02-06 02:44:59 +01:00
parent 83077a115d
commit 1545c88a19
10 changed files with 18 additions and 106 deletions

View File

@@ -2,7 +2,6 @@ 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()
@@ -33,6 +32,7 @@ end
function ISCutLimb:start()
-- 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.
self:setActionAnim("SawLog")
local saw_item = TocGetSawInInventory(self.surgeon)
@@ -119,7 +119,7 @@ function ISCutLimb:perform()
TocCutLimb(self.part_name, surgeon_factor, bandage_table, painkiller_table)
end
self.surgeon:getEmitter():stopSoundByName("Amputation_Sound") -- TODO This doesn't work reliably
self.surgeon:getEmitter():stopSoundByName("Amputation_Sound")
self.surgeon:getXp():AddXP(Perks.Doctor, 400)
ISBaseTimedAction.perform(self)
@@ -131,7 +131,7 @@ function ISCutLimb:new(patient, surgeon, part_name)
local o = {}
setmetatable(o, self) -- TODO what's this crap?
setmetatable(o, self)
self.__index = self
o.part_name = part_name
o.character = surgeon -- For anim

View File

@@ -23,7 +23,7 @@ end
function ISOperateLimb:start()
self:setActionAnim("MedicalCheck")
if self.use_oven then
self.sound = self.patient:getEmitter():playSound("Burn_sound") -- TODO currently broken, but maybe that's good
self.sound = self.patient:getEmitter():playSound("Burn_sound")
self:forceComplete()
end
end
@@ -63,7 +63,6 @@ function ISOperateLimb:perform()
end
self.surgeon:getXp():AddXP(Perks.Doctor, 400)
-- FIXME Add a check for kit to prevent errors
if self.kit and not use_oven then
self.surgeon:getInventory():Remove(self.kit)
end