mirror of
https://github.com/Luzifer/sii.git
synced 2024-12-21 00:21:15 +00:00
Add Company and Bank blocks
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
40b6d77f01
commit
b54e02543b
2 changed files with 56 additions and 0 deletions
31
block_bank.go
Normal file
31
block_bank.go
Normal file
|
@ -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 }
|
25
block_company.go
Normal file
25
block_company.go
Normal file
|
@ -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 }
|
Loading…
Reference in a new issue