-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Buckaroo Banzai <[email protected]>
- Loading branch information
1 parent
c02568e
commit 2f4f3b7
Showing
3 changed files
with
83 additions
and
0 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
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,81 @@ | ||
|
||
-- Register wrench support for mapserver mod | ||
|
||
wrench.register_node("mapserver:border", { | ||
lists = {}, | ||
metas = { | ||
color = wrench.META_TYPE_STRING, | ||
formspec = wrench.META_TYPE_IGNORE, | ||
index = wrench.META_TYPE_INT, | ||
infotext = wrench.META_TYPE_IGNORE, | ||
name = wrench.META_TYPE_STRING, | ||
owner = wrench.META_TYPE_STRING, | ||
}, | ||
owned = true, | ||
after_place = function(pos, player) | ||
local node_def = core.registered_nodes["mapserver:border"] | ||
node_def.on_receive_fields(pos, nil, {}, player) | ||
end, | ||
}) | ||
|
||
|
||
wrench.register_node("mapserver:label", { | ||
lists = {}, | ||
metas = { | ||
color = wrench.META_TYPE_STRING, | ||
direction = wrench.META_TYPE_STRING, | ||
formspec = wrench.META_TYPE_IGNORE, | ||
infotext = wrench.META_TYPE_IGNORE, | ||
owner = wrench.META_TYPE_STRING, | ||
size = wrench.META_TYPE_STRING, | ||
text = wrench.META_TYPE_STRING, | ||
}, | ||
owned = true, | ||
after_place = function(pos, player) | ||
local node_def = core.registered_nodes["mapserver:label"] | ||
node_def.on_receive_fields(pos, nil, {}, player) | ||
end, | ||
}) | ||
|
||
|
||
wrench.register_node("mapserver:train", { | ||
lists = {}, | ||
metas = { | ||
color = wrench.META_TYPE_STRING, | ||
formspec = wrench.META_TYPE_IGNORE, | ||
index = wrench.META_TYPE_INT, | ||
infotext = wrench.META_TYPE_IGNORE, | ||
line = wrench.META_TYPE_STRING, | ||
owner = wrench.META_TYPE_STRING, | ||
station = wrench.META_TYPE_STRING, | ||
}, | ||
owned = true, | ||
after_place = function(pos, player) | ||
local node_def = core.registered_nodes["mapserver:train"] | ||
node_def.on_receive_fields(pos, nil, {}, player) | ||
end, | ||
}) | ||
|
||
|
||
for _, colour in ipairs({ "blue", "green", "orange", "red", "purple" }) do | ||
local node_name = "mapserver:poi_" .. colour | ||
wrench.register_node(node_name, { | ||
lists = {}, | ||
metas = { | ||
addr = wrench.META_TYPE_STRING, | ||
formspec = wrench.META_TYPE_IGNORE, | ||
icon = wrench.META_TYPE_STRING, | ||
image = wrench.META_TYPE_STRING, | ||
infotext = wrench.META_TYPE_STRING, | ||
name = wrench.META_TYPE_STRING, | ||
owner = wrench.META_TYPE_STRING, | ||
url = wrench.META_TYPE_STRING, | ||
}, | ||
owned = true, | ||
after_place = function(pos, player) | ||
local node_def = core.registered_nodes[node_name] | ||
node_def.on_receive_fields(pos, nil, {}, player) | ||
end, | ||
}) | ||
end | ||
|