-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
partially attends to minetest-mapserver/mapserver#72
- Loading branch information
1 parent
821bf1a
commit 43ecc7d
Showing
3 changed files
with
25 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-- bones owner saving workaround | ||
-- https://github.com/minetest/minetest_game/blob/master/mods/bones/init.lua#L120 | ||
|
||
local bones_def = minetest.registered_items["bones:bones"] | ||
assert(bones_def) | ||
|
||
local bones_on_timer = bones_def.on_timer | ||
assert(bones_on_timer) | ||
assert(type(bones_on_timer) == "function") | ||
|
||
minetest.override_item("bones:bones", { | ||
on_timer = function(pos, elapsed) | ||
-- save owner in separate field | ||
local meta = minetest.get_meta(pos) | ||
meta:set_string("_owner", meta:get_string("owner")) | ||
|
||
-- call original function | ||
bones_on_timer(pos, elapsed) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
name = mapserver | ||
description = Mod for the mapserver. | ||
optional_depends = default, dye, advtrains, minecart, monitoring | ||
optional_depends = default, dye, advtrains, minecart, monitoring, bones |