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
Hooks:PostHook(Class, "function_name", "posthook_name", function(self, [args...])
end)
Same thing with PreHook which is called before the original function, but is called Hooks:PreHook.
I won't recommend doing the above method for people who don't understand lua. If you ever use this method, you have to include '...'. So if overkill adds new arguments your mod won't break anything.
Posting an example is also fine, I learned most programming languages by reading examples (because trial and error is a little hard withouth debugger)
Anyway, It should be....
(The other file my mod changes did work)
Change returns to something like:
if true then return false end
allow_fire = yes
If I wanted to change this so it was
allow_fire = no
Would you do a prehook or posthook? If I did pre then would the original value be what is used since it is being called after my modified version?
In general I am always a bit confused whether to use a prehook or a posthook. Is there a general rule of thumb or any information?
Thanks!