Skip to content

Make items usable via the inventory screen - with menu - #1545

Open
PabstMirror wants to merge 10 commits into
KoffeinFlummi:masterfrom
PabstMirror:InvInteract
Open

PabstMirror wants to merge 10 commits into
KoffeinFlummi:masterfrom
PabstMirror:InvInteract

Conversation

@PabstMirror

Copy link
Copy Markdown
Collaborator

Based on #1441 by @CorruptedHeart

Makes Inventory Dialog bigger for those using a smaller UI size. (Adds more rows. Text size is unaffected.)
Added a menu when clicking on an item, showing possible actions.
Allows multiple actions to be added to items/magazines/weapons
Can add actions with scripting

2014-11-14_00002

E.G.: "Lock Backpack" is from AGM_Backpacks config, Show Radio Info added via script, possibly added via TFR config

As discussed in original pull, this shouldn't be seen as a replacement, but as a different way to access actions. The problem this brings, is it's a 2nd pathway that needs to be considered when modifying something.
E.G.: I want to add repacking, but I had to modify AGM_Repack because it's designed around being accessed in a certain order from the main Interaction Menu.

This is tested, but could be a little rough still.
Right now it show the itemInfo for the 5 assigned items, the player's container lists (uniform, vest, backpack) and the backpack slot. It would be possible to cover every slot, but I don't see the use.

The info box has to be drawn to the right of the player's container lists (the lists seem to draw over everything, even if they're underneath)

Current Actions Added:

  • AGM_Attach: IR_Strobe, IR_Grenandes, Chemlights
  • AGM_Backpacks: Lock/Unlock
  • AGM_Explosives: Start Placing, Open Clacker
  • AGM_Hearing: Earbuds In (still need otherway to take out...)
  • AGM_MagazineRepack: Repack
  • AGM_Overheating: Swap Barrels
  • AGM_Wind: Open/Close Kestral

@KoffeinFlummi

Copy link
Copy Markdown
Owner

Sorry for the late reply.

I like this alot, although I'm not exactly sure if we want to have another PBO that's required by alot of others. It might be best to split up the inventory changes (size, etc.) from the interaction options and move those into AGM_Interaction.

@commy2 @esteldunedain @CorruptedHeart @jodav Thoughts?

@KoffeinFlummi KoffeinFlummi added this to the Version 0.95 milestone Nov 16, 2014
@garthdw

garthdw commented Nov 16, 2014

Copy link
Copy Markdown
Contributor

I agree, I think the interaction should become a part of AGM_Interaction, since that is what that is there for.

@bux

bux commented Nov 16, 2014

Copy link
Copy Markdown
Collaborator

I agree. Encapsulation and separation of concerns 👍

@nicolasbadano

Copy link
Copy Markdown
Collaborator

I think I might be the only one how thinks we don't need this (more work for us and I don't think people will really use it); but if we gonna have it, I vote to integrate it in Interaction.

@commy2

commy2 commented Nov 17, 2014

Copy link
Copy Markdown
Collaborator

Why Interaction? Move it to Core instead.

@KoffeinFlummi

Copy link
Copy Markdown
Owner

On second thought, it might not actually be a bad idea having another PBO, as it's not actually required by the PBOs using it. As long as all those options are all possible using "normal" ways (which they are), this is just "nice to have". So it might be better to have another PBO after all, especially if some people might not like it.

@jonpas

jonpas commented Nov 17, 2014

Copy link
Copy Markdown
Contributor

@commy2 Aren't there some features that don't need Interaction as well?

@commy2

commy2 commented Nov 17, 2014

Copy link
Copy Markdown
Collaborator

Maybe. I don't know any.

@jonpas

jonpas commented Nov 17, 2014

Copy link
Copy Markdown
Contributor

Aircraft, Backblast, Ballistics, CrewInfo, Difficulties, Disposable, Movement, NoRadio, Ragdolls, RealisticNames.....???

@PabstMirror

Copy link
Copy Markdown
Collaborator Author

The resize I know I like, but I do worry about the interaction increasing maintenance complexity down the line.

Easy enough to separate the resize from the interaction. But I'm still not sure where parts should go.

Switching it to double-click mode in options does a lot to get it out of the way for people who don't want it; But I'm still be leery about making this a required part of AGM.

  • still need to implement a check to AGM_Core_canInteract.

semi off topic:
Testing with current master (so not this code) I was able to open the inventory while "captured"?
https://www.youtube.com/watch?v=kprzknwhSIk
Is that correct? It seemed to happen only sometimes when I hit I while looking at my feet.

@KoffeinFlummi

Copy link
Copy Markdown
Owner

Well I think we should definitely merge the inventory size changes. We can decide later if more interaction options are a good idea maintenance-wise. Could you maybe make another PR with just the UI changes @PabstMirror? I would just call the PBO "AGM_Inventory".

semi off topic:
Testing with current master (so not this code) I was able to open the inventory while "captured"?

https://www.youtube.com/watch?v=kprzknwhSIk
Is that correct? It seemed to happen only sometimes when I hit I while looking at my feet.

@commy2 ?

@commy2

commy2 commented Nov 20, 2014

Copy link
Copy Markdown
Collaborator

Should be easy to fix. Edit: fixed.

@KoffeinFlummi

Copy link
Copy Markdown
Owner

Moving this to v0.96 for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants