1
0
Fork 0
mirror of https://github.com/Luzifer/sii.git synced 2024-10-18 05:14:19 +00:00

Add CityData and LicensePlateData base blocks

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-12-24 15:35:08 +01:00
parent a7132e54bd
commit 719e6eab6a
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
2 changed files with 54 additions and 0 deletions

28
block_city_data.go Normal file
View file

@ -0,0 +1,28 @@
package sii
func init() {
RegisterBlock(&CityData{})
}
type CityData struct {
CityName string `sii:"city_name"`
CityNameLocalized string `sii:"city_name_localized"`
Country Ptr `sii:"country"`
MapXOffsets []int64 `sii:"map_x_offsets"`
MapYOffsets []int64 `sii:"map_y_offsets"`
VehicleBrands []string `sii:"vehicle_brands"`
LicensePlate []Ptr `sii:"license_plate"`
blockName string
}
func (CityData) Class() string { return "city_data" }
func (c *CityData) Init(class, name string) {
c.blockName = name
}
func (c CityData) Name() string { return c.blockName }

View file

@ -0,0 +1,26 @@
package sii
func init() {
RegisterBlock(&LicensePlateData{})
}
type LicensePlateData struct {
Type Ptr `sii:"type"`
Templates []string `sii:"templates"`
Def0 []string `sii:"def0"`
Def1 []string `sii:"def1"`
Def2 []string `sii:"def2"`
Def3 []string `sii:"def3"`
blockName string
}
func (LicensePlateData) Class() string { return "license_plate_data" }
func (l *LicensePlateData) Init(class, name string) {
l.blockName = name
}
func (l LicensePlateData) Name() string { return l.blockName }