英文名称 | Streetbuilder |
中文名称 | |
作者 | heger - ContentDB |
语言 | 英语 |
版本 | Minetest Minetest Version: 5.5.1 |
依赖Mode或插件 | |
Mode类型 | 街道 |
开源协议 | LGPL-3.0-or-later |
视频例子 | |
原视频地址 | |
原始地址 | Streetbuilder - ContentDB |
代码仓库 | Seckl / streetbuilder · GitLab |
下载地址 | Streetbuilder - ContentDB |
简历 | 这个模组可以让你半自动地建造街道。您只需要提供街道必须经过的一些点和一些街道参数,例如宽度、街区类型或街道是否应该有码头。 |
streetname
标记点 名称
MyStreet
标记点 名称
F5查看坐标
最简单的方法是沿着路线飞行并用 标记重要点/street MyStreet set point next
:
/street 1 set point next 玩家位置开始坐标
/street 1 set point next x,y,z 输入结束地点 坐标
/street 1 build`
街道参数可以在模组中编辑和保存。只需一个命令即可建造、移除和重建街道。
限制和已知错误
生成的街道非常基础。只使用标准的 Minetest 节点,没有花哨的道路标记或标志,没有交通信号灯等,只有立方体。但是,当然,您可以在使用此 mod 生成街道后手动编辑街道。
建筑算法在普通街道上效果很好。如果街道变得太陡,那么它可能包含人工制品并且看起来很破旧。
有时街道没有完全建成你第一次execute /street <streetname> build
。然后只需重新运行命令,直到街道完成。
用法
该模组提供了 Minetest 聊天命令/street
来编辑和建造街道。
/street
Show all streets currently saved in the mod storage.
/street <streetname> set point <N>|next <X>,<Y>,<Z>
Set point <N> or next point of street <streetname> to position <X>,<Y>,<Z>.
If no position is given then the current player position is used.
/street <streetname> set point all <X1>,<Y1>,<Z1> <X2>,<Y2>,<Z2> <Xn>,<Yn>,<Zn>
Replace all points of street <streetname> with the given positions. Previous points will be deleted!
/street <streetname> set bordernode|roadnode|linenode|piersnode|pointsnode <nodename>
Set the border/road surface/center line/bridge piers/original points node type of street <streetname> to <nodename>.
If <nodename> is omitted the node type will be reset to default.
If pointsnode is set then the manually set points will be marked (for debugging).
/street <streetname> set air|pierdist <N>
Set the number of air nodes above street/the distance between bridge piers.
If air is not set the default value is used.
If pierdist is not set no bridge piers are built.
/street <streetname> ins point <N> <X>,<Y>,<Z>
Insert point <N> of street <streetname> at position <X>,<Y>,<Z>.
If no position is given then the current player position is used.
/street <streetname> del point <N>
Delete point <N> of street <streetname>.
/street <streetname> get
/street <streetname> get all
Show all parameters of street <streetname>.
/street <streetname> get point <N>
Show the position of point <N> in street <streetname>.
/street <streetname> get point
/street <streetname> get point all
Show all points in street <streetname>.
/street <streetname> get bordernode|roadnode|linenode|piersnode|pointsnode
Show the node type of the border/road surface/center line/bridge piers/original points of street <streetname>.
/street <streetname> build
Generate the street <streetname> in the current world.
/street <streetname> vanish
Make the street <streetname> disappear in the current world. The volume around the street will be re-generated to its original state.
/street <streetname> delete
Delete all data of street <streetname> from the mod storage.
If you already generated the street in the world you may want to issue "/street <streetname> vanish" before deleting its data.
例子
建造街道最简单的方法是沿着路线飞行并用 标记重要点/street MyStreet set point next
:
/street MyStreet set point next
Point 1 of street "MyStreet" set to player position -131,14,310.
/street MyStreet set point next
Point 2 of street "MyStreet" set to player position -96,27,308.
/street MyStreet set point next
Point 3 of street "MyStreet" set to player position 19,42,311.
/street MyStreet set point next
Point 4 of street "MyStreet" set to player position 76,42,224.
/street MyStreet set point next
Point 5 of street "MyStreet" set to player position 156,29,189.
/street MyStreet set point next
Point 6 of street "MyStreet" set to player position 254,29,152.
显示点和默认值:
/street MyStreet get all
Properties of street "MyStreet":
Point 1: -131,14,310
Point 2: -96,27,308
Point 3: 19,42,311
Point 4: 76,42,224
Point 5: 156,29,189
Point 6: 254,29,152
bordernode is not set. Using default (default:meselamp).
roadnode is not set. Using default (default:stone).
linenode is not set. Using default (default:stone).
piersnode is not set. Using default (default:stone_block).
pointsnode is not set. Using default (do not mark the original points).
width is not set. Using default (3).
air is not set. Using default (5).
pierdist is not set. Using default (do not build bridge piers).
修改并显示单个值:
/street MyStreet set pierdist 20
pierdist of street "MyStreet" set to 20.
/street MyStreet set linenode wool:red
linenode of street "MyStreet" set to wool:red.
/street MyStreet get pierdist
pierdist of street "MyStreet" is set to 20.
/street MyStreet get linenode
linenode of street "MyStreet" is set to wool:red.
建造街道:
/street MyStreet build
To make the street build reliably we emerge the area around the street ...
Area emerged.
Building street 7 blocks broad with 5 nodes of air above...
Calculating coordinates
Placing nodes
Building street done.
让街道再次消失:
/street MyStreet vanish
API
您可以从其他模块调用 main 函数streetbuilder.build_street(plname,points,params,vanish)
来构建一条街道。
该函数返回一个表格,其中包含构建街道的参数。
使用默认参数构建街道:
streetbuilder.build_street(plname,{ {x=114,y=7,z=595}, {x=129,y=9,z=588}, {x=137,y=10,z=565}, {x=113,y=9,z=535} })
使用给定的节点类型构建街道:
streetbuilder.build_street(plname,{ {x=114,y=7,z=595}, {x=129,y=9,z=588}, {x=137,y=10,z=565}, {x=113,y=9,z=535} },{roadnode='default:stone_block',bordernode='wool:blue'})
在街道下方建造桥墩:
streetbuilder.build_street(plname,{ {x=114,y=7,z=595}, {x=129,y=9,z=588}, {x=137,y=10,z=565}, {x=113,y=9,z=535} },{pierdist=30,piersnode='wool:yellow'})
标记原始点(用于调试):
streetbuilder.build_street(plname,{ {x=114,y=7,z=595}, {x=129,y=9,z=588}, {x=137,y=10,z=565}, {x=113,y=9,z=535} },{pointsnode='wool:red'})
从世界中删除街道并重新生成街道周围的原始世界:
streetbuilder.build_street(plname,{ {x=114,y=7,z=595}, {x=129,y=9,z=588}, {x=137,y=10,z=565}, {x=113,y=9,z=535} },{},true)