Tuesday, December 26, 2017

Tracker - selling spec trade - just about there!

I had to make a few more changes to the database: we need to track the price we purchased it at and sell it at. This way you can tell if you are making a profit or not. I plan on logging all this to the ship log, but also I may not actually delete cargos from the ship cargo manifest, but set them to a sold/not there anymore status.  This would allow us to generate the cargo manifest from any point to any point in time.  In case the custom's inspector wants to see what you were carrying the last time you came through this system 6 months ago.  So eventually the print cargo manifest will allow you to print what is currently on board, or what was on board for a specified date range. I do stress the eventually...

A few other changes, and I've (finally) got the trade code stuff working, and allowing the players' to have a DM on the actual value table. The roll button should add the number of days to your ship calendar as per the searching for cargo I think, and I've got to wire up the actual sell part (which is coded but not called).  But the resulting price is the base price * the tons * the percent value (which I now realize I need to divide by 100 - there is some major price gouging in that image!)

And I also have to revisit purchasing the spec cargo - it will end up being the same user control but in buy mode vs sell mode.This way we can keep the price you paid for it as well.

I've also added a UserBackground brush to my resource dictionary so that all the user controls can have the same color - change it one place & they all get the same color. Just need to update the other controls to use that.  The light blue is not a great choice...

No comments: