commodity price
Moderators: winston, another_commander
- david todd
- Harmless
- Posts: 1
- Joined: Fri Apr 03, 2009 7:17 pm
commodity price
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.
- Cmdr James
- Commodore
- Posts: 1357
- Joined: Tue Jun 05, 2007 10:43 pm
- Location: Berlin
- ClymAngus
- ---- E L I T E ----
- Posts: 2514
- Joined: Tue Jul 08, 2008 12:31 am
- Location: London England
- Contact:
Here!Ebi wrote:The average price would be okay.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?
https://bb.oolite.space/viewtopic.php?t= ... et&start=0
- Cmdr James
- Commodore
- Posts: 1357
- Joined: Tue Jun 05, 2007 10:43 pm
- Location: Berlin
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.
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.