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

Add CargoData and CompanyPermanent base data

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-12-24 15:01:27 +01:00
parent a48a514570
commit 6202f0dedf
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
2 changed files with 47 additions and 0 deletions

26
block_cargo_data.go Normal file
View file

@ -0,0 +1,26 @@
package sii
func init() {
RegisterBlock(&CargoData{})
}
type CargoData struct {
CargoName string `sii:"name"`
Fragility float32 `sii:"fragility"`
Groups []Ptr `sii:"group"`
Volume float32 `sii:"volume"`
Mass float32 `sii:"mass"`
UnitRewardPerKM float32 `sii:"unit_reward_per_km"`
UnitLoadTime int64 `sii:"unit_load_time"`
BodyTypes []Ptr `sii:"body_types"`
blockName string
}
func (CargoData) Class() string { return "cargo_data" }
func (c *CargoData) Init(class, name string) {
c.blockName = name
}
func (c CargoData) Name() string { return c.blockName }

View file

@ -0,0 +1,21 @@
package sii
func init() {
RegisterBlock(&CompanyPermanent{})
}
type CompanyPermanent struct {
CompanyName string `sii:"name"`
SortName string `sii:"sort_name"`
TrailerLook Ptr `sii:"trailer_look"`
blockName string
}
func (CompanyPermanent) Class() string { return "company_permanent" }
func (c *CompanyPermanent) Init(class, name string) {
c.blockName = name
}
func (c CompanyPermanent) Name() string { return c.blockName }