Cram server and client functions together into the same file

It's how avorion does it anyway
This commit is contained in:
2025-07-20 18:30:17 +02:00
parent 766a5a9cfe
commit ef45b510e9
2 changed files with 28 additions and 11 deletions

View File

@@ -19,9 +19,9 @@
---@return {{.Type}}{{if ne .Comment ""}} #{{truncateComment .Comment 80}}{{end}}
{{- end}}
{{- end}}
{{.Name}} = function(self{{if gt (len .Params) 0}}, {{range $index, $param := .Params}}{{if $index}}, {{end}}{{$param.Name}}{{end}}{{end}}) end,
{{.Name}} = function(self{{if gt (len .Params) 0}}, {{range $index, $param := .Params}}{{if $index}}, {{end}}{{$param.Name}}{{end}}{{end}}) end,{{if ne $method.Comment ""}} -- {{truncateComment $method.Comment 80}}{{end}}
{{- else}}
{{.Name}} = function(self{{if gt (len .Params) 0}}, {{range $index, $param := .Params}}{{if $index}}, {{end}}{{$param.Name}}{{end}}{{end}}) end,
{{.Name}} = function(self{{if gt (len .Params) 0}}, {{range $index, $param := .Params}}{{if $index}}, {{end}}{{$param.Name}}{{end}}{{end}}) end,{{if ne $method.Comment ""}} -- {{truncateComment $method.Comment 80}}{{end}}
{{- end}}
{{- if ne (plus1 $index) $n}}