-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Revert "Add owner property to tile elements for scripting" #21715
Conversation
Would like approval from @Basssiiie and @Sadret for this. |
Are we sure this is not yet used in any plugins? Tagging @CorySanin as well ; you made some multiplayer plugins right? Have you used this specific property in any or would you know if any servers use it? |
Also, what makes this property different from setting Note that as the setter can only be used in a mutable context, in multiplayer the plugin must be run on the server and must update it in a synchronized custom action for it to be able to update it. |
The problem is that it can massively break things once OpenRCT2 starts actually doing stuff with ownership. And that we might want to use some bits for other purposes, for example. It’s basically something that should never have been exposed, and this PR is trying to get rid of it before it is too late to do so. (Obviously, the longer-term plan is to expose this data in some way, just not like this.) |
Thanks for the mention, I appreciate it. No, I never used this API in any of my plugins. |
I agree with the reversion, and I haven't heard about any plugin that uses it. |
You can probably leave the getter in there, if we ever get to have multiple companies then we probably want to have that anyway. |
Hmm, I'd get rid of the getter too tbh. When we do get multiple companies, you'd probably want it to return a ref to the company instead of the raw value, after all. |
If we're sure no plugins are using it, I'm fine with removal. Since it was added ages ago, it's removal should have a changelog entry though. |
596edee
to
885566f
Compare
885566f
to
704574b
Compare
Rebased to address the changelog.txt conflict. Is anything else needed for this PR? |
704574b
to
b1a69c6
Compare
I think my requests let to the feature when I attempted to create a capture the flag multiplayer plugin with this feature. There ended up being other issues around company finances that caused my development pause, but I could see myself working on it again in the future. If there is a plan to use this field in a native way sometime in the future, I'm fine with reverting - I can use a nonnative field or just work on other plugins. |
Thanks. Such multiplayer functionality should definitely be part of the core game logic, imo, with players joining separate companies on the same map, i.e. mixing cooperative and competitive multiplayer. Plug-ins could then extend that functionality in ways they see fit. |
This reverts commit b4376ab.
b1a69c6
to
a4bd20b
Compare
- Feature: [#11512] Coloured usernames by group on multiplayer servers. - Feature: [#21734] Park admittance price can now be set via text input. - Feature: [#21957] [Plugin] Expose whether the game is paused to the plugin API. - Improved: [#21728] “Fix all rides” cheat now also works if a mechanic is already fixing the ride. - Improved: [#21769] Expose “animation is backwards” wall property in Tile Inspector. - Improved: [#21855] Add a separator between “Load Game” and “Save Game”, to avoid accidental overwriting. - Change: [#21715] [Plugin] Remove access to the internal `owner` property. Note: `ownership` is still accessible. - Change: [#21855] Cheats menu dropdown no longer requires dragging. - Change: [#21866] Hide the FPS Counter when the top toolbar/widgets have been toggled off. - Change: [#21950] Construction and removal buttons can now be held down for repeated placement. - Fix: [#866] Boat Hire boats get stuck entering track (original bug). - Fix: [#10701] No reason specified when placing door over unsuitable track. - Fix: [#18723, #21870] Attempting to demolish a flat ride in pause mode allows you to place multiple copies. - Fix: [#19559] Custom rides with long descriptions extend into lower widgets. - Fix: [#21696] Fullscreen window option not correctly applied on macOS. - Fix: [#21749] Crash when loading park bigger than current limits. - Fix: [#21787] Map generator heightmap should respect increased height limits. - Fix: [#21829] When creating a new scenario, the default name contains formatting codes. - Fix: [#21937] Build errors with the ORIGINAL_RATINGS flag. - Fix: [objects#324] Cannot build Colosseum inside a turn or helix. - Fix: [objects#325] Sloped castle walls are vertically offset by one pixel (original bug).
- Feature: [OpenRCT2#11512] Coloured usernames by group on multiplayer servers. - Feature: [OpenRCT2#21734] Park admittance price can now be set via text input. - Feature: [OpenRCT2#21957] [Plugin] Expose whether the game is paused to the plugin API. - Improved: [OpenRCT2#21728] “Fix all rides” cheat now also works if a mechanic is already fixing the ride. - Improved: [OpenRCT2#21769] Expose “animation is backwards” wall property in Tile Inspector. - Improved: [OpenRCT2#21855] Add a separator between “Load Game” and “Save Game”, to avoid accidental overwriting. - Change: [OpenRCT2#21715] [Plugin] Remove access to the internal `owner` property. Note: `ownership` is still accessible. - Change: [OpenRCT2#21855] Cheats menu dropdown no longer requires dragging. - Change: [OpenRCT2#21866] Hide the FPS Counter when the top toolbar/widgets have been toggled off. - Change: [OpenRCT2#21950] Construction and removal buttons can now be held down for repeated placement. - Fix: [OpenRCT2#866] Boat Hire boats get stuck entering track (original bug). - Fix: [OpenRCT2#10701] No reason specified when placing door over unsuitable track. - Fix: [OpenRCT2#18723, OpenRCT2#21870] Attempting to demolish a flat ride in pause mode allows you to place multiple copies. - Fix: [OpenRCT2#19559] Custom rides with long descriptions extend into lower widgets. - Fix: [OpenRCT2#21696] Fullscreen window option not correctly applied on macOS. - Fix: [OpenRCT2#21749] Crash when loading park bigger than current limits. - Fix: [OpenRCT2#21787] Map generator heightmap should respect increased height limits. - Fix: [OpenRCT2#21829] When creating a new scenario, the default name contains formatting codes. - Fix: [OpenRCT2#21937] Build errors with the ORIGINAL_RATINGS flag. - Fix: [objects#324] Cannot build Colosseum inside a turn or helix. - Fix: [objects#325] Sloped castle walls are vertically offset by one pixel (original bug).
In #20853, the owner attribute was exposed though the scripting API. This allows plug-ins to write values to this field. However, these values are not restricted, and are likely to lead to conflicts when the field is eventually used to actually distinguish between different park companies.
We should hide the field now to prevent strange bugs or disappointment down the line.
This reverts commit b4376ab.