diff options
author | Riley <49880817+DerZombiiie@users.noreply.github.com> | 2022-07-17 01:13:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-17 01:13:57 +0200 |
commit | e59fff6f09a950a185729f5d2ab929a949a91856 (patch) | |
tree | 809c340f21d87736a522ce475d37a52a1d92c310 | |
parent | 9bb5203193a113670a0d81c2e8d0768a5cdbe3db (diff) | |
download | mtmap-e59fff6f09a950a185729f5d2ab929a949a91856.tar.xz |
Add Peek- and PokeNode functions to MapBlk (#1)
* added PickNode to MapBlk
* renamed MapBlk.PickNode to MapBlk.PeekNode
* added funktion MapBlk.PokeNode as reverse of MapBlk.PeekNode
-rw-r--r-- | tools.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools.go b/tools.go new file mode 100644 index 0000000..8e4f35a --- /dev/null +++ b/tools.go @@ -0,0 +1,19 @@ +package mtmap + +import ( + "github.com/anon55555/mt" +) + +func (mb *MapBlk) PeekNode(i int) mt.Node { + return mt.Node{ + Param0: mb.Param0[i], + Param1: mb.Param1[i], + Param2: mb.Param2[i], + } +} + +func (mb *MapBlk) PokeNode(i int, node mt.Node) { + mb.Param0[i] = node.Param0 + mb.Param1[i] = node.Param1 + mb.Param2[i] = node.Param2 +} |