Page 3 of 3
Re: [WIP] Duplex Fuel Tank v0.5
Posted: Thu Jul 30, 2015 8:50 am
by Lone_Wolf
Interesting approach, Timer.
Looking at your code, your DFT looks a lot more like 3x 1 LY tanks then a 1x 3 LY fueltank to me.
Was this your intention ?
P.S. your code is well structured, but i suggest you to read
https://bb.oolite.space/viewtopic.php?f=4&t=12149 .
Re: [WIP] Duplex Fuel Tank v0.5
Posted: Thu Jul 30, 2015 10:54 am
by timer
Lone_Wolf wrote:Interesting approach, Timer.
Looking at your code, your DFT looks a lot more like 3x 1 LY tanks then a 1x 3 LY fueltank to me.
Was this your intention ?
P.S. your code is well structured, but i suggest you to read
https://bb.oolite.space/viewtopic.php?f=4&t=12149 .
Hi!
thank for feedback )
I think my external tank can be full or not )
and it has discrete I/O portions.
hmm... what wrong in OXP code or pack?
Re: [WIP] Duplex Fuel Tank v0.5
Posted: Thu Jul 30, 2015 1:34 pm
by Lone_Wolf
timer wrote:I think my external tank can be full or not )
and it has discrete I/O portions.
suppose the dft is empty, and i buy 1 refill only and launch. At that point the dft is 1/3 full .
I do like the idea of being able to finetune fuel use a bit, and a design with discrete I/O portions does feel like a good choice for rocketfuel.
timer wrote:hmm... what wrong in OXP code or pack?
There's nothing really wrong with your code/pack, but it could be improved.
- you don't include a readme file and/or change log in the oxz
- you could add some more comments for documentation purpose
example : this.info = function(cs)
no description what kind of input values cs can have
(in a small oxp like this it's not hard to figure that out, but in larger oxps it matters a lot)
- naming
- oolite core functions start with lowercase or uppercase (mainly Constructors) letters.
if oxp functions use those also it could lead to confusion / clashes.
preceding oxp functions with _ (my personal preference) or $ prevents that.
- using unique names in oxps helps a lot with troubleshooting.
prepending names with a few letters specific to the oxp makes this easy.
- ex:
this.get_current_state
could become this._dft_get_current_state
Re: [WIP] Duplex Fuel Tank v0.5
Posted: Thu Jul 30, 2015 2:38 pm
by timer
Lone_Wolf wrote:
There's nothing really wrong with your code/pack, but it could be improved.
Ok, I understood. I agree with all points.
When I'll get a bit free time from coding on main job - I try to do tiny refactor
Thanks!
Re: [WIP] Duplex Fuel Tank v0.5
Posted: Sun Feb 26, 2023 3:16 pm
by timer
real life is time machine from nightmare...
there was a "tiny" delay with the update
uploaded v0.52