mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-18 02:16:23 -05:00
removed all 'structcheck' and 'unused' lint errors (#839)
This commit is contained in:
parent
42a48fe03a
commit
49c1985dcc
@ -425,6 +425,9 @@ func (am *AssetManager) loadDCC(path string,
|
|||||||
}
|
}
|
||||||
|
|
||||||
animation, err := newDCCAnimation(dcc, palette, effect)
|
animation, err := newDCCAnimation(dcc, palette, effect)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
return animation, nil
|
return animation, nil
|
||||||
}
|
}
|
||||||
|
@ -53,6 +53,7 @@ const (
|
|||||||
var _ d2item.Item = &Item{}
|
var _ d2item.Item = &Item{}
|
||||||
|
|
||||||
// Item is a representation of a diablo2 item
|
// Item is a representation of a diablo2 item
|
||||||
|
// nolint:structcheck,unused // WIP
|
||||||
type Item struct {
|
type Item struct {
|
||||||
factory *ItemFactory
|
factory *ItemFactory
|
||||||
name string
|
name string
|
||||||
@ -83,6 +84,7 @@ type Item struct {
|
|||||||
sockets []*d2item.Item // there will be checks for handling the craziness this might entail
|
sockets []*d2item.Item // there will be checks for handling the craziness this might entail
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// nolint:structcheck,unused // WIP
|
||||||
type itemAttributes struct {
|
type itemAttributes struct {
|
||||||
worldSprite *d2ui.Sprite
|
worldSprite *d2ui.Sprite
|
||||||
inventorySprite *d2ui.Sprite
|
inventorySprite *d2ui.Sprite
|
||||||
@ -118,7 +120,7 @@ type itemAttributes struct {
|
|||||||
type minMaxEnhanceable struct {
|
type minMaxEnhanceable struct {
|
||||||
min int
|
min int
|
||||||
max int
|
max int
|
||||||
enhance int
|
enhance int // nolint:structcheck,unused // WIP
|
||||||
}
|
}
|
||||||
|
|
||||||
// Label returns the item name
|
// Label returns the item name
|
||||||
|
@ -7,6 +7,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// AnimatedEntity represents an animation that can be projected onto the map.
|
// AnimatedEntity represents an animation that can be projected onto the map.
|
||||||
|
// nolint:structcheck,unused // variables are unused because it is incomplete
|
||||||
type AnimatedEntity struct {
|
type AnimatedEntity struct {
|
||||||
mapEntity
|
mapEntity
|
||||||
animation d2interface.Animation
|
animation d2interface.Animation
|
||||||
|
@ -116,7 +116,7 @@ type MainMenu struct {
|
|||||||
inputManager d2interface.InputManager
|
inputManager d2interface.InputManager
|
||||||
renderer d2interface.Renderer
|
renderer d2interface.Renderer
|
||||||
audioProvider d2interface.AudioProvider
|
audioProvider d2interface.AudioProvider
|
||||||
scriptEngine *d2script.ScriptEngine
|
scriptEngine *d2script.ScriptEngine // nolint:structcheck,unused // it will be used...
|
||||||
navigator d2interface.Navigator
|
navigator d2interface.Navigator
|
||||||
uiManager *d2ui.UIManager
|
uiManager *d2ui.UIManager
|
||||||
heroState *d2hero.HeroStateFactory
|
heroState *d2hero.HeroStateFactory
|
||||||
|
@ -36,6 +36,7 @@ func Create(asset *d2asset.AssetManager) (*RemoteClientConnection, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
result := &RemoteClientConnection{
|
result := &RemoteClientConnection{
|
||||||
|
asset: asset,
|
||||||
heroState: heroStateFactory,
|
heroState: heroStateFactory,
|
||||||
uniqueID: uuid.New().String(),
|
uniqueID: uuid.New().String(),
|
||||||
}
|
}
|
||||||
@ -149,6 +150,7 @@ func (r *RemoteClientConnection) serverListener() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bytesToJSON reads the packet type, decompresses the packet and returns a JSON string.
|
// bytesToJSON reads the packet type, decompresses the packet and returns a JSON string.
|
||||||
|
// nolint:unused // WIP
|
||||||
func (r *RemoteClientConnection) bytesToJSON(buffer []byte) (string, d2netpackettype.NetPacketType, error) {
|
func (r *RemoteClientConnection) bytesToJSON(buffer []byte) (string, d2netpackettype.NetPacketType, error) {
|
||||||
packet, err := d2netpacket.UnmarshalNetPacket(buffer)
|
packet, err := d2netpacket.UnmarshalNetPacket(buffer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user