diff --git a/language.version b/language.version index 3b9a3c220..e11253a01 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre \cu(Fri 17 Sep 19:46:45 CEST 2021)\c-"; -SWWM_SHORTVER="\cw1.2pre \cu(2021-09-17 19:46:45)\c-"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r1 \cu(Sat 18 Sep 00:10:31 CEST 2021)\c-"; +SWWM_SHORTVER="\cw1.2pre r1 \cu(2021-09-18 00:10:31)\c-"; diff --git a/zscript/items/swwm_baseammo.zsc b/zscript/items/swwm_baseammo.zsc index 6c2bfbecb..ed5b5a7a4 100644 --- a/zscript/items/swwm_baseammo.zsc +++ b/zscript/items/swwm_baseammo.zsc @@ -8,6 +8,7 @@ Class SWWMAmmo : Ammo String PickupTag; Class MagAmmoType; private int SAmmoFlags; + transient bool bSinglePrint; // used for pickup messages of mag manager Property PickupTag : PickupTag; Property MagAmmoType : MagAmmoType; @@ -26,11 +27,12 @@ Class SWWMAmmo : Ammo { if ( bUsePickupMsg ) return Super.PickupMessage(); String tagstr = "$T_"..PickupTag; - if ( Amount > 1 ) + if ( (Amount > 1) && !bSinglePrint ) { tagstr = tagstr.."S"; return String.Format("%d %s",Amount,StringTable.Localize(tagstr)); } + bSinglePrint = false; return StringTable.Localize(tagstr); } @@ -258,6 +260,7 @@ Class MagAmmo : Inventory abstract int ClipSize; int countdown; String PickupTag; + transient bool bSinglePrint; // used for pickup messages of mag manager Property ParentAmmo : ParentAmmo; Property ClipSize : ClipSize; @@ -316,11 +319,12 @@ Class MagAmmo : Inventory abstract override string PickupMessage() { String tagstr = "$T_"..PickupTag; - if ( Amount > 1 ) + if ( (Amount > 1) && !bSinglePrint ) { tagstr = tagstr.."S"; return String.Format("%d %s",Amount,StringTable.Localize(tagstr)); } + bSinglePrint = false; return StringTable.Localize(tagstr); } @@ -520,7 +524,10 @@ Class MagAmmo : Inventory abstract Amount -= ClipSize; given = true; if ( Owner.CheckLocalView() ) + { + SWWMAmmo(pamo).bSinglePrint = true; pamo.PrintPickupMessage(true,pamo.PickupMessage()); + } } if ( given ) pamo.PlayPickupSound(Owner); return given; diff --git a/zscript/weapons/swwm_tastytreat.zsc b/zscript/weapons/swwm_tastytreat.zsc index 7508ee73f..61e541531 100644 --- a/zscript/weapons/swwm_tastytreat.zsc +++ b/zscript/weapons/swwm_tastytreat.zsc @@ -262,7 +262,11 @@ Class CandyGun : SWWMWeapon if ( dropamt > 0 ) ma.CreateTossable(dropamt); ma.Amount = min(ma.MaxAmount,ma.Amount+invoker.clipcount); ma.MagFill(); - if ( CheckLocalView() ) for ( int i=0; i 0 ) ma.PlayPickupSound(self); invoker.clipcount = 0; } diff --git a/zscript/weapons/swwm_thiccboolet.zsc b/zscript/weapons/swwm_thiccboolet.zsc index 0f2cd04dd..e66c1b4e8 100644 --- a/zscript/weapons/swwm_thiccboolet.zsc +++ b/zscript/weapons/swwm_thiccboolet.zsc @@ -787,7 +787,11 @@ Class SilverBullet : SWWMWeapon if ( dropamt > 0 ) ma.CreateTossable(dropamt); ma.Amount = min(ma.MaxAmount,ma.Amount+invoker.clipcount); ma.MagFill(); - if ( CheckLocalView() ) for ( int i=0; i 0 ) ma.PlayPickupSound(self); } invoker.ClipCount = 0;