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
5. This is truly a personal nitpick and not a real issue, but when checking for variables, it's good to keep this in mind:
'if x then' // 'if x == true or x ~= nil then'
'if not x then' // 'if x == false or x == nil then'
These terms are generally more readable when (and faster to write) when you have more experience coding.
1. You are barely using enumerations (i.e. typing Isaac.Spawn(1000, ...) instead of Isaac.Spawn(EntityType.ENTITY_EFFECT, ...)), this makes the code pretty unreadable and specially if you start making custom stuff, it might cause issues with dynamic ids and whatnot.
2. On the topic of readability, some of your statements get pretty long, generally it's best to keep each check in its own line.
i.e. 'if x and y then' to
'if x'
'and y'
'then'
3. In this case it doesn't matter, but it's generally a bad practice to define static objects more than once, in your case you're defining a Color every time you spawn an outline, but the color is always the same, so really there's no reason not to define it at the top of your code as a constant.
Ok I've now defined the json library, thank you for pointing that out. I'm pretty new to modding, Isaac or otherwise, so your help is much appreciated.