Open SvarogZ opened 3 years ago
Thanks for the input!
For the color function there's no no need to place more utils, rounds (more cpu) and take down the "minimum" "medium" and "max" threshold warning. For color conventions, I do endorse the use of hexs and web colors thru names. You can still use rgb, but it's a bit, duhhhh. (unless u need to do a transparency, and in that case, you should use an argb). I could make the color variables so you change them in parameters (if you please you can type rgb(x,y,z) if you like. If you don't like the 3 color settings, you can just workaround the settings.
For now I will not make different containers in one hub. We have character limit on the names (30), and it will be to damn confuse to accomplish that.
Last version brought the capacity of multiple "standalone" containers with the same ore, but but different sizes within one container hub is very tricky. CH_1L_3M_4S_IRON ?? Don't have space left...
For the temp variable in the first quote, i could make it local. It will prevent future unpleasantness if I reuse that name.
Thanks!
Yes, the character limit does not allow to type everything. This is a brilliant idea and I started to use it in my code. However, I use direct entering "uid" of the hub. If this hub on the same screen it's easier. No neer to search it in a cycle. We have around 10k elements :)
Thank you!
P.S. if you add a formatted version of your code, it will be easier for visitors to give you feedback. Not everyone wants to copy this to the game or parse it.
Alternatively, you can use the capacity instead: CH_196.0_IRON or CH_IRON_196.0
Added the locals on the core code. Don't quite understand why I should change from pairs to ipairs. other idea to avoid another cycle is to store the uids in the database. i'm uncertain if that helps, or how much miliseconds will be affected.
Please check all cycles and local variables across the code. Please see comments below
Improvement to color the line:
This code cannot work with different containers in one hub. Please consider specifying the volume/capacity in the name of the hub.