diff --git a/gamemodes/benny/entities/weapons/benny/sh_firing.lua b/gamemodes/benny/entities/weapons/benny/sh_firing.lua index 34376d6..3032ed3 100644 --- a/gamemodes/benny/entities/weapons/benny/sh_firing.lua +++ b/gamemodes/benny/entities/weapons/benny/sh_firing.lua @@ -1,7 +1,7 @@ function SWEP:PrimaryAttack() - local dual = self:BTable( false ) and self:BTable( true ) + local dual = self:C_DualCheck() if dual then self:BFire( true ) else @@ -11,7 +11,7 @@ function SWEP:PrimaryAttack() end function SWEP:SecondaryAttack() - local dual = self:BTable( false ) and self:BTable( true ) + local dual = self:C_DualCheck() if dual then self:BFire( false ) else diff --git a/gamemodes/benny/entities/weapons/benny/sh_inv.lua b/gamemodes/benny/entities/weapons/benny/sh_inv.lua index e55db39..27e8953 100644 --- a/gamemodes/benny/entities/weapons/benny/sh_inv.lua +++ b/gamemodes/benny/entities/weapons/benny/sh_inv.lua @@ -53,6 +53,10 @@ function SWEP:D_SetClip( hand, value ) return (hand == true) and self:SetClip2( value ) or (hand == false) and self:SetClip1( value ) end +function SWEP:C_DualCheck() + return self:BTable( true )--self:BTable( false ) and self:BTable( true ) and self:BClass( false ).Features == "firearm" and self:BClass( true ).Features == "firearm" +end + function SWEP:BDeploy( hand, id ) assert( isbool(hand), "You forgot the hand." ) assert( isstring(id), "You forgot the ID." ) diff --git a/gamemodes/benny/entities/weapons/benny/shared.lua b/gamemodes/benny/entities/weapons/benny/shared.lua index 4dede5e..67fdc5d 100644 --- a/gamemodes/benny/entities/weapons/benny/shared.lua +++ b/gamemodes/benny/entities/weapons/benny/shared.lua @@ -170,7 +170,7 @@ hook.Add( "PlayerButtonDown", "Benny_PlayerButtonDown_TempForAim", function( ply end end - local dual = wep:BTable( false ) and wep:BTable( true ) + local dual = wep:C_DualCheck() if button == KEY_R then if dual then wep:Reload( true ) else wep:Reload( false ) end end diff --git a/gamemodes/benny/gamemode/modules/player/sh_basic.lua b/gamemodes/benny/gamemode/modules/player/sh_basic.lua index a562f42..66f7dbe 100644 --- a/gamemodes/benny/gamemode/modules/player/sh_basic.lua +++ b/gamemodes/benny/gamemode/modules/player/sh_basic.lua @@ -182,7 +182,13 @@ end function GM:ShowSpare1( ply ) if SERVER then - ply:ConCommand( "benny_inv_holster" ) + ply:ConCommand( "benny_gui_settings" ) + end +end + +function GM:ShowSpare2( ply ) + if SERVER then + ply:ConCommand( "benny_gui_spscore" ) end end @@ -344,24 +350,24 @@ if CLIENT then local opt1 = Menu:AddOption( "Equip Right", function() RunConsoleCommand( "benny_inv_equip", button.ID, "false" ) end) - opt1:SetIcon( "icon16/resultset_next.png" ) + opt1:SetIcon( "icon16/resultset_last.png" ) - local opt3 = Menu:AddOption( "Swap Right", function() + local opt3 = Menu:AddOption( "Equip Right, Move Left", function() RunConsoleCommand( "benny_inv_equip", button.ID, "false", "true" ) end) - opt3:SetIcon( "icon16/resultset_first.png" ) + opt3:SetIcon( "icon16/resultset_next.png" ) Menu:AddSpacer() local opt2 = Menu:AddOption( "Equip Left", function() RunConsoleCommand( "benny_inv_equip", button.ID, "true" ) end) - opt2:SetIcon( "icon16/resultset_previous.png" ) + opt2:SetIcon( "icon16/resultset_first.png" ) - local opt4 = Menu:AddOption( "Swap Left", function() + local opt4 = Menu:AddOption( "Equip Left, Move Right", function() RunConsoleCommand( "benny_inv_equip", button.ID, "true", "true" ) end) - opt4:SetIcon( "icon16/resultset_last.png" ) + opt4:SetIcon( "icon16/resultset_previous.png" ) Menu:AddSpacer()