H-uru / moul-scripts

Plasma engine scripts used by Myst Online. Moved to https://github.com/H-uru/Plasma
GNU General Public License v3.0
31 stars 34 forks source link

Bump a public neighborhood to the top of the Nexus list when someone links to it. #90

Closed cwalther closed 9 years ago

cwalther commented 9 years ago

This is a proof-of-concept implementation of the scheme I proposed in 4 pinned hoods in nexus on the MOUL forum. It achieves that public neighborhoods that are in active use stay (near the top) on the list in the Nexus, even after their owners disappear (as is the case for the numerous dedicated Delin & Tsogal hoods that have been made over time), with no manual toggling needed, and no need for pinned hoods.

Tested on MOSS and MOULa. Not tested on Dirtsand.

Requires H-uru/Plasma#461.

Mystler commented 9 years ago

I really like this idea! The only further thing I'd like to request is a date check. On TOC, we sometimes pin a neighborhood to the top by changing the DM in the database to a point in the future. That wouldn't work with this change. Better solutions are welcome, though.

Hoikas commented 9 years ago

I would rather see a last accessed time be bumped in the server databbase. However, considering that MOULa is a black box, this is probably the best way to get it done.

cwalther commented 9 years ago

Mystler: I don’t think the modification date is available in the client, or is it? So that check would have to be done in the server (MOSS: VaultSetAgePublic_Request in db_requests.h). To pin hoods, I would implement something like the AlwaysInclude field Chogon mentions here in the database (MOSS: function getpublicagelist in moss.sql). Since hood members can already do what this code does by a manual private/public toggle, your way of pinning only works reliably for hoods that have no members among the general public, right?

Hoikas: Agreed, that would be a better solution. But this code is in fact explicitly intended for the black box MOULa (I’m just posting it here first to get better feedback) – specifically, the point is to demonstrate that this behavior can be achieved without putting any burden of modifying their server on Cyan.

Hoikas commented 9 years ago

I totally understand. The only suggestion I have here is to add a comment to the script to explain why this addition is necessary. You never know when someone will be looking at this again and wondering, "WTF is this?" :tongue:

cwalther commented 9 years ago

I’ll just commit it under author name “eap”. :stuck_out_tongue: Nah, good idea, I’ll do that.

Mystler commented 9 years ago

@cwalther Ah, that makes sense. Thanks!