CHR15cs / CS2-Practice-Plugin

Open Source Plugin for Counterstrike 2 based on CounterStrikeSharp
GNU General Public License v3.0
82 stars 10 forks source link

Apply nade manipulations to last used nade #45

Closed naofireblade closed 7 months ago

naofireblade commented 7 months ago

A .delete command to remove the last loaded nade would be useful.

CHR15cs commented 7 months ago

Currently the .delete command requires a parameter with the id of the nade you want to delete. (use .nades to see the ID) I can implement that it if no number is passed the last saved grenade will be deleted

naofireblade commented 7 months ago

Ok cleared this up. It's wrong stated as .remove in the wiki :)

Do I need to pass the nade id to all nade commands? .desc, .rename, .addtag, .removeTag? I remember the cs go practice plugin had a mechanism to apply these commands to the last loaded (not saved) nade. If last action was a save its also the loaded one.

CHR15cs commented 7 months ago

My bad, that wiki isnt up2date yet.

In the update planned for today, there will be a .editnade command. This way you can select a grenade and edit it with .desc .rename etc. and no extra parameter is required. In the last version I just totally forgott about it.

If you think its more convenient to just edit the last loaded grenade, that would be fine for me as well.

naofireblade commented 7 months ago

I think it's more convenient yes. And i can imagine many users come from the cs go practice plugin and assume the same behavior.

CHR15cs commented 7 months ago

Implemented in commit https://github.com/CHR15cs/CS2-Practice-Plugin/commit/b7ce25e6eed31517f00108b5bf5826cf2450d13a Release should be uploaded shortly :)

.delete without parameters will delete the last used or saved nade to delete a specific nade use .delete