An area for discussing new ideas and additions to Oolite.
Moderators: another_commander , winston
david todd
Harmless
Posts: 1 Joined: Fri Apr 03, 2009 7:17 pm
Post
by david todd » Fri Apr 03, 2009 7:28 pm
would it be possible for to mod oolite it so when you have bought a commodity and you look in the ships manifest it tells you what you paid for it and maybe which system you bought it in. I no i could use a pen and paper
Last edited by
david todd on Sat Apr 04, 2009 4:27 pm, edited 1 time in total.
CptnEcho
---- E L I T E ----
Posts: 536 Joined: Sun Oct 26, 2008 4:14 pm
Post
by CptnEcho » Fri Apr 03, 2009 9:45 pm
Or, you could write that information down into a notebook, travel & trade log, or even start your own transaction history via entries in your favorite speadsheet or database program.
"I shouldn't have taken off in this crate without more ammo..." Sergeant Knox - Star Blazers
Cmdr James
Commodore
Posts: 1357 Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin
Post
by Cmdr James » Sat Apr 04, 2009 10:17 am
There are other ways to get things, such as scooping cargo, or awarded by scripts (Ore Extracter oxp for example).
You may also have 35t of food, each one from a different place and different price , how would we display that?
Ebi
Competent
Posts: 40 Joined: Fri Jun 27, 2008 9:45 pm
Post
by Ebi » Mon Apr 06, 2009 4:36 pm
Cmdr James wrote: There are other ways to get things, such as scooping cargo, or awarded by scripts (Ore Extracter oxp for example).
You may also have 35t of food, each one from a different place and different price , how would we display that?
The average price would be okay.
ClymAngus
---- E L I T E ----
Posts: 2514 Joined: Tue Jul 08, 2008 12:31 am
Location: London England
Contact:
Post
by ClymAngus » Mon Apr 06, 2009 5:31 pm
Ebi wrote: Cmdr James wrote: There are other ways to get things, such as scooping cargo, or awarded by scripts (Ore Extracter oxp for example).
You may also have 35t of food, each one from a different place and different price , how would we display that?
The average price would be okay.
Here!
https://bb.oolite.space/viewtopic.php?t= ... et&start=0
Ebi
Competent
Posts: 40 Joined: Fri Jun 27, 2008 9:45 pm
Post
by Ebi » Mon Apr 06, 2009 7:13 pm
Deja Vu - That strange feeling we sometimes get that we've lived through something before...
CptnEcho
---- E L I T E ----
Posts: 536 Joined: Sun Oct 26, 2008 4:14 pm
Post
by CptnEcho » Tue Apr 07, 2009 10:36 am
Amazing what the "search" feature of the forums might reveal, eh?
"I shouldn't have taken off in this crate without more ammo..." Sergeant Knox - Star Blazers
ClymAngus
---- E L I T E ----
Posts: 2514 Joined: Tue Jul 08, 2008 12:31 am
Location: London England
Contact:
Post
by ClymAngus » Tue Apr 07, 2009 3:35 pm
Let us not be uncharitable gentlemen. An old question is also an easy answer to the enlightened.
There are no points to be scored in the eternal search for knowledge. Only truth to be shown to the new by the old.
Cmdr James
Commodore
Posts: 1357 Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin
Post
by Cmdr James » Tue Apr 07, 2009 4:30 pm
I dont think this is actually what the guy weas asking for anyway. He wanted to know how much he had paid, and therefore the amount to display should not be the average price overall, but rather the average price payed for the actual items in the hold.
Ebi
Competent
Posts: 40 Joined: Fri Jun 27, 2008 9:45 pm
Post
by Ebi » Wed Apr 08, 2009 5:08 pm
That was my understanding as well. I was talking of the average buy price.
There must be an internal representation of the cargo list. For instance:
c.av = (c.av * c.amnt + price * amnt) / (c.amnt + amnt);
c.amnt += amnt;
Hmm. what happens if you sell the item partially?
c.amnt -= amnt
That much is clear!
No wait! You need a separate amnt variable which is never decreased. c.buy_amnt rather than amnt.