Begin implementing more OOP-like design
This commit is contained in:
40
machines/activated_electric_machine.lua
Normal file
40
machines/activated_electric_machine.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
-- IndustrialTest
|
||||
-- Copyright (C) 2024 mrkubax10
|
||||
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
industrialtest.ActivatedElectricMachine=table.copy(industrialtest.ElectricMachine)
|
||||
|
||||
function industrialtest.ActivatedElectricMachine.onTimer(self,pos,elapsed)
|
||||
industrialtest.ElectricMachine.requestPower(self,pos)
|
||||
return industrialtest.ActivatedMachine.onTimer(self,pos,elapsed)
|
||||
end
|
||||
|
||||
industrialtest.ActivatedElectricMachine.register=industrialtest.ActivatedMachine.register
|
||||
|
||||
industrialtest.ActivatedElectricMachine.createDefinitionTable=industrialtest.ActivatedMachine.createDefinitionTable
|
||||
|
||||
industrialtest.ActivatedElectricMachine.shouldActivate=industrialtest.ActivatedMachine.shouldActivate
|
||||
|
||||
industrialtest.ActivatedElectricMachine.shouldDeactivate=industrialtest.ActivatedMachine.shouldDeactivate
|
||||
|
||||
industrialtest.ActivatedElectricMachine.beforeActivation=industrialtest.ActivatedMachine.beforeActivation
|
||||
|
||||
industrialtest.ActivatedElectricMachine.beforeDeactivation=industrialtest.ActivatedMachine.beforeDeactivation
|
||||
|
||||
function industrialtest.ActivatedElectricMachine.activeOnTimer(self,pos,elapsed)
|
||||
industrialtest.ElectricMachine.requestPower(self,pos)
|
||||
return industrialtest.ActivatedMachine.activeOnTimer(self,pos,elapsed)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user