[WIP] Duplex Fuel Tank v0.5

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: [WIP] Duplex Fuel Tank v0.5

Post 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 .
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
User avatar
timer
---- E L I T E ----
---- E L I T E ----
Posts: 336
Joined: Sat Mar 17, 2012 8:26 pm
Location: Laenin spiv club
Contact:

Re: [WIP] Duplex Fuel Tank v0.5

Post 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?
Cobra MK III owner since 1994
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: [WIP] Duplex Fuel Tank v0.5

Post 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.
  1. you don't include a readme file and/or change log in the oxz
  2. 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)
  3. naming
    1. 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.
    2. using unique names in oxps helps a lot with troubleshooting.
      prepending names with a few letters specific to the oxp makes this easy.
    3. ex: this.get_current_state could become this._dft_get_current_state
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
User avatar
timer
---- E L I T E ----
---- E L I T E ----
Posts: 336
Joined: Sat Mar 17, 2012 8:26 pm
Location: Laenin spiv club
Contact:

Re: [WIP] Duplex Fuel Tank v0.5

Post 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!
Cobra MK III owner since 1994
User avatar
timer
---- E L I T E ----
---- E L I T E ----
Posts: 336
Joined: Sat Mar 17, 2012 8:26 pm
Location: Laenin spiv club
Contact:

Re: [WIP] Duplex Fuel Tank v0.5

Post by timer »

real life is time machine from nightmare...
there was a "tiny" delay with the update :(
uploaded v0.52
Cobra MK III owner since 1994
Post Reply