diff --git a/d2core/d2asset/asset_manager.go b/d2core/d2asset/asset_manager.go index 2d66ce6b..77e06f64 100644 --- a/d2core/d2asset/asset_manager.go +++ b/d2core/d2asset/asset_manager.go @@ -425,6 +425,9 @@ func (am *AssetManager) loadDCC(path string, } animation, err := newDCCAnimation(dcc, palette, effect) + if err != nil { + return nil, err + } return animation, nil } diff --git a/d2core/d2item/diablo2item/item.go b/d2core/d2item/diablo2item/item.go index c86e50be..061cf59a 100644 --- a/d2core/d2item/diablo2item/item.go +++ b/d2core/d2item/diablo2item/item.go @@ -53,6 +53,7 @@ const ( var _ d2item.Item = &Item{} // Item is a representation of a diablo2 item +// nolint:structcheck,unused // WIP type Item struct { factory *ItemFactory name string @@ -83,6 +84,7 @@ type Item struct { sockets []*d2item.Item // there will be checks for handling the craziness this might entail } +// nolint:structcheck,unused // WIP type itemAttributes struct { worldSprite *d2ui.Sprite inventorySprite *d2ui.Sprite @@ -118,7 +120,7 @@ type itemAttributes struct { type minMaxEnhanceable struct { min int max int - enhance int + enhance int // nolint:structcheck,unused // WIP } // Label returns the item name diff --git a/d2core/d2map/d2mapentity/animated_entity.go b/d2core/d2map/d2mapentity/animated_entity.go index 232dfcee..d9359f99 100644 --- a/d2core/d2map/d2mapentity/animated_entity.go +++ b/d2core/d2map/d2mapentity/animated_entity.go @@ -7,6 +7,7 @@ import ( ) // AnimatedEntity represents an animation that can be projected onto the map. +// nolint:structcheck,unused // variables are unused because it is incomplete type AnimatedEntity struct { mapEntity animation d2interface.Animation diff --git a/d2game/d2gamescreen/main_menu.go b/d2game/d2gamescreen/main_menu.go index f58f7f4e..f6bff123 100644 --- a/d2game/d2gamescreen/main_menu.go +++ b/d2game/d2gamescreen/main_menu.go @@ -116,7 +116,7 @@ type MainMenu struct { inputManager d2interface.InputManager renderer d2interface.Renderer audioProvider d2interface.AudioProvider - scriptEngine *d2script.ScriptEngine + scriptEngine *d2script.ScriptEngine // nolint:structcheck,unused // it will be used... navigator d2interface.Navigator uiManager *d2ui.UIManager heroState *d2hero.HeroStateFactory diff --git a/d2networking/d2client/d2remoteclient/remote_client_connection.go b/d2networking/d2client/d2remoteclient/remote_client_connection.go index 59876615..ad8812eb 100644 --- a/d2networking/d2client/d2remoteclient/remote_client_connection.go +++ b/d2networking/d2client/d2remoteclient/remote_client_connection.go @@ -36,6 +36,7 @@ func Create(asset *d2asset.AssetManager) (*RemoteClientConnection, error) { } result := &RemoteClientConnection{ + asset: asset, heroState: heroStateFactory, 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. +// nolint:unused // WIP func (r *RemoteClientConnection) bytesToJSON(buffer []byte) (string, d2netpackettype.NetPacketType, error) { packet, err := d2netpacket.UnmarshalNetPacket(buffer) if err != nil {