UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Open Submit Patch #4756 misc_inventory edict support
Go to the next issue (open or closed)
Go to the next open issue
bayo-fr (@bayo-fr) has been working on this issue since January 28, 2013 (20:51)
Issue basics
  • Type of issue
    Submit Patch
  • Category
    General
  • Targetted for
    Not determined
  • Status
    Open
  • Priority
    3. Normal
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
[http://sourceforge.net/p/ufoai/patches/629 Item 629] imported from sourceforge.net tracker on 2013-01-28 20:46:59

* introduced misc_inventory edict

* this edict allows us to equip actors in mission, there is no longer a need to do that before you enter the mission.
* NOTE: this is currently mainly for multiplayer
* TODO: the ui script for the inventory management is not yet done
* TODO: the scrollable container support must be added to the network protocol

===== Comments Ported from Sourceforge =====

====== tlh2000 (2011-10-03 17:53:55) ======


====== tlh2000 (2011-10-03 17:54:25) ======

i've assigned this to you bayo, because i need some help with the scrollable container stuff.
====== tlh2000 (2011-10-03 17:55:29) ======

testmap - walk close to the wall, it will get highlighted, hit backspace
====== bayo-fr (2011-10-03 21:17:40) ======

you must init the "ui_inventory" global var with the list of your items, and it should work.

baseInventoryNode do not yet use a ref to a base, then you can use it without base. Which make me think linking this node to a base is not the right way... anyway it is another problem :-)
====== tlh2000 (2011-10-04 05:46:53) ======

the list is shown perfectly - the drag works, too, but the drop is not.

I'm getting this error when dropping the item:
Error: INVSH_SearchInInventory: Scrollable containers (9:equip) are not supported by this function

I suppose we have to extend the net protocol to let scrollable containers work on battlescape (which is my primary goal in the misc_inventory branch)
====== bayo-fr (2011-10-04 06:13:03) ======

I dont check your patch (... i should)
But imo we should not interleave network and gui code.

If i understand right your feature it is before the battlescape?

* server send list of items to client
* client do what he want with it
* client validate his choice
* client send his choice to the server
* server can check everything is right

Or you want something fully interactive? where spectator can view player selecting thinks...? Or people from the sameteam share the same items, or thing like that?
Anyway, i remember all inventory structure is a mess, i must check, but i am not sure i can help a lot.
====== tlh2000 (2011-10-04 12:06:19) ======

no, i want soldiers to be equipped on the battlescape. i'm currently doing this by adding a new entity called misc_inventory. this can be triggered by a trigger_touch (e.g.)

once you are in the trigger zone, you can use it (as you would open a door - key=backspace)

when you use it, you should be able to equip your soldier from the equipment definition that is connected with the misc_inventory entity. this way we can have special (server-based) equipments for multiplayer games (it also would allow us to implement campaign maps where we can e.g. loot the alien weapon chamber).
====== tlh2000 (2011-10-04 12:13:52) ======

i won't directly link ui to net of course

the problem is in UI_ContainerNodeDNDFinished - if (CL_BattlescapeRunning()) { [....] }
this is called with fromX and fromY paramters - that won't work for scrollable containers. to we have to adopt this.
====== tlh2000 (2011-10-04 13:20:58) ======

http://ufoai.git.sourceforge.net/git/gitweb.cgi?p=ufoai/ufoai;a=commitdiff;h=104b4fe969f3126b0bf85b2e899fc8429ed204a7
====== bayo-fr (2011-10-04 19:24:12) ======

hoooo sourceforge login is really bad...

before losing my comment, i said:
I dont understand the difference between what you want to do and the floor container.

Plus, "scrollable" should be hiden foe CL_ code. It dont care about scrolling or not. Maybe, fromX and fromY should support a "i dont care" value. But, i think all the item structure is quite magic, no body know anymore how does it works. If you have time to create an uml diagram class of all this data structures, it can be very usefull.
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif