Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto store items on container based on inscribed regex #608

Open
wants to merge 38 commits into
base: master
Choose a base branch
from

Conversation

AquariusPower
Copy link
Contributor

just inscribe a regex in the container
works for pickup and auto-pickup
(split from #587 using meld folder compare)

(ready) bug fix for show items under (Attnam#369)
(ready) Fantasy name generator (Attnam#363)
uses pcre regex (pcre compile code unified at festring);
works for normal pickup and auto-pickup;
Inscribe containers with a valid regex for it to work!
Copy link
Contributor

@red-kangaroo red-kangaroo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!

  • The message for storing an item in a container should come after the message for picking it up:

Screenshot from 2020-09-28 17-38-23

  • Items will be stored in containers even when they are locked. There should be a check if you can open the container before trying to auto-store an item inside.

@AquariusPower
Copy link
Contributor Author

AquariusPower commented Oct 4, 2020

* The message for storing an item in a container should come after the message for picking it up:

agreed, if to move the code (that stores the item) becomes too complicated, just moving the message (store it in a var to display later) would suffice.

* Items will be stored in containers even when they are locked. There should be a check if you can open the container before trying to auto-store an item inside.

could check if it is locked, and then store only if we have a key to open it.
To complement that, we should let NPCs get items from unlocked containers making keeping it locked meaningful.
In the other hand, we could grab a locked chest and using this glitch/bug, store things on it w/o having a key.

@red-kangaroo
Copy link
Contributor

To complement that, we should let NPCs get items from unlocked containers making keeping it locked meaningful.

That would be nice.

In the other hand, we could grab a locked chest and using this glitch/bug, store things on it w/o having a key.

I would consider that bug abuse. :D Also the player might end up with items stored in chests he doesn't have a key for.

@ryfactor
Copy link
Member

Are we good to merge this @red-kangaroo ?

@red-kangaroo
Copy link
Contributor

red-kangaroo commented Dec 23, 2021

Are we good to merge this @red-kangaroo ?

I think there should at least be the check not to store items in locked containers. That could bite the player in the proverbial ass quite easily. :)

I will try having a look at that, maybe during holidays.

if(lRemainingVol<itToStore->GetVolume())
continue;

if(itc->IsAutoStoreMatch(itToStore->GetName(DEFINITE))){
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think changing this line to
if(!itc->IsLocked() && itc->IsAutoStoreMatch(itToStore->GetName(DEFINITE))){
suffices to solve #608 (comment) request

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.

3 participants