Facepunch / garrysmod-requests

Feature requests for Garry's Mod
83 stars 24 forks source link

Spawn Menu SWEP Ammo #2376

Closed A1steaksa closed 1 month ago

A1steaksa commented 1 month ago

The Problem

When clicking on the spawn icon for a SWEP that you already have in your player inventory, the game should try to give you ammo for it instead of simply doing nothing.

Currently, clicking the big, pretty picture of the weapon you want isn't actually the "right" way to get it, because you'll only get howevermuch ammo the weapon spawns with, which is rarely what you want when sapwning a weapon in Sandbox.

Instead, the "correct" way to get a weapon and/or its ammo is to right-click on the spawn icon (Something it's not necessarily obvious you CAN do,) then click "Spawn using Toolgun" which switches you away from whatever weapon you might be holding, then you spawn a bunch of the weapon's entity and go walk over it.

This is counter-intuitive and I'm pretty sure everyone hates it.

The Solution

When the player clicks on the spawn icon for a SWEP they already have, just give them howevermuch ammo they would've gotten from picking up a tool-gun spawned version of the weapon.

It's simple, it's intuitive, it doesn't break the existing "flow" if people prefer that, and it reduces the need to spam-spawn 20 entities per weapon.

robotboy655 commented 1 month ago

The amount of ammo you get when just clicking on the icon is dictated by the SWEP itself, via the DefaultClip value. It it is above the clip value, that's the "extra" ammo you get.

Picking up the weapon after you already have it results in you having 2x that value, that's it.

A1steaksa commented 1 month ago

The amount of ammo you get when just clicking on the icon is dictated by the SWEP itself, via the DefaultClip value. It it is above the clip value, that's the "extra" ammo you get.

Picking up the weapon after you already have it results in you having 2x that value, that's it.

To be clear, I'm only suggesting an easier, more user-friendly way to get 2x the DefaultClip via clicking the spawn menu icon multiple times, instead of spawning the SWEP entity multiple times via the toolgun.

robotboy655 commented 1 month ago

You can middle mouse click to spawn the gun at your crosshair without usage of the toolgun.

A1steaksa commented 1 month ago

That's news to me!

I don't know where exactly, but I wish that was in the spawnmenu UI somewhere.

That's one of those things that is 100% hidden and undiscoverable unless you try to left-, middle-, and right-click on every single type of UI element and spawn icon. Middle click does nothing on the icons for models, entities, NPCs, vehicles, post-processing effects, dupes, and saves. It also doesn't seem to do anyhting for spawn lists, tool list entries, tabs, text fields, etc.

It does apparently reset numerical sliders to their default value, though. (This breaks the RGB numbers of DColorMixers and resets to the center of the DColorCube instead of the default value, fyi)

robotboy655 commented 1 month ago

Yeah, the "where" is the question. It could be added as a popup hint that Sandbox already uses to tell you about freezing props, etc., but I don't know if that's "visible enough" for the average player.

I will fix the ColorCube reset to default behavior.