MCPcopy Create free account
hub / github.com/SolarLune/masterplan / Deserialize

Method Deserialize

contents.go:2471–2489  ·  view source on GitHub ↗
(data string)

Source from the content-addressed store, hash-verified

2469}
2470
2471func (mapData *MapData) Deserialize(data string) {
2472
2473 if data != "" {
2474
2475 contents := gjson.Get(data, "contents")
2476
2477 if len(contents.Array()) == 0 {
2478 mapData.Clear()
2479 }
2480
2481 for y, r := range contents.Array() {
2482 for x, v := range r.Array() {
2483 mapData.SetI(x, y, int(v.Int()))
2484 }
2485 }
2486
2487 }
2488
2489}
2490
2491const (
2492 MapEditToolColors = iota

Callers 4

NewMapContentsFunction · 0.45
ReceiveMessageMethod · 0.45
NewTableContentsFunction · 0.45
ReceiveMessageMethod · 0.45

Calls 3

ClearMethod · 0.95
SetIMethod · 0.95
GetMethod · 0.45

Tested by

no test coverage detected