安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题
This feature is not in my mod. And no belts were used anywhere.
The only possible bug I know right now is related with the welding mask.
If it is added to favorites, recipes with metal tools and handles will be inactive.
Line #3 is
I have zero knowledge in lua, and most of my code was written just by mashing buttons and seeing if it worked.
So it should work if i add this
Or just
You need both and you also need to define `OPTIONS` before you can assign it to RYT.OPTIONS
RYT = {} means it's an empty table
RYT.OPTIONS = <something> is the same thing as
RYT = {
OPTIONS = <something> ; here <something> can either be a value or reference to another table
}
In \client\RYT.OPTIONS.lua, you defined OPTIONS to be a table with one key/value pair, namely "Difficulty" = 1. If you are able to some how "require" the client file, then you don't need to declare again
But if I declare it again in RYT_Recipecode, then how it will receive data from RYT_Options then?.. I thought that the way I declared it is global, and can be read from anywhere. And it worked in single mode.
Does
require("RYT_Options");
will even work here?..
Or can I try to move all the files to the "server" folder?
MP coding is so confusing...
I don't write PZ mod so I can not tell you for sure how the lookup dependencies for the "require" statements work.
However, there is a "shared" folder and it seems you can simply put files in there with the the name you want, let say Options.lua. Then you can require them for things in the server and client folder by name.
You should consult IsTimer.lua in \media\luaexamples\IsTimer.lua. Now at the very top of the file is the line
Indeed, the paths are
\media\luaexamples\IsTimer.lua <- path of file requiring "IsBaseObject"
\media\lua\shared\IsBaseObject.lua <- path of the required file, totally in a different folder
So, here you can have
\media\lua\client\RYT_Options.lua
\media\lua\server\RYT_Options.lua
\media\lua\shared\Options.lua
In each RYT_Options.lua, at the top, write
For the one in server\RYT_Options.lua,
In \media\lua\shared\Options.lua, then write the code you want for the tables that will be shared across the client and server. In this case,
I hope that makes sense.