WeaponMechanics / WeaponMechanicsCosmeticsWiki

Wiki for the WeaponMechanicsCosmetics plugin
6 stars 0 forks source link

When using Ammo_Per_Reload, the reload time and firearm action are merged. #15

Open DarkmanBree opened 2 years ago

DarkmanBree commented 2 years ago

Has this issue already been reported? Did you ask for help before making this report?

Current Behavior

When using Show_Time, the first bullet you reload will show a merged reload time of both the normal reload and the firearm action close's time. However, the reload is luckily not longer.

At the end of reloading all bullets, firearm action close will not play any reload bar / item cooldown timers.

Expected Behavior

The first bullet should only have the regular reload time (unless Open firearm action is used). The last bullet you reload should have the firearm action close time added to the reload bar / item cooldown.

Steps To Reproduce

Use these configs:

  Reload:
    Trigger:
      Main_Hand: drop_item
    Magazine_Size: 8
    Ammo_Per_Reload: 1
    Reload_Duration: 18
    Start_Mechanics:
      Sounds:
      - ITEM_FLINTANDSTEEL_USE-1-1.3-13
      - BLOCK_IRON_TRAPDOOR_OPEN-1-2-13
      - BLOCK_IRON_TRAPDOOR_CLOSE-1-1.4-16
      - ENTITY_IRON_GOLEM_ATTACK-1-2-17
  Firearm_Action:
    Type: slide
    Close:
      Time: 16
      Mechanics:
        Sounds:
        - BLOCK_IRON_DOOR_OPEN-1-1.5-5
        - BLOCK_PISTON_EXTEND-1-1.5-5
        - BLOCK_IRON_DOOR_OPEN-1-1.5-5
        - BLOCK_IRON_TRAPDOOR_OPEN-1-1.5-5
        - BLOCK_IRON_TRAPDOOR_OPEN-1-1.3-5
        - BLOCK_IRON_TRAPDOOR_CLOSE-1-1.5-5
        - BLOCK_IRON_DOOR_CLOSE-1-1.5-5
        - BLOCK_IRON_DOOR_OPEN-1-1.5-11
        - BLOCK_PISTON_EXTEND-1-1.5-11
        - BLOCK_IRON_DOOR_OPEN-1-1.5-11
        - BLOCK_IRON_TRAPDOOR_OPEN-1-1.5-11
        - BLOCK_IRON_TRAPDOOR_OPEN-1-1.3-11
        - BLOCK_IRON_TRAPDOOR_CLOSE-1-1.5-11
        - BLOCK_IRON_DOOR_CLOSE-1-1.5-11

And

  Show_Time:
    Reload:
      Action_Bar: <gray>Reloading...<white> %bar% <white>%time%s
      Action_Bar_Cancelled: <red>Reload Cancelled
      Bar:
        Left_Color: <white>
        Right_Color: <black>
        Left_Symbol: '|'
        Symbol_Amount: 50
      Item_Cooldown: true

This is what I used on a SPAS-12 shotgun, just empty the weapon magazine so it reloads from 0, the first bullet will make the reload bar and item cooldown say it is longer because Firearm Action Close is calculated with it, but the reload itself won't be longer luckily. At the end, the times for firearm action close won't play after the last bullet because it already played on the first bullet.

Frequency

100% of the time

Version and Log

image latest.log

Anything else?

No response

DarkmanBree commented 1 year ago

Got a clip of it, pay attention to the visual reload action bar, and the item cooldown in the hotbar.

https://medal.tv/games/minecraft/clips/10FEuvGehEhoIr/d1337ADUh1KP?invite=cr-MSxwN0gsMTcwOTA3Njks