diff --git a/block_bank.go b/block_bank.go new file mode 100644 index 0000000..eaa181f --- /dev/null +++ b/block_bank.go @@ -0,0 +1,31 @@ +package sii + +func init() { + RegisterBlock(&Bank{}) +} + +type Bank struct { + MoneyAccount int64 `sii:"money_account"` + CoinsuranceFixed int64 `sii:"coinsurance_fixed"` + CoinsuranceRatio float32 `sii:"coinsurance_ratio"` + AccidentSeverity float32 `sii:"accident_severity"` + Loans int64 `sii:"loans"` + AppEnabled bool `sii:"app_enabled"` + LoanLimit int64 `sii:"loan_limit"` + PaymentTimer float32 `sii:"payment_timer"` + Overdraft bool `sii:"overdraft"` + OverdraftTimer float32 `sii:"overdraft_timer"` + OverdraftWarnCount int64 `sii:"overdraft_warn_count"` + SellPlayersTruckLater bool `sii:"sell_players_truck_later"` + SellPlayersTrailerLater bool `sii:"sell_players_trailer_later"` + + blockName string +} + +func (Bank) Class() string { return "bank" } + +func (b *Bank) Init(class, name string) { + b.blockName = name +} + +func (b Bank) Name() string { return b.blockName } diff --git a/block_company.go b/block_company.go new file mode 100644 index 0000000..a08a4a4 --- /dev/null +++ b/block_company.go @@ -0,0 +1,25 @@ +package sii + +func init() { + RegisterBlock(&Company{}) +} + +type Company struct { + PermanentData Ptr `sii:"permanent_data"` // external pointer + DelieredTrailer Ptr `sii:"delivered_trailer"` + DeliveredPos int64 `sii:"delivered_pos"` + JobOffer []Ptr `sii:"job_offer"` + CargoOfferSeeds []int64 `sii:"cargo_offer_seeds"` + Discovered bool `sii:"discovered"` + ReservedTrailerSlot int64 `sii:"reserved_trailer_slot"` // TODO: Maybe wrong type, haven't seen other than "nil" + + blockName string +} + +func (Company) Class() string { return "company" } + +func (c *Company) Init(class, name string) { + c.blockName = name +} + +func (c Company) Name() string { return c.blockName }