From 298ed03ccd59f5fdb572d4941fe5927dae79ae79 Mon Sep 17 00:00:00 2001 From: Marisa the Magician Date: Sun, 24 Jul 2022 19:44:39 +0200 Subject: [PATCH] Ammo adjustments. --- language.version | 4 ++-- zscript/dlc1/swwm_ammoitems_dlc.zsc | 28 +++++++++++++------------- zscript/items/swwm_ammoextra.zsc | 31 ----------------------------- 3 files changed, 16 insertions(+), 47 deletions(-) diff --git a/language.version b/language.version index 50f3197c8..6c7f26d10 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r211 \cu(Sun 24 Jul 19:44:26 CEST 2022)\c-"; -SWWM_SHORTVER="\cw1.3pre r211 \cu(2022-07-24 19:44:26)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r212 \cu(Sun 24 Jul 19:44:39 CEST 2022)\c-"; +SWWM_SHORTVER="\cw1.3pre r212 \cu(2022-07-24 19:44:39)\c-"; diff --git a/zscript/dlc1/swwm_ammoitems_dlc.zsc b/zscript/dlc1/swwm_ammoitems_dlc.zsc index 976cbb2a5..ab41d5146 100644 --- a/zscript/dlc1/swwm_ammoitems_dlc.zsc +++ b/zscript/dlc1/swwm_ammoitems_dlc.zsc @@ -8,9 +8,9 @@ Class SMW05Ammo : SWWMAmmo SWWMAmmo.PickupTag "SMW05BULLET"; Stamina 300; Inventory.Amount 1; - Inventory.MaxAmount 60; + Inventory.MaxAmount 80; Ammo.BackpackAmount 6; - Ammo.BackpackMaxAmount 90; + Ammo.BackpackMaxAmount 200; Ammo.DropAmount 3; +FLOATBOB; FloatBobStrength 0.25; @@ -60,9 +60,9 @@ Class SheenAmmo : SWWMAmmo SWWMAmmo.PickupTag "SHEENBULLET"; Stamina 600; Inventory.Amount 1; - Inventory.MaxAmount 300; + Inventory.MaxAmount 200; Ammo.BackpackAmount 20; - Ammo.BackpackMaxAmount 900; + Ammo.BackpackMaxAmount 800; Ammo.DropAmount 10; +FLOATBOB; FloatBobStrength 0.25; @@ -118,9 +118,9 @@ Class QuadravolAmmo : SWWMAmmo SWWMAmmo.PickupTag "QUADAMMO"; Stamina 10000; Inventory.Amount 1; - Inventory.MaxAmount 5; - Ammo.BackpackAmount 2; - Ammo.BackpackMaxAmount 15; + Inventory.MaxAmount 24; + Ammo.BackpackAmount 4; + Ammo.BackpackMaxAmount 40; Ammo.DropAmount 1; +FLOATBOB; FloatBobStrength 0.25; @@ -156,8 +156,8 @@ Class SparksterBAmmo : SWWMAmmo SWWMAmmo.PickupTag "SPARKBCELL"; Stamina 16000; Inventory.Amount 1; - Inventory.MaxAmount 6; - Ammo.BackpackAmount 2; + Inventory.MaxAmount 8; + Ammo.BackpackAmount 1; Ammo.BackpackMaxAmount 16; Ammo.DropAmount 1; +FLOATBOB; @@ -194,8 +194,8 @@ Class SparksterRAmmo : SWWMAmmo SWWMAmmo.PickupTag "SPARKRCELL"; Stamina 18000; Inventory.Amount 1; - Inventory.MaxAmount 6; - Ammo.BackpackAmount 2; + Inventory.MaxAmount 8; + Ammo.BackpackAmount 1; Ammo.BackpackMaxAmount 16; Ammo.DropAmount 1; +FLOATBOB; @@ -343,7 +343,7 @@ Class MisterAmmo : SWWMAmmo Inventory.Amount 1; Inventory.MaxAmount 2; Ammo.BackpackAmount 0; - Ammo.BackpackMaxAmount 4; + Ammo.BackpackMaxAmount 5; Ammo.DropAmount 1; SWWMAmmo.MagAmmoType "MisterRound"; +FLOATBOB; @@ -366,9 +366,9 @@ Class MisterGAmmo : SWWMAmmo SWWMAmmo.PickupTag "MRGRENADE"; Stamina 120000; Inventory.Amount 1; - Inventory.MaxAmount 3; + Inventory.MaxAmount 4; Ammo.BackpackAmount 0; - Ammo.BackpackMaxAmount 6; + Ammo.BackpackMaxAmount 10; Ammo.DropAmount 1; +FLOATBOB; FloatBobStrength 0.25; diff --git a/zscript/items/swwm_ammoextra.zsc b/zscript/items/swwm_ammoextra.zsc index 6755cb5ba..808fd9bb3 100644 --- a/zscript/items/swwm_ammoextra.zsc +++ b/zscript/items/swwm_ammoextra.zsc @@ -345,41 +345,10 @@ Class HammerspaceEmbiggener : Inventory if ( !traded ) other.A_StartSound("powerup/embiggener",CHAN_ITEMEXTRA); // Find every unique type of ammoitem. Give it to the player if // they don't have it already, and increase its maximum capacity. - // first we must build an array of all valid weapons, this saves time instead of doing recursive loops - Array > validweapons; - for ( int i=0; i)(AllActorClasses[i]); - if ( !type2 ) continue; - let rep = GetReplacement(type2); - if ( (rep != type2) && !(rep is "DehackedPickup") ) continue; - readonly weap = GetDefaultByType(type2); - if ( !other.player || !other.player.weapons.LocateWeapon(type2) || weap.bCheatNotWeapon || !weap.CanPickup(other) ) continue; - let ready = weap.FindState("Ready"); - if ( !ready || !ready.ValidateSpriteFrame() ) continue; - validweapons.Push(type2); - } for ( int i=0; i)(AllActorClasses[i]); if ( !type || (type.GetParentClass() != 'SWWMAmmo') ) continue; - // check that it's for a valid weapon - bool isvalid = false; - for ( int j=0; j weap = GetDefaultByType(validweapons[j]); - if ( (validweapons[j] is 'SWWMWeapon') && SWWMWeapon(weap).UsesAmmo(type) ) - { - isvalid = true; - break; - } - if ( (weap.AmmoType1 == type) || (weap.AmmoType2 == type) ) - { - isvalid = true; - break; - } - } - if ( !isvalid ) continue; let ammoitem = Ammo(other.FindInventory(type)); int amount = GetDefaultByType(type).BackpackAmount*self.Amount; if ( traded ) amount = 0;