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

Fix #63, #54, #62, and #101 #121

Closed
wants to merge 12 commits into from
Closed

Conversation

azigler
Copy link

@azigler azigler commented Jun 6, 2020

  • Properly define Room.exits for documentation purposes.
  • Use early return on Character.unfollow()
  • Create new copy of this.keywords when spawning a Npc
  • Deep clone effect.state before adding to an entity

@azigler azigler changed the title Fix #63 and change #54 to use an early return Fix #63, #54, and #62 Jun 6, 2020
@azigler azigler changed the title Fix #63, #54, and #62 Fix #63, #54, #62, and #101 Jun 7, 2020
// This ensures that when it's reloaded it won't try to set
// its default inventory. Instead it will persist the fact
// that all the items were removed from it
if (!this.inventory.size) {
Copy link
Contributor

@seanohue seanohue Jun 8, 2020

Choose a reason for hiding this comment

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

getting rid of the null inventory is a blessing

Copy link
Contributor

@nelsonsbrian nelsonsbrian left a comment

Choose a reason for hiding this comment

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

Can't we get rid of a few more things with this inventory fix?

Like equip() Remove the 'if this.inventory' check? line 365
Cant we just use _setupInventory in the constructor and pass in the inventory with the data? Then we can get rid of all the extra _setupInventory calls in Character.js

Can do the same in Item.js, have a single setupInventory and not have to have checks in all the other places.

@azigler
Copy link
Author

azigler commented Jul 9, 2020

@nelsonsbrian I totally agree, so I just added those changes for Item.js and Character.js to the PR.

@azigler
Copy link
Author

azigler commented Jul 11, 2020

I rolled back those Inventory setup changes because they caused inventories to not be properly initialized (my containers were empty).

@azigler azigler closed this Nov 8, 2022
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