summaryrefslogtreecommitdiff
path: root/toolcaps.go
diff options
context:
space:
mode:
authoranon5 <anon5clam@protonmail.com>2021-06-21 18:47:26 +0000
committeranon5 <anon5clam@protonmail.com>2021-06-21 18:47:26 +0000
commit425da65ed46061303604610bb539d6495b2b1f3f (patch)
tree10ae3e665132c369ce0207676321cef870679923 /toolcaps.go
parent9f239d341ef46b656dda759020da87bdd0606344 (diff)
Add high-level protocol (de)serialization
Diffstat (limited to 'toolcaps.go')
-rw-r--r--toolcaps.go45
1 files changed, 45 insertions, 0 deletions
diff --git a/toolcaps.go b/toolcaps.go
new file mode 100644
index 0000000..c414607
--- /dev/null
+++ b/toolcaps.go
@@ -0,0 +1,45 @@
+package mt
+
+type ToolCaps struct {
+ //mt:if _ = %s; false
+ NonNil bool `json:"-"`
+ //mt:end
+
+ //mt:lenhdr 16
+
+ //mt:ifde
+ //mt:if r.N > 0 { %s.NonNil = true}; /**/
+ //mt:if %s.NonNil
+
+ //mt:const uint8(5)
+
+ AttackCooldown float32 `json:"full_punch_interval"`
+ MaxDropLvl int16 `json:"max_drop_level"`
+
+ //mt:len32
+ GroupCaps []ToolGroupCaps `json:"groupcaps"`
+
+ //mt:len32
+ DmgGroups []Group `json:"damage_groups"`
+
+ AttackUses uint16 `json:"punch_attack_uses"`
+
+ //mt:end
+ //mt:end
+
+ //mt:end
+}
+
+type ToolGroupCaps struct {
+ Name string
+ Uses int16
+ MaxLvl int16
+
+ //mt:len32
+ Times []DigTime
+}
+
+type DigTime struct {
+ Rating int16
+ Time float32
+}