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:
parent
a7132e54bd
commit
719e6eab6a
2 changed files with 54 additions and 0 deletions
28
block_city_data.go
Normal file
28
block_city_data.go
Normal 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 }
|
26
block_license_plate_data.go
Normal file
26
block_license_plate_data.go
Normal 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 }
|
Loading…
Reference in a new issue