aliens

Author Topic: Item Transfer Development  (Read 7917 times)

Offline sentin3l

  • Squaddie
  • *
  • Posts: 5
    • View Profile
Item Transfer Development
« on: February 04, 2011, 08:45:12 am »
Hi,

I want to refresh my C++ and contribute something to OpenXcom, so I decided to start on looking on Item Transfer (to Craft, to another Base).

Milestone 1:
* Refresh my C++
* Learning how to handle the guts of OpenXcom

Milestone 2:
* implement TransferList Class like the TextList one for Item checking / adding / transfering in "Transfers" and "Craft->Equipment"
* setup Screens (Background, Text, Buttons, TransferList)

Milestone 3:
* activate IRC and speak to supsuper (I know, maybe to late here, but I'm impatient - want to code a bit.)
* hope to don't have to throw away everything  ???
* implement suggestions / instructions / changes

Milestone 4:
* present patch

Offline sentin3l

  • Squaddie
  • *
  • Posts: 5
    • View Profile
Re: Item Transfer Development
« Reply #1 on: February 04, 2011, 08:50:16 am »
Hmm, was bored yesterday evening...

Milestone 1: Complete
Milestone 2: Not finished but some results are here.  :)

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Item Transfer Development
« Reply #2 on: February 04, 2011, 10:30:07 am »
Make sure you talk to supsuper first, because as far as I know the Item class is going to be obsolete, and replaced by something in the style of ItemContainer. Because on geoscape each inventory item is not an instance of an object in contrary to the battlescape. So the name "Item" is confusing, because the object actually represents a stack of items.

I also have a question: when soldiers are on a craft, the Base object still has ownership of the soldiers. Will that be the same with items?

edit: I don't it matters that much who has the ownership over soldiers and items on a craft, but it seems logical to me they both work the same way.

I'm also curious what happens if items are in transfer and the origin or destination base is destroyed by aliens :) Especially if destination is destroyed, will the goods be returned to the base of origin? :)
« Last Edit: February 04, 2011, 12:15:53 pm by Daiky »

Offline sentin3l

  • Squaddie
  • *
  • Posts: 5
    • View Profile
Re: Item Transfer Development
« Reply #3 on: February 04, 2011, 01:32:11 pm »
Make sure you talk to supsuper first, because as far as I know the Item class is going to be obsolete, and replaced by something in the style of ItemContainer. Because on geoscape each inventory item is not an instance of an object in contrary to the battlescape. So the name "Item" is confusing, because the object actually represents a stack of items.
Oh oh - but I was warned... I'll switch to IRC asap this weekend. Nevertheless enjoyed coding yesterday and really want to contribute, even if I have to rewrite everything or something different.
I also have a question: when soldiers are on a craft, the Base object still has ownership of the soldiers. Will that be the same with items?
Right now the Base still has the ownership.
I'm also curious what happens if items are in transfer and the origin or destination base is destroyed by aliens :) Especially if destination is destroyed, will the goods be returned to the base of origin? :)
Hmm, my Base<->Base Transfers are not implemented yet, but I would suggest that at GeoscapeState::time1Hour() check for complete Transfer and if destination are not existent, drop Items.
Can't remember how it was in the original, think the items were lost, too!?