Rinart73 Posted December 21, 2017 Share Posted December 21, 2017 I guess that even stations with properly placed docking ports (that work with NPC traders) don't give true for object:hasComponent(ComponentType.DockingPositions) in scripts/lib/player.lua. Because me and my friends almost always get "You must be closer to the object for this" instead of "You must be docked to the object for this". We need to almost hit the station with our ships to be able to transfer anything. Let's look at the code: function CheckShipDocked(faction, ship, object, errors, generic) ... local error if object:hasComponent(ComponentType.DockingPositions) then if not object:isDocked(ship) then error = errors[object.type] or generic or "You must be docked to the object for this."%_T end else if object:getNearestDistance(ship) > 50 then error = errors[object.type] or generic or "You must be closer to the object for this."%_T end end So, if station has docks, then one error message. If not, another. And we always getting second message. Tried with different stations and mines. Link to comment Share on other sites More sharing options...
Phantomal Posted December 29, 2017 Share Posted December 29, 2017 I can add, that some actions need to be close to a docking port, and other actions need to be close to the station itself. "Trade Goods" neet to be docked "Transfer Crew/Stuff" needs to be 0km from the Station itself. Perhaps its a good idea to streamline it to the same mechanic. Link to comment Share on other sites More sharing options...
Rinart73 Posted December 29, 2017 Author Share Posted December 29, 2017 I can add, that some actions need to be close to a docking port, and other actions need to be close to the station itself. "Trade Goods" neet to be docked "Transfer Crew/Stuff" needs to be 0km from the Station itself. That's because most of this checks use CheckPlayerDocked function from "scripts/lib/player.lua", but "scripts/entity/transfercrewgoods.lua" uses getNearestDistance: 20 for Crew, 2 for Cargo and Fighters. I agree, this should be unified. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now