Code Monkey home page Code Monkey logo

Comments (8)

SpikeHimself avatar SpikeHimself commented on June 5, 2024 2

Hi @AugusDogus. I have not heard from you in 2 weeks, so I am closing this issue. If you'd like to reopen this issue, go right ahead!

The problem I am currently seeing is players having the ability to access portals that are not the same type as the portal they are interacting with. I would like it if only certain items can only go through the "Advanced Portal" as long as it's linked to another "Advanced Portal" of the same type.

Once more to sum up: This functionality needs to be added by the creator of Advanced Portals. XPortal has no control over how the other mod works.

from xportal.

SpikeHimself avatar SpikeHimself commented on June 5, 2024

Hi, thanks for your post!

I understand the problem, and I think it might indeed be easier if there was a way of seeing what the type of portal is that you're trying to connect to. However, creating a new dropdown for each portal type introduces a few problems. Some are technical in nature but I'll happily battle those. Another is one I'm not happy to battle: what if someone makes a mod that's similar to Advanced Portals, but instead of 3, they add 12 (or any random amount) new portal types? Then will someone come here and suggest I add 12 dropdowns? I don't think this is the best approach.

Cloning the KnownPortalsManager for each portal type is, again, probably technically possible after overcoming some hurdles (or rather: a full refactoring of how that currently works!), but I don't think this is the right approach either. Portal "type" could simply be a property of existing portals (in fact, the prefab property is already right there), and then you could make other choices in the code based on that.

I could perhaps give the portals in the dropdown a different highlighted colour (or add a character or some other way of making them stand out), depending on what type of portal they are. That might do the trick.

I'm gonna let this be for a bit and see if my brain comes up with anything.

from xportal.

AugusDogus avatar AugusDogus commented on June 5, 2024

Hey Spike, thanks for replying!

Absolutely, adding the prefab name as a property for type makes a ton of sense. I imagine the best scenario is both mod authors working together to add support for this functionality.

Admittedly I do not have considerable C# experience, but I imagine when iterating over the array of portals to send back to the client, we could filter by that same type property so basically achieve what I'm asking.

Unfortunately I don't think I was super clear in my initial ask. The problem I am currently seeing is players having the ability to access portals that are not the same type as the portal they are interacting with. I would like it if only certain items can only go through the "Advanced Portal" as long as it's linked to another "Advanced Portal" of the same type.

Not super worried about this being server autorotated, but I understand if you don't want to compromise on that.

from xportal.

SpikeHimself avatar SpikeHimself commented on June 5, 2024

I would like it if only certain items can only go through the "Advanced Portal" as long as it's linked to another "Advanced Portal" of the same type.

I understand now and completely agree that this would be a better, or at least a lot fairer, approach. But I think this functionality belongs on the Advanced Portals side. It should check, on the teleport trigger, whether the player is allowed to teleport to the connected portal, and display a message if not. Even without XPortal installed, it would currently allow that, right? The game's vanilla behaviour is just to connect portals of the same tag. I don't think Advanced Portals currently modifies that (but I'm not sure).

Of course it would be nice if XPortal could display the portal type before you select the destination, fully agreed on that (and I'll look into that!), but I don't think blocking the player from teleporting fits in XPortal's scope.

from xportal.

SpikeHimself avatar SpikeHimself commented on June 5, 2024

Perhaps something like this?

image

from xportal.

SpikeHimself avatar SpikeHimself commented on June 5, 2024

image

from xportal.

SpikeHimself avatar SpikeHimself commented on June 5, 2024

The changes visible in the screenshots above are included in v1.2.6 of XPortal, which released just a few moments ago.

from xportal.

SpikeHimself avatar SpikeHimself commented on June 5, 2024

@AugusDogus Have you had a chance to review these changes? What's your opinion? Does it approach your wish?

from xportal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.