This commit is contained in:
Raum0x2A
2021-05-06 22:02:21 -06:00
parent 5ca88596ff
commit ad42c6bb04

View File

@@ -6,7 +6,7 @@
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.
NMSlib also translates in game languages to english. NMSlib also translates in game languages (Korvax, Gek Vy'Keen and Atlas) to english, and create portal banners.
## Installation ## Installation
@@ -41,9 +41,9 @@ func main() {
nmslib.CreateBanner(portalcode, "NewLennon.png", 0) nmslib.CreateBanner(portalcode, "NewLennon.png", 0)
nmslib.CreateBanner(RndPortal(), "Random.png", 0) nmslib.CreateBanner(RndPortal(), "Random.png", 0)
fmt.Println(Translate{"KIHTYOMOLES"}.Kor2Eng()) fmt.Println(nmslib.Translate{"KIHTYOMOLES"}.Kor2Eng())
korvax := Translate{"Contraband"} korvax := nmslib.Translate{"Contraband"}
fmt.Println(korvax.Eng2Kor()) fmt.Println(nmslib.korvax.Eng2Kor())
} }
``` ```
@@ -66,6 +66,20 @@ nmslib.CreateBanner("006AFA556C30", "NewLennon.png", 0)
![](NewLennon.png) ![](NewLennon.png)
Vertical layout for a random address
```golang
nmslib.CreateBanner(nmslib.RndPortal(), "ranportal.png", 11)
```
![](ranportal_scaled.png)
_Note: Images shown in readme.md have been scaled down in gimp._
_Original Vertical: 256x3072px_
_Original: Horizontal: 3072x256px_
### Converting Portal code to Galactic address with P2gc() ### Converting Portal code to Galactic address with P2gc()
This function only takes 1 parameter and returns a string and error This function only takes 1 parameter and returns a string and error
@@ -118,7 +132,7 @@ This function takes only 1 parameter and returns a string
**Example:** **Example:**
```golang ```golang
fmt.Println(Translate{"Paka"}.Atl2Eng()) fmt.Println(nmslib.Translate{"Paka"}.Atl2Eng())
``` ```
Output: Output:
@@ -134,7 +148,7 @@ This function takes only 1 parameter and returns a string
**Example:** **Example:**
```golang ```golang
korvax := Translate{"Contraband"} korvax := nmslib.Translate{"Contraband"}
fmt.Println(korvax.Eng2Kor()) fmt.Println(korvax.Eng2Kor())
``` ```
@@ -146,20 +160,20 @@ Output:
### Language commands ### Language commands
Gek: Gek:
- ``Translate{word}.Gek2Eng()`` - ``Translate{string}.Gek2Eng()``
- ``Translate{word}.Eng2Gek()`` - ``Translate{string}.Eng2Gek()``
Korvax: Korvax:
- ``Translate{word}.Kor2Eng()`` - ``Translate{string}.Kor2Eng()``
- ``Translate{word}.Eng2Kor()`` - ``Translate{string}.Eng2Kor()``
Vy'keen: Vy'keen:
- ``Translate{word}.Vyk2Eng()`` - ``Translate{string}.Vyk2Eng()``
- ``Translate{word}.Eng2Vyk()`` - ``Translate{string}.Eng2Vyk()``
Atlas: Atlas:
- ``Translate{word}.Atl2Eng()`` - ``Translate{string}.Atl2Eng()``
- ``Translate{word}.Eng2Atl()`` - ``Translate{string}.Eng2Atl()``
## Random Portal address ## Random Portal address
@@ -168,12 +182,15 @@ Atlas:
**Example:** **Example:**
```golang ```golang
fmt.Println(RndPortal()) fmt.Println(nmslib.RndPortal())
fmt.Println(nmslib.RndPortal())
``` ```
**Outout:** **Output:**
``10EFABDEA373`` ``10EFABDEA373``
``11EAB355FC8E``
## License ## License
[MIT](COPYING) [MIT](COPYING)