From df28b24e013817ea5cbf7e7372dbb7fa3ee3eb3f Mon Sep 17 00:00:00 2001 From: ketmar Date: Fri, 15 Apr 2022 13:02:12 +0000 Subject: [PATCH] small cleanups: use new k8vavoom decorate actions FossilOrigin-Name: e0cc5b57853f8b79363e9256be3d6ddff9393db9e75c0ccaa8e66f118f9e5bbf --- decorate/Weapons/Crushbow.txt | 24 ++++++++++++------------ decorate/Weapons/Crylance.txt | 12 ++++++------ decorate/Weapons/FragfireGun.txt | 6 +++--- decorate/Weapons/Hellclaw.txt | 2 +- decorate/Weapons/PainGun.txt | 2 +- decorate/Weapons/PotionLauncher_Acid.txt | 8 ++++---- decorate/Weapons/PotionLauncher_Toxic.txt | 8 ++++---- decorate/Weapons/SpikeGun.txt | 6 +++--- 8 files changed, 34 insertions(+), 34 deletions(-) diff --git a/decorate/Weapons/Crushbow.txt b/decorate/Weapons/Crushbow.txt index 5d2aeb6..e1e45c1 100644 --- a/decorate/Weapons/Crushbow.txt +++ b/decorate/Weapons/Crushbow.txt @@ -96,7 +96,7 @@ ACTOR Crushbow : Weapon replaces RocketLauncher { Weapon.AmmoType1 "CrushbowLoaded" Weapon.AmmoGive1 0 Weapon.AmmoUse1 1 - Weapon.AmmoType2 "Boltmag" + Weapon.AmmoType2 "BoltMag" Weapon.AmmoGive2 3 Weapon.AmmoUse2 0 Weapon.SlotNumber 5 @@ -166,7 +166,7 @@ ACTOR Crushbow : Weapon replaces RocketLauncher { } } } - TNT1 A 0 A_JumpIf(CountInv("CrushbowLoaded")==0, "ReadyEmptyGun") + TNT1 A 0 A_JumpIfNotInventory("CrushbowLoaded", "ReadyEmptyGun") WCRR A 8 A_WeaponReady(WRF_ALLOWRELOAD) Loop @@ -189,7 +189,7 @@ ACTOR Crushbow : Weapon replaces RocketLauncher { WCRF D 1 A_SetPitch(1.00+pitch) WCRF D 1 A_SetPitch(-1.00+pitch) WCRF D 4 A_AlertMonsters - TNT1 A 0 A_JumpIf(CountInv("CrushbowLoaded")==0, "ReadyEmptyGun") + TNT1 A 0 A_JumpIfNotInventory("CrushbowLoaded", "ReadyEmptyGun") WCRF D 8 WCRF E 3 A_SetPitch(-0.50+pitch) TNT1 A 0 A_PlaySound("Weapons/CrushbowPump", CHAN_WEAPON) @@ -215,7 +215,7 @@ ACTOR Crushbow : Weapon replaces RocketLauncher { WCRF D 1 A_SetPitch(0.50+pitch) WCRF D 1 A_SetPitch(-0.50+pitch) WCRF D 4 A_AlertMonsters - TNT1 A 0 A_JumpIf(CountInv("CrushbowLoaded")==0, "ReadyEmptyGun") + TNT1 A 0 A_JumpIfNotInventory("CrushbowLoaded", "ReadyEmptyGun") WCRF D 8 A_AlertMonsters WCRF E 3 A_SetPitch(-0.25+pitch) TNT1 A 0 A_PlaySound("Weapons/CrushbowPump", CHAN_WEAPON, 0.5) @@ -228,7 +228,7 @@ ACTOR Crushbow : Weapon replaces RocketLauncher { Goto ReadyIdle AltFire: - TNT1 A 0 A_JumpIf(CountInv("CrushbowLoaded")==0, "Reload") + TNT1 A 0 A_JumpIfNotInventory("CrushbowLoaded", "Reload") TNT1 A 0 A_TakeInventory("CrushbowLoaded", 1) TNT1 A 0 A_JumpIf(waterlevel==3, "WaterAltFire") WSPI A 0 A_FireProjectile("ImpactBolt", 0, 1, /*2*/0, 1, FPF_NOAUTOAIM, 0) @@ -241,7 +241,7 @@ ACTOR Crushbow : Weapon replaces RocketLauncher { WCRF D 1 A_SetPitch(-1.00+pitch) WCRF D 1 A_SetPitch(1.00+pitch) WCRF D 1 A_SetPitch(-1.00+pitch) - TNT1 A 0 A_JumpIf(CountInv("CrushbowLoaded")==0, "ReadyEmptyGun") + TNT1 A 0 A_JumpIfNotInventory("CrushbowLoaded", "ReadyEmptyGun") WCRF D 8 WCRF E 3 A_SetPitch(-0.50+pitch) TNT1 A 0 A_PlaySound("Weapons/CrushbowPump", CHAN_WEAPON) @@ -255,7 +255,7 @@ ACTOR Crushbow : Weapon replaces RocketLauncher { Goto ReadyIdle WaterAltFire: - TNT1 A 0 A_JumpIf(CountInv("CrushbowLoaded")==0, "Reload") + TNT1 A 0 A_JumpIfNotInventory("CrushbowLoaded", "Reload") TNT1 A 0 A_TakeInventory("CrushbowLoaded", 1) WSPI A 0 A_FireProjectile("ImpactBoltUnderwater", 0, 1, /*2*/0, 1, FPF_NOAUTOAIM, 0) WCRR A 1 @@ -267,7 +267,7 @@ ACTOR Crushbow : Weapon replaces RocketLauncher { WCRF D 1 A_SetPitch(-0.50+pitch) WCRF D 1 A_SetPitch(0.50+pitch) WCRF D 1 A_SetPitch(-0.50+pitch) - TNT1 A 0 A_JumpIf(CountInv("CrushbowLoaded")==0, "ReadyEmptyGun") + TNT1 A 0 A_JumpIfNotInventory("CrushbowLoaded", "ReadyEmptyGun") WCRF D 8 WCRF E 3 A_SetPitch(-0.25+pitch) TNT1 A 0 A_PlaySound("Weapons/CrushbowPump", CHAN_WEAPON, 0.5) @@ -285,9 +285,9 @@ ACTOR Crushbow : Weapon replaces RocketLauncher { Reload: WFRR A 0 A_JumpIfInventory("CrushbowLoaded", 6, "ReloadFinish") - WFRR A 0 A_JumpIfInventory("Boltmag", 1, "ReloadWork") + WFRR A 0 A_JumpIfInventory("BoltMag", 1, "ReloadWork") WFRR A 0 A_JumpIfNoAmmo("Dryfire") - WCRR A 1 A_JumpIf(CountInv("Boltmag")==0, "ReadyIdle") + WCRR A 1 A_JumpIfNotInventory("BoltMag", "ReadyIdle") Goto ReadyIdle ReloadWork: @@ -313,11 +313,11 @@ ACTOR Crushbow : Weapon replaces RocketLauncher { if (!GetCVar("k8ZanMod_CheatReload")) { A_TakeInventory("CrushbowLoaded", 666); } - local clipCount = CountInv("Boltmag"); + local clipCount = CountInv("BoltMag"); local loadCount = 6-CountInv("CrushbowLoaded"); if (loadCount > 0) { if (loadCount > clipCount) loadCount = clipCount; - A_TakeInventory("Boltmag", loadCount); + A_TakeInventory("BoltMag", loadCount); A_GiveInventory("CrushbowLoaded", loadCount); } user_lowPauseCount = 0; diff --git a/decorate/Weapons/Crylance.txt b/decorate/Weapons/Crylance.txt index 3fea90c..ee47e41 100644 --- a/decorate/Weapons/Crylance.txt +++ b/decorate/Weapons/Crylance.txt @@ -142,7 +142,7 @@ ACTOR Crylance : Weapon replaces BFG9000 { } } } - TNT1 A 0 A_JumpIf(CountInv("CrylanceLoaded")==0, "ReadyEmptyGun") + TNT1 A 0 A_JumpIfNotInventory("CrylanceLoaded", "ReadyEmptyGun") WCLR A 8 A_WeaponReady(WRF_ALLOWRELOAD) Loop @@ -191,9 +191,9 @@ ACTOR Crylance : Weapon replaces BFG9000 { Goto ReadyIdle AltFire: - TNT1 A 0 A_JumpIf(CountInv("CryLanceLoaded") <=19, "Reload") + TNT1 A 0 A_JumpIfInventoryLess("CryLanceLoaded", 20, "Reload") TNT1 A 0 A_JumpIf(waterlevel==3, "WaterAltFire") - //TNT1 A 0 A_JumpIf(CountInv("CrylanceLoaded")==0, "Reload") + //TNT1 A 0 A_JumpIfNotInventory("CrylanceLoaded", "Reload") WCLF A 2 A_SetPitch(-0.25+pitch) TNT1 A 0 A_Quake(1, 18, 0, 192) WCLF B 2 A_SetPitch(-0.25+pitch) @@ -215,8 +215,8 @@ ACTOR Crylance : Weapon replaces BFG9000 { Goto ReadyIdle WaterAltFire: - TNT1 A 0 A_JumpIf(CountInv("CryLanceLoaded") <=4, "Reload") - //TNT1 A 0 A_JumpIf(CountInv("CrylanceLoaded")==0, "Reload") + TNT1 A 0 A_JumpIfInventoryLess("CryLanceLoaded", 5, "Reload") + //TNT1 A 0 A_JumpIfNotInventory("CrylanceLoaded", "Reload") WCLF A 2 A_SetPitch(-0.25+pitch) TNT1 A 0 A_Quake(1, 18, 0, 192) WCLF B 2 A_SetPitch(-0.25+pitch) @@ -253,7 +253,7 @@ ACTOR Crylance : Weapon replaces BFG9000 { WFRR A 0 A_JumpIfInventory("CrylanceLoaded", 25, "ReloadFinish") WFRR A 0 A_JumpIfInventory("DepletedShard", 1, "ReloadWork") WFRR A 0 A_JumpIfNoAmmo("Dryfire") - WCLR A 1 A_JumpIf(CountInv("DepletedShard")==0, "ReadyIdle") + WCLR A 1 A_JumpIfNotInventory("DepletedShard", "ReadyIdle") Goto ReadyIdle ReloadWork: diff --git a/decorate/Weapons/FragfireGun.txt b/decorate/Weapons/FragfireGun.txt index 9c04fbd..cc910c5 100644 --- a/decorate/Weapons/FragfireGun.txt +++ b/decorate/Weapons/FragfireGun.txt @@ -167,7 +167,7 @@ ACTOR FragfireGun : Weapon replaces Shotgun { } } } - TNT1 A 0 Offset(-15, 40) A_JumpIf(CountInv("FragfireGunLoaded")==0, "ReadyEmptyGun") + TNT1 A 0 Offset(-15, 40) A_JumpIfNotInventory("FragfireGunLoaded", "ReadyEmptyGun") WFRR AA 4 A_WeaponReady(WRF_ALLOWRELOAD) Loop @@ -249,7 +249,7 @@ ACTOR FragfireGun : Weapon replaces Shotgun { AltFire: //TNT1 A 0 A_JumpIfNoAmmo("Reload") - TNT1 A 0 A_JumpIf(CountInv("FragfireGunLoaded")==0, "Reload") + TNT1 A 0 A_JumpIfNotInventory("FragfireGunLoaded", "Reload") TNT1 A 0 A_JumpIf(waterlevel==3, "UnderwaterDryFire") TNT1 A 0 { @@ -290,7 +290,7 @@ ACTOR FragfireGun : Weapon replaces Shotgun { WFRR A 0 A_JumpIfInventory("FragfireGunLoaded", 80, "ReloadFinish") WFRR A 0 A_JumpIfInventory("FragfireCan", 1, "ReloadWork") TNT1 A 0 A_JumpIfNoAmmo("DryFire") - //WFRR B 1 A_JumpIf(CountInv("FragfireCan")==0, "ReadyIdle") + //WFRR B 1 A_JumpIfNotInventory("FragfireCan", "ReadyIdle") Goto ReadyIdle ReloadWork: diff --git a/decorate/Weapons/Hellclaw.txt b/decorate/Weapons/Hellclaw.txt index 9d58989..1749ce8 100644 --- a/decorate/Weapons/Hellclaw.txt +++ b/decorate/Weapons/Hellclaw.txt @@ -171,7 +171,7 @@ ACTOR Hellclaw : Weapon replaces SuperShotgun { Altfire: TNT1 A 0 A_JumpIfInventory("IsDraining", 1, "Reload") - TNT1 A 0 A_JumpIf(CountInv("HellEnergy") < 10, "Reload") + TNT1 A 0 A_JumpIfInventoryLess("HellEnergy", 10, "Reload") TNT1 A 0 { A_k8ConLog(va("PITCH: %s; crouch=%s", pitch, GetCrouchFactor())); diff --git a/decorate/Weapons/PainGun.txt b/decorate/Weapons/PainGun.txt index 15fcd31..7672ff4 100644 --- a/decorate/Weapons/PainGun.txt +++ b/decorate/Weapons/PainGun.txt @@ -283,7 +283,7 @@ ACTOR Paingun : Weapon replaces Chaingun { Goto ReadyIdle Altfiring: - TNT1 A 0 A_JumpIf(CountInv("AmmoBox") == 0, "Reload") + TNT1 A 0 A_JumpIfNotInventory("AmmoBox", "Reload") TNT1 A 0 A_JumpIf(waterlevel==3, "Reload") TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6") //TNT1 A 0 A_Overlay(3, "MuzzleGas") diff --git a/decorate/Weapons/PotionLauncher_Acid.txt b/decorate/Weapons/PotionLauncher_Acid.txt index 284b47d..7295d88 100644 --- a/decorate/Weapons/PotionLauncher_Acid.txt +++ b/decorate/Weapons/PotionLauncher_Acid.txt @@ -94,7 +94,7 @@ ACTOR PotionLauncherAcid : Weapon /*6000*/ { Goto ReadyIdle ReadyIdle: - //TNT1 A 0 A_JumpIf(CountInv("PotionLauncherAcidLoaded")==0, "ReadyEmptyGun") + //TNT1 A 0 A_JumpIfNotInventory("PotionLauncherAcidLoaded", "ReadyEmptyGun") WPOR A 4 A_WeaponReady(WRF_ALLOWRELOAD) WPOR AAAAA 4 A_WeaponReady(WRF_ALLOWRELOAD | WRF_NOFIRE) Loop @@ -120,7 +120,7 @@ ACTOR PotionLauncherAcid : Weapon /*6000*/ { Goto ReadyIdle AltFire: - TNT1 A 0 A_JumpIf(CountInv("PotionLauncherAcidLoaded")==0, "Reload") + TNT1 A 0 A_JumpIfNotInventory("PotionLauncherAcidLoaded", "Reload") TNT1 A 0 A_JumpIf(waterlevel==3, "UnderwaterDryFire") TNT1 A 0 A_TakeInventory("PotionLauncherAcidLoaded", 1) WSPI A 0 A_FireProjectile("PotionBounceAcid", 0, 1, /*4*/random(-2, 2), 0, FPF_NOAUTOAIM, 0) @@ -161,7 +161,7 @@ ACTOR PotionLauncherAcid : Weapon /*6000*/ { WFRR A 0 A_JumpIfInventory("PotionLauncherAcidLoaded", 8, "ReadyIdle") WFRR A 0 A_JumpIfInventory("PotionBoxAcid", 1, "ReloadWork") WFRR A 0 A_JumpIfNoAmmo("Dryfire") - WPOR A 1 A_JumpIf(CountInv("PotionBoxAcid")==0, "ReadyIdle") + WPOR A 1 A_JumpIfNotInventory("PotionBoxAcid", "ReadyIdle") Goto ReadyIdle ReloadWork: @@ -173,7 +173,7 @@ ACTOR PotionLauncherAcid : Weapon /*6000*/ { Goto ReloadLoop ReloadLoop: - TNT1 A 0 A_JumpIf(CountInv("PotionLauncherAcidLoaded") == 0, 2) + TNT1 A 0 A_JumpIfNotInventory("PotionLauncherAcidLoaded", 2) WPOL E 1 A_WeaponReady TNT1 A 0 A_TakeInventory("PotionBoxAcid", 1) TNT1 A 0 A_GiveInventory("PotionLauncherAcidLoaded", 1) diff --git a/decorate/Weapons/PotionLauncher_Toxic.txt b/decorate/Weapons/PotionLauncher_Toxic.txt index 25e30cd..6df5339 100644 --- a/decorate/Weapons/PotionLauncher_Toxic.txt +++ b/decorate/Weapons/PotionLauncher_Toxic.txt @@ -94,7 +94,7 @@ ACTOR PotionLauncherToxic : Weapon /*6001*/ { Goto ReadyIdle ReadyIdle: - //TNT1 A 0 A_JumpIf(CountInv("PotionLauncherToxicLoaded")==0, "ReadyEmptyGun") + //TNT1 A 0 A_JumpIfNotInventory("PotionLauncherToxicLoaded", "ReadyEmptyGun") //WPOR A 24 A_WeaponReady(WRF_ALLOWRELOAD) WPOR A 4 A_WeaponReady(WRF_ALLOWRELOAD) WPOR AAAAA 4 A_WeaponReady(WRF_ALLOWRELOAD | WRF_NOFIRE) @@ -120,7 +120,7 @@ ACTOR PotionLauncherToxic : Weapon /*6001*/ { Goto ReadyIdle AltFire: - TNT1 A 0 A_JumpIf(CountInv("PotionLauncherToxicLoaded")==0, "Reload") + TNT1 A 0 A_JumpIfNotInventory("PotionLauncherToxicLoaded", "Reload") TNT1 A 0 A_JumpIf(waterlevel==3, "UnderwaterDryFire") TNT1 A 0 A_TakeInventory("PotionLauncherToxicLoaded", 1) WSPI A 0 A_FireProjectile("PotionBounceToxic", 0, 1, /*4*/random(-2, 2), 0, FPF_NOAUTOAIM, 0) @@ -161,7 +161,7 @@ ACTOR PotionLauncherToxic : Weapon /*6001*/ { WFRR A 0 A_JumpIfInventory("PotionLauncherToxicLoaded", 8, "ReadyIdle") WFRR A 0 A_JumpIfInventory("PotionBoxToxic", 1, "ReloadWork") WFRR A 0 A_JumpIfNoAmmo("Dryfire") - WPOR A 1 A_JumpIf(CountInv("PotionBoxToxic")==0, "ReadyIdle") + WPOR A 1 A_JumpIfNotInventory("PotionBoxToxic", "ReadyIdle") Goto ReadyIdle ReloadWork: @@ -173,7 +173,7 @@ ACTOR PotionLauncherToxic : Weapon /*6001*/ { Goto ReloadLoop ReloadLoop: - TNT1 A 0 A_JumpIf(CountInv("PotionLauncherToxicLoaded") == 0, 2) + TNT1 A 0 A_JumpIfNotInventory("PotionLauncherToxicLoaded", 2) WPOL E 1 A_WeaponReady TNT1 A 0 A_TakeInventory("PotionBoxToxic", 1) TNT1 A 0 A_GiveInventory("PotionLauncherToxicLoaded", 1) diff --git a/decorate/Weapons/SpikeGun.txt b/decorate/Weapons/SpikeGun.txt index 6567b74..1ac4387 100644 --- a/decorate/Weapons/SpikeGun.txt +++ b/decorate/Weapons/SpikeGun.txt @@ -185,7 +185,7 @@ ACTOR SpikeGun : Weapon /*replaces Chaingun*/ replaces Pistol { WSPI A 0 A_JumpIfInventory("SpikeGunZoomed", 1, "ReadyZoomed") TNT1 A 0 Offset(-15, 40) { if (GetCVarB('k8ZanMod_CustomCrosshairs')) A_SetCrosshair(3); } WSPI A 1 A_WeaponReady(WRF_ALLOWRELOAD|(GetCVarB('k8ZanMod_SpikeZoom') ? 0 : WRF_SECONDARY_SAME_AMMO)) - TNT1 A 0 A_JumpIf(CountInv("SpikeGunHeat") > 28, "Steaming") + TNT1 A 0 A_JumpIfInventory("SpikeGunHeat", 29, "Steaming") Loop Steaming: @@ -199,7 +199,7 @@ ACTOR SpikeGun : Weapon /*replaces Chaingun*/ replaces Pistol { ReadyZoomed: WSPS A 1 Offset(10000, 32) A_WeaponReady(WRF_ALLOWRELOAD|(GetCVarB('k8ZanMod_SpikeZoom') ? 0 : WRF_SECONDARY_SAME_AMMO)) - TNT1 A 0 A_JumpIf(CountInv("SpikeGunHeat") > 28, "ZoomSteaming") + TNT1 A 0 A_JumpIfInventory("SpikeGunHeat", 29, "ZoomSteaming") Goto ReadyIdle ZoomSteaming: @@ -428,7 +428,7 @@ ACTOR SpikeGun : Weapon /*replaces Chaingun*/ replaces Pistol { Goto ReadyIdle ReloadWork: - WSPI A 0 A_JumpIf(CountInv("SpikeGunHeat") > 12, "ReloadWorkSteaming") + WSPI A 0 A_JumpIfInventory("SpikeGunHeat", 13, "ReloadWorkSteaming") WSPI A 4 A_PlaySound("Weapons/SpikeGunReloadA", CHAN_WEAPON) WSPI A 6 A_SpawnItem("SpikeMagDropped", -1, 16, 0) WSPR G 2 -- 2.11.4.GIT