Tsunder / Pardus-Sweetener

A browser extension that enhances the user interface of the online game Pardus
3 stars 3 forks source link

Aware AP calculator #13

Closed Tsunder closed 5 years ago

Tsunder commented 5 years ago

minimap pather should be able to calculate the players current speed from the nav screen information

BartKieviet commented 5 years ago

I did this. See getSpeed my Sweetener Repo, from my map.js.

The function is:

function getSpeed() {
            let current = this.getCurrentCoords();
            let currentTileType = this.sector.tiles[ current.col + this.sector.width * current.row ];
            let moveField = document.getElementById('tdStatusMove').childNodes;
            let speed = 0;
            if ( moveField.length > 1 ) { //something modifies our speed 
                speed -= parseInt( moveField[1].childNodes[0].textContent );
            }
            speed -= parseInt( moveField[0].textContent );
            speed += this.VISC[ currentTileType ];

            return speed;
        } 

Should work with minimal changes (VISC you don't use here I see)

BartKieviet commented 5 years ago

I fixed it but got a github problem. I copied your code over mine, changed just the map.js, yet it does not want to merge easily. Go check out the file in my repo and copy it :)

Tsunder commented 5 years ago

neat. I believe I copied it now. Unfortunately I haven't looked at how the minimap pather works, as @likuilin wrote it.

likuilin commented 5 years ago

The navigation page doesn't reveal what level of Advanced Navigation the pilot is, though, and in my opinion imperfect detection < user-supplied values. That's why the options page has that table instead of just a ship drive dropdown or something.

BartKieviet commented 5 years ago

We could change the options to have user input on Nav, or store the Navigation level from the adv. skills page, which would result in a small discrepancy before the Adv. skills page is visited. I think setting options should not be a chore in which mistakes can be made easily.

Tsunder commented 5 years ago

the fewer actions the player has to make, the better.