Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
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.