-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improvements to the core of EventCallback is now called Event * renamed the folder to events, which is correct now, and freed up the use of this folder in scripts * Compatibility with the previous version. * unnecessary temporary * resol conflicts
- Loading branch information
1 parent
a4471ed
commit 2cdf1de
Showing
20 changed files
with
166 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
function Monster:onDropLoot(corpse) | ||
local onDropLoot = EventCallback.onDropLoot | ||
if onDropLoot then | ||
onDropLoot(self, corpse) | ||
end | ||
if hasEvent.onDropLoot then | ||
Event.onDropLoot(self, corpse) | ||
end | ||
local player = Player(corpse:getCorpseOwner()) | ||
if player then | ||
player:updateKillTracker(self, corpse) | ||
end | ||
end | ||
|
||
function Monster:onSpawn(position, startup, artificial) | ||
local onSpawn = EventCallback.onSpawn | ||
if onSpawn then | ||
return onSpawn(self, position, startup, artificial) | ||
if hasEvent.onSpawn then | ||
return Event.onSpawn(self, position, startup, artificial) | ||
end | ||
return true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.