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

moveWidgetChild causes the item on widget to disappear when a negative number is used for the Y axis offset #184

Closed
DennisMartinez opened this issue Jun 20, 2020 · 2 comments

Comments

@DennisMartinez
Copy link
Contributor

Calling moveWidgetChild with a negative offset on the Y axis looks to be making the item on the widget disappear.

Here's a sample plugin which uses itemSelectionAction to ask the user for input, which calls moveWidgetChild internally.

import { itemOnItemAction } from '@server/world/actor/player/action/item-on-item-action';
import { itemSelectionAction } from '@server/world/actor/player/action/item-selection-action';
import { RunePlugin, ActionType } from '@server/plugins/plugin';

const action: itemOnItemAction = ({ player }) => {
    itemSelectionAction(player, 'COOKING', [
        { itemId: 377, itemName: 'Raw Lobster', offset: -12 }
    ]);
};

export default new RunePlugin([
    {
        type: ActionType.ITEM_ON_ITEM_ACTION,
        items: [{ item1: 377, item2: 377 }],
        action
    }
]);

Change offset: -12 to a positive number and the item reappears.

You can use raw lobster on another raw lobster to bring up the interface in the sample plugin. ::item 377 2

@DennisMartinez DennisMartinez changed the title moveWidgetChild causes the item on widget to disappear when a negative number is used for the Y offset moveWidgetChild causes the item on widget to disappear when a negative number is used for the Y axis offset Jun 20, 2020
@TheBlackParade
Copy link
Contributor

Screen Shot 2020-06-28 at 9 21 56 PM

Think I got it fixed. Made a mistake in the client. 😅

@TheBlackParade
Copy link
Contributor

Closing this as I've merged the fix into the client's master branch

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

No branches or pull requests

2 participants