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

[LUA] Fixes self target in "!givemagianitem" command #4551

Merged
merged 1 commit into from
Sep 30, 2023

Conversation

N3ckB3ard
Copy link
Contributor

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

Corrects issue with "target" in the !givemagianitem command

image
image

Steps to test these changes

Use command and give the item to a player, rather than yourself

@@ -32,7 +32,7 @@ commandObj.onTrigger = function(player, target, trialId, isRewardItem)
player:PrintToPlayer(string.format('Player \'%s\' does not have free space for that item!', target))
else
if giveRewardItem then
xi.magian.giveRewardItem(player, trialId)
xi.magian.giveRewardItem(target, trialId)
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't an entirely accurate fix, and only half-implements your desired intent. I'm fine with requiring a target, but you didn't update the else condition, which in this case, giveRewardItem bool determines if its the requiredItem or rewardItem in the magian table.

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 updated the additional player to target

@claywar claywar merged commit 7e0406a into LandSandBoat:base Sep 30, 2023
11 checks passed
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