Barotrauma

Barotrauma

[FIX]火力不足-Insufficient Firepower
whosyourdaddy 17 May, 2023 @ 5:36am
半自动 爆炸开火 代码改进
半自动改进:使用热tag代替臃肿的物品tag,例如为smg实现半自动,仅需添加以下StatusEffect到对应Component
<Holdable> <StatusEffect type="OnUse" target="This" tags="wait_rls_trigger" duration="0.03" stackable="false"> <Conditional hasstatustag="wait_rls_trigger" /> </StatusEffect> <StatusEffect type="OnUse" target="This" reloadtimer="+1"> <Conditional hasstatustag="wait_rls_trigger" /> </StatusEffect> </Holdable> <RangedWeapon> <StatusEffect type="OnUse" target="This" tags="wait_rls_trigger" duration="0.03" stackable="false" /> <StatusEffect type="OnUse" target="This" reloadtimer="+1"> <Conditional reloadtimer="lt 0.01667" /> </StatusEffect> </RangedWeapon>
duration="0.03"意味着热tag只对下一个tick的OnUse条件可见。
<Conditional reloadtimer="lt 0.01667" />的SE解决了在极高RangedAttackSpeedMultipier加成下会让武器无法使用的隐晦问题。

优点:
1. 不占用物品tag
2. 不干涉reload属性
3. 性能+++
4. 仅需cv,不用调参

爆炸开火改进:也以热tag代替物品tag,添加以下StatusEffect至对应Component
<RangedWeapon> <StatusEffect type="OnUse" target="This" reloadtimer="+1.0" disabledeltatime="true"> <Conditional hasstatustag="if_burst_2" /> </StatusEffect> <StatusEffect type="OnUse" target="This" tags="if_burst_2" duration="1.0" stackable="false"> <Conditional hasstatustag="if_burst_1" /> </StatusEffect> <StatusEffect type="OnUse" target="This" tags="if_burst_1" duration="1.0" stackable="false" /> </RangedWeapon>
reloadtimer和duration的值应该相同,表示最后一次射击或完成爆炸开火后的冷却时间。

优点:
1. 不占用物品tag
2. 不干涉reload属性
Last edited by whosyourdaddy; 18 May, 2023 @ 2:50am
< >
Showing 1-1 of 1 comments
苏大妈 17 May, 2023 @ 7:29pm 
好!:steamhappy:
< >
Showing 1-1 of 1 comments
Per page: 1530 50