Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Body ¶
type Body struct { ID int `json:"id"` Name string `json:"name"` MotherShip bool `json:"mother_ship"` Speed int `json:"speed"` Initiative int `json:"initiative"` MaxHP int `json:"max_hp"` Armor int `json:"armor"` EvasionCritical int `json:"evasion_critical"` VulToKinetics int `json:"vul_to_kinetics"` VulToThermo int `json:"vul_to_thermo"` VulToExplosion int `json:"vul_to_explosion"` RangeView int `json:"range_view"` RangeRadar int `json:"range_radar"` Accuracy int `json:"accuracy"` MaxPower int `json:"max_power"` RecoveryPower int `json:"recovery_power"` RecoveryHP int `json:"recovery_hp"` WallHack bool `json:"wall_hack"` CapacitySize float32 `json:"capacity_size"` /* вместимость корпуса к кубо-метрах */ StandardSize int `json:"standard_size"` /* small - 1, medium - 2, big - 3, размер корпуса (если корпус мс то неучитывается)*/ StandardSizeSmall bool `json:"standard_size_small"` /* оружие которое может использовать корпус small, medium, big */ StandardSizeMedium bool `json:"standard_size_medium"` /* оружие которое может использовать корпус small, medium, big */ StandardSizeBig bool `json:"standard_size_big"` /* оружие которое может использовать корпус small, medium, big */ EquippingI map[int]*BodyEquipSlot `json:"equippingI"` EquippingII map[int]*BodyEquipSlot `json:"equippingII"` EquippingIII map[int]*BodyEquipSlot `json:"equippingIII"` EquippingIV map[int]*BodyEquipSlot `json:"equippingIV"` EquippingV map[int]*BodyEquipSlot `json:"equippingV"` ThoriumSlots map[int]*ThoriumSlot `json:"thorium_slots"` /* слоты в которых хранится топливо */ Weapons map[int]*BodyWeaponSlot `json:"weapons"` Height int `json:"height"` Width int `json:"width"` }
func (*Body) FindApplicableEquip ¶
func (body *Body) FindApplicableEquip(applicable string) *BodyEquipSlot
func (*Body) GetEquip ¶
func (body *Body) GetEquip(typeSlot, numberSlot int) *BodyEquipSlot
func (*Body) GetRandomEquip ¶
func (body *Body) GetRandomEquip() *BodyEquipSlot
func (*Body) GetUseCapacitySize ¶
func (*Body) GetUsePower ¶
type BodyEquipSlot ¶
type BodyEquipSlot struct { Type int `json:"type_slot"` Number int `json:"number_slot"` Equip *equip.Equip `json:"equip"` InsertToDB bool `json:"insert_to_db"` Used bool `json:"used"` /* использовано или нет */ StepsForReload int `json:"steps_for_reload"` HP int `json:"hp"` Target *coordinate.Coordinate `json:"target"` StandardSize int `json:"standard_size"` /* определяет тип вмещаемого юнита если это ангар */ XAttach int `json:"x_attach"` YAttach int `json:"y_attach"` Mining bool `json:"mining"` }
type BodyWeaponSlot ¶
type BodyWeaponSlot struct { Type int `json:"type_slot"` // по диз доку он может быть только 3 Number int `json:"number_slot"` Weapon *Weapon `json:"weapon"` WeaponType string `json:"weapon_type"` Ammo *ammo.Ammo `json:"ammo"` AmmoQuantity int `json:"ammo_quantity"` InsertToDB bool `json:"insert_to_db"` HP int `json:"hp"` XAttach int `json:"x_attach"` YAttach int `json:"y_attach"` Reload bool `json:"reload"` }
type ThoriumSlot ¶
type Weapon ¶
type Weapon struct { // если тут появяться ссылочные типы данных включая срезы, карты и тд, надо будет делать глубокое копирование в // factory/gameTypes/weapons ID int `json:"id"` Name string `json:"name"` MinAttackRange int `json:"min_attack_range"` Range int `json:"range"` Accuracy int `json:"accuracy"` AmmoCapacity int `json:"ammo_capacity"` Artillery bool `json:"artillery"` Power int `json:"power"` MaxHP int `json:"max_hp"` Type string `json:"type"` /* firearms, missile_weapon, laser_weapon */ StandardSize int `json:"standard_size"` /* small - 1, medium - 2, big - 3 */ Size float32 `json:"size"` /* занимаемый обьем в кубо метрах */ EquipDamage int `json:"equip_damage"` EquipCriticalDamage int `json:"equip_critical_damage"` XAttach int `json:"x_attach"` YAttach int `json:"y_attach"` RotateSpeed int `json:"rotate_speed"` CountFireBullet int `json:"count_fire_bullet"` BulletSpeed int `json:"bullet_speed"` ReloadTime int `json:"reload_time"` DelayFollowingFire int `json:"delay_following_fire"` FirePositions []*coordinate.Coordinate `json:"fire_positions"` }
Click to show internal directories.
Click to hide internal directories.