I've set it up on Github and I'm working on it.
So far I've just cleaned up the formatting (tabs, spaces, indentation) and added a bunch of comments.
I also had to change it to make right-click shoot the orange portal, because for some reason I can't do the "right and left click at the same time" that UjEdwin's version expects. So the controls are:
- Left-click to make blue portal
- Right-click to make orange portal
- Sneak (shift) + Left-click to remove both portals
Contributors - UjEdwin, mrob27
Depends - default
Download - None yet, use the github
Github - https://github.com/mrob27/portalgun
Licence - CC-BY-SA 3.0
Tested on Minetest 0.4.11 (that's all I have access to right now)
Biggest issues are:
- Inability to set player's velocity means that when you exit a portal you just fall straight down. (But mobs and objects shoot out at the velocity you'd expect). I wrote a block comment explaining how to implement this.
- It leaves old portals around sometimes, so even in singleplayer mode you can have multiple portals of one colour, but only the last one is actually active
- Portals are oriented perpendicular to the direction you were looking when you shoot it, instead of being flat on the surface you attached it to.