Yeti wrote: ↑Sat Sep 25, 2021 15:28
...
Any thoughts on this? I'd love to hear them
It wont be anything to elegant I'm very much self-taught, although i did a little programming way back in highschool on the old apple IIe's. I think of my coding/scripting style as simplistic/rustic :).
reversed inputs, to be honest not too sure, the fission and fusion reactors are two I have looked at the least, although I did check out the electrolyzor a little more. Icy wrote so much code its taken me quiet awhile to get my head around it and I still have big gaps. fluid_lib handles most of the in's and outs so there could be abit of a problem in the code for fluid_lib or it might relate to the issue Icy mentions way back were node sides arent properly designated in/out - if the electrolyzer is involved im leaning towards the second guess. I'll fix those two bugs yourself and Markus identified and then have a dig.
Edit
Probably not a very smart way to go as I can see this tripping me or someone up in the future as it makes node reg naming convention important - untidy quickfix:
Code: Select all
if not string.find(reg_name, "active") then
new_name = "elepower_lighting:"..string.match(reg_name, ':(.-)_').."_floodlight_x"..rpn..rotate.."_y"..tpn..tilt
else
new_name = "elepower_lighting:"..string.match(reg_name, ':(.-)_').."_floodlight_x"..rpn..rotate.."_y"..tpn..tilt.."_active"
end
i'll add a new local var at the top of the code block and just insert "bulb/light_type", I could add a new field to node def table something like ele_light/bulb_type = "ccf/incan/led" but as floodlights only need to know type I'll avoid that for now and use the string match on the reg_name. Also looks like an unessecary nested if inside the floodlight code block, I wont touch that with these fixes but will note it for later fix.
Also picked up that lighting wont run off any powercell....I didn't update the status message in lighting as for a human pretty obvious when they are on/off but for the network/battery code it needs to know so I'll fix that as well.
Edit 2 - Info for everyone :)
Both fix's pushed to git master - note master does currently contain my work to make it easier to integrate elepower with a non-MTG base game. It shouldn't affect functionality but it is significant change - wrapping of external node/item names in internal elepower vars and providing a config file so I could have dumb thumbed something. On the plus side updating the config file is easy, assuming I didnt dumb thumb the var name in the code.....I'll do an a.23 version once I fix lighting so they run of batteries and see if I can improve in the ins/outs on the electrolyzer at least.
Download link for master zip -
https://github.com/sirrobzeroone/elepow ... master.zip
On extract just remove "-master" bit or rename the folder back to plain old elepower and then drop across to your mods folder in minetest folder and overwrite all if asked.
Content DB version will come with a.23
Note: I am aware aliasing can do that but pain the butt for a game developer if you dont know what to alias :).