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

new event onRotateItem #3976

Closed
2 tasks
lucasgrizante opened this issue Feb 23, 2022 · 1 comment · Fixed by #4541
Closed
2 tasks

new event onRotateItem #3976

lucasgrizante opened this issue Feb 23, 2022 · 1 comment · Fixed by #4541
Labels
decisions Debatable/disputable enhancement Increase or improvement in quality, value, or extent feature New feature or functionality

Comments

@lucasgrizante
Copy link
Contributor

Before creating an issue, please ensure:

  • This is a bug in the software that resides in this repository, and not a
    support matter (use https://otland.net/forums/support.16/ for support)
  • This issue is reproducible without changes to the C++ code in this repository

This is not a bug, but a feature request.
I'd like a new event "onRotateItem" that will be executed after player rotates an object.

Why?
I'm trying to make a statue in my temple using the new Podium feature. I could limit players to not move/edit it using already available events (onMoveItem, onPodiumRequest and onPodiumEdit), yet, they can rotate it (and I think there's no way without editing sources to limit that).

@EPuncker
Copy link
Contributor

this is pretty interesting because podium is the only item that rotates, but actually doesn't rotate. we only rotate outfit direction on it 🤔

we should really add a house check here:

if (!item || item->getClientID() != spriteId || (!item->isRotatable() && !item->isPodium()) || item->hasAttribute(ITEM_ATTRIBUTE_UNIQUEID)) {

to allow rotating a podium only if it is located inside a house tile

but accordingly to the code I referenced, you could just add an unique ID to podium and it will become not rotatable

@DSpeichert DSpeichert added enhancement Increase or improvement in quality, value, or extent feature New feature or functionality decisions Debatable/disputable labels Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decisions Debatable/disputable enhancement Increase or improvement in quality, value, or extent feature New feature or functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants