2014-01-04 15:39:52 +01:00
|
|
|
--[[
|
|
|
|
|
Illarion Server
|
|
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify it under
|
|
|
|
|
the terms of the GNU Affero 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 Affero General Public License for more
|
|
|
|
|
details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License along
|
2020-12-06 23:34:30 +01:00
|
|
|
with this program. If not, see <http://www.gnu.org/licenses/>.
|
2014-01-04 15:39:52 +01:00
|
|
|
]]
|
2014-09-17 03:50:05 +02:00
|
|
|
local class = require("base.class")
|
2010-06-24 17:13:46 +00:00
|
|
|
|
2014-09-22 23:18:12 +02:00
|
|
|
local _consequence_helper_empty
|
2010-06-24 17:13:46 +00:00
|
|
|
|
|
|
|
|
--- Basic class for all consequences. Its never needed to create a instance of
|
|
|
|
|
-- this class. Its just a collection of methods the specific consequences
|
|
|
|
|
-- share.
|
2014-09-23 20:14:37 +02:00
|
|
|
local consequence = class(function(self)
|
2014-09-22 23:18:12 +02:00
|
|
|
self["perform"] = _consequence_helper_empty
|
|
|
|
|
end)
|
2010-06-24 17:13:46 +00:00
|
|
|
|
|
|
|
|
function consequence:setNPC(npc)
|
2014-09-22 23:18:12 +02:00
|
|
|
self["npc"] = npc
|
|
|
|
|
end
|
2010-06-24 17:13:46 +00:00
|
|
|
|
2012-08-11 19:39:29 +02:00
|
|
|
function _consequence_helper_empty(self, npcChar, player)
|
2010-06-24 17:13:46 +00:00
|
|
|
-- by default nothing is done
|
2014-09-22 23:18:12 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return consequence
|