mirror of
https://github.com/Luzifer/sii.git
synced 2024-10-18 05:14:19 +00:00
Add Garage block
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
b54e02543b
commit
a061da28b0
1 changed files with 24 additions and 0 deletions
24
block_garage.go
Normal file
24
block_garage.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
package sii
|
||||
|
||||
func init() {
|
||||
RegisterBlock(&Garage{})
|
||||
}
|
||||
|
||||
type Garage struct {
|
||||
Vehicles []Ptr `sii:"vehicles"`
|
||||
Drivers []Ptr `sii:"drivers"`
|
||||
Trailers []Ptr `sii:"trailers"`
|
||||
Status int `sii:"status"`
|
||||
ProfitLog Ptr `sii:"profit_log"`
|
||||
Productivity float32 `sii:"productivity"`
|
||||
|
||||
blockName string
|
||||
}
|
||||
|
||||
func (Garage) Class() string { return "garage" }
|
||||
|
||||
func (g *Garage) Init(class, name string) {
|
||||
g.blockName = name
|
||||
}
|
||||
|
||||
func (g Garage) Name() string { return g.blockName }
|
Loading…
Reference in a new issue