1
0
Fork 0
mirror of https://github.com/Luzifer/sii.git synced 2024-12-21 00:21:15 +00:00

Add VehicleAccessory

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-12-23 16:16:47 +01:00
parent 04dda4ab4d
commit 6b9c7c1493
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -0,0 +1,20 @@
package sii
func init() {
RegisterBlock(&VehicleAccessory{})
}
type VehicleAccessory struct {
Wear float32 `sii:"wear"`
DataPath string `sii:"data_path"`
blockName string
}
func (VehicleAccessory) Class() string { return "vehicle_accessory" }
func (v *VehicleAccessory) Init(class, name string) {
v.blockName = name
}
func (v VehicleAccessory) Name() string { return v.blockName }