Today's project is to finally finish the cargo move functionality, which is going to involve a lot of code refactoring. This will let ships move items from their cargo holds into the cargo area of colonies that are also owned by the player. I had a half-assed version of this done a while back, but the data tables have changed a bit in the meantime and it never really worked right anyway.
This is fairly complicated functionality, since a player will want to move partial stacks of items, which is different from moving an entire item. So for example, if a player has 100 Precious Metals ore on their ship, they may only want to move 50 of them, which involves possibly creating a new stack of that item in the colony unless there is already a stack of Precious Metals there in which case it would just add 50 to it.
At least I already have the interface in place, I just need to get all of the functions behind the scenes working correctly now.
No comments:
Post a Comment