Added section for Random Portal func

This commit is contained in:
Raum0x2A
2021-05-05 19:44:49 -06:00
parent bc4e334ecd
commit a7069dce7e

View File

@@ -1,8 +1,8 @@
# NMSlib # NMSlib
**master Branch** : ![](https://gitlab.com/bradley.richins/nmslib/badges/master/pipeline.svg) **master Branch** : ![](https://gitlab.com/Raum0x2A/nmslib/badges/master/pipeline.svg)
**develop Branch** : ![](https://gitlab.com/bradley.richins/nmslib/badges/develop/pipeline.svg) **develop Branch** : ![](https://gitlab.com/Raum0x2A/nmslib/badges/develop/pipeline.svg)
NMSlib is a GoLang package for dealing with converting Galactic coordinates to Portal codes and vice versa. NMSlib is a GoLang package for dealing with converting Galactic coordinates to Portal codes and vice versa.
@@ -14,7 +14,7 @@ To install this module use `go get`
```bash ```bash
go get -u gitlab.com/bradley.richins/nmslib go get -u gitlab.com/Raum0x2A/nmslib
``` ```
## Usage ## Usage
@@ -27,16 +27,16 @@ package main
import ( import (
"fmt" "fmt"
"gitlab.com/bradley.richins/nmslib" "gitlab.com/Raum0x2A/nmslib"
) )
func main() { func main() {
portalcode := "006afa556c30" portalcode := "21F2F8EDB94D"
tstvar, err := nmslib.P2gc(portalcode) tstvar, err := nmslib.P2gc(portalcode)
if err != nil { if err != nil {
panic(err) panic(err)
} }
fmt.Printf("Input:\t%s\nExpecting:\t042F:0079:0D55:006A\nHave:\t%s\n", portalcode, tstvar) fmt.Printf("Input:\t%s\nExpecting:\t014C:0077:06DA:01F2\nHave:\t%s\n", portalcode, tstvar)
nmslib.CreateBanner(portalcode, "NewLennon.png", 0) nmslib.CreateBanner(portalcode, "NewLennon.png", 0)
@@ -60,7 +60,7 @@ This function takes 3 parameters:
Horizontal Layout for Galactic Hub [HUB10-6A Icarus Sun](https://nomanssky.gamepedia.com/HUB10-6A_Icarus_Sun) Eniwa 68/L3 Horizontal Layout for Galactic Hub [HUB10-6A Icarus Sun](https://nomanssky.gamepedia.com/HUB10-6A_Icarus_Sun) Eniwa 68/L3
```golang ```golang
nmslib.CreateBanner("006afa556c30", "NewLennon.png", 0) nmslib.CreateBanner("006AFA556C30", "NewLennon.png", 0)
``` ```
![](NewLennon.png) ![](NewLennon.png)
@@ -74,13 +74,13 @@ This function only takes 1 parameter and returns a string and error
**Example:** **Example:**
```golang ```golang
ga, _ := nmslib.P3gc("006afa556c30") ga, _ := nmslib.P3gc("21F2F8EDB94D")
fmt.Println(ga) fmt.Println(ga)
``` ```
Output: Output:
``042F:0079:0D55:006A`` ``014C:0077:06DA:01F2``
### Converting Galactic coordinates to Portal codes with Gc2p() ### Converting Galactic coordinates to Portal codes with Gc2p()
@@ -91,13 +91,13 @@ This function only takes 1 parameter and returns a string and error
**Example:** **Example:**
```golang ```golang
pc, _ := nmslib.P3gc("042F:0079:0D55:006A") pc, _ := nmslib.P3gc("014C:0077:06DA:01F2")
fmt.Println(pc) fmt.Println(pc)
``` ```
Output: Output:
``006AFA556C30`` ``21F2F8EDB94D``
## Translate Words ## Translate Words
@@ -160,5 +160,19 @@ Atlas:
- ``Translate{word}.Atl2Eng()`` - ``Translate{word}.Atl2Eng()``
- ``Translate{word}.Eng2Atl()`` - ``Translate{word}.Eng2Atl()``
## Random Portal address
### Create a random portal address
**Example:**
```golang
fmt.Println(RndPortal())
```
**Outout:**
``10EFABDEA373``
## License ## License
[MIT](COPYING) [MIT](COPYING)