42.20 and Towtrucks

This commit is contained in:
2026-08-13 18:59:54 -04:00
parent a6ba4877d0
commit e403323017
33 changed files with 2333 additions and 142 deletions
@@ -0,0 +1,35 @@
require("TimedActions/ISBaseTimedAction")
WreckerTimedAction = ISBaseTimedAction:derive("WreckerTimedAction")
function WreckerTimedAction:isValid()
return self.isValidFunc ~= nil
and self.isValidFunc(self.character, self.arg1, self.arg2) == true
end
function WreckerTimedAction:start()
end
function WreckerTimedAction:perform()
if self:isValid() and self.performFunc then
self.performFunc(self.character, self.arg1, self.arg2)
end
ISBaseTimedAction.perform(self)
end
function WreckerTimedAction:stop()
ISBaseTimedAction.stop(self)
end
function WreckerTimedAction:new(character, time, isValidFunc, performFunc, arg1, arg2)
local action = ISBaseTimedAction.new(self, character)
action.maxTime = time
action.stopOnWalk = false
action.stopOnRun = false
action.useProgressBar = true
action.isValidFunc = isValidFunc
action.performFunc = performFunc
action.arg1 = arg1
action.arg2 = arg2
return action
end