About Portals
Teleportation portals for Rust - this is a partial rewrite of the old Portals plugin by LaserHydra.
Portals gives you the opportunity to place teleportation portals in the Rust world.
How to use
- Go to the place where the entrance should be.
- Type /portal entrance portal1 (portal1 is an example name for a portal).
- Go to the place where the exit should be.
- Type /portal exit portal1
Portals can be unidirectional or bidirectional. See below.
By default, a spinner wheel will be placed at the entrance and exit. If you have SignArtist installed, it can also write the portal name on the wheel. See Configuration below.
Recommendations
It is recommended that you set the following configs for SignArtist to try to lessen the chance of spinners not being painted:
{ "Time in seconds between download requests (0 to disable)": 0, "Maximum concurrent downloads": 50, ... }
There are additional configs for SignArtist, but what is above has impact on its use by Portals.
- On load, Portals will try to draw to every spinner within a few seconds at most. This can exceed the default limits in SignArtist for "Time in seconds between...".
- If you have 5 portals, 10 spinners will need to be painted. So, a limit of 10 might just allow Portals to finish its work. Set this to allow all portals as well as any signs you may have actively using it.
Permissions
This plugin uses Oxide's permission system. To assign a permission, use oxide.grant . To remove a permission, use oxide.revoke .
- portals.admin - Required for /portal command
- portals.use - Standard permission for using portals (can be customized per portal in oxide/data/Portals.json)
Commands
Commands can be used in chat or console.
-
/portal entrance <NAME> - Set the entrance to a portal
- You can substitute pri|primary|add|create for entrance
-
/portal exit <NAME> - Set the exit for a portal
- You can substitute sec|secondary for exit
-
/portal timer <NAME> <NUMBERINSECONDS>
- You can substitute time for timer
- /portal remove <NAME> - Remove a portal
- /portal spinner <NAME> <TRUE|FALSE> - Enable or disable spinner for named portal (NEW 12/2020)
-
/portal oneway <NAME> <TRUE|FALSE>
- You can use 1/0 or true/false
-
/portal spinner <NAME> <TRUE|FALSE>
- You can use 1/0 or true/false
-
/portal perm/permission <NAME> <PERMISSION>
- Ex. /portal perm cp1 checkpoint1 -- Registers a new permission, portals.checkpoint1 for portal cp1.
- /portal list - List existing portals
Configuration
{ "wipeOnNewSave": true, "defaultTwoWay": false, "playEffects": false, "defaultCountdown": 5.0, "deploySpinner": true, "nameOnWheel": true, "useNoEscape": false, "spinEntrance": true, "spinExit": true, "spinnerBGColor": "000000", "spinnerTextColor": "00FF00", "Version": { "Major": 2, "Minor": 2, "Patch": 1 } }
Stored Data
Portals are saved in oxide/data/Portals.json.
For Developers
- void OnPortalUsed(BasePlayer player, JObject portal, JObject point)
JObject portal: the portal object; Example: { "ID": "1", "Entrance": { "Location": { "_location": "16.76093 75.57893 10.72905" } }, "Exit": { "Location": { "_location": "3.850618 72.05898 22.37546" } }, "OneWay": true, "DeploySpinner": true, "TeleportationTime": 0.0, "RequiredPermission": "portals.use" } JObject point: exit or entrance point, player is being teleported to; Example: { "Location": { "_location": "16.76093 75.57893 10.72905" } }
SpawnEphemeralPortal(BasePlayer player, BaseEntity entity, float time = 10f)
Spawns a temporary portal in front of a user and target entity. It will be automatically destroyed after "time". Default name is currently player.displayName:TEMP.
Issues
- Spinners can break when not placed on a nice flat surface like a foundation.