diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9ff9e38 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: Release PK3s + +on: + push: + tags: + - "v*.*.*" + +jobs: + buildAndRelease: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: build PK3 + uses: montudor/action-zip@v1 + with: + args: zip -r "icarus-innovations-improved-${{ github.ref_name }}.pk3" . -i graphics/* patches/* sounds/* sprites/* zscript/* CVARINFO DECALDEF.* GLDEFS.* KEYCONF LANGUAGE.* LICENSE MAPINFO MENUDEF README.* SNDINFO.* TEXTURES.* zscript.zs + - name: Release PK3 + uses: softprops/action-gh-release@v0.1.7 + with: + generate_release_notes: true + discussion_category_name: 'Releases' + files: ./*.pk3 diff --git a/CREDITS.barracuda.txt b/CREDITS.barracuda.txt deleted file mode 100644 index 718d189..0000000 --- a/CREDITS.barracuda.txt +++ /dev/null @@ -1,5 +0,0 @@ -Code: -- Completely original for once! Yay, me! No. I'm kidding. Ace helped me out a lot (as always) - -Sprites: -- First Person Sprites originally by Mr.Enchanter. \ No newline at end of file diff --git a/CREDITS.flamenwerfer77.txt b/CREDITS.flamenwerfer77.txt deleted file mode 100644 index ce2cec9..0000000 --- a/CREDITS.flamenwerfer77.txt +++ /dev/null @@ -1,11 +0,0 @@ -Code: -- Loosely based on code originally written by PotetoBloke. -- Ace for his continued assistance and patience with teaching my sharp as a brick brain how to do CVars and other cool shit like the lighting effects. - -Sprites: -- Fuel Canister: Eriance, 3d Realms -- World Sprite: Railgunner (with edits) -- First Person: Eriance (with edits) - -Sounds: -- Sounds from Dennaton (Hotline Miami 2), Dice (Battlefield 4), and Bethesda (Fallout 3). Compiled by Magmacow. (https://gamebanana.com/sounds/26593) \ No newline at end of file diff --git a/CREDITS.pd42.txt b/CREDITS.pd42.txt deleted file mode 100644 index 1799744..0000000 --- a/CREDITS.pd42.txt +++ /dev/null @@ -1,13 +0,0 @@ -Code: -- Myself but based (heavily) on Jackdaw by Accensus (https://gitlab.com/accensi/hd-addons) -- Prettyfist, Sledge for the bullet breaking code shamelessly "borrowed" from the TROG from Peppergrinder (https://gitlab.com/hdiscord-saltmines/hd-peppergrinder) - -Sprites: -- Weapon Sprite: Myself following (read tracing lol) a Barrett M82 sprite I found online, a1337spy for additional shading -- Weapon Sights: Bryan, Ultra64 and Clay from Bryan's Extensions (https://github.com/abramsba/hdest-weapons) -- Pickup sprite: Frankensprite based off various pickup sprites made from Railgunner - -Sounds: -- Seven Zero, SkullBlade: Fire sound (https://gamebanana.com/sounds/16695) -- !Alex!: Reloding and such (https://gamebanana.com/sounds/22068) -- KenLV, DeathCold: Miscellaneous sounds (https://gamebanana.com/sounds/50612) \ No newline at end of file diff --git a/CREDITS.six12.txt b/CREDITS.six12.txt deleted file mode 100644 index b0336de..0000000 --- a/CREDITS.six12.txt +++ /dev/null @@ -1,11 +0,0 @@ -Code: -- Accensus for like 90% of the code. I was just a glorified keyboard monkey. - -Sprites: -- Weapon Sprites based on sprites by Sonik.O -- World Sprites based on sprites by Railgunner -- Some tweaking, editing, shading and frankenspriting by myself - -Sounds: -- Firing Sound: https://gamebanana.com/skins/124930 -- Mag Sound: https://gamebanana.com/sounds/39196 \ No newline at end of file diff --git a/CVARINFO b/CVARINFO new file mode 100644 index 0000000..2078452 --- /dev/null +++ b/CVARINFO @@ -0,0 +1,130 @@ +// Most of these are server variables so in a multiplayer session they can be synced to other players. +// Every weapon has a comment before its cvars based on its name in-game for organization. - [Ted] + +// NOTE: Values need to either be -1, 0, 2, 4, 9, 14, 19, 24, 49, 99, 149 or 199 to work for the spawners! +// Anything else would require remaking the option values in the menus. +// They'll still function in-game correctly, but the menus won't properly display them. +// Stick to it please and have less bug reports to explain for pls. - [Ted] + +server bool Flamer_PrettyLights = false; + +// -------------------- +// Weapons +// -------------------- + +// Barracuda +server bool barracuda_allowBackpacks = true; +server int barracuda_hunter_spawn_bias = 49; +server int barracuda_slayer_spawn_bias = 19; +server bool barracuda_persistent_spawning = false; + +// Bitch LMG +server bool bitch_allowBackpacks = true; +server int bitch_chaingun_spawn_bias = 19; +server bool bitch_persistent_spawning = false; + +// Fenris +server bool fenris_allowBackpacks = true; +server int fenris_thunderbuster_spawn_bias = 9; +server bool fenris_persistent_spawning = false; + +// Flamenwerfer-77 +server bool flamenwerfer_allowBackpacks = true; +server int flamenwerfer_launcher_spawn_bias = 9; +server int flamenwerfer_bfg_spawn_bias = 19; +server bool flamenwerfer_persistent_spawning = false; + +// Frontiersman +server bool frontiersman_allowBackpacks = true; +server int frontiersman_hunter_spawn_bias = 24; +server int frontiersman_slayer_spawn_bias = 49; +server bool frontiersman_persistent_spawning = false; + +// GFBlaster +server bool gfb9_allowBackpacks = true; +server int gfb9_pistol_spawn_bias = 9; +server bool gfb9_persistent_spawning = false; + +// NCT +server bool nct_allowBackpacks = true; +server int nct_bfg_spawn_bias = 24; +server bool nct_persistent_spawning = false; + +// Nyx +server bool nyx_allowBackpacks = true; +server int nyx_pistol_spawn_bias = 19; +server int nyx_hunter_spawn_bias = 49; +server bool nyx_persistent_spawning = false; + +// PD-42 +server bool pd42_allowBackpacks = true; +server int pd42_clipbox_spawn_bias = 14; +server bool pd42_persistent_spawning = false; + +// Six-12 +server bool six12_allowBackpacks = true; +server int six12_hunter_spawn_bias = 19; +server int six12_slayer_spawn_bias = 49; +server bool six12_persistent_spawning = false; + +// UMP +server bool ump45_allowBackpacks = true; +server int ump45_clipbox_spawn_bias = 9; +server bool ump45_persistent_spawning = false; + +// USP +server bool usp45_allowBackpacks = true; +server int usp45_pistol_spawn_bias = 9; +server bool usp45_persistent_spawning = false; + + +//------------ +// Ammunition +//------------ + +// Flamenwerfer Gas Tank +server bool gastank_allowBackpacks = true; +server int gastank_rocket_spawn_bias = 14; +server int gastank_rocketbox_spawn_bias = 19; +server int gastank_battery_spawn_bias = 24; +server bool gastank_persistent_spawning = false; + +// Nyx Magazine +server bool nyxmag_allowBackpacks = true; +server int nyxmag_shellbox_spawn_bias = 24; +server int nyxmag_clipmag_spawn_bias = 14; +server bool nyxmag_persistent_spawning = false; + +// PD-42 Magazine +server bool pd42mag_allowBackpacks = true; +server int pd42mag_clipmag_spawn_bias = 9; +server bool pd42mag_persistent_spawning = false; + +// Six-12 Shell Magazine +server bool six12shellmag_allowBackpacks = true; +server int six12shellmag_shell_spawn_bias = 9; +server bool six12shellmag_persistent_spawning = false; + +// Six-12 Slug Magazine +server bool six12slugmag_allowBackpacks = true; +server int six12slugmag_slug_spawn_bias = 9; +server bool six12slugmag_persistent_spawning = false; + +// UMP Magazine +server bool ump45mag_allowBackpacks = true; +server int ump45mag_clipmag_spawn_bias = 14; +server bool ump45mag_persistent_spawning = false; + +// USP Magazine +server bool usp45mag_allowBackpacks = true; +server int usp45mag_clipmag_spawn_bias = 14; +server bool usp45mag_persistent_spawning = false; + + +//------------ +// Items +//------------ + +// HEV Armour +server int hevarmour_spawn_bias = 19; +server bool hevarmour_persistent_spawning = false; \ No newline at end of file diff --git a/CVARINFO.txt b/CVARINFO.txt deleted file mode 100644 index a5e7a0f..0000000 --- a/CVARINFO.txt +++ /dev/null @@ -1 +0,0 @@ -server bool Flamer_PrettyLights = false; \ No newline at end of file diff --git a/DECALDEF.fenris b/DECALDEF.fenris new file mode 100644 index 0000000..c85c747 --- /dev/null +++ b/DECALDEF.fenris @@ -0,0 +1,22 @@ +decal FenrisScorchBlack +{ + pic FNRSCR1 + shade "00 00 00" + x-scale 0.02 + y-scale 0.02 + randomflipx + randomflipy +} + +decal FenrisScorch +{ + pic FNRSCR1 + shade "93 D3 FF" + x-scale 0.025 + y-scale 0.025 + randomflipx + randomflipy + Fullbright + animator GoAway + LowerDecal "FenrisScorchBlack" +} \ No newline at end of file diff --git a/DECALDEF.gfb9 b/DECALDEF.gfb9 new file mode 100644 index 0000000..3c8c93d --- /dev/null +++ b/DECALDEF.gfb9 @@ -0,0 +1,22 @@ +decal GFBScorchBlack +{ + pic GFBSCR1 + shade "00 00 00" + x-scale 0.04 + y-scale 0.04 + randomflipx + randomflipy +} + +decal GFBScorch +{ + pic FNRSCR1 + shade "44 D6 1D" + x-scale 0.05 + y-scale 0.05 + randomflipx + randomflipy + Fullbright + animator GoAway + LowerDecal "GFBScorchBlack" +} \ No newline at end of file diff --git a/GLDEFS.fenris b/GLDEFS.fenris new file mode 100644 index 0000000..0763808 --- /dev/null +++ b/GLDEFS.fenris @@ -0,0 +1,7 @@ +PointLight ImpactBlueSmall +{ + color 0.1 0.1 0.8 + size 24 +} + +Object FenrisRayImpact { Frame TNT1 { Light ImpactBlueSmall } } \ No newline at end of file diff --git a/KEYCONF b/KEYCONF new file mode 100644 index 0000000..ca067ac --- /dev/null +++ b/KEYCONF @@ -0,0 +1,14 @@ +alias barracuda_reset_cvars "resetcvar barracuda_hunter_spawn_bias; resetcvar barracuda_slayer_spawn_bias; resetcvar barracuda_allowBackpacks; resetcvar barracuda_persistent_spawning;" +alias bitch_reset_cvars "resetcvar bitch_chaingun_spawn_bias; resetcvar bitch_allowBackpacks; resetcvar bitch_persistent_spawning;" +alias fenris_reset_cvars "resetcvar fenris_thunderbuster_spawn_bias; resetcvar fenris_allowBackpacks; resetcvar fenris_persistent_spawning;" +alias flamenwerfer_reset_cvars "resetcvar flamenwerfer_launcher_spawn_bias; resetcvar flamenwerfer_bfg_spawn_bias; resetcvar gastank_rocket_spawn_bias; resetcvar gastank_rocketbox_spawn_bias; resetcvar gastank_battery_spawn_bias; resetcvar flamenwerfer_allowBackpacks; resetcvar gastank_allowBackpacks; resetcvar flamenwerfer_persistent_spawning; resetcvar gastank_persistent_spawning;" +alias frontiersman_reset_cvars "resetcvar frontiersman_hunter_spawn_bias; resetcvar frontiersman_slayer_spawn_bias; resetcvar frontiersman_allowBackpacks; resetcvar frontiersman_persistent_spawning;" +alias gfb9_reset_cvars "resetcvar gfb9_pistol_spawn_bias; resetcvar gfb9_allowBackpacks; resetcvar gfb9_persistent_spawning;" +alias nct_reset_cvars "resetcvar nct_bfg_spawn_bias; resetcvar nct_allowBackpacks; resetcvar nct_persistent_spawning;" +alias nyx_reset_cvars "resetcvar nyx_pistol_spawn_bias; resetcvar nyxmag_clipmag_spawn_bias; resetcvar nyxmag_shellbox_spawn_bias; resetcvar nyx_allowBackpacks; resetcvar nyxmag_allowBackpacks; resetcvar nyx_persistent_spawning; resetcvar nyxmag_persistent_spawning;" +alias pd42_reset_cvars "resetcvar pd42_clipbox_spawn_bias; resetcvar pd42mag_clipmag_spawn_bias; resetcvar pd42_allowBackpacks; resetcvar pd42mag_allowBackpacks; resetcvar pd42_persistent_spawning; resetcvar pd42mag_persistent_spawning;" +alias six12_reset_cvars "resetcvar six12_hunter_spawn_bias; resetcvar six12_slayer_spawn_bias; resetcvar six12shellmag_shell_spawn_bias; resetcvar six12slugmag_slug_spawn_bias; resetcvar six12_allowBackpacks; resetcvar six12shellmag_allowBackpacks; resetcvar six12slugmag_allowBackpacks; resetcvar six12_persistent_spawning; resetcvar six12shellmag_persistent_spawning; resetcvar six12slugmag_persistent_spawning;" +alias ump45_reset_cvars "resetcvar ump45_clipbox_spawn_bias; resetcvar ump45mag_clipmag_spawn_bias; resetcvar ump45_allowBackpacks; resetcvar ump45mag_allowBackpacks; resetcvar ump45_persistent_spawning; resetcvar ump45mag_persistent_spawning;" +alias usp45_reset_cvars "resetcvar usp45_pistol_spawn_bias; resetcvar usp45mag_clipmag_spawn_bias; resetcvar usp45_allowBackpacks; resetcvar usp45mag_allowBackpacks; resetcvar usp45_persistent_spawning; resetcvar usp45mag_persistent_spawning;" + +alias Icarus_Reset_Cvars "barracuda_reset_cvars; bitch_reset_cvars; fenris_reset_cvars; flamenwerfer_reset_cvars; frontiersman_reset_cvars; gfb9_reset_cvars; nct_reset_cvars; nyx_reset_cvars; pd42_reset_cvars; six12_reset_cvars; ump45_reset_cvars; usp45_reset_cvars;" diff --git a/LANGUAGE.en b/LANGUAGE.en new file mode 100644 index 0000000..2f7886e --- /dev/null +++ b/LANGUAGE.en @@ -0,0 +1,218 @@ +[enu default] + +// Options Menu Titles +ICARUS_MENU = "\c[Fire]Ⓘ\c- Icarus Innovations Improved"; +MENU_PISTOLS_TITLE = "--- Pistols ---"; +MENU_SHOTGUNS_TITLE = "--- Shotguns ---"; +MENU_MACHINEGUNS_TITLE = "--- Machine Guns ---"; +MENU_EXPLOSIVES_TITLE = "--- Explosives ---"; +MENU_RIFLES_TITLE = "--- Rifles ---"; +MENU_ENERGYWEAPONS_TITLE = "--- Energy Weapons ---"; +MENU_ARMOUR_TITLE = "--- Armor ---"; +MENU_RESETOPTIONS_TITLE = "--- Reset Options ---"; + +// Menu Section Headers +MENU_SPAWNOPTIONS = "Spawn Options"; +MENU_WEPSPAWNOPTIONS = "Weapon Spawn Options"; +MENU_MAGSPAWNOPTIONS = "Magazine Spawn Options"; +MENU_PERSISTENCYOPTIONS = "Spawn Persistence Options"; +MENU_RESETOPTIONS = "Reset Options"; +MENU_RESETALLOPTIONS = "Reset all Options"; + +// Menu Static Text +MENU_SPAWNRATE_TEXT1 = "Setting 'spawn rate' to Replace All will suppress"; +MENU_SPAWNRATE_TEXT2 = "spawns of that given type."; +MENU_PERSISTENCY_TEXT = "Control whether replacements happen after a mapload:"; + +// Menu Option Labels +MENU_NOTICE = "Notice:"; +MENU_BACKPACKSALLOWED = "Allowed in Ammo Boxes and/or Backpacks: "; +MENU_SPAWNRATE = "Spawn Rate: "; +MENU_WEPSPAWNRATE = "Weapon Spawn Rate: "; +MENU_MAGSPAWNRATE = "Magazine Spawn Rate: "; +MENU_PERSISTENCY = "Persistent Spawns: "; +MENU_WEPPERSISTENCY = "Persistent Weapon Spawns: "; +MENU_MAGPERSISTENCY = "Persistent Magazine Spawns: "; + +// Menu Command Text +MENU_RESETWEP = "Reset Weapon Options"; +MENU_RESETMAG = "Reset Magazine Options"; +MENU_RESETPERSISTENCY = "Reset Persistence Options"; +ICARUS_RESETALLOPTIONS = "Reset all options for Icarus Innovations Improved"; + +// Barracuda Options Text +MENU_BARRACUDA_TITLE = "------ Barracuda Options ------"; +MENU_BARRACUDA_HUNTER_SPAWNTEXT = "Control the spawn rate of the Barracuda on Hunter Shotguns:"; +MENU_BARRACUDA_SLAYER_SPAWNTEXT = "Control the spawn rate of the Barracuda on Slayer Shotguns:"; +MENU_BARRACUDA_BACKPACKS = "Control whether the Barracuda spawns in Backpacks:"; + +// Bitch Options Text +MENU_BITCH_TITLE = "------ 'Bitch' 4.26mm LMG Options ------"; +MENU_BITCH_CHAINGUN_SPAWNTEXT = "Control the spawn rate of the Bitch on Vulcanettes:"; +MENU_BITCH_BACKPACKS = "Control whether the Bitch spawns in Backpacks:"; + +// Fenris Options Text +MENU_FENRIS_TITLE = "------ CFL-21 'Fenris' Cold Fusion Laser Options ------"; +MENU_FENRIS_PLASMA_SPAWNTEXT = "Control the spawn rate of the Fenris on Thunderbusters:"; +MENU_FENRIS_BACKPACKS = "Control whether the Fenris spawns in Backpacks:"; + +// Flamenwerfer 77 Options Text +MENU_FLAMENWERFER77_TITLE = "------ Flamenwerfer 77 Options ------"; + +MENU_FLAMENWERFER77_LAUNCHER_SPAWNTEXT = "Control the spawn rate of the Flamenwerfer 77 on Rocket Launchers:"; +MENU_FLAMENWERFER77_BFG_SPAWNTEXT = "Control the spawn rate of the Flamenwerfer 77 on BFG-9000s:"; +MENU_FLAMENWERFER77_BACKPACKS = "Control whether the Flamenwerfer 77 spawns in Backpacks:"; + +MENU_GASTANK_ROCKET_SPAWNTEXT = "Control the spawn rate of Fuel Tanks on Rockets:"; +MENU_GASTANK_ROCKETBOX_SPAWNTEXT = "Control the spawn rate of Fuel Tanks on Rocket Boxes:"; +MENU_GASTANK_BATTERY_SPAWNTEXT = "Control the spawn rate of Fuel Tanks on Batteries:"; +MENU_GASTANK_BACKPACKS = "Control whether Fuel Tanks spawn in Backpacks:"; + +MENU_GASTANK_SPAWNOPTIONS = "Fuel Tank Spawn Options"; +MENU_GASTANK_SPAWNRATE = "Fuel Tank Spawn Rate: "; +MENU_GASTANK_PERSISTENCY = "Persistent Fuel Tank Spawns: "; +MENU_RESETGASTANK = "Reset Fuel Tank Options"; + +MENU_FLAMENWERFER77_PRETTYLIGHTS = "Enable Dynamic Lighting"; + +// Frontiersman Options Text +MENU_FRONTIERSMAN_TITLE = "------ 'Frontiersman' 7.76mm Lever-Action Rifle Options ------"; +MENU_FRONTIERSMAN_HUNTER_SPAWNTEXT = "Control the spawn rate of the Frontiersman on Hunter Shotguns:"; +MENU_FRONTIERSMAN_SLAYER_SPAWNTEXT = "Control the spawn rate of the Frontiersman on Slayer Shotguns:"; +MENU_FRONTIERSMAN_BACKPACKS = "Control whether the Frontiersman spawns in Backpacks:"; + +// GFB-9 Options Text +MENU_GFB9_TITLE = "------ Gretchenfrage Blaster Mk. 9 Options ------"; +MENU_GFB9_PISTOL_SPAWNTEXT = "Control the spawn rate of the GFB-9 on Pistols:"; +MENU_GFB9_BACKPACKS = "Control whether the GFB-9 spawns in Backpacks:"; + +// HEV Armour Options Text +MENU_HEVARMOUR_TITLE = "------ HEV Armor Options ------"; +MENU_HEVARMOUR_ARMOUR_SPAWNTEXT = "Control the spawn rate of the HEV Armor on Garrison and Battle Armour:"; + +// NCT Options Text +MENU_NCT_TITLE = "------ NS3-Cr.Kt Options ------"; +MENU_NCT_BFG_SPAWNTEXT = "Control the spawn rate of the NS3-Cr.Kt on BFG-9000s:"; +MENU_NCT_BACKPACKS = "Control whether the NS3-Cr.Kt spawns in Backpacks:"; + +// Nyx Options Text +MENU_NYX_TITLE = "------ CM-3 'Nyx' .355 Burst-Fire Magnum Options ------"; +MENU_NYX_PISTOL_SPAWNTEXT = "Control the spawn rate of the Nyx on Pistols:"; +MENU_NYX_BACKPACKS = "Control whether the Nyx spawns in Backpacks:"; + +MENU_NYXMAG_CLIPMAG_SPAWNTEXT = "Control the spawn rate of Nyx Magazines on Clip Magazines:"; +MENU_NYXMAG_SHELLBOX_SPAWNTEXT = "Control the spawn rate of Nyx Magazines on Shell Boxes:"; +MENU_NYXMAG_BACKPACKS = "Control whether Nyx Magazines spawn in Backpacks:"; + +// PD-42 Options Text +MENU_PD42_TITLE = "------ PD-42 4.26mm Suppressed PDW Options ------"; +MENU_PD42_CLIPBOX_SPAWNTEXT = "Control the spawn rate of the PD-42 on Clip Boxes:"; +MENU_PD42_BACKPACKS = "Control whether the PD-42 spawns in Backpacks:"; + +MENU_PD42MAG_CLIPMAG_SPAWNTEXT = "Control the spawn rate of PD-42 Magazines on Clip Magazines:"; +MENU_PD42MAG_BACKPACKS = "Control whether Nyx Magazines spawn in Backpacks:"; + +// Six-12 Options Text +MENU_SIX12_TITLE = "------ Six-12 Options ------"; +MENU_SIX12_HUNTER_SPAWNTEXT = "Control the spawn rate of the Six-12 on Hunter Shotguns:"; +MENU_SIX12_SLAYER_SPAWNTEXT = "Control the spawn rate of the Six-12 on Slayer Shotguns:"; +MENU_SIX12_BACKPACKS = "Control whether the Six-12 spawns in Backpacks:"; + +MENU_SIX12MAG_SHELL_SHELL_SPAWNTEXT = "Control the spawn rate of Six-12 Shell Magazines on Shell Pickups:"; +MENU_SIX12MAG_SHELL_BACKPACKS = "Control whether Six-12 Shell Magazines spawn in Backpacks:"; + +MENU_SIX12MAG_SLUG_SLUG_SPAWNTEXT = "Control the spawn rate of Six-12 Slug Magazines on Slug Pickups:"; +MENU_SIX12MAG_SLUG_BACKPACKS = "Control whether Six-12 Slug Magazines spawn in Backpacks:"; + +MENU_SIX12MAG_SHELL_PERSISTENCY = "Persistent Shell Magazine Spawns: "; +MENU_SIX12MAG_SLUG_PERSISTENCY = "Persistent Slug Magazine Spawns: "; + +// UMP-45 Options Text +MENU_UMP_TITLE = "------ UMP-45 .45 ACP PDW Options ------"; +MENU_UMP_CLIPBOX_SPAWNTEXT = "Control the spawn rate of the UMP-45 on Clip Boxes:"; +MENU_UMP_BACKPACKS = "Control whether the UMP-45 spawns in Backpacks:"; + +MENU_UMPMAG_CLIPMAG_SPAWNTEXT = "Control the spawn rate of UMP-45 Magazines on Clip Magazines:"; +MENU_UMPMAG_BACKPACKS = "Control whether UMP-45 Magazines spawn in Backpacks:"; + +// USP-45 Options Text +MENU_USP_TITLE = "------ USP-45 .45 ACP Handgun Options ------"; +MENU_USP_PISTOL_SPAWNTEXT = "Control the spawn rate of the USP-45 on Pistols:"; +MENU_USP_BACKPACKS = "Control whether the USP-45 spawns in Backpacks:"; + +MENU_USPMAG_CLIPMAG_SPAWNTEXT = "Control the spawn rate of USP-45 Magazines on Clip Magazines:"; +MENU_USPMAG_BACKPACKS = "Control whether USP-45 Magazines spawn in Backpacks:"; + + +// Item Tags +TAG_BARRACUDA = "Barracuda"; +TAG_BITCH = "'Bitch' 4mm LMG"; +TAG_FENRIS = "CFL-21 'Fenris' Cold Fusion Laser"; +TAG_FLAMENWERFER77 = "Flammenwerfer 77"; +TAG_FRONTIERSMAN = "'Frontiersman' 7.76mm Lever-Action Rifle"; +TAG_GASTANK = "Fuel Tank"; +TAG_GFB9 = "Gretchenfrage Blaster Mk. 9"; +TAG_HEVARMOUR = "HEV Armor"; +TAG_HEVARMOURSPARE = "HEV Armor (spare)"; +TAG_NCT = "NS3-Cr.Kt"; +TAG_NYX = "CM-3 'Nyx' .355 Burst-Fire Magnum"; +TAG_NYXMAG = "Nyx Magazine"; +TAG_PD42 = "PD-42 Suppressed 4.26mm PDW"; +TAG_PD42MAG = "PD-42 Magazine"; +TAG_SIX12 = "Six-12 Shotgun"; +TAG_SIX12MAG_SHELL = "Six-12 Shell Magazine"; +TAG_SIX12MAG_SLUG = "Six-12 Slug Magazine"; +TAG_UMP = "UMP-45 .45 ACP PDW"; +TAG_UMPMAG = "UMP Magazine"; +TAG_USP = "USP-45 .45 ACP Handgun"; +TAG_USPMAG = "USP Magazine"; + +// Obituaries +OB_FLAMENWERFER77 = "%o was deep fried by %k."; +OB_NCT = "%o got chirp chirp'd by %k's tny gun."; + +// Item Pickup Messages +PICKUP_BARRACUDA_PREFIX = "You got the "; +PICKUP_BARRACUDA_SUFFIX = ". Watch out. It's got a bite!"; +PICKUP_BITCH_PREFIX = "You got the "; +PICKUP_BITCH_RAPID = "Rapid-Fire "; +PICKUP_BITCH_GL = ". This one has a grenade launcher"; +PICKUP_BITCH_SUFFIX = "."; +PICKUP_FENRIS_PREFIX = "You got the "; +PICKUP_FENRIS_POLYFRAME = "Light-Weight "; +PICKUP_FENRIS_PLATINUM = " with Platinum Wiring"; +PICKUP_FENRIS_SUFFIX = "."; +PICKUP_FLAMENWERFER77_PREFIX = "You got the "; +PICKUP_FLAMENWERFER77_SUFFIX = ". If werfs flammen."; +PICKUP_FRONTIERSMAN_PREFIX = "You got the "; +PICKUP_FRONTIERSMAN_SUFFIX = "."; +PICKUP_GASTANK_PREFIX = "You got a "; +PICKUP_GASTANK_SUFFIX = ". The cheap chineseum casing might react violently to extreme heat, pressure or sudden shock."; +PICKUP_GFB9_PREFIX = "You got the "; +PICKUP_GFB9_CAPACITOR = "High-Capacity "; +PICKUP_GFB9_SUFFIX = "."; +PICKUP_HEVARMOUR = "You got the Hazardous Environment Armor."; +PICKUP_NCT_PREFIX = "You got the "; +PICKUP_NCT_SUFFIX = ". It's some sort of weird tiny ... gun? thing?"; +PICKUP_NYX_PREFIX = "You got the "; +PICKUP_NYX_SUFFIX = "."; +PICKUP_NYXMAG = "You got a Nyx magazine."; +PICKUP_PD42_PREFIX = "You got the "; +PICKUP_PD42_SLUGTHROWER = " with an Under-Barrel Slug Thrower"; +PICKUP_PD42_SUFFIX = "."; +PICKUP_PD42MAG_PREFIX = "You got a "; +PICKUP_PD42MAG_SUFFIX = "."; +PICKUP_SIX12_PREFIX = "You got the "; +PICKUP_SIX12_SUFFIX = "."; +PICKUP_SIX12MAG_SHELL_PREFIX = "You got a "; +PICKUP_SIX12MAG_SHELL_SUFFIX = "."; +PICKUP_SIX12MAG_SLUG_PREFIX = "You got a "; +PICKUP_SIX12MAG_SLUG_SUFFIX = "."; +PICKUP_UMP_PREFIX = "You got the "; +PICKUP_UMP_SUFFIX = "."; +PICKUP_UMPMAG_PREFIX = "You got a "; +PICKUP_UMPMAG_SUFFIX = "."; +PICKUP_USP_PREFIX = "You got the "; +PICKUP_USP_SUFFIX = "."; +PICKUP_USPMAG_PREFIX = "You got a "; +PICKUP_USPMAG_SUFFIX = "."; diff --git a/MAPINFO b/MAPINFO new file mode 100644 index 0000000..8f1f73a --- /dev/null +++ b/MAPINFO @@ -0,0 +1,3 @@ +GameInfo { + AddEventHandlers = "IcarusWepsHandler" +} \ No newline at end of file diff --git a/MAPINFO.txt b/MAPINFO.txt deleted file mode 100644 index 08f1319..0000000 --- a/MAPINFO.txt +++ /dev/null @@ -1,9 +0,0 @@ -GameInfo -{ - AddEventHandlers = "HEVArmorHandler", - "PDFourHandler", - "BarracudaHandler", - "FlamethrowerHandler", - "FrontierHandler", - "Six12Handler" -} \ No newline at end of file diff --git a/MENUDEF b/MENUDEF new file mode 100644 index 0000000..0117948 --- /dev/null +++ b/MENUDEF @@ -0,0 +1,562 @@ +// Spawn Bias (for items that do replace) +OptionValue "SpawnBias" { + -1, "Disabled" + 0, "Replace All" + 2, "1 in 3" + 4, "1 in 5" + 9, "1 in 10" + 14, "1 in 15" + 19, "1 in 20" + 24, "1 in 25" + 49, "1 in 50" + 99, "1 in 100" + 149, "1 in 150" + 199, "1 in 200" +} + +OptionMenu "IcarusMenu" { + + Title "$ICARUS_MENU" + + StaticText "$MENU_PISTOLS_TITLE", "Yellow" + StaticText "" + Submenu "$TAG_NYX", "nyxSpawning", 0, 1 + StaticText "" + Submenu "$TAG_USP", "usp45Spawning", 0, 1 + StaticText "" + + StaticText "$MENU_SHOTGUNS_TITLE", "Red" + StaticText "" + Submenu "$TAG_BARRACUDA", "barracudaSpawning", 0, 1 + StaticText "" + Submenu "$TAG_SIX12", "six12Spawning", 0, 1 + StaticText "" + + StaticText "$MENU_MACHINEGUNS_TITLE", "Green" + StaticText "" + Submenu "$TAG_BITCH", "bitchSpawning", 0, 1 + StaticText "" + Submenu "$TAG_PD42", "pd42Spawning", 0, 1 + StaticText "" + Submenu "$TAG_UMP", "ump45Spawning", 0, 1 + StaticText "" + + StaticText "$MENU_EXPLOSIVES_TITLE", "Brown" + StaticText "" + Submenu "$TAG_FLAMENWERFER77", "flamenwerferSpawning", 0, 1 + StaticText "" + + StaticText "$MENU_RIFLES_TITLE", "Orange" + StaticText "" + Submenu "$TAG_FRONTIERSMAN", "frontiersmanSpawning", 0, 1 + StaticText "" + + StaticText "$MENU_ENERGYWEAPONS_TITLE", "Cyan" + StaticText "" + Submenu "$TAG_FENRIS", "fenrisSpawning", 0, 1 + StaticText "" + Submenu "$TAG_GFB9", "gfb9Spawning", 0, 1 + StaticText "" + Submenu "$TAG_NCT", "nctSpawning", 0, 1 + StaticText "" + + StaticText "$MENU_ARMOUR_TITLE", "Sapphire" + StaticText "" + Submenu "$TAG_HEVARMOUR", "hevArmourSpawning", 0, 1 + StaticText "" + StaticText "" + + StaticText "$MENU_RESETOPTIONS_TITLE", "Red" + StaticText "" + SafeCommand "$ICARUS_RESETALLOPTIONS", "Icarus_Reset_Cvars" +} + +// Pistols + +OptionMenu "nyxSpawning" { + Title "$MENU_NYX_TITLE" + StaticText "$MENU_NOTICE", "Yellow" + StaticText "$MENU_SPAWNRATE_TEXT1", "White" + StaticText "$MENU_SPAWNRATE_TEXT2", "White" + StaticText "" + + StaticText "$MENU_WEPSPAWNOPTIONS", "Yellow" + StaticText "$MENU_NYX_PISTOL_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "nyx_pistol_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar nyx_pistol_spawn_bias" + StaticText "" + + StaticText "$MENU_NYX_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "nyx_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_MAGSPAWNOPTIONS", "Yellow" + StaticText "$MENU_NYXMAG_CLIPMAG_SPAWNTEXT", "White" + Option "$MENU_MAGSPAWNRATE", "nyxmag_clipmag_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETMAG", "resetcvar nyxmag_clipmag_spawn_bias" + StaticText "$MENU_NYXMAG_SHELLBOX_SPAWNTEXT", "White" + Option "$MENU_MAGSPAWNRATE", "nyxmag_shellbox_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETMAG", "resetcvar nyxmag_shellbox_spawn_bias" + StaticText "" + + StaticText "$MENU_NYXMAG_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "nyxmag_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_PERSISTENCYOPTIONS", "Yellow" + StaticText "$MENU_PERSISTENCY_TEXT", "White" + Option "$MENU_WEPPERSISTENCY", "nyx_persistent_spawning", "OnOff" + Option "$MENU_MAGPERSISTENCY", "nyxmag_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar nyx_persistent_spawning; resetcvar nyxmag_persistent_spawning" + StaticText "" + StaticText "" + + StaticText "$MENU_RESETOPTIONS", "Yellow" + SafeCommand "$MENU_RESETALLOPTIONS", "nyx_reset_cvars" +} + +OptionMenu "usp45Spawning" { + Title "$MENU_USP_TITLE" + StaticText "$MENU_NOTICE", "Yellow" + StaticText "$MENU_SPAWNRATE_TEXT1", "White" + StaticText "$MENU_SPAWNRATE_TEXT2", "White" + StaticText "" + + StaticText "$MENU_WEPSPAWNOPTIONS", "Yellow" + StaticText "$MENU_USP_PISTOL_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "usp45_pistol_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar usp45_pistol_spawn_bias" + StaticText "" + + StaticText "$MENU_USP_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "usp45_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_MAGSPAWNOPTIONS", "Yellow" + StaticText "$MENU_USPMAG_CLIPMAG_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "usp45mag_clipmag_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar usp45mag_clipmag_spawn_bias" + StaticText "" + + StaticText "$MENU_USPMAG_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "usp45mag_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_PERSISTENCYOPTIONS", "Yellow" + StaticText "$MENU_PERSISTENCY_TEXT", "White" + Option "$MENU_WEPPERSISTENCY", "usp45_persistent_spawning", "OnOff" + Option "$MENU_MAGPERSISTENCY", "usp45mag_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar usp45_persistent_spawning; usp45mag_persistent_spawning" + StaticText "" + StaticText "" + + StaticText "$MENU_RESETOPTIONS", "Yellow" + SafeCommand "$MENU_RESETALLOPTIONS", "usp45_reset_cvars" +} + + +// Shotguns + +OptionMenu "barracudaSpawning" { + Title "$MENU_BARRACUDA_TITLE" + StaticText "$MENU_NOTICE", "Red" + StaticText "$MENU_SPAWNRATE_TEXT1", "White" + StaticText "$MENU_SPAWNRATE_TEXT2", "White" + StaticText "" + + StaticText "$MENU_SPAWNOPTIONS", "Red" + StaticText "$MENU_BARRACUDA_HUNTER_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "barracuda_hunter_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar barracuda_hunter_spawn_bias" + StaticText "$MENU_BARRACUDA_SLAYER_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "barracuda_slayer_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar barracuda_slayer_spawn_bias" + StaticText "" + + StaticText "$MENU_BARRACUDA_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "barracuda_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_PERSISTENCYOPTIONS", "Red" + StaticText "$MENU_PERSISTENCY_TEXT", "White" + Option "$MENU_PERSISTENCY", "barracuda_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar barracuda_persistent_spawning" + StaticText "" + StaticText "" + + StaticText "$MENU_RESETOPTIONS", "Red" + SafeCommand "$MENU_RESETALLOPTIONS", "barracuda_reset_cvars" +} + +OptionMenu "six12Spawning" { + Title "$MENU_SIX12_TITLE" + StaticText "$MENU_NOTICE", "Red" + StaticText "$MENU_SPAWNRATE_TEXT1", "White" + StaticText "$MENU_SPAWNRATE_TEXT2", "White" + StaticText "" + + StaticText "$MENU_WEPSPAWNOPTIONS", "Red" + StaticText "$MENU_SIX12_HUNTER_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "six12_hunter_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar six12_hunter_spawn_bias" + StaticText "$MENU_SIX12_SLAYER_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "six12_slayer_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar six12_slayer_spawn_bias" + StaticText "" + + StaticText "$MENU_SIX12_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "six12_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_MAGSPAWNOPTIONS", "Red" + StaticText "$MENU_SIX12MAG_SHELL_SHELL_SPAWNTEXT", "White" + Option "$MENU_MAGSPAWNRATE", "six12shellmag_shell_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETMAG", "resetcvar six12shellmag_shell_spawn_bias" + StaticText "" + + StaticText "$MENU_SIX12MAG_SHELL_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "six12shellmag_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_SIX12MAG_SLUG_SLUG_SPAWNTEXT", "White" + Option "$MENU_MAGSPAWNRATE", "six12slugmag_slug_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETMAG", "resetcvar six12slugmag_slug_spawn_bias" + StaticText "" + + StaticText "$MENU_SIX12MAG_SLUG_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "six12slugmag_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_PERSISTENCYOPTIONS", "Red" + StaticText "$MENU_PERSISTENCY_TEXT", "White" + Option "$MENU_WEPPERSISTENCY", "six12_persistent_spawning", "OnOff" + Option "$MENU_SIX12MAG_SHELL_PERSISTENCY", "six12shellmag_persistent_spawning", "OnOff" + Option "$MENU_SIX12MAG_SLUG_PERSISTENCY", "six12slugmag_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar six12_persistent_spawning; resetcvar six12shellmag_persistent_spawning; resetcvar six12slugmag_persistent_spawning" + StaticText "" + StaticText "" + + StaticText "$MENU_RESETOPTIONS", "Red" + SafeCommand "$MENU_RESETALLOPTIONS", "six12_reset_cvars" +} + + +// Machine Guns + +OptionMenu "bitchSpawning" { + Title "$MENU_BITCH_TITLE" + StaticText "$MENU_NOTICE", "Green" + StaticText "$MENU_SPAWNRATE_TEXT1", "White" + StaticText "$MENU_SPAWNRATE_TEXT2", "White" + StaticText "" + + StaticText "$MENU_SPAWNOPTIONS", "Green" + StaticText "$MENU_BITCH_CHAINGUN_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "bitch_chaingun_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar bitch_chaingun_spawn_bias" + StaticText "" + + StaticText "$MENU_BITCH_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "bitch_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_PERSISTENCYOPTIONS", "Green" + StaticText "$MENU_PERSISTENCY_TEXT", "White" + Option "$MENU_PERSISTENCY", "bitch_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar bitch_persistent_spawning" + StaticText "" + StaticText "" + + StaticText "$MENU_RESETOPTIONS", "Green" + SafeCommand "$MENU_RESETALLOPTIONS", "bitch_reset_cvars" +} + +OptionMenu "pd42Spawning" { + Title "$MENU_PD42_TITLE" + StaticText "$MENU_NOTICE", "Green" + StaticText "$MENU_SPAWNRATE_TEXT1", "White" + StaticText "$MENU_SPAWNRATE_TEXT2", "White" + StaticText "" + + StaticText "$MENU_SPAWNOPTIONS", "Green" + StaticText "$MENU_PD42_CLIPBOX_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "pd42_clipbox_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar pd42_clipbox_spawn_bias" + StaticText "" + + StaticText "$MENU_PD42_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "pd42_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_MAGSPAWNOPTIONS", "Green" + StaticText "$MENU_PD42MAG_CLIPMAG_SPAWNTEXT", "White" + Option "$MENU_MAGSPAWNRATE", "pd42mag_clipmag_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETMAG", "resetcvar pd42mag_clipmag_spawn_bias" + StaticText "" + + StaticText "$MENU_PD42MAG_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "pd42mag_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_PERSISTENCYOPTIONS", "Green" + StaticText "$MENU_PERSISTENCY_TEXT", "White" + Option "$MENU_WEPPERSISTENCY", "pd42_persistent_spawning", "OnOff" + Option "$MENU_MAGPERSISTENCY", "pd42mag_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar pd42_persistent_spawning; resetcvar pd42mag_persistent_spawning" + StaticText "" + StaticText "" + + StaticText "$MENU_RESETOPTIONS", "Green" + SafeCommand "$MENU_RESETALLOPTIONS", "pd42_reset_cvars" +} + +OptionMenu "ump45Spawning" { + Title "$MENU_UMP_TITLE" + StaticText "$MENU_NOTICE", "Green" + StaticText "$MENU_SPAWNRATE_TEXT1", "White" + StaticText "$MENU_SPAWNRATE_TEXT2", "White" + StaticText "" + + StaticText "$MENU_WEPSPAWNOPTIONS", "Green" + StaticText "$MENU_UMP_CLIPBOX_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "ump45_clipbox_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar ump45_clipbox_spawn_bias" + StaticText "" + + StaticText "$MENU_UMP_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "ump45_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_MAGSPAWNOPTIONS", "Green" + StaticText "$MENU_UMPMAG_CLIPMAG_SPAWNTEXT", "White" + Option "$MENU_MAGSPAWNRATE", "ump45mag_clipmag_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETMAG", "resetcvar ump45mag_clipmag_spawn_bias" + StaticText "" + + StaticText "$MENU_UMPMAG_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "ump45mag_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_PERSISTENCYOPTIONS", "Green" + StaticText "$MENU_PERSISTENCY_TEXT", "White" + Option "$MENU_WEPPERSISTENCY", "ump45_persistent_spawning", "OnOff" + Option "$MENU_MAGPERSISTENCY", "ump45mag_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar ump45_persistent_spawning; resetcvar ump45mag_persistent_spawning" + StaticText "" + StaticText "" + + StaticText "$MENU_RESETOPTIONS", "Green" + SafeCommand "$MENU_RESETALLOPTIONS", "ump45_reset_cvars" +} + + +// Explosives + +OptionMenu "flamenwerferSpawning" { + Title "$MENU_FLAMENWERFER77_TITLE" + StaticText "" + + Option "$MENU_FLAMENWERFER77_PRETTYLIGHTS", "Flamer_PrettyLights", "YesNo" + StaticText "" + + StaticText "$MENU_NOTICE", "Brown" + StaticText "$MENU_SPAWNRATE_TEXT1", "White" + StaticText "$MENU_SPAWNRATE_TEXT2", "White" + StaticText "" + + StaticText "$MENU_WEPSPAWNOPTIONS", "Brown" + StaticText "$MENU_FLAMENWERFER77_LAUNCHER_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "flamenwerfer_launcher_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar flamenwerfer_launcher_spawn_bias" + StaticText "$MENU_FLAMENWERFER77_BFG_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "flamenwerfer_bfg_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar flamenwerfer_bfg_spawn_bias" + StaticText "" + + StaticText "$MENU_FLAMENWERFER77_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "flamenwerfer_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_GASTANK_SPAWNOPTIONS", "Brown" + StaticText "$MENU_GASTANK_ROCKET_SPAWNTEXT", "White" + Option "$MENU_GASTANK_SPAWNRATE", "gastank_rocket_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETGASTANK", "resetcvar gastank_rocket_spawn_bias" + StaticText "$MENU_GASTANK_ROCKETBOX_SPAWNTEXT", "White" + Option "$MENU_GASTANK_SPAWNRATE", "gastank_rocketbox_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETGASTANK", "resetcvar gastank_rocketbox_spawn_bias" + StaticText "$MENU_GASTANK_BATTERY_SPAWNTEXT", "White" + Option "$MENU_GASTANK_SPAWNRATE", "gastank_battery_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETGASTANK", "resetcvar gastank_battery_spawn_bias" + StaticText "" + + StaticText "$MENU_GASTANK_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "gastank_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_PERSISTENCYOPTIONS", "Brown" + StaticText "$MENU_PERSISTENCY_TEXT", "White" + Option "$MENU_WEPPERSISTENCY", "flamenwerfer_persistent_spawning", "OnOff" + Option "$MENU_GASTANK_PERSISTENCY", "gastank_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar flamenwerfer_persistent_spawning; resetcvar gastank_persistent_spawning" + StaticText "" + StaticText "" + + StaticText "$MENU_RESETOPTIONS", "Brown" + SafeCommand "$MENU_RESETALLOPTIONS", "flamenwerfer_reset_cvars" +} + + +// Rifles + +OptionMenu "frontiersmanSpawning" { + Title "$MENU_FRONTIERSMAN_TITLE" + StaticText "$MENU_NOTICE", "Orange" + StaticText "$MENU_SPAWNRATE_TEXT1", "White" + StaticText "$MENU_SPAWNRATE_TEXT2", "White" + StaticText "" + + StaticText "$MENU_SPAWNOPTIONS", "Orange" + StaticText "$MENU_FRONTIERSMAN_HUNTER_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "frontiersman_hunter_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar frontiersman_hunter_spawn_bias" + StaticText "$MENU_FRONTIERSMAN_SLAYER_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "frontiersman_slayer_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar frontiersman_slayer_spawn_bias" + StaticText "" + + StaticText "$MENU_FRONTIERSMAN_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "frontiersman_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_PERSISTENCYOPTIONS", "Orange" + StaticText "$MENU_PERSISTENCY_TEXT", "White" + Option "$MENU_PERSISTENCY", "frontiersman_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar frontiersman_persistent_spawning" + StaticText "" + StaticText "" + + StaticText "$MENU_RESETOPTIONS", "Orange" + SafeCommand "$MENU_RESETALLOPTIONS", "frontiersman_reset_cvars" +} + + +// Energy weapons + +OptionMenu "fenrisSpawning" { + Title "$MENU_FENRIS_TITLE" + StaticText "$MENU_NOTICE", "Cyan" + StaticText "$MENU_SPAWNRATE_TEXT1", "White" + StaticText "$MENU_SPAWNRATE_TEXT2", "White" + StaticText "" + + StaticText "$MENU_SPAWNOPTIONS", "Cyan" + StaticText "$MENU_FENRIS_PLASMA_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "fenris_thunderbuster_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar fenris_thunderbuster_spawn_bias" + StaticText "" + + StaticText "$MENU_FENRIS_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "fenris_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_PERSISTENCYOPTIONS", "Cyan" + StaticText "$MENU_PERSISTENCY_TEXT", "White" + Option "$MENU_PERSISTENCY", "fenris_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar fenris_persistent_spawning" + StaticText "" + StaticText "" + + StaticText "$MENU_RESETOPTIONS", "Cyan" + SafeCommand "$MENU_RESETALLOPTIONS", "fenris_reset_cvars" +} + +OptionMenu "gfb9Spawning" { + Title "$MENU_GFB9_TITLE" + StaticText "$MENU_NOTICE", "Cyan" + StaticText "$MENU_SPAWNRATE_TEXT1", "White" + StaticText "$MENU_SPAWNRATE_TEXT2", "White" + StaticText "" + + StaticText "$MENU_SPAWNOPTIONS", "Cyan" + StaticText "$MENU_GFB9_PISTOL_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "gfb9_pistol_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar gfb9_pistol_spawn_bias" + StaticText "" + + StaticText "$MENU_GFB9_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "gfb9_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_PERSISTENCYOPTIONS", "Cyan" + StaticText "$MENU_PERSISTENCY_TEXT", "White" + Option "$MENU_PERSISTENCY", "gfb9_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar gfb9_persistent_spawning" + StaticText "" + StaticText "" + + StaticText "$MENU_RESETOPTIONS", "Cyan" + SafeCommand "$MENU_RESETALLOPTIONS", "gfb9_reset_cvars" +} + +OptionMenu "nctSpawning" { + Title "$MENU_NCT_TITLE" + StaticText "$MENU_NOTICE", "Cyan" + StaticText "$MENU_SPAWNRATE_TEXT1", "White" + StaticText "$MENU_SPAWNRATE_TEXT2", "White" + StaticText "" + + StaticText "$MENU_SPAWNOPTIONS", "Cyan" + StaticText "$MENU_NCT_BFG_SPAWNTEXT", "White" + Option "$MENU_WEPSPAWNRATE", "nct_bfg_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETWEP", "resetcvar nct_bfg_spawn_bias" + StaticText "" + + StaticText "$MENU_NCT_BACKPACKS", "White" + Option "$MENU_BACKPACKSALLOWED", "nct_allowBackpacks", "OnOff" + StaticText "" + + StaticText "$MENU_PERSISTENCYOPTIONS", "Cyan" + StaticText "$MENU_PERSISTENCY_TEXT", "White" + Option "$MENU_PERSISTENCY", "nct_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar nct_persistent_spawning" + StaticText "" + StaticText "" + + StaticText "$MENU_RESETOPTIONS", "Cyan" + SafeCommand "$MENU_RESETALLOPTIONS", "nct_reset_cvars" +} + + +// Items + +OptionMenu "hevArmourSpawning" { + Title "$MENU_HEVARMOUR_TITLE" + StaticText "$MENU_NOTICE", "Sapphire" + StaticText "$MENU_SPAWNRATE_TEXT1", "White" + StaticText "$MENU_SPAWNRATE_TEXT2", "White" + StaticText "" + + StaticText "$MENU_SPAWNOPTIONS", "Sapphire" + StaticText "$MENU_HEVARMOUR_ARMOUR_SPAWNTEXT", "White" + Option "$MENU_SPAWNRATE", "hevarmour_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETOPTIONS", "resetcvar hevarmour_spawn_bias" + StaticText "" + + StaticText "$MENU_PERSISTENCYOPTIONS", "Sapphire" + StaticText "$MENU_PERSISTENCY_TEXT", "White" + Option "$MENU_PERSISTENCY", "hevarmour_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar hevarmour_persistent_spawning" + StaticText "" + StaticText "" + + StaticText "$MENU_RESETOPTIONS", "Sapphire" + SafeCommand "$MENU_RESETALLOPTIONS", "hevarmour_reset_cvars" +} + +AddOptionMenu "OptionsMenu" { + Submenu "$ICARUS_MENU", "IcarusMenu" +} + +AddOptionMenu "HDAddonMenu" { + Submenu "$ICARUS_MENU", "IcarusMenu" +} \ No newline at end of file diff --git a/MENUDEF.txt b/MENUDEF.txt deleted file mode 100644 index 7b74617..0000000 --- a/MENUDEF.txt +++ /dev/null @@ -1,11 +0,0 @@ -OptionMenu "FlamerMenu" -{ - Title "Flammenwerfer Options" - - Option "Enable Dynamic Lighting", "Flamer_PrettyLights", "YesNo" -} - -AddOptionMenu "OptionsMenu" -{ - Submenu "Flammenwerfer", "FlamerMenu" -} \ No newline at end of file diff --git a/Patches/Barracuda/BUKMAG.png b/Patches/Barracuda/BUKMAG.png deleted file mode 100644 index c17cede..0000000 Binary files a/Patches/Barracuda/BUKMAG.png and /dev/null differ diff --git a/Patches/Barracuda/SLGMAG.png b/Patches/Barracuda/SLGMAG.png deleted file mode 100644 index 5b2d2e8..0000000 Binary files a/Patches/Barracuda/SLGMAG.png and /dev/null differ diff --git a/Patches/PD-42/PD42.png b/Patches/PD-42/PD42.png deleted file mode 100644 index 2774fc1..0000000 Binary files a/Patches/PD-42/PD42.png and /dev/null differ diff --git a/Patches/PD-42/PDFTA0.png b/Patches/PD-42/PDFTA0.png deleted file mode 100644 index f2587a0..0000000 Binary files a/Patches/PD-42/PDFTA0.png and /dev/null differ diff --git a/Patches/PD-42/PDFTB0.png b/Patches/PD-42/PDFTB0.png deleted file mode 100644 index 3038653..0000000 Binary files a/Patches/PD-42/PDFTB0.png and /dev/null differ diff --git a/Patches/PD-42/PDFTC0.png b/Patches/PD-42/PDFTC0.png deleted file mode 100644 index dc78ed0..0000000 Binary files a/Patches/PD-42/PDFTC0.png and /dev/null differ diff --git a/README.barracuda.md b/README.barracuda.md deleted file mode 100644 index b3b023c..0000000 --- a/README.barracuda.md +++ /dev/null @@ -1,14 +0,0 @@ -### Important ---- -- This mod requires [BulletLib](https://gitlab.com/accensi/hd-addons/hdbulletlib), [AceCoreLib](https://gitlab.com/accensi/hd-addons/acecorelib) and [Six12](https://gitlab.com/icarus-innovations/hdest-addons/six12). -- Supports ACL's spawn scaling. - -### Notes ---- -- The Barracuda is a double barrel, double magazine shotgun. -- It can be found naturally in the world. It can also drop from [Weapon Crates](https://gitlab.com/accensi/hd-addons/weapon-crate) and can be sold by the [Merchant](https://gitlab.com/accensi/hd-addons/merchant). -- The loadout code is `ace`. -- Loadout Configuration Codes are: - - `lslugs` for a slug magazine to be loaded in the left slot - - `rslugs` for a slug magazine to be loaded in the right slot. -- Alternate Black Gloves sprites are included in the addon. Simply remove the `BG - ` from the sprite name and override. \ No newline at end of file diff --git a/README.flamenwerfer77.md b/README.flamenwerfer77.md deleted file mode 100644 index c45afa7..0000000 --- a/README.flamenwerfer77.md +++ /dev/null @@ -1,9 +0,0 @@ -### Important ---- -- This mod requires [AceCoreLib](https://gitlab.com/accensi/hd-addons/acecorelib). -- Supports ACL's spawn scaling. - -### Notes ---- -- The Flamenwerfer is found naturally in the world. Can also drop from [weapon crates](https://gitlab.com/accensi/hd-addons/weapon-crate) and can be sold by the [Merchant](https://gitlab.com/accensi/hd-addons/merchant). -- The loadout code is `fw7` and `gas` for the weapon and fuel tanks, respectively. \ No newline at end of file diff --git a/README.frontiersman.md b/README.frontiersman.md deleted file mode 100644 index a68bb98..0000000 --- a/README.frontiersman.md +++ /dev/null @@ -1,10 +0,0 @@ -### Important ---- -- This mod requires [AceCoreLib](https://gitlab.com/accensi/hd-addons/acecorelib). -- Supports ACL's spawn scaling. - -### Notes ---- -- The Frontiersman is a 7.76 lever action rifle with a twist. -- It can be found naturally in the world. It can also drop from [Weapon Crates](https://gitlab.com/accensi/hd-addons/weapon-crate) and can be sold by the [Merchant](https://gitlab.com/accensi/hd-addons/merchant). -- The loadout codes is `fm7` for the weapon. \ No newline at end of file diff --git a/README.hevArmor.md b/README.hevArmor.md deleted file mode 100644 index 448a1b5..0000000 --- a/README.hevArmor.md +++ /dev/null @@ -1,6 +0,0 @@ -### Notes ---- -- HEV Armor is designed to be an effective combat suit built to withstand the elemental hazards of both the Tyrant's forces and the realm from which they came. It's slightly more protective and reliable than Garrison Armor but with added elemental protection at the cost of increased weight and movement speed. -- HEV Armor can be found natrually in the world. It has approximately an 18.75% chance to replace Garrison or Battle Armor. They can also be sold by the [Merchant](https://gitlab.com/accensi/hd-addons/merchant). -- Loadout code is `hve` to start with the armor equipped. -- Loadout code is `hva` to start with a spare in your inventory. \ No newline at end of file diff --git a/README.pd42.md b/README.pd42.md deleted file mode 100644 index d8ffe71..0000000 --- a/README.pd42.md +++ /dev/null @@ -1,12 +0,0 @@ -### Important ---- -- This mod requires [AceCoreLib](https://gitlab.com/accensi/hd-addons/acecorelib). -- Supports ACL's spawn scaling. - -### Notes ---- -- The PD-42 is an integrally suppressed 4.26mm PDW with select fire (Semi, Hyper-Burst™️, and Full Auto) and a 36 round mag. -- It can be found naturally in the world. It can also drop from [Weapon Crates](https://gitlab.com/accensi/hd-addons/weapon-crate) and can be sold by the [Merchant](https://gitlab.com/accensi/hd-addons/merchant). -- Loadout Code is `pd4` and `436` for the weapon and magazines, respectively. -- Loadout Configuration Code `slugger` for a variant with an under barrels single shot slug launcher. -- Alternate Black Gloves sprites are included in the addon. Simply remove the `BG - ` from the sprite name and override. \ No newline at end of file diff --git a/README.six12.md b/README.six12.md deleted file mode 100644 index 73a433b..0000000 --- a/README.six12.md +++ /dev/null @@ -1,12 +0,0 @@ -### Important ---- -- This mod requires [BulletLib](https://gitlab.com/accensi/hd-addons/hdbulletlib) and [AceCoreLib](https://gitlab.com/accensi/hd-addons/acecorelib). -- Supports ACL's spawn scaling. - -### Notes ---- -- The Six12 is a 6 shot rotary magazine shotgun. -- It can be found naturally in the world. It can also drop from [Weapon Crates](https://gitlab.com/accensi/hd-addons/weapon-crate) and can be sold by the [Merchant](https://gitlab.com/accensi/hd-addons/merchant). -- Accepts magazines loaded with slugs or regular shells. There is a 1 in 4 chance that when a Six12 spawns it will be loaded with slugs. -- Loadout Codes are `612`, `6sh`, and `6sl` for weapon, shell mag, and slug mag, respectively. -- Loadout Configuration Code `slugs` to have the weapon loaded with slugs on map start. \ No newline at end of file diff --git a/SNDINFO.fenris b/SNDINFO.fenris new file mode 100644 index 0000000..174d6ab --- /dev/null +++ b/SNDINFO.fenris @@ -0,0 +1,20 @@ +Fenris/BattIn FENLAOD + +Fenris/BattOut FENULOD + +Fenris/Charge FENCHRG + +Fenris/Fire FENPEWW + +Fenris/Empty FENMPTY + +Fenris/Impact FENHIT + +Fenris/SBCharge FENBCHRG + +Fenris/SBFire FENBPEW + +Fenris/SBExplode ICBLKBRK + +$limit Fenris/Impact 0 +$volume Fenris/Impact 0.5 \ No newline at end of file diff --git a/SNDINFO.gfb9 b/SNDINFO.gfb9 new file mode 100644 index 0000000..1d01e9e --- /dev/null +++ b/SNDINFO.gfb9 @@ -0,0 +1,3 @@ +GFBlaster/Fire GFBFIRE +GFBlaster/Charge GFBCHUM +GFBlaster/Impact GFBIMPA \ No newline at end of file diff --git a/SNDINFO.nyx b/SNDINFO.nyx new file mode 100644 index 0000000..8627834 --- /dev/null +++ b/SNDINFO.nyx @@ -0,0 +1,5 @@ +Nyx/Fire NYXFIRE +Nyx/MagOut NYXMAGO +Nyx/MagIn NYXMAGI +Nyx/SlideBack NYXSLDB +Nyx/SlideForward NYXSLDF \ No newline at end of file diff --git a/SNDINFO.ump b/SNDINFO.ump new file mode 100644 index 0000000..279e0ce --- /dev/null +++ b/SNDINFO.ump @@ -0,0 +1,5 @@ +UMP/Fire UMPFIRE +UMP/MagOut UMPMAGO +UMP/MagIn UMPMAGI +UMP/SlideBack UMPSLDB +UMP/SlideForward UMPSLDF \ No newline at end of file diff --git a/SNDINFO.usp b/SNDINFO.usp new file mode 100644 index 0000000..5fbbf2f --- /dev/null +++ b/SNDINFO.usp @@ -0,0 +1,5 @@ +USP/Fire USPFIRE +USP/MagOut USPMAGO +USP/MagIn USPMAGI +USP/SlideBack USPSLDB +USP/SlideForward USPSLDF \ No newline at end of file diff --git a/TEXTURES.barracuda b/TEXTURES.barracuda index b2eac96..f5e90b0 100644 --- a/TEXTURES.barracuda +++ b/TEXTURES.barracuda @@ -1,5 +1,5 @@ // Texture definitions generated by SLADE3 -// on Sun Apr 25 19:42:16 2021 +// on Sat Feb 11 09:15:30 2023 Sprite "BSAAA0", 52, 16 { @@ -11,7 +11,7 @@ Sprite "BSBAA0", 52, 16 { Offset 26, 16 Patch "BARPKUP", 0, 0 - Patch "BUKMAG", 4, 4 + Patch "STMBB0", 4, 4 { Blend "#000000", 0.4 } @@ -21,7 +21,7 @@ Sprite "BSSAA0", 52, 16 { Offset 26, 16 Patch "BARPKUP", 0, 0 - Patch "SLGMAG", 4, 4 + Patch "STMSB0", 4, 4 { Blend "#000000", 0.4 } @@ -31,14 +31,14 @@ Sprite "BSABA0", 52, 16 { Offset 26, 16 Patch "BARPKUP", 0, 0 - Patch "BUKMAG", 4, 4 + Patch "STMBB0", 4, 4 } Sprite "BSASA0", 52, 16 { Offset 26, 16 Patch "BARPKUP", 0, 0 - Patch "SLGMAG", 4, 4 + Patch "STMSB0", 4, 4 } // End of texture definitions diff --git a/TEXTURES.bitch b/TEXTURES.bitch new file mode 100644 index 0000000..25f8418 --- /dev/null +++ b/TEXTURES.bitch @@ -0,0 +1,43 @@ +// Texture definitions generated by SLADE3 +// on Sat Apr 23 11:42:08 2022 + +Sprite "BCHGA0", 94, 75 +{ + Offset -96, -94 + Patch "BCHGA0", 0, 0 +} + +Sprite "BCHFA0", 98, 99 +{ + Offset -96, -74 + Patch "BCHFA0", 0, 0 +} + +Sprite "BCHFB0", 106, 87 +{ + Offset -96, -88 + Patch "BCHFB0", 0, 0 +} + +Sprite "BCHGY0", 46, 14 +{ + Offset 23, 14 + Patch "BCHGZ0", 0, 0 + Patch "RIFGLAT", 25, 7 +} + +Graphic "STHPRAUT", 15, 3 +{ + Patch "PBRSC0", 0, 0 + Patch "PBRSC0", 1, 2 + Patch "PBRSC0", 3, 0 + Patch "PBRSC0", 4, 2 + Patch "PBRSC0", 6, 0 + Patch "PBRSC0", 7, 2 + Patch "PBRSC0", 9, 0 + Patch "PBRSC0", 10, 2 + Patch "PBRSC0", 12, 0 + Patch "PBRSC0", 13, 2 +} + +// End of texture definitions diff --git a/TEXTURES.fenris b/TEXTURES.fenris new file mode 100644 index 0000000..e7c8138 --- /dev/null +++ b/TEXTURES.fenris @@ -0,0 +1,68 @@ +// Texture definitions generated by SLADE3 +// on Tue Nov 16 09:09:07 2021 + +Sprite "FNRSA0", 103, 103 +{ + XScale 1.300 + YScale 1.400 + Offset -145, -132 + Patch "FENRIS", 0, 0 +} + +Sprite "FNRSB0", 122, 157 +{ + XScale 1.300 + YScale 1.400 + Offset -145, -84 + Patch "FENFIRE", 0, 0 +} + +Sprite "FNRCA0", 122, 157 +{ + XScale 1.300 + YScale 1.400 + Offset -145, -78 + Patch "FENCHRGA", 0, 0 +} + +Sprite "FNRCB0", 122, 157 +{ + XScale 1.300 + YScale 1.400 + Offset -145, -78 + Patch "FENCHRGB", 0, 0 +} + +Sprite "FNRCC0", 122, 157 +{ + XScale 1.300 + YScale 1.400 + Offset -145, -78 + Patch "FENCHRGC", 0, 0 +} + +Sprite "FNRCD0", 122, 157 +{ + XScale 1.300 + YScale 1.400 + Offset -145, -78 + Patch "FENCHRGD", 0, 0 +} + +Sprite "FNRSY0", 74, 21 +{ + XScale 1.300 + YScale 1.300 + Offset 36, 20 + Patch "FWRLDB", 0, 0 +} + +Sprite "FNRSZ0", 74, 21 +{ + XScale 1.300 + YScale 1.300 + Offset 36, 20 + Patch "FWRLDE", 0, 0 +} + +// End of texture definitions diff --git a/TEXTURES.gfb9 b/TEXTURES.gfb9 new file mode 100644 index 0000000..0b3c96d --- /dev/null +++ b/TEXTURES.gfb9 @@ -0,0 +1,52 @@ +// Texture definitions generated by SLADE3 +// on Mon May 10 22:33:43 2021 + +Sprite "GFBNA0", 103, 92 +{ + XScale 1.300 + YScale 1.400 + Offset -161, -143 + Patch "GFBIDLE", 0, 0 +} + +Sprite "GFBNB0", 105, 122 +{ + XScale 1.300 + YScale 1.400 + Offset -159, -117 + Patch "GFBFIRE", 0, 0 +} + +Sprite "GFBNC0", 103, 92 +{ + XScale 1.300 + YScale 1.400 + Offset -161, -143 + Patch "GFBCHRG1", 0, 0 +} + +Sprite "GFBND0", 103, 92 +{ + XScale 1.300 + YScale 1.400 + Offset -161, -143 + Patch "GFBCHRG2", 0, 0 +} + +Sprite "GFBNE0", 103, 92 +{ + XScale 1.300 + YScale 1.400 + Offset -161, -143 + Patch "GFBCHRG3", 0, 0 +} + +Sprite "GFBNF0", 105, 110 +{ + XScale 1.300 + YScale 1.400 + Offset -159, -125 + Patch "GFBCHRG4", 0, 0 +} + +// End of texture definitions diff --git a/TEXTURES.nyx b/TEXTURES.nyx new file mode 100644 index 0000000..ca9e810 --- /dev/null +++ b/TEXTURES.nyx @@ -0,0 +1,127 @@ +// Texture definitions generated by SLADE3 +// on Sun Jun 26 21:27:06 2022 + +Sprite "NYXPC0", 30, 16 +{ + XScale 1.100 + YScale 1.200 + Offset 15, 16 + Patch "NYXBASE", 0, 0 + Patch "FIRESEL", 4, 3 +} + +Sprite "NYXPE0", 37, 16 +{ + XScale 1.100 + YScale 1.200 + Offset 18, 16 + Patch "NYXEMPT", 0, 0 + Patch "FIRESEL", 2, 3 +} + +Sprite "NYXMA0", 5, 7 +{ + Offset 2, 7 + Patch "NYXMAG", 0, 0 +} + +Sprite "NYXMB0", 5, 7 +{ + Offset 2, 7 + Patch "NYXMAGE", 0, 0 +} + +Graphic "NYXMNORM", 5, 7 +{ + Patch "NYXMAG", 0, 0 +} + +Graphic "NYXMGREY", 5, 7 +{ + Patch "NYXMAG", 0, 0 + { + Blend "#C0C0C0", 0.5 + } +} + +Sprite "NYXGA0", 105, 97 +{ + XScale 1.100 + YScale 1.200 + Offset -126, -104 + Patch "NYXGA0", 0, 0 +} + +Sprite "NYXGB0", 105, 97 +{ + XScale 1.100 + YScale 1.200 + Offset -126, -104 + Patch "NYXGB0", 0, 0 +} + +Sprite "NYXGC0", 105, 140 +{ + XScale 1.100 + YScale 1.200 + Offset -126, -65 + Patch "NYXGC0", 0, 0 +} + +Sprite "NYXGD0", 105, 97 +{ + XScale 1.100 + YScale 1.200 + Offset -126, -104 + Patch "NYXGD0", 0, 0 +} + +Sprite "NRLAA0", 101, 97 +{ + XScale 1.100 + YScale 1.200 + Offset -130, -104 + Patch "NRLAA0", 0, 0 +} + +Sprite "NRLBA0", 93, 97 +{ + XScale 1.100 + YScale 1.200 + Offset -138, -104 + Patch "NRLBA0", 0, 0 +} + +Sprite "NRLCA0", 79, 97 +{ + XScale 1.100 + YScale 1.200 + Offset -152, -104 + Patch "NRLCA0", 0, 0 +} + +Sprite "NRLAD0", 101, 97 +{ + XScale 1.100 + YScale 1.200 + Offset -130, -104 + Patch "NRLAD0", 0, 0 +} + +Sprite "NRLBD0", 93, 97 +{ + XScale 1.100 + YScale 1.200 + Offset -138, -104 + Patch "NRLBD0", 0, 0 +} + +Sprite "NRLCD0", 79, 97 +{ + XScale 1.100 + YScale 1.200 + Offset -152, -104 + Patch "NRLCD0", 0, 0 +} + +// End of texture definitions diff --git a/TEXTURES.pd42 b/TEXTURES.pd42 index 9e80c79..7e1d2c1 100644 --- a/TEXTURES.pd42 +++ b/TEXTURES.pd42 @@ -1,50 +1,60 @@ // Texture definitions generated by SLADE3 -// on Sat Jul 17 16:16:55 2021 +// on Wed May 31 17:06:56 2023 -Sprite "PDWGY0", 37, 15 +Sprite "PDWGA0", 37, 15 { Offset 19, 15 Patch "PMAGE0", 1, 2 - Patch "PD42", 0, 0 + Patch "PD42IS", 0, 0 } -Sprite "PDWGZ0", 37, 15 +Sprite "PDWGB0", 37, 15 { Offset 19, 15 - Patch "PD42", 0, 0 + Patch "PD42IS", 0, 0 } -Sprite "PDWSY0", 44, 15 +Sprite "PDWGC0", 37, 15 { - Offset 22, 15 + Offset 19, 15 Patch "PMAGE0", 1, 2 - Patch "PD42", 0, 0 - Patch "SLGGUN", 31, 3 + Patch "PD42RS", 0, 0 } -Sprite "PDWSZ0", 44, 15 +Sprite "PDWGD0", 37, 15 +{ + Offset 19, 15 + Patch "PD42RS", 0, 0 +} + +Sprite "PDWSA0", 44, 15 { Offset 22, 15 - Patch "PD42", 0, 0 + Patch "PMAGE0", 1, 2 + Patch "PD42IS", 0, 0 Patch "SLGGUN", 31, 3 } -Sprite "PDFGA0", 86, 70 +Sprite "PDWSB0", 44, 15 { - Offset -102, -98 - Patch "PDFTB0", 0, 0 + Offset 22, 15 + Patch "PD42IS", 0, 0 + Patch "SLGGUN", 31, 3 } -Sprite "PDFFA0", 115, 121 +Sprite "PDWSC0", 44, 15 { - Offset -102, -50 - Patch "PDFTA0", 0, 0 + Offset 22, 15 + Patch "PMAGE0", 1, 2 + Patch "PD42RS", 0, 0 + Patch "SLGGUN", 31, 3 } -Sprite "PDFFB0", 101, 93 +Sprite "PDWSD0", 44, 15 { - Offset -102, -81 - Patch "PDFTC0", 0, 0 + Offset 22, 15 + Patch "PD42RS", 0, 0 + Patch "SLGGUN", 31, 3 } Sprite "PDMGA0", 10, 13 @@ -79,4 +89,14 @@ Graphic "PDWBACK", 86, 66 Patch "PDFBACK", 0, 0 } +Graphic "PDFNTSIT", 5, 13 +{ + Patch "FRNTSITE", 0, 0 +} + +Graphic "PDBAKSIT", 27, 13 +{ + Patch "BACKSITE", 0, 0 +} + // End of texture definitions diff --git a/TEXTURES.ump b/TEXTURES.ump new file mode 100644 index 0000000..e17ab7a --- /dev/null +++ b/TEXTURES.ump @@ -0,0 +1,65 @@ +// Texture definitions generated by SLADE3 +// on Fri Jun 3 03:40:09 2022 + +Sprite "UMPFA0", 70, 101 +{ + XScale 1.100 + YScale 1.100 + Offset -132, -87 + Patch "UMPFA0", 0, 0 +} + +Sprite "UMPGA0", 70, 92 +{ + XScale 1.100 + YScale 1.100 + Offset -132, -93 + Patch "UMPGA0", 0, 0 +} + +Sprite "UMPGB0", 70, 92 +{ + XScale 1.100 + YScale 1.100 + Offset -132, -93 + Patch "UMPGB0", 0, 0 +} + +Sprite "UMPGY0", 50, 17 +{ + Offset 25, 17 + Patch "UMPGY0", 0, 0 +} + +Sprite "UMPGZ0", 50, 21 +{ + Offset 25, 21 + Patch "UMPGZ0", 0, 0 +} + +Graphic "UMPMNORM", 7, 13 +{ + Patch "UMPMA0", 0, 0 +} + +Graphic "UMPMGREY", 7, 13 +{ + Patch "UMPMA0", 0, 0 + { + Blend "#C0C0C0", 0.3 + } +} + +Sprite "UMPMA0", 7, 13 +{ + Offset 3, 13 + Patch "UMPMA0", 0, 0 +} + +Sprite "UMPMB0", 13, 7 +{ + Offset 7, 7 + Patch "UMPMB0", 0, 0 +} + +// End of texture definitions diff --git a/TEXTURES.usp b/TEXTURES.usp new file mode 100644 index 0000000..52029b3 --- /dev/null +++ b/TEXTURES.usp @@ -0,0 +1,119 @@ +// Texture definitions generated by SLADE3 +// on Fri Jun 3 12:42:26 2022 + +Sprite "USPFA0", 104, 112 +{ + XScale 1.200 + YScale 1.200 + Offset -142, -94 + Patch "USPFA0", 0, 0 +} + +Sprite "USPGA0", 104, 92 +{ + XScale 1.200 + YScale 1.200 + Offset -142, -109 + Patch "USPGA0", 0, 0 +} + +Sprite "USPGB0", 104, 84 +{ + XScale 1.200 + YScale 1.200 + Offset -142, -117 + Patch "USPGB0", 0, 0 +} + +Sprite "USPGY0", 49, 31 +{ + XScale 2.300 + YScale 2.500 + Offset 22, 31 + Patch "USPGY0", 0, 0 +} + +Sprite "USPGZ0", 56, 31 +{ + XScale 2.300 + YScale 2.500 + Offset 30, 31 + Patch "USPGZ0", 0, 0 +} + +Sprite "USPMA0", 6, 13 +{ + YScale 1.100 + Offset 3, 13 + Patch "USPMA0", 0, 0 +} + +Sprite "USPMB0", 13, 6 +{ + XScale 1.100 + Offset 7, 6 + Patch "USPMB0", 0, 0 +} + +Graphic "USPMNORM", 6, 13 +{ + Patch "USPMA0", 0, 0 +} + +Graphic "USPMGREY", 6, 13 +{ + Patch "USPMA0", 0, 0 + { + Blend "#C0C0C0", 0.6 + } +} + +Sprite "USPRA0", 94, 92 +{ + XScale 1.200 + YScale 1.200 + Offset -152, -109 + Patch "USRAA0", 0, 0 +} + +Sprite "USPRB0", 89, 92 +{ + XScale 1.200 + YScale 1.200 + Offset -157, -109 + Patch "USRBA0", 0, 0 +} + +Sprite "USPRC0", 79, 92 +{ + XScale 1.200 + YScale 1.200 + Offset -167, -109 + Patch "USRCA0", 0, 0 +} + +Sprite "USPEA0", 94, 84 +{ + XScale 1.200 + YScale 1.200 + Offset -152, -117 + Patch "USRAD0", 0, 0 +} + +Sprite "USPEB0", 89, 84 +{ + XScale 1.200 + YScale 1.200 + Offset -157, -117 + Patch "USRBD0", 0, 0 +} + +Sprite "USPEC0", 79, 84 +{ + XScale 1.200 + YScale 1.200 + Offset -167, -117 + Patch "USRCD0", 0, 0 +} + +// End of texture definitions diff --git a/graphics/Bitch/BCHBACK.png b/graphics/Bitch/BCHBACK.png new file mode 100644 index 0000000..32aa88a Binary files /dev/null and b/graphics/Bitch/BCHBACK.png differ diff --git a/graphics/Bitch/BCHFRONT.png b/graphics/Bitch/BCHFRONT.png new file mode 100644 index 0000000..a3f4074 Binary files /dev/null and b/graphics/Bitch/BCHFRONT.png differ diff --git a/graphics/Fenris/FENBACK.png b/graphics/Fenris/FENBACK.png new file mode 100644 index 0000000..6d7983c Binary files /dev/null and b/graphics/Fenris/FENBACK.png differ diff --git a/graphics/Fenris/FENFRNT.png b/graphics/Fenris/FENFRNT.png new file mode 100644 index 0000000..1b87cdd Binary files /dev/null and b/graphics/Fenris/FENFRNT.png differ diff --git a/graphics/Fenris/FNRSCR1.png b/graphics/Fenris/FNRSCR1.png new file mode 100644 index 0000000..1dab8d7 Binary files /dev/null and b/graphics/Fenris/FNRSCR1.png differ diff --git a/Graphics/Flamenwerfer 77/FLMRSITE.png b/graphics/Flamenwerfer 77/FLMRSITE.png similarity index 100% rename from Graphics/Flamenwerfer 77/FLMRSITE.png rename to graphics/Flamenwerfer 77/FLMRSITE.png diff --git a/Graphics/Frontiersman/HOLYBLT.png b/graphics/Frontiersman/HOLYBLT.png similarity index 100% rename from Graphics/Frontiersman/HOLYBLT.png rename to graphics/Frontiersman/HOLYBLT.png diff --git a/graphics/GFB-9/GFBBACK.png b/graphics/GFB-9/GFBBACK.png new file mode 100644 index 0000000..d9fa4a6 Binary files /dev/null and b/graphics/GFB-9/GFBBACK.png differ diff --git a/graphics/GFB-9/GFBFRNT.png b/graphics/GFB-9/GFBFRNT.png new file mode 100644 index 0000000..07c68d0 Binary files /dev/null and b/graphics/GFB-9/GFBFRNT.png differ diff --git a/graphics/GFB-9/GFBSCR1.png b/graphics/GFB-9/GFBSCR1.png new file mode 100644 index 0000000..1dab8d7 Binary files /dev/null and b/graphics/GFB-9/GFBSCR1.png differ diff --git a/graphics/Nyx/NYXBACK.png b/graphics/Nyx/NYXBACK.png new file mode 100644 index 0000000..eb89d7e Binary files /dev/null and b/graphics/Nyx/NYXBACK.png differ diff --git a/graphics/Nyx/NYXFRNT.png b/graphics/Nyx/NYXFRNT.png new file mode 100644 index 0000000..c43df15 Binary files /dev/null and b/graphics/Nyx/NYXFRNT.png differ diff --git a/Graphics/PD-42/PDFBACK.png b/graphics/PD-42/PDFBACK.png similarity index 100% rename from Graphics/PD-42/PDFBACK.png rename to graphics/PD-42/PDFBACK.png diff --git a/Graphics/Six12/STLVBACK.png b/graphics/Six12/STLVBACK.png similarity index 100% rename from Graphics/Six12/STLVBACK.png rename to graphics/Six12/STLVBACK.png diff --git a/Graphics/Six12/STLVFRNT.png b/graphics/Six12/STLVFRNT.png similarity index 100% rename from Graphics/Six12/STLVFRNT.png rename to graphics/Six12/STLVFRNT.png diff --git a/graphics/UMP/UMPBACK.png b/graphics/UMP/UMPBACK.png new file mode 100644 index 0000000..1206d3d Binary files /dev/null and b/graphics/UMP/UMPBACK.png differ diff --git a/graphics/UMP/UMPFRNT.png b/graphics/UMP/UMPFRNT.png new file mode 100644 index 0000000..46a5852 Binary files /dev/null and b/graphics/UMP/UMPFRNT.png differ diff --git a/graphics/USP/USPBACK.png b/graphics/USP/USPBACK.png new file mode 100644 index 0000000..4cf94ad Binary files /dev/null and b/graphics/USP/USPBACK.png differ diff --git a/graphics/USP/USPFRNT.png b/graphics/USP/USPFRNT.png new file mode 100644 index 0000000..81fd802 Binary files /dev/null and b/graphics/USP/USPFRNT.png differ diff --git a/Patches/Barracuda/BARPKUP.png b/patches/Barracuda/BARPKUP.png similarity index 100% rename from Patches/Barracuda/BARPKUP.png rename to patches/Barracuda/BARPKUP.png diff --git a/patches/Bitch/BCHFA0.png b/patches/Bitch/BCHFA0.png new file mode 100644 index 0000000..76b80b0 Binary files /dev/null and b/patches/Bitch/BCHFA0.png differ diff --git a/patches/Bitch/BCHFB0.png b/patches/Bitch/BCHFB0.png new file mode 100644 index 0000000..147046b Binary files /dev/null and b/patches/Bitch/BCHFB0.png differ diff --git a/patches/Bitch/BCHGA0.png b/patches/Bitch/BCHGA0.png new file mode 100644 index 0000000..95bb2a9 Binary files /dev/null and b/patches/Bitch/BCHGA0.png differ diff --git a/patches/Fenris/FENCHRGA.png b/patches/Fenris/FENCHRGA.png new file mode 100644 index 0000000..2c69bcc Binary files /dev/null and b/patches/Fenris/FENCHRGA.png differ diff --git a/patches/Fenris/FENCHRGB.png b/patches/Fenris/FENCHRGB.png new file mode 100644 index 0000000..9980309 Binary files /dev/null and b/patches/Fenris/FENCHRGB.png differ diff --git a/patches/Fenris/FENCHRGC.png b/patches/Fenris/FENCHRGC.png new file mode 100644 index 0000000..f19b64f Binary files /dev/null and b/patches/Fenris/FENCHRGC.png differ diff --git a/patches/Fenris/FENCHRGD.png b/patches/Fenris/FENCHRGD.png new file mode 100644 index 0000000..3ffcdd7 Binary files /dev/null and b/patches/Fenris/FENCHRGD.png differ diff --git a/patches/Fenris/FENFIRE.png b/patches/Fenris/FENFIRE.png new file mode 100644 index 0000000..6b63ff8 Binary files /dev/null and b/patches/Fenris/FENFIRE.png differ diff --git a/patches/Fenris/FENRIS.png b/patches/Fenris/FENRIS.png new file mode 100644 index 0000000..e92a170 Binary files /dev/null and b/patches/Fenris/FENRIS.png differ diff --git a/patches/Fenris/FWRLDB.png b/patches/Fenris/FWRLDB.png new file mode 100644 index 0000000..bca2498 Binary files /dev/null and b/patches/Fenris/FWRLDB.png differ diff --git a/patches/Fenris/FWRLDE.png b/patches/Fenris/FWRLDE.png new file mode 100644 index 0000000..eb53d54 Binary files /dev/null and b/patches/Fenris/FWRLDE.png differ diff --git a/Patches/Frontiersman/FMPKUP.png b/patches/Frontiersman/FMPKUP.png similarity index 100% rename from Patches/Frontiersman/FMPKUP.png rename to patches/Frontiersman/FMPKUP.png diff --git a/Patches/Frontiersman/FRMFA0.png b/patches/Frontiersman/FRMFA0.png similarity index 100% rename from Patches/Frontiersman/FRMFA0.png rename to patches/Frontiersman/FRMFA0.png diff --git a/Patches/Frontiersman/FRMGA0.png b/patches/Frontiersman/FRMGA0.png similarity index 100% rename from Patches/Frontiersman/FRMGA0.png rename to patches/Frontiersman/FRMGA0.png diff --git a/Patches/Frontiersman/FRMGB0.png b/patches/Frontiersman/FRMGB0.png similarity index 100% rename from Patches/Frontiersman/FRMGB0.png rename to patches/Frontiersman/FRMGB0.png diff --git a/Patches/Frontiersman/FRMGC0.png b/patches/Frontiersman/FRMGC0.png similarity index 100% rename from Patches/Frontiersman/FRMGC0.png rename to patches/Frontiersman/FRMGC0.png diff --git a/Patches/Frontiersman/FRMGD0.png b/patches/Frontiersman/FRMGD0.png similarity index 100% rename from Patches/Frontiersman/FRMGD0.png rename to patches/Frontiersman/FRMGD0.png diff --git a/patches/GFB-9/GFBCHRG1.png b/patches/GFB-9/GFBCHRG1.png new file mode 100644 index 0000000..48e3c86 Binary files /dev/null and b/patches/GFB-9/GFBCHRG1.png differ diff --git a/patches/GFB-9/GFBCHRG2.png b/patches/GFB-9/GFBCHRG2.png new file mode 100644 index 0000000..52e6dc5 Binary files /dev/null and b/patches/GFB-9/GFBCHRG2.png differ diff --git a/patches/GFB-9/GFBCHRG3.png b/patches/GFB-9/GFBCHRG3.png new file mode 100644 index 0000000..4801233 Binary files /dev/null and b/patches/GFB-9/GFBCHRG3.png differ diff --git a/patches/GFB-9/GFBCHRG4.png b/patches/GFB-9/GFBCHRG4.png new file mode 100644 index 0000000..fcb15c4 Binary files /dev/null and b/patches/GFB-9/GFBCHRG4.png differ diff --git a/patches/GFB-9/GFBFIRE.png b/patches/GFB-9/GFBFIRE.png new file mode 100644 index 0000000..71bd7b4 Binary files /dev/null and b/patches/GFB-9/GFBFIRE.png differ diff --git a/patches/GFB-9/GFBIDLE.png b/patches/GFB-9/GFBIDLE.png new file mode 100644 index 0000000..681bd7c Binary files /dev/null and b/patches/GFB-9/GFBIDLE.png differ diff --git a/patches/Nyx/NRLAA0.png b/patches/Nyx/NRLAA0.png new file mode 100644 index 0000000..d03c7ba Binary files /dev/null and b/patches/Nyx/NRLAA0.png differ diff --git a/patches/Nyx/NRLAD0.png b/patches/Nyx/NRLAD0.png new file mode 100644 index 0000000..f30d31c Binary files /dev/null and b/patches/Nyx/NRLAD0.png differ diff --git a/patches/Nyx/NRLBA0.png b/patches/Nyx/NRLBA0.png new file mode 100644 index 0000000..9634808 Binary files /dev/null and b/patches/Nyx/NRLBA0.png differ diff --git a/patches/Nyx/NRLBD0.png b/patches/Nyx/NRLBD0.png new file mode 100644 index 0000000..ccbfbde Binary files /dev/null and b/patches/Nyx/NRLBD0.png differ diff --git a/patches/Nyx/NRLCA0.png b/patches/Nyx/NRLCA0.png new file mode 100644 index 0000000..afc98c3 Binary files /dev/null and b/patches/Nyx/NRLCA0.png differ diff --git a/patches/Nyx/NRLCD0.png b/patches/Nyx/NRLCD0.png new file mode 100644 index 0000000..776bc68 Binary files /dev/null and b/patches/Nyx/NRLCD0.png differ diff --git a/patches/Nyx/NYXBASE.png b/patches/Nyx/NYXBASE.png new file mode 100644 index 0000000..763a6b7 Binary files /dev/null and b/patches/Nyx/NYXBASE.png differ diff --git a/patches/Nyx/NYXEMPT.png b/patches/Nyx/NYXEMPT.png new file mode 100644 index 0000000..e5aabed Binary files /dev/null and b/patches/Nyx/NYXEMPT.png differ diff --git a/patches/Nyx/NYXGA0.png b/patches/Nyx/NYXGA0.png new file mode 100644 index 0000000..b357181 Binary files /dev/null and b/patches/Nyx/NYXGA0.png differ diff --git a/patches/Nyx/NYXGB0.png b/patches/Nyx/NYXGB0.png new file mode 100644 index 0000000..531f97e Binary files /dev/null and b/patches/Nyx/NYXGB0.png differ diff --git a/patches/Nyx/NYXGC0.png b/patches/Nyx/NYXGC0.png new file mode 100644 index 0000000..499b7cc Binary files /dev/null and b/patches/Nyx/NYXGC0.png differ diff --git a/patches/Nyx/NYXGD0.png b/patches/Nyx/NYXGD0.png new file mode 100644 index 0000000..712b9b3 Binary files /dev/null and b/patches/Nyx/NYXGD0.png differ diff --git a/patches/Nyx/NYXMAG.png b/patches/Nyx/NYXMAG.png new file mode 100644 index 0000000..288f669 Binary files /dev/null and b/patches/Nyx/NYXMAG.png differ diff --git a/patches/Nyx/NYXMAGE.png b/patches/Nyx/NYXMAGE.png new file mode 100644 index 0000000..58a8b57 Binary files /dev/null and b/patches/Nyx/NYXMAGE.png differ diff --git a/patches/PD-42/PD42IS.png b/patches/PD-42/PD42IS.png new file mode 100644 index 0000000..09c8999 Binary files /dev/null and b/patches/PD-42/PD42IS.png differ diff --git a/patches/PD-42/PD42RS.png b/patches/PD-42/PD42RS.png new file mode 100644 index 0000000..6d1425d Binary files /dev/null and b/patches/PD-42/PD42RS.png differ diff --git a/Patches/PD-42/PMAGE0.png b/patches/PD-42/PMAGE0.png similarity index 100% rename from Patches/PD-42/PMAGE0.png rename to patches/PD-42/PMAGE0.png diff --git a/Patches/PD-42/PMAGF0.png b/patches/PD-42/PMAGF0.png similarity index 100% rename from Patches/PD-42/PMAGF0.png rename to patches/PD-42/PMAGF0.png diff --git a/Patches/PD-42/SLGGUN.png b/patches/PD-42/SLGGUN.png similarity index 100% rename from Patches/PD-42/SLGGUN.png rename to patches/PD-42/SLGGUN.png diff --git a/Patches/Six12/STWLMAGS.png b/patches/Six12/STWLMAGS.png similarity index 100% rename from Patches/Six12/STWLMAGS.png rename to patches/Six12/STWLMAGS.png diff --git a/Patches/Six12/STWLSHL.png b/patches/Six12/STWLSHL.png similarity index 100% rename from Patches/Six12/STWLSHL.png rename to patches/Six12/STWLSHL.png diff --git a/Patches/Six12/SXTWLA0.png b/patches/Six12/SXTWLA0.png similarity index 100% rename from Patches/Six12/SXTWLA0.png rename to patches/Six12/SXTWLA0.png diff --git a/Patches/Six12/SXTWLB0.png b/patches/Six12/SXTWLB0.png similarity index 100% rename from Patches/Six12/SXTWLB0.png rename to patches/Six12/SXTWLB0.png diff --git a/patches/UMP/UMPFA0.png b/patches/UMP/UMPFA0.png new file mode 100644 index 0000000..d51c5a3 Binary files /dev/null and b/patches/UMP/UMPFA0.png differ diff --git a/patches/UMP/UMPGA0.png b/patches/UMP/UMPGA0.png new file mode 100644 index 0000000..e207cae Binary files /dev/null and b/patches/UMP/UMPGA0.png differ diff --git a/patches/UMP/UMPGB0.png b/patches/UMP/UMPGB0.png new file mode 100644 index 0000000..ab38276 Binary files /dev/null and b/patches/UMP/UMPGB0.png differ diff --git a/patches/UMP/UMPGY0.png b/patches/UMP/UMPGY0.png new file mode 100644 index 0000000..7a2ad91 Binary files /dev/null and b/patches/UMP/UMPGY0.png differ diff --git a/patches/UMP/UMPGZ0.png b/patches/UMP/UMPGZ0.png new file mode 100644 index 0000000..fade526 Binary files /dev/null and b/patches/UMP/UMPGZ0.png differ diff --git a/patches/UMP/UMPMA0.png b/patches/UMP/UMPMA0.png new file mode 100644 index 0000000..4e74e19 Binary files /dev/null and b/patches/UMP/UMPMA0.png differ diff --git a/patches/UMP/UMPMB0.png b/patches/UMP/UMPMB0.png new file mode 100644 index 0000000..b7d0850 Binary files /dev/null and b/patches/UMP/UMPMB0.png differ diff --git a/patches/USP/USPFA0.png b/patches/USP/USPFA0.png new file mode 100644 index 0000000..d842493 Binary files /dev/null and b/patches/USP/USPFA0.png differ diff --git a/patches/USP/USPGA0.png b/patches/USP/USPGA0.png new file mode 100644 index 0000000..86923f6 Binary files /dev/null and b/patches/USP/USPGA0.png differ diff --git a/patches/USP/USPGB0.png b/patches/USP/USPGB0.png new file mode 100644 index 0000000..e53d148 Binary files /dev/null and b/patches/USP/USPGB0.png differ diff --git a/patches/USP/USPGY0.png b/patches/USP/USPGY0.png new file mode 100644 index 0000000..cbe25ce Binary files /dev/null and b/patches/USP/USPGY0.png differ diff --git a/patches/USP/USPGZ0.png b/patches/USP/USPGZ0.png new file mode 100644 index 0000000..240153b Binary files /dev/null and b/patches/USP/USPGZ0.png differ diff --git a/patches/USP/USPMA0.png b/patches/USP/USPMA0.png new file mode 100644 index 0000000..c99f682 Binary files /dev/null and b/patches/USP/USPMA0.png differ diff --git a/patches/USP/USPMB0.png b/patches/USP/USPMB0.png new file mode 100644 index 0000000..f7e3775 Binary files /dev/null and b/patches/USP/USPMB0.png differ diff --git a/patches/USP/USRAA0.png b/patches/USP/USRAA0.png new file mode 100644 index 0000000..c29aa32 Binary files /dev/null and b/patches/USP/USRAA0.png differ diff --git a/patches/USP/USRAD0.png b/patches/USP/USRAD0.png new file mode 100644 index 0000000..ea90649 Binary files /dev/null and b/patches/USP/USRAD0.png differ diff --git a/patches/USP/USRBA0.png b/patches/USP/USRBA0.png new file mode 100644 index 0000000..2efd26c Binary files /dev/null and b/patches/USP/USRBA0.png differ diff --git a/patches/USP/USRBD0.png b/patches/USP/USRBD0.png new file mode 100644 index 0000000..89ec76f Binary files /dev/null and b/patches/USP/USRBD0.png differ diff --git a/patches/USP/USRCA0.png b/patches/USP/USRCA0.png new file mode 100644 index 0000000..8d071cb Binary files /dev/null and b/patches/USP/USRCA0.png differ diff --git a/patches/USP/USRCD0.png b/patches/USP/USRCD0.png new file mode 100644 index 0000000..e1f9560 Binary files /dev/null and b/patches/USP/USRCD0.png differ diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..882c05f --- /dev/null +++ b/readme.md @@ -0,0 +1,217 @@ +# Icarus Innovations, Improved + +_Requires [BulletLib - Recasted](https://github.com/HDest-Community/HDBulletLib-Recasted) and [AceCoreLib](https://github.com/HDest-Community/AceCoreLib), by the HDest Community._ + +This mod aims to maintain and improve Icarus's Innovations, by updating them to the latest HDest main, as well as tweaking/fixing any bugs that come along the way. All weapons can be found naturally, as well as dropping from [Weapon Crates](https://github.com/HDest-Community/weapon-crate) and being sold by the [Merchant](https://github.com/HDest-Community/merchant). + +## Weapons +--- + +### Barracuda +- The Barracuda is a double barrel, double magazine shotgun. +- The loadout code is `ace`. +- Loadout Configuration Codes are: + - `lslugs` for a slug magazine to be loaded in the left slot + - `rslugs` for a slug magazine to be loaded in the right slot. +- Alternate Black Gloves sprites are included in the addon. Simply remove the `BG - ` from the sprite name and override. +--- + +### Bitch +- The Bitch is a 4.26mm backpack-fed light machine gun. +- Loadout Code is `bch`. +- Loadout Configuration Codes are: + - `rapid`: Adds a new fire mode which allows the weapon to fire in Fuller Auto. + - `gl`: Gives the weapon a hair trigger Grenade Launcher +--- + +### CFL-3 "Fenris" +- The Fenris is a select fire energy assault rifle. +- Loadout Code is `cfl`. +- Loadout Configuration Codes are: + - `frame`: Reduces Weapon Bulk. + - `plat`: Increased energy efficiency. +--- + +### Flamenwerfer-77 +- The loadout code is `fw7` and `gas` for the weapon and fuel tanks, respectively. +--- + +### Frontiersman +- The Frontiersman is a 7.76mm lever action rifle with a twist. +- The loadout codes is `fm7` for the weapon. +--- + +### GFB-9 "Backup Plan" +- The Backup Plan is a rechargeable energy sidearm. +- The loadout code is `gfb` for the weapon. +- Loadout Configuration Code`cap` gives the weapon an extended capacitor. Hold more rounds but takes longer to recharge. +--- + +### Hammerhead +- The loadout code is `hhd`. +- There are 3 firing modes: 1 battery, 2 batteries, and full barrage. Lowest setting is for low-heat sustained fire. Highest setting is for maximizing damage at the expense of much faster heat build-up and battery drain rate. +- Batteries are cycled after each shot to deplete them evenly. +- If the heat bar turns orange, vent the gun or you will get set on fire. +--- + +### NS3-Cr.Kt +- The NS3-Cr.KT is a battery powered, single shot pistol. +- The loadout code is `tny`. +- Alternate Black Gloves sprites are included in the addon. Simply remove the `BG - ` from the sprite name and override. +--- + +### Nyx +- The Nyx is a .355 select fire pistol. +- The loadout codes are `nyx`, `nxm` for weapon and magazines, respectively. +- Alternate Black Gloves sprites are included in the addon. Simply remove the `BG - ` from the sprite name and override. + +### PD-42 +--- +- The PD-42 is an integrally suppressed 4.26mm PDW with select fire (Semi, Hyper-Burst™️, and Full Auto) and a 36 round mag. +- Loadout Code is `pd4` and `436` for the weapon and magazines, respectively. +- Loadout Configuration Code `slugger` for a variant with an under barrels single shot slug launcher. +- Alternate Black Gloves sprites are included in the addon. Simply remove the `BG - ` from the sprite name and override. + +### Scorpion +--- +- The loadout code is `scr`. + +### Six-12 +--- +- The Six-12 is a 6 shot rotary magazine shotgun. +- Accepts magazines loaded with slugs or regular shells. There is a 1 in 4 chance that when a Six12 spawns it will be loaded with slugs. +- Loadout Codes are `612`, `6sh`, and `6sl` for weapon, shell mag, and slug mag, respectively. +- Loadout Configuration Code `slugs` to have the weapon loaded with slugs on map start. + +### UMP-45 +--- +- The UMP is a .45 select fire submachine gun. +- The loadout codes are `ump`, `umm` for weapon and magazines, respectively. + +### USP-45 +--- +- The USP is a .45 ACP semi auto pistol. +- The loadout codes are `usp`, `usm` for weapon and magazines, respectively. + +### Viper +--- +- The loadout codes are `vpr`, `50m`, and `50r` for weapon, mag, and rounds, respectively. +- Configuration codes are: + - `hframe`: Heavier frame. Gun weighs more but has less recoil. + - `extended`: Extended barrel. Higher projectile velocity but heavier gun. + +### Wyvern +--- +- The loadout code is `wyv`. +- Configuration codes are: + - `auto`: Autoloader. Makes reloading from side saddles a bit faster. + +## Items +--- + +### HEV Armor +--- +- HEV Armor is designed to be an effective combat suit built to withstand the elemental hazards of both the Tyrant's forces and the realm from which they came. It's slightly more protective and reliable than Garrison Armor but with added elemental protection at the cost of increased weight and movement speed. +- Loadout code is `hve` to start with the armor equipped. +- Loadout code is `hva` to start with a spare in your inventory. + +## Credits +--- + +### Barracuda +--- +Code: +- Icarus, Accensus + +Sprites: +- First Person Sprites originally by Mr.Enchanter. + +### Bitch +--- +Code: +- Icarus, Accensus + +Sprites: +- Pillowblaster, DoomNukem (From [FinalDoomer](https://forum.zdoom.org/viewtopic.php?t=55061)) + +### Fenris +--- +Sprites: +- World Sprite: Icarus, Railgunner, Sonik.O +- First Person Sprite: Icarus, Dimoshunter +- Muzzle Flashes: Moa Dixon + +Sounds: +- Laser Sounds: Zapsplat.com (firing sound), a1337spy's Insurgency FX for HDest +- Blast and Charge Sounds: Capcom (Mega Man X4) + +### Flamenwerfer-77 +--- +Code: +- Icarus, Accensus, Potetobloke + +Sprites: +- Fuel Canister: Eriance, 3d Realms +- World Sprite: Icarus, Railgunner +- First Person: Icarus, Eriance + +Sounds: +- Dennaton (Hotline Miami 2), Dice (Battlefield 4), and Bethesda (Fallout 3). Compiled by [Magmacow](https://gamebanana.com/sounds/26593). + +### GFB-9 +--- +Code: +- Icarus, Accensus, Sledge, Melodica + +Sprites: +- Icarus, Sonik.O + +Sounds: +- Icarus, Mechadon (Karasawa weapon mod), Doom 2016 + +### NS3-Cr.Kt +--- +Code: +- Accensus, Icarus, Melodica + +Sprites: +- Icarus + +### Nyx +--- +Code: +- Accensus + +Sprites: +- Weapon Sprites: Icarus, Eriance, Gothic, Blox, ClonedPickle, MidoriMan, PillowBlaster, Sonik.o.fan, Captain Nurbles + +Sounds: +- Sounds from various sources, compiled by [Navaro](https://gamebanana.com/sounds/33280). + +### PD-42 +--- +Code: +- Icarus, Accensus, Prettyfist, Sledge + +Sprites: +- Weapon Sprite: Icarus, a1337spy +- Weapon Sights: Bryan, Ultra64, and Clay from [Bryan's Extensions](https://github.com/abramsba/hdest-weapons) +- Pickup sprite: Icarus, Railgunner + +Sounds: +- Fire Sounds: [Seven Zero, SkullBlade](https://gamebanana.com/sounds/16695) +- Reloading Sounds: [!Alex!](https://gamebanana.com/sounds/22068) +- Miscellaneous Sounds: [KenLV, DeathCold](https://gamebanana.com/sounds/50612) + +### Six-12 +--- +Code: +- Icarus, Accensus + +Sprites: +- Weapon Sprites: Icarus, Sonik.O +- World Sprites: Icarus, Railgunner + +Sounds: +- Firing Sound: https://gamebanana.com/skins/124930 +- Mag Sound: https://gamebanana.com/sounds/39196 \ No newline at end of file diff --git a/sounds/Fenris/FENBCHRG.wav b/sounds/Fenris/FENBCHRG.wav new file mode 100644 index 0000000..4dcfd13 Binary files /dev/null and b/sounds/Fenris/FENBCHRG.wav differ diff --git a/sounds/Fenris/FENBPEW.ogg b/sounds/Fenris/FENBPEW.ogg new file mode 100644 index 0000000..b8a7adc Binary files /dev/null and b/sounds/Fenris/FENBPEW.ogg differ diff --git a/sounds/Fenris/FENCHRG.wav b/sounds/Fenris/FENCHRG.wav new file mode 100644 index 0000000..48d3767 Binary files /dev/null and b/sounds/Fenris/FENCHRG.wav differ diff --git a/sounds/Fenris/FENHIT.wav b/sounds/Fenris/FENHIT.wav new file mode 100644 index 0000000..52756f2 Binary files /dev/null and b/sounds/Fenris/FENHIT.wav differ diff --git a/sounds/Fenris/FENLAOD.wav b/sounds/Fenris/FENLAOD.wav new file mode 100644 index 0000000..396d09a Binary files /dev/null and b/sounds/Fenris/FENLAOD.wav differ diff --git a/sounds/Fenris/FENMPTY.wav b/sounds/Fenris/FENMPTY.wav new file mode 100644 index 0000000..a35eeb7 Binary files /dev/null and b/sounds/Fenris/FENMPTY.wav differ diff --git a/sounds/Fenris/FENPEWW.wav b/sounds/Fenris/FENPEWW.wav new file mode 100644 index 0000000..efea587 Binary files /dev/null and b/sounds/Fenris/FENPEWW.wav differ diff --git a/sounds/Fenris/FENULOD.wav b/sounds/Fenris/FENULOD.wav new file mode 100644 index 0000000..7b66167 Binary files /dev/null and b/sounds/Fenris/FENULOD.wav differ diff --git a/sounds/Fenris/ICBLKBRK.ogg b/sounds/Fenris/ICBLKBRK.ogg new file mode 100644 index 0000000..b7655d7 Binary files /dev/null and b/sounds/Fenris/ICBLKBRK.ogg differ diff --git a/Sounds/Flamenwerfer 77/FLMRBLST.wav b/sounds/Flamenwerfer 77/FLMRBLST.wav similarity index 100% rename from Sounds/Flamenwerfer 77/FLMRBLST.wav rename to sounds/Flamenwerfer 77/FLMRBLST.wav diff --git a/Sounds/Flamenwerfer 77/FLMRCIN.wav b/sounds/Flamenwerfer 77/FLMRCIN.wav similarity index 100% rename from Sounds/Flamenwerfer 77/FLMRCIN.wav rename to sounds/Flamenwerfer 77/FLMRCIN.wav diff --git a/Sounds/Flamenwerfer 77/FLMRCOT.wav b/sounds/Flamenwerfer 77/FLMRCOT.wav similarity index 100% rename from Sounds/Flamenwerfer 77/FLMRCOT.wav rename to sounds/Flamenwerfer 77/FLMRCOT.wav diff --git a/Sounds/Flamenwerfer 77/FLMRLOOP.wav b/sounds/Flamenwerfer 77/FLMRLOOP.wav similarity index 100% rename from Sounds/Flamenwerfer 77/FLMRLOOP.wav rename to sounds/Flamenwerfer 77/FLMRLOOP.wav diff --git a/Sounds/Flamenwerfer 77/FLMRSTOP.wav b/sounds/Flamenwerfer 77/FLMRSTOP.wav similarity index 100% rename from Sounds/Flamenwerfer 77/FLMRSTOP.wav rename to sounds/Flamenwerfer 77/FLMRSTOP.wav diff --git a/Sounds/Flamenwerfer 77/FLMRSTRT.wav b/sounds/Flamenwerfer 77/FLMRSTRT.wav similarity index 100% rename from Sounds/Flamenwerfer 77/FLMRSTRT.wav rename to sounds/Flamenwerfer 77/FLMRSTRT.wav diff --git a/sounds/GFB-9/GFBCHUM.ogg b/sounds/GFB-9/GFBCHUM.ogg new file mode 100644 index 0000000..3880a68 Binary files /dev/null and b/sounds/GFB-9/GFBCHUM.ogg differ diff --git a/sounds/GFB-9/GFBFIRE.ogg b/sounds/GFB-9/GFBFIRE.ogg new file mode 100644 index 0000000..f102f4a Binary files /dev/null and b/sounds/GFB-9/GFBFIRE.ogg differ diff --git a/sounds/GFB-9/GFBIMPA.ogg b/sounds/GFB-9/GFBIMPA.ogg new file mode 100644 index 0000000..031ecaa Binary files /dev/null and b/sounds/GFB-9/GFBIMPA.ogg differ diff --git a/sounds/Nyx/NYXFIRE.wav b/sounds/Nyx/NYXFIRE.wav new file mode 100644 index 0000000..5a2b8d6 Binary files /dev/null and b/sounds/Nyx/NYXFIRE.wav differ diff --git a/sounds/Nyx/NYXMAGI.wav b/sounds/Nyx/NYXMAGI.wav new file mode 100644 index 0000000..af0734d Binary files /dev/null and b/sounds/Nyx/NYXMAGI.wav differ diff --git a/sounds/Nyx/NYXMAGO.wav b/sounds/Nyx/NYXMAGO.wav new file mode 100644 index 0000000..bbbbbf8 Binary files /dev/null and b/sounds/Nyx/NYXMAGO.wav differ diff --git a/sounds/Nyx/NYXSLDB.wav b/sounds/Nyx/NYXSLDB.wav new file mode 100644 index 0000000..6b48b16 Binary files /dev/null and b/sounds/Nyx/NYXSLDB.wav differ diff --git a/sounds/Nyx/NYXSLDF.wav b/sounds/Nyx/NYXSLDF.wav new file mode 100644 index 0000000..6fe89ab Binary files /dev/null and b/sounds/Nyx/NYXSLDF.wav differ diff --git a/Sounds/PD-42/PDFBLTBK.wav b/sounds/PD-42/PDFBLTBK.wav similarity index 100% rename from Sounds/PD-42/PDFBLTBK.wav rename to sounds/PD-42/PDFBLTBK.wav diff --git a/Sounds/PD-42/PDFFIRE.wav b/sounds/PD-42/PDFFIRE.wav similarity index 100% rename from Sounds/PD-42/PDFFIRE.wav rename to sounds/PD-42/PDFFIRE.wav diff --git a/Sounds/PD-42/PDFMAGIN.wav b/sounds/PD-42/PDFMAGIN.wav similarity index 100% rename from Sounds/PD-42/PDFMAGIN.wav rename to sounds/PD-42/PDFMAGIN.wav diff --git a/Sounds/PD-42/PDFMAGOT.wav b/sounds/PD-42/PDFMAGOT.wav similarity index 100% rename from Sounds/PD-42/PDFMAGOT.wav rename to sounds/PD-42/PDFMAGOT.wav diff --git a/Sounds/Six12/STLVMGIN.wav b/sounds/Six12/STLVMGIN.wav similarity index 100% rename from Sounds/Six12/STLVMGIN.wav rename to sounds/Six12/STLVMGIN.wav diff --git a/Sounds/Six12/STLVMGOT.wav b/sounds/Six12/STLVMGOT.wav similarity index 100% rename from Sounds/Six12/STLVMGOT.wav rename to sounds/Six12/STLVMGOT.wav diff --git a/Sounds/Six12/SXTWLVFR.wav b/sounds/Six12/SXTWLVFR.wav similarity index 100% rename from Sounds/Six12/SXTWLVFR.wav rename to sounds/Six12/SXTWLVFR.wav diff --git a/sounds/UMP/UMPFIRE.wav b/sounds/UMP/UMPFIRE.wav new file mode 100644 index 0000000..952fd53 Binary files /dev/null and b/sounds/UMP/UMPFIRE.wav differ diff --git a/sounds/UMP/UMPMAGI.wav b/sounds/UMP/UMPMAGI.wav new file mode 100644 index 0000000..1cd32bc Binary files /dev/null and b/sounds/UMP/UMPMAGI.wav differ diff --git a/sounds/UMP/UMPMAGO.wav b/sounds/UMP/UMPMAGO.wav new file mode 100644 index 0000000..a1aec7e Binary files /dev/null and b/sounds/UMP/UMPMAGO.wav differ diff --git a/sounds/UMP/UMPSLDB.wav b/sounds/UMP/UMPSLDB.wav new file mode 100644 index 0000000..9cea126 Binary files /dev/null and b/sounds/UMP/UMPSLDB.wav differ diff --git a/sounds/UMP/UMPSLDF.wav b/sounds/UMP/UMPSLDF.wav new file mode 100644 index 0000000..7185239 Binary files /dev/null and b/sounds/UMP/UMPSLDF.wav differ diff --git a/sounds/USP/USPFIRE.wav b/sounds/USP/USPFIRE.wav new file mode 100644 index 0000000..f21be3c Binary files /dev/null and b/sounds/USP/USPFIRE.wav differ diff --git a/sounds/USP/USPMAGI.wav b/sounds/USP/USPMAGI.wav new file mode 100644 index 0000000..a813b29 Binary files /dev/null and b/sounds/USP/USPMAGI.wav differ diff --git a/sounds/USP/USPMAGO.wav b/sounds/USP/USPMAGO.wav new file mode 100644 index 0000000..1d2f377 Binary files /dev/null and b/sounds/USP/USPMAGO.wav differ diff --git a/sounds/USP/USPSLDB.wav b/sounds/USP/USPSLDB.wav new file mode 100644 index 0000000..1afafb4 Binary files /dev/null and b/sounds/USP/USPSLDB.wav differ diff --git a/sounds/USP/USPSLDF.wav b/sounds/USP/USPSLDF.wav new file mode 100644 index 0000000..d5d974c Binary files /dev/null and b/sounds/USP/USPSLDF.wav differ diff --git a/sprites/Bitch/BCHGZ0.png b/sprites/Bitch/BCHGZ0.png new file mode 100644 index 0000000..174adc2 Binary files /dev/null and b/sprites/Bitch/BCHGZ0.png differ diff --git a/sprites/Fenris/BXPLA0.png b/sprites/Fenris/BXPLA0.png new file mode 100644 index 0000000..d665c22 Binary files /dev/null and b/sprites/Fenris/BXPLA0.png differ diff --git a/sprites/Fenris/BXPLB0.png b/sprites/Fenris/BXPLB0.png new file mode 100644 index 0000000..d529d14 Binary files /dev/null and b/sprites/Fenris/BXPLB0.png differ diff --git a/sprites/Fenris/BXPLC0.png b/sprites/Fenris/BXPLC0.png new file mode 100644 index 0000000..5756f10 Binary files /dev/null and b/sprites/Fenris/BXPLC0.png differ diff --git a/sprites/Fenris/BXPLD0.png b/sprites/Fenris/BXPLD0.png new file mode 100644 index 0000000..d8dd27e Binary files /dev/null and b/sprites/Fenris/BXPLD0.png differ diff --git a/sprites/Fenris/BXPLE0.png b/sprites/Fenris/BXPLE0.png new file mode 100644 index 0000000..d20bf5c Binary files /dev/null and b/sprites/Fenris/BXPLE0.png differ diff --git a/sprites/Fenris/BXPLF0.png b/sprites/Fenris/BXPLF0.png new file mode 100644 index 0000000..58ea5d7 Binary files /dev/null and b/sprites/Fenris/BXPLF0.png differ diff --git a/sprites/Fenris/BXPLG0.png b/sprites/Fenris/BXPLG0.png new file mode 100644 index 0000000..946afeb Binary files /dev/null and b/sprites/Fenris/BXPLG0.png differ diff --git a/sprites/Fenris/BXPLH0.png b/sprites/Fenris/BXPLH0.png new file mode 100644 index 0000000..da4bb44 Binary files /dev/null and b/sprites/Fenris/BXPLH0.png differ diff --git a/sprites/Fenris/BXPLI0.png b/sprites/Fenris/BXPLI0.png new file mode 100644 index 0000000..d62e500 Binary files /dev/null and b/sprites/Fenris/BXPLI0.png differ diff --git a/sprites/Fenris/BXPLJ0.png b/sprites/Fenris/BXPLJ0.png new file mode 100644 index 0000000..6f70c00 Binary files /dev/null and b/sprites/Fenris/BXPLJ0.png differ diff --git a/sprites/Fenris/BXPLK0.png b/sprites/Fenris/BXPLK0.png new file mode 100644 index 0000000..83bcc46 Binary files /dev/null and b/sprites/Fenris/BXPLK0.png differ diff --git a/sprites/Fenris/BXPLL0.png b/sprites/Fenris/BXPLL0.png new file mode 100644 index 0000000..f739449 Binary files /dev/null and b/sprites/Fenris/BXPLL0.png differ diff --git a/sprites/Fenris/BXPLM0.png b/sprites/Fenris/BXPLM0.png new file mode 100644 index 0000000..3f9480c Binary files /dev/null and b/sprites/Fenris/BXPLM0.png differ diff --git a/sprites/Fenris/SNBLA0.png b/sprites/Fenris/SNBLA0.png new file mode 100644 index 0000000..4b868bd Binary files /dev/null and b/sprites/Fenris/SNBLA0.png differ diff --git a/sprites/Fenris/SNBLB0.png b/sprites/Fenris/SNBLB0.png new file mode 100644 index 0000000..2a308c0 Binary files /dev/null and b/sprites/Fenris/SNBLB0.png differ diff --git a/sprites/Fenris/SNBLC0.png b/sprites/Fenris/SNBLC0.png new file mode 100644 index 0000000..58b4326 Binary files /dev/null and b/sprites/Fenris/SNBLC0.png differ diff --git a/sprites/GFB-9/GFBNZ0.png b/sprites/GFB-9/GFBNZ0.png new file mode 100644 index 0000000..0b8fc66 Binary files /dev/null and b/sprites/GFB-9/GFBNZ0.png differ diff --git a/sprites/NCT/NCTFA0.png b/sprites/NCT/NCTFA0.png new file mode 100644 index 0000000..0a2e7ff Binary files /dev/null and b/sprites/NCT/NCTFA0.png differ diff --git a/sprites/NCT/NCTFB0.png b/sprites/NCT/NCTFB0.png new file mode 100644 index 0000000..30521fa Binary files /dev/null and b/sprites/NCT/NCTFB0.png differ diff --git a/sprites/NCT/NCTGA0.png b/sprites/NCT/NCTGA0.png new file mode 100644 index 0000000..1b44ab9 Binary files /dev/null and b/sprites/NCT/NCTGA0.png differ diff --git a/sprites/NCT/NCTPA0.png b/sprites/NCT/NCTPA0.png new file mode 100644 index 0000000..713a1c6 Binary files /dev/null and b/sprites/NCT/NCTPA0.png differ diff --git a/sprites/PD-42/PDFFA0.png b/sprites/PD-42/PDFFA0.png new file mode 100644 index 0000000..65f9d3f Binary files /dev/null and b/sprites/PD-42/PDFFA0.png differ diff --git a/sprites/PD-42/PDFFB0.png b/sprites/PD-42/PDFFB0.png new file mode 100644 index 0000000..41a411a Binary files /dev/null and b/sprites/PD-42/PDFFB0.png differ diff --git a/sprites/PD-42/PDFGA0.png b/sprites/PD-42/PDFGA0.png new file mode 100644 index 0000000..0e05bd0 Binary files /dev/null and b/sprites/PD-42/PDFGA0.png differ diff --git a/sprites/PD-42/PDFGB0.png b/sprites/PD-42/PDFGB0.png new file mode 100644 index 0000000..b19052c Binary files /dev/null and b/sprites/PD-42/PDFGB0.png differ diff --git a/sprites/PD-42/PDFSA0.png b/sprites/PD-42/PDFSA0.png new file mode 100644 index 0000000..f77a32e Binary files /dev/null and b/sprites/PD-42/PDFSA0.png differ diff --git a/sprites/PD-42/PDFSB0.png b/sprites/PD-42/PDFSB0.png new file mode 100644 index 0000000..fa5a69a Binary files /dev/null and b/sprites/PD-42/PDFSB0.png differ diff --git a/sprites/Six12/STBEA0.png b/sprites/Six12/STPEA0.png similarity index 100% rename from sprites/Six12/STBEA0.png rename to sprites/Six12/STPEA0.png diff --git a/sprites/Six12/STSEA0.png b/sprites/Six12/STSEA0.png deleted file mode 100644 index a26c652..0000000 Binary files a/sprites/Six12/STSEA0.png and /dev/null differ diff --git a/zscript.zs b/zscript.zs index 5f5ed29..c0488e0 100644 --- a/zscript.zs +++ b/zscript.zs @@ -1,8 +1,40 @@ version "4.10" -#include "zscript/HEV Armor/hevArmor.zs" -#include "zscript/PD-42/pd42.zs" -#include "zscript/Barracuda/barracuda.zs" -#include "zscript/Flamenwerfer 77/flamenwerfer77.zs" -#include "zscript/Frontiersman/frontiersman.zs" -#include "zscript/Six12/six12.zs" +const HDLD_BARRACUDA = "ace"; +const HDLD_BITCH = "bch"; +const HDLD_FENRIS = "cfl"; +const HDLD_FLAMENWERFER77 = "fw7"; +const HDLD_FRONTIERSMAN = "fm7"; +const HDLD_GASTANK = "gas"; +const HDLD_GFB9 = "gfb"; +const HDLD_HEVARMOUR = "hve"; +const HDLD_HEVARMOURSPARE = "hva"; +const HDLD_NCT = "tny"; +const HDLD_NYX = "nyx"; +const HDLD_NYX_MAG = "nxm"; +const HDLD_PD4 = "pd4"; +const HDLD_PD4MAG = "436"; +const HDLD_SIX12 = "612"; +const HDLD_SIX12MAG_SHELL = "6sh"; +const HDLD_SIX12MAG_SLUG = "6sl"; +const HDLD_UMP = "ump"; +const HDLD_UMPMAG = "umm"; +const HDLD_USP = "usp"; +const HDLD_USPMAG = "usm"; + +#include "zscript/icarus/SpawnHandler.zs" + +#include "zscript/icarus/items/HEV Armor/hevArmor.zs" + +#include "zscript/icarus/weapons/Barracuda/barracuda.zs" +#include "zscript/icarus/weapons/Bitch/bitch.zs" +#include "zscript/icarus/weapons/Fenris/fenris.zs" +#include "zscript/icarus/weapons/Flamenwerfer 77/flamenwerfer77.zs" +#include "zscript/icarus/weapons/Frontiersman/frontiersman.zs" +#include "zscript/icarus/weapons/GFB-9/gfb9.zs" +#include "zscript/icarus/weapons/NCT/nct.zs" +#include "zscript/icarus/weapons/Nyx/nyx.zs" +#include "zscript/icarus/weapons/PD-42/pd42.zs" +#include "zscript/icarus/weapons/Six12/six12.zs" +#include "zscript/icarus/weapons/UMP/ump.zs" +#include "zscript/icarus/weapons/USP/usp.zs" \ No newline at end of file diff --git a/zscript/PD-42/pd42.zs b/zscript/PD-42/pd42.zs deleted file mode 100644 index 229e45f..0000000 --- a/zscript/PD-42/pd42.zs +++ /dev/null @@ -1,686 +0,0 @@ -class PDFourHandler : EventHandler -{ - override void CheckReplacement(ReplaceEvent e) - { - if (!e.Replacement) - { - return; - } - - switch (e.Replacement.GetClassName()) - { - case 'ClipBoxPickup': - if (random[pdfrand]() <= AceCore.GetScaledChance(16, 64, acl_spawnscale_min, acl_spawnscale_max)) - { - e.Replacement = randompick[pdfrand](0,0,0,0,1) ? "PDFourRandom" : "HDPDFourMag"; - } - break; - } - } - - override void WorldThingSpawned(WorldEvent e) - { - let PDFourAmmo = HDAmmo(e.Thing); - if (!PDFourAmmo) - { - return; - } - - switch (PDFourAmmo.GetClassName()) - { - case 'FourMilAmmo': - case 'HDSlugAmmo': - PDFourAmmo.ItemsThatUseThis.Push("HDPDFour"); - break; - } - } -} - -class HDPDFour : HDWeapon -{ - enum PDFourFlags - { - PDF_JustUnload = 1, - PDF_SlugLoaded = 2, - PDF_SlugLauncher = 4 - } - - enum PDFourProperties - { - PDProp_Flags, - PDProp_Chamber, - PDProp_Mag, - PDProp_Mode, - PDProp_Dot - } - - override void PostBeginPlay() - { - weaponspecial = 1337; // [Ace] UaS sling compatibility. - Super.PostBeginPlay(); - } - override void Tick() - { - Super.Tick(); - if (!(WeaponStatus[PDProp_Flags] & PDF_SlugLauncher) && WeaponStatus[PDProp_Flags] & PDF_SlugLoaded) - { - WeaponStatus[PDProp_Flags] &= ~PDF_SlugLoaded; - Actor ptr = owner ? owner : Actor(self); - ptr.A_SpawnItemEx('HDSlugAmmo', cos(ptr.pitch) * 10, 0, ptr.height - 10 - 10 * sin(ptr.pitch), ptr.vel.x, ptr.vel.y, ptr.vel.z, 0, SXF_ABSOLUTEMOMENTUM | SXF_NOCHECKPOSITION | SXF_TRANSFERPITCH); - ptr.A_StartSound("weapons/huntrackdown", CHAN_WEAPON, CHANF_OVERLAP); - } - } - - override bool AddSpareWeapon(actor newowner) { return AddSpareWeaponRegular(newowner); } - override HDWeapon GetSpareWeapon(actor newowner, bool reverse, bool doselect) { return GetSpareWeaponRegular(newowner, reverse, doselect); } - override double GunMass() - { - double BaseMass = 6; - if (WeaponStatus[PDProp_Flags] & PDF_SlugLauncher) - { - BaseMass += 1; - } - return BaseMass + 0.03 * WeaponStatus[PDProp_Mag]; - } - - override double WeaponBulk() - { - double BaseBulk = 80; - int Mag = WeaponStatus[PDProp_Mag]; - if (Mag >= 0) - { - BaseBulk += HDPDFourMag.EncMagLoaded + Mag * ENC_426_LOADED; - } - if (WeaponStatus[PDProp_Flags] & PDF_SlugLauncher) - { - BaseBulk += 5; - } - if (WeaponStatus[PDProp_Flags] & PDF_SlugLoaded) - { - BaseBulk += ENC_SHELLLOADED; - } - return BaseBulk; - } - - override string, double GetPickupSprite() - { - string IconString = ""; - if (WeaponStatus[PDProp_Mag] > 0) - { - IconString = WeaponStatus[PDProp_Flags] & PDF_SlugLauncher ? "PDWSY0" : "PDWGY0"; - } - else - { - IconString = WeaponStatus[PDProp_Flags] & PDF_SlugLauncher ? "PDWSZ0" : "PDWGZ0"; - } - return IconString, 1.0; - } - - override void InitializeWepStats(bool idfa) - { - WeaponStatus[PDProp_Chamber] = 1; - WeaponStatus[PDProp_Mag] = HDPDFourMag.MagCapacity; - if (WeaponStatus[PDProp_Flags] & PDF_SlugLauncher) - { - WeaponStatus[PDProp_Flags] |= PDF_SlugLoaded; - } - } - - override void LoadoutConfigure(string input) - { - if (GetLoadoutVar(input, "slugger", 1) > 0) - { - WeaponStatus[PDProp_Flags] |= PDF_SlugLauncher; - } - - InitializeWepStats(); - } - - override string GetHelpText() - { - return WEPHELP_FIRESHOOT - ..(WeaponStatus[PDProp_Flags] & PDF_SlugLauncher ? WEPHELP_ALTFIRE.. " Fire Slug Thrower\n" : "") - ..(WeaponStatus[PDProp_Flags] & PDF_SlugLauncher ? WEPHELP_ALTRELOAD.. " Load Slug Thrower\n" : "") - ..(WeaponStatus[PDProp_Flags] & PDF_SlugLauncher ? WEPHELP_FIREMODE.."+"..WEPHELP_UNLOAD.. " Unload Slug Thrower\n" : "") - ..WEPHELP_RELOAD.." Reload mag\n" - ..WEPHELP_UNLOADUNLOAD - ..WEPHELP_FIREMODE.." Semi Auto/Double Tap/Full Auto\n" - ..WEPHELP_MAGMANAGER; - } - - override string PickupMessage() - { - string SlugString = WeaponStatus[PDProp_Flags] & PDF_SlugLauncher ? " with an Under-Barrel Slug Thrower" : ""; - return String.Format("You picked up the PD-42 4mm PDW%s.", SlugString); - } - override void DrawHUDStuff(HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl) - { - if (sb.HudLevel == 1) - { - int NextMagLoaded = sb.GetNextLoadMag(HDMagAmmo(hpl.findinventory("HDPDFourMag"))); - if (NextMagLoaded >= HDPDFourMag.MagCapacity) - { - sb.DrawImage("PDMGA0", (-46, -3),sb. DI_SCREEN_CENTER_BOTTOM, scale: (1.0, 1.0)); - } - else if (NextMagLoaded <= 0) - { - sb.DrawImage("PDMGB0", (-46, -3), sb.DI_SCREEN_CENTER_BOTTOM, alpha: NextMagLoaded ? 0.6 : 1.0, scale: (1.0, 1.0)); - } - else - { - sb.DrawBar("PDMGNORM", "PDMGGREY", NextMagLoaded, HDPDFourMag.MagCapacity, (-46, -3), -1, sb.SHADER_VERT, sb.DI_SCREEN_CENTER_BOTTOM); - } - sb.DrawNum(hpl.CountInv('HDPDFourMag'), -43, -8, sb.DI_SCREEN_CENTER_BOTTOM); - - if (hdw.WeaponStatus[PDProp_Flags] & PDF_SlugLauncher) - { - sb.DrawImage("SLG1A0",(-59, -8), sb.DI_SCREEN_CENTER_BOTTOM, scale: (0.6, 0.6)); - sb.DrawNum(hpl.CountInv('HDSlugAmmo'), -58, -8, sb.DI_SCREEN_CENTER_BOTTOM); - } - } - sb.DrawWepNum(hdw.WeaponStatus[PDProp_Mag], HDPDFourMag.MagCapacity); - - if (hdw.WeaponStatus[PDProp_Chamber] == 1) - { - sb.DrawRect(-19, -11, 3, 1); - } - if (hdw.WeaponStatus[PDProp_Flags] & PDF_SlugLoaded) - { - sb.DrawRect(-20, -15, 4, 2.6); - } - - sb.DrawWepCounter(hdw.WeaponStatus[PDProp_Mode], -22, -10, "RBRSA3A7", "STBURAUT", "STFULAUT"); - } - - override void SetReflexReticle(int which) { weaponstatus[PDProp_Dot] = which; } - override void DrawSightPicture(HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl, bool sightbob, vector2 bob, double fov, bool scopeview, actor hpc, string whichdot) - { - double dotoff = max(abs(bob.x), abs(bob.y)); - if (dotoff < 6) - { - string whichdot = sb.ChooseReflexReticle(hdw.WeaponStatus[PDProp_Dot]); - sb.DrawImage(whichdot, (0, 0) + bob * 3, sb.DI_SCREEN_CENTER | sb.DI_ITEM_CENTER, alpha : 0.8 - dotoff * 0.04, col:0xFF000000 | sb.crosshaircolor.GetInt()); - } - sb.DrawImage("PDWBACK", (0, -18) + bob, sb.DI_SCREEN_CENTER | sb.DI_ITEM_TOP, scale: (0.8, 0.8)); - } - - override void DropOneAmmo(int amt) - { - if (owner) - { - double OldAngle = owner.angle; - - amt = clamp(amt, 1, 10); - if (owner.CheckInventory('FourMilAmmo', 1)) - { - owner.A_DropInventory('FourMilAmmo', amt * 30); - } - else - { - owner.A_DropInventory('HDPDFourMag', amt); - } - - owner.angle += 15; - if (owner.CheckInventory('HDSlugAmmo', 1)) - { - owner.A_DropInventory('HDSlugAmmo', amt * 4); - } - - owner.angle = OldAngle; - } - } - - private int BurstIndex; - - Default - { - +HDWEAPON.FITSINBACKPACK - Weapon.SelectionOrder 300; - Weapon.SlotNumber 4; - Weapon.SlotPriority 3; - HDWeapon.BarrelSize 20,0.5,1; - Scale 0.45; - Tag "PD-42 4mm PDW"; - HDWeapon.Refid "pd4"; - HDWeapon.Loadoutcodes " - \cuslugger - Under-Barrel Slug Thrower"; - } - - States - { - Spawn: - PDWS Y 0 NoDelay A_JumpIf(invoker.WeaponStatus[PDProp_Flags] & PDF_SlugLauncher, 2); - PDWG Y 0; - #### # -1 - { - frame = (invoker.WeaponStatus[PDProp_Mag] == -1 ? 25 : 24); - } - Stop; - Ready: - PDFG A 1 - { - if (JustPressed(BT_FIREMODE)) - { - ++invoker.WeaponStatus[PDProp_Mode] %= 3; - } - invoker.BurstIndex = 0; - A_WeaponReady(WRF_ALL & ~WRF_ALLOWUSER2); - } - Goto ReadyEnd; - Select0: - PDFG A 0; - Goto Select0Small; - Deselect0: - PDFG A 0; - Goto Deselect0Small; - User3: - PDFG A 0 A_MagManager("HDPDFourMag"); - Goto Ready; - - Fire: - PDFF A 0 - { - if (invoker.WeaponStatus[PDProp_Chamber] == 0) - { - SetWeaponState('ChamberManual'); - return; - } - } - PDFF A 1 - { - HDBulletActor.FireBullet(self, "HDB_426", speedfactor: 0.9); - A_AlertMonsters(HDCONST_ONEMETRE * 15); - A_ZoomRecoil(0.95); - A_StartSound("PD42/Fire", CHAN_WEAPON); - invoker.WeaponStatus[PDProp_Chamber] = 0; - HDFlashAlpha(-200); - A_Light1(); - } - PDFF A 0 - { - if (invoker.WeaponStatus[PDProp_Mode] == 1) - { - A_MuzzleClimb(-frandom(-0.7, 0.7), -frandom(0.8, 1.2)); - } - else - { - A_MuzzleClimb(-frandom(-0.5, 0.5), -frandom(0.6, 0.8), -frandom(-0.5, 0.5), -frandom(0.6, 0.8)); - } - } - PDFG A 0 - { - A_WeaponOffset(0, 35); - if (invoker.WeaponStatus[PDProp_Mag] > 0) - { - invoker.WeaponStatus[PDProp_Chamber] = 1; - invoker.WeaponStatus[PDProp_Mag]--; - } - if (invoker.WeaponStatus[PDProp_Mode] == 2) - { - A_SetTics(2); - } - A_WeaponReady(WRF_NOFIRE); - } - PDFG A 0 - { - switch (invoker.WeaponStatus[PDProp_Mode]) - { - case 1: - { - if (invoker.BurstIndex < 2) - { - invoker.BurstIndex++; - A_Refire('Fire'); - } - break; - } - case 2: - { - A_Refire('Fire'); - break; - } - } - } - Goto Nope; - - AltFire: - PDFG A 0 A_JumpIf(!(invoker.WeaponStatus[PDProp_Flags] & PDF_SlugLoaded), 'Nope'); - PDFF B 2 - { - A_WeaponOffset(0, 36); - HDBulletActor.FireBullet(self, "HDB_SLUG", speedfactor: 0.65); - invoker.WeaponStatus[PDProp_Flags] &= ~PDF_SlugLoaded; - A_AlertMonsters(); - A_StartSound("weapons/hunter", CHAN_WEAPON); - A_ZoomRecoil(0.95); - } - PDFG A 2 A_MuzzleClimb(-frandom(-0.5, 0.5), -frandom(1.5, 2.0), -frandom(-0.6, 0.6), -frandom(1.5, 2.0)); - Goto Nope; - - Unload: - PDFG A 0 - { - invoker.WeaponStatus[PDProp_Flags] |= PDF_JustUnload; - if (PressingFiremode() && invoker.WeaponStatus[PDProp_Flags] & PDF_SlugLoaded) - { - SetWeaponState('UnloadST'); - Return; - } - if (invoker.WeaponStatus[PDProp_Mag] >= 0) - { - SetWeaponState('UnMag'); - } - else if (invoker.WeaponStatus[PDProp_Chamber] > 0) - { - SetWeaponState('UnloadChamber'); - } - } - Goto Nope; - UnloadChamber: - PDFG A 1 A_JumpIf(invoker.WeaponStatus[PDProp_Chamber] == 0, "Nope"); - PDFG A 4 Offset(2, 34) - { - A_StartSound("PD42/BoltPull", 8); - } - PDFG A 6 Offset(1, 36) - { - class Which = invoker.WeaponStatus[PDProp_Chamber] > 1 ? "FourMilAmmo" : "ZM66DroppedRound"; - invoker.WeaponStatus[PDProp_Chamber] = 0; - A_SpawnItemEx(which, cos(pitch) * 10, 0, height - 8 - sin(pitch) * 10, vel.x, vel.y, vel.z, 0, SXF_ABSOLUTEMOMENTUM | SXF_NOCHECKPOSITION | SXF_TRANSFERPITCH); - } - PDFG A 2 Offset(0, 34); - Goto ReadyEnd; - - AltReload: - PDFG A 0 - { - invoker.WeaponStatus[PDProp_Flags] &= ~PDF_JustUnload; - if (invoker.WeaponStatus[PDProp_Flags] & PDF_SlugLauncher && !(invoker.WeaponStatus[PDProp_Flags] & PDF_SlugLoaded) && CheckInventory('HDSlugAmmo', 1)) - { - SetWeaponState('UnloadST'); - } - } - Goto Nope; - UnloadST: - PDFG A 0 - { - A_SetCrosshair(21); - A_MuzzleClimb(-0.3, -0.3); - } - #### A 2 Offset(0, 34); - #### A 1 Offset(4, 38) A_MuzzleClimb(-0.3,-0.3); - #### A 2 Offset(8, 48) - { - A_StartSound("weapons/huntrackdown", CHAN_WEAPON, CHANF_OVERLAP); - A_MuzzleClimb(-0.3, -0.3); - - if (invoker.WeaponStatus[PDProp_Flags] & PDF_SlugLoaded) - { - A_StartSound("weapons/huntreload", CHAN_WEAPON); - } - } - #### A 4 Offset(10, 49) - { - if (!(invoker.WeaponStatus[PDProp_Flags] & PDF_SlugLoaded)) - { - if (invoker.WeaponStatus[PDProp_Flags] & PDF_JustUnload) - { - A_SetTics(3); - } - return; - } - invoker.WeaponStatus[PDProp_Flags] &= ~PDF_SlugLoaded; - if(!PressingUnload() || A_JumpIfInventory('HDSlugAmmo', 0, 'Null')) - { - A_SpawnItemEx('HDSlugAmmo', cos(pitch) * 10, 0, height - 10 - 10 * sin(pitch), vel.x, vel.y, vel.z, 0, SXF_ABSOLUTEMOMENTUM | SXF_NOCHECKPOSITION | SXF_TRANSFERPITCH); - } - else - { - A_SetTics(20); - A_StartSound("weapons/pocket", CHAN_WEAPON, CHANF_OVERLAP); - A_GiveInventory('HDSlugAmmo', 1); - A_MuzzleClimb(frandom(0.8, -0.2), frandom(0.4, -0.2)); - } - } - #### A 0 A_JumpIf(invoker.WeaponStatus[PDProp_Flags] & PDF_JustUnload, 'ReloadEndST'); - LoadST: - PDFG A 2 Offset(10, 50) A_StartSound("weapons/pocket", CHAN_WEAPON, CHANF_OVERLAP); - #### A 5 Offset(10, 50) A_MuzzleClimb(frandom(-0.2, 0.8), frandom(-0.2, 0.4)); - #### A 10 Offset(8, 50) - { - A_TakeInventory('HDSlugAmmo', 1, TIF_NOTAKEINFINITE); - invoker.WeaponStatus[PDProp_Flags] |= PDF_SlugLoaded; - A_StartSound("weapons/huntreload", CHAN_WEAPON); - } - ReloadEndST: - PDFG A 4 Offset(4, 44) A_StartSound("weapons/huntrackdown", CHAN_WEAPON); - #### A 1 Offset(0, 40); - #### A 1 Offset(0, 34) A_MuzzleClimb(frandom(-2.4, 0.2), frandom(-1.4, 0.2)); - Goto Nope; - - Reload: - PDFG A 0 - { - invoker.WeaponStatus[PDProp_Flags] &=~ PDF_JustUnload; - bool NoMags = HDMagAmmo.NothingLoaded(self, "HDPDFourMag"); - int Mag = invoker.WeaponStatus[PDProp_Mag]; - if (Mag >= HDPDFourMag.MagCapacity || Mag < HDPDFourMag.MagCapacity && NoMags) - { - SetWeaponState("Nope"); - } - } - Goto UnMag; - - ChamberManual: - PDFG A 0 A_JumpIf(invoker.WeaponStatus[PDProp_Mag] <= 0 || invoker.WeaponStatus[PDProp_Chamber] == 1, "Nope"); - PDFG A 2 Offset(2, 34); - PDFG A 2 Offset(3, 38) A_StartSound("PD42/BoltPull", 8, CHANF_OVERLAP); - PDFG A 3 Offset(4, 44) - { - if (invoker.WeaponStatus[PDProp_Chamber] == 1) - { - A_SpawnItemEx("ZM66DroppedRound", cos(pitch) * 10, 0, height - 10 - sin(pitch) * 10, vel.x, vel.y, vel.z, 0, SXF_ABSOLUTEMOMENTUM | SXF_NOCHECKPOSITION | SXF_TRANSFERPITCH); - invoker.WeaponStatus[PDProp_Chamber] = 0; - } - - A_WeaponBusy(); - invoker.WeaponStatus[PDProp_Mag]--; - invoker.WeaponStatus[PDProp_Chamber] = 1; - } - PDFG A 1 Offset(3, 38); - PDFG A 1 Offset(2, 34); - PDFG A 1 Offset(0, 32); - Goto Nope; - - UnMag: - #### A 1 Offset(0,34) A_SetCrosshair(21); - #### A 1 Offset(5,38); - #### A 1 Offset(10,42); - #### A 2 Offset(20,46) A_StartSound("weapons/smgmagclick",8); - #### A 4 Offset(30,52) - { - A_MuzzleClimb(0.3,0.4); - A_StartSound("PD42/MagOut",8,CHANF_OVERLAP); - } - #### A 0 - { - int magamt=invoker.WeaponStatus[PDProp_Mag]; - if(magamt<0) - { - SetWeaponState("magout"); - return; - } - invoker.WeaponStatus[PDProp_Mag]=-1; - if ((!PressingUnload()&&!PressingReload())||A_JumpIfInventory("HDPDFourMag",0,"null")) - { - HDMagAmmo.SpawnMag(self,"HDPDFourMag",magamt); - SetWeaponState("magout"); - } - else - { - HDMagAmmo.GiveMag(self,"HDPDFourMag",magamt); - A_StartSound("weapons/pocket",9); - SetWeaponState("pocketmag"); - } - } - PocketMag: - #### AA 7 Offset(34,54) - { - A_MuzzleClimb(frandom(0.2, -0.8), frandom(-0.2, 0.4)); - } - MagOut: - #### A 0 - { - if(invoker.WeaponStatus[PDProp_Flags] & PDF_JustUnload) - { - SetWeaponState("reloadend"); - } - else - { - SetWeaponState("loadmag"); - } - } - LoadMag: - PDFG A 0 A_StartSound("weapons/pocket", 9); - PDFG A 6 Offset(26, 54) A_MuzzleClimb(frandom(0.2, -0.8), frandom(-0.2, 0.4)); - PDFG A 7 Offset(26, 52) A_MuzzleClimb(frandom(0.2, -0.8), frandom(-0.2, 0.4)); - PDFG A 10 Offset(24, 50); - PDFG A 3 Offset(24, 48) - { - let Mag = HDMagAmmo(FindInventory("HDPDFourMag")); - if (Mag) - { - invoker.WeaponStatus[PDProp_Mag] = Mag.TakeMag(true); - A_StartSound("PD42/MagIn", 8, CHANF_OVERLAP); - } - } - Goto ReloadEnd; - - ReloadEnd: - PDFG A 3 Offset(30, 52); - PDFG A 2 Offset(20, 46); - PDFG A 1 Offset(10, 42); - PDFG A 1 Offset(5, 38); - PDFG A 1 Offset(0, 34); - Goto ChamberManual; - } -} - -class PDFourRandom : IdleDummy -{ - States - { - Spawn: - TNT1 A 0 NoDelay - { - A_SpawnItemEx('HDPDFourMag', -3,flags: SXF_NOCHECKPOSITION); - A_SpawnItemEx('HDPDFourMag', 3,flags: SXF_NOCHECKPOSITION); - let wpn = HDPDFour(Spawn('HDPDFour', pos, ALLOW_REPLACE)); - if (!wpn) - { - return; - } - - HDF.TransferSpecials(self, wpn); - - if (!random(0, 2)) - { - wpn.WeaponStatus[wpn.PDProp_Flags] |= wpn.PDF_SlugLauncher; - A_SpawnItemEx('SlugPickup', -6,flags: SXF_NOCHECKPOSITION); - } - wpn.InitializeWepStats(false); - } - Stop; - } -} - -class HDPDFourMag : HDMagAmmo -{ - override string, string, name, double GetMagSprite(int thismagamt) - { - return (thismagamt > 0) ? "PDMGA0" : "PDMGB0", "RBRSBRN", "FourMilAmmo", 1.0; - } - - override void GetItemsThatUseThis() - { - ItemsThatUseThis.Push("HDPDFour"); - } - - const MagCapacity = 36; - const EncMagEmpty = 6; - const EncMagLoaded = EncMagEmpty * 0.8; - - Default - { - HDMagAmmo.MaxPerUnit MagCapacity; - HDMagAmmo.InsertTime 8; - HDMagAmmo.ExtractTime 6; - HDMagAmmo.RoundType "FourMilAmmo"; - HDMagAmmo.RoundBulk ENC_426_LOADED; - HDMagAmmo.MagBulk EncMagEmpty; - Tag "PD-42 magazine"; - Inventory.PickupMessage "Picked up a PD-42 magazine."; - HDPickup.RefId "436"; - Scale 0.35; - } - - override bool Extract() - { - SyncAmount(); - int mindex = Mags.Size() - 1; - if (mindex == -1 || Mags[mindex] < 1 || owner.A_JumpIfInventory(roundtype, 0, "null")) - { - return false; - } - ExtractTime = GetDefaultByType(GetClass()).extracttime; - int toTake = min(random(1, 24), mags[mindex]); - if (toTake < HDPickup.MaxGive(owner, roundtype, roundbulk)) - { - HDF.Give(owner, roundtype, totake); - } - else - { - HDPickup.DropItem(owner, roundtype, totake); - } - owner.A_StartSound("weapons/rifleclick2", CHAN_WEAPON); - owner.A_StartSound("weapons/rockreload", CHAN_WEAPON, CHANF_OVERLAP, 0.4); - Mags[mindex] -= totake; - return true; - } - - override bool Insert() - { - SyncAmount(); - int mindex = Mags.Size() - 1; - if (mindex == -1 || Mags[Mags.Size() - 1] >= MaxPerUnit || owner.CountInv(roundtype) == 0) - { - return false; - } - owner.A_TakeInventory(roundtype, 1, TIF_NOTAKEINFINITE); - owner.A_StartSound("weapons/rifleclick2", 7); - if (random(0,100) <= 10) - { - owner.A_StartSound("weapons/bigcrack", 8, CHANF_OVERLAP); - owner.A_SpawnItemEx("WallChunk", 12, 0, owner.height - 12, 4, frandom(-2, 2), frandom(2, 4)); - return false; - } - owner.A_StartSound("weapons/pocket", 9, volume: frandom(0.1, 0.6)); - Mags[mindex]++; - return true; - } - - States - { - Spawn: - PDMG A -1; - Stop; - SpawnEmpty: - PDMG B -1 - { - bROLLSPRITE = true; - bROLLCENTER = true; - roll = randompick(0, 0, 0, 0, 2, 2, 2, 2, 1, 3) * 90; - } - Stop; - } -} diff --git a/zscript/icarus/SpawnHandler.zs b/zscript/icarus/SpawnHandler.zs new file mode 100644 index 0000000..f5048e5 --- /dev/null +++ b/zscript/icarus/SpawnHandler.zs @@ -0,0 +1,479 @@ +// Struct for itemspawn information. +class IcarusSpawnItem play { + // ID by string for spawner + string spawnName; + + // ID by string for spawnees + Array spawnReplaces; + + // Whether or not to persistently spawn. + bool isPersistent; + + // Whether or not to replace the original item. + bool replaceItem; + + string toString() { + + let replacements = "["; + + foreach (spawnReplace : spawnReplaces) replacements = replacements..", "..spawnReplace.toString(); + + replacements = replacements.."]"; + + return String.format("{ spawnName=%s, spawnReplaces=%s, isPersistent=%b, replaceItem=%b }", spawnName, replacements, isPersistent, replaceItem); + } +} + +class IcarusSpawnItemEntry play { + string name; + int chance; + + string toString() { + return String.format("{ name=%s, chance=%s }", name, chance >= 0 ? "1/"..(chance + 1) : "never"); + } +} + +// Struct for passing useinformation to ammunition. +class IcarusSpawnAmmo play { + // ID by string for the header ammo. + string ammoName; + + // ID by string for weapons using that ammo. + Array weaponNames; + + string toString() { + + let weapons = "["; + + foreach (weaponName : weaponNames) weapons = weapons..", "..weaponName; + + weapons = weapons.."]"; + + return String.format("{ ammoName=%s, weaponNames=%s }", ammoName, weapons); + } +} + + + +// One handler to rule them all. +class IcarusWepsHandler : EventHandler { + + // List of persistent classes to completely ignore. + // This -should- mean this mod has no performance impact. + static const string blacklist[] = { + 'HDSmoke', + 'BloodTrail', + 'CheckPuff', + 'WallChunk', + 'HDBulletPuff', + 'HDFireballTail', + 'ReverseImpBallTail', + 'HDSmokeChunk', + 'ShieldSpark', + 'HDFlameRed', + 'HDMasterBlood', + 'PlantBit', + 'HDBulletActor', + 'HDLadderSection' + }; + + // List of CVARs for Backpack Spawns + array > backpackBlacklist; + + // Cache of Ammo Box Loot Table + private HDAmBoxList ammoBoxList; + + // List of weapon-ammo associations. + // Used for ammo-use association on ammo spawn (happens very often). + array ammoSpawnList; + + // List of item-spawn associations. + // used for item-replacement on mapload. + array itemSpawnList; + + bool cvarsAvailable; + + // appends an entry to itemSpawnList; + void addItem(string name, Array replacees, bool persists, bool rep=true) { + + if (hd_debug) { + + let msg = "Adding "..(persists ? "Persistent" : "Non-Persistent").." Replacement Entry for "..name..": ["; + + foreach (replacee : replacees) msg = msg..", "..replacee.toString(); + + console.printf(msg.."]"); + } + + // Creates a new struct; + IcarusSpawnItem spawnee = IcarusSpawnItem(new('IcarusSpawnItem')); + + // Populates the struct with relevant information, + spawnee.spawnName = name; + spawnee.isPersistent = persists; + spawnee.replaceItem = rep; + spawnee.spawnReplaces.copy(replacees); + + // Pushes the finished struct to the array. + itemSpawnList.push(spawnee); + } + + IcarusSpawnItemEntry addItemEntry(string name, int chance) { + // Creates a new struct; + IcarusSpawnItemEntry spawnee = IcarusSpawnItemEntry(new('IcarusSpawnItemEntry')); + spawnee.name = name; + spawnee.chance = chance; + return spawnee; + } + + // appends an entry to ammoSpawnList; + void addAmmo(string name, Array weapons) { + + if (hd_debug) { + let msg = "Adding Ammo Association Entry for "..name..": ["; + + foreach (weapon : weapons) msg = msg..", "..weapon; + + console.printf(msg.."]"); + } + + // Creates a new struct; + IcarusSpawnAmmo spawnee = IcarusSpawnAmmo(new('IcarusSpawnAmmo')); + spawnee.ammoName = name; + spawnee.weaponNames.copy(weapons); + + // Pushes the finished struct to the array. + ammoSpawnList.push(spawnee); + } + + + // Populates the replacement and association arrays. + void init() { + + cvarsAvailable = true; + + //----------------- + // Backpack Spawns + //----------------- + + if (!barracuda_allowBackpacks) backpackBlacklist.push((Class)('HDBarracuda')); + if (!bitch_allowBackpacks) backpackBlacklist.push((Class)('HDBitch')); + if (!fenris_allowBackpacks) backpackBlacklist.push((Class)('HDFenris')); + if (!flamenwerfer_allowBackpacks) backpackBlacklist.push((Class)('HDFlamethrower')); + if (!frontiersman_allowBackpacks) backpackBlacklist.push((Class)('HDFrontier')); + if (!gfb9_allowBackpacks) backpackBlacklist.push((Class)('HDGFBlaster')); + if (!nct_allowBackpacks) backpackBlacklist.push((Class)('HDNCT')); + if (!nyx_allowBackpacks) backpackBlacklist.push((Class)('HDNyx')); + if (!pd42_allowBackpacks) backpackBlacklist.push((Class)('HDPDFour')); + if (!six12_allowBackpacks) backpackBlacklist.push((Class)('HDSix12')); + if (!ump45_allowBackpacks) backpackBlacklist.push((Class)('HDUMP')); + if (!usp45_allowBackpacks) backpackBlacklist.push((Class)('HDUSP')); + + if (!gastank_allowBackpacks) backpackBlacklist.push((Class)('HDGasTank')); + if (!nyxmag_allowBackpacks) backpackBlacklist.push((Class)('HDNyxMag')); + if (!pd42mag_allowBackpacks) backpackBlacklist.push((Class)('HDPDFourMag')); + if (!six12shellmag_allowBackpacks) backpackBlacklist.push((Class)('HDSix12MagShells')); + if (!six12slugmag_allowBackpacks) backpackBlacklist.push((Class)('HDSix12MagSlugs')); + if (!ump45mag_allowBackpacks) backpackBlacklist.push((Class)('HDUMPMag')); + if (!usp45mag_allowBackpacks) backpackBlacklist.push((Class)('HDUSPMag')); + + + //------------ + // Ammunition + //------------ + + // .355 + Array wep_355; + wep_355.push('HDNyx'); + addAmmo('HDRevolverAmmo', wep_355); + + // .45 ACP + Array wep_45acp; + wep_45acp.push('HDUMP'); + wep_45acp.push('HDUSP'); + addAmmo('HD45ACPAmmo', wep_45acp); + + // 12 gauge Buckshot Ammo. + Array wep_12gaShell; + wep_12gaShell.push('HDBarracuda'); + wep_12gaShell.push('HDSix12'); + addAmmo('HDShellAmmo', wep_12gaShell); + + // 12 gauge Slug Ammo. + Array wep_12gaSlug; + wep_12gaSlug.push('HDBarracuda'); + wep_12gaSlug.push('HDPDFour'); + wep_12gaSlug.push('HDSix12'); + addAmmo('HDSlugAmmo', wep_12gaSlug); + + // 4mm + Array wep_4mm; + wep_4mm.push('HDBitch'); + wep_4mm.push('HDPDFour'); + addAmmo('FourMilAmmo', wep_4mm); + + // Rocket (Gyro) Grenades. + Array wep_rocket; + wep_rocket.push('HDBitch'); + addAmmo('HDRocketAmmo', wep_rocket); + + // Gas Tank + Array wep_gastank; + wep_gastank.push('HDFlamethrower'); + addAmmo('HDGasTank', wep_gastank); + + // HDBattery. + Array wep_battery; + wep_battery.push('HDFenris'); + wep_battery.push('HDNCT'); + addAmmo('HDBattery', wep_battery); + + // 7mm + Array wep_7mm; + wep_7mm.push('HDFrontier'); + addAmmo('SevenMilAmmo', wep_7mm); + + + //------------ + // Weaponry + //------------ + + // Barracuda + Array spawns_barracuda; + spawns_barracuda.push(addItemEntry('Hunter', barracuda_hunter_spawn_bias)); + spawns_barracuda.push(addItemEntry('Slayer', barracuda_slayer_spawn_bias)); + addItem('BarracudaRandom', spawns_barracuda, barracuda_persistent_spawning); + + // Bitch LMG + Array spawns_bitch; + spawns_bitch.push(addItemEntry('Vulcanette', bitch_chaingun_spawn_bias)); + addItem('BitchRandom', spawns_bitch, bitch_persistent_spawning); + + // Fenris + Array spawns_fenris; + spawns_fenris.push(addItemEntry('Thunderbuster', fenris_thunderbuster_spawn_bias)); + addItem('FenrisRandom', spawns_fenris, fenris_persistent_spawning); + + // Flamenwerfer77 + Array spawns_flamenwerfer; + spawns_flamenwerfer.push(addItemEntry('HDRL', flamenwerfer_launcher_spawn_bias)); + spawns_flamenwerfer.push(addItemEntry('BFG9K', flamenwerfer_bfg_spawn_bias)); + addItem('FlamethrowerSpawner', spawns_flamenwerfer, flamenwerfer_persistent_spawning); + + // Frontiersman + Array spawns_frontiersman; + spawns_frontiersman.push(addItemEntry('Hunter', frontiersman_hunter_spawn_bias)); + spawns_frontiersman.push(addItemEntry('Slayer', frontiersman_slayer_spawn_bias)); + // spawns_frontiersman.push(addItemEntry('HdAmBoxUnarmed', frontiersman_clipbox_spawn_bias)); + // spawns_frontiersman.push(addItemEntry('HdAmBox', frontiersman_clipbox_spawn_bias)); + addItem('FrontierSpawner', spawns_frontiersman, frontiersman_persistent_spawning); + + // GFBlaster + Array spawns_gfb9; + spawns_gfb9.push(addItemEntry('HDPistol', gfb9_pistol_spawn_bias)); + addItem('GFBlasterRandom', spawns_gfb9, gfb9_persistent_spawning); + + // NCT + Array spawns_nct; + spawns_nct.push(addItemEntry('BFG9K', nct_bfg_spawn_bias)); + addItem('NCTRandom', spawns_nct, nct_persistent_spawning); + + // Nyx + Array spawns_nyx; + spawns_nyx.push(addItemEntry('HDPistol', nyx_pistol_spawn_bias)); + spawns_nyx.push(addItemEntry('Hunter', nyx_hunter_spawn_bias)); + addItem('NyxRandom', spawns_nyx, nyx_persistent_spawning); + + // PD-42 + Array spawns_pd42; + spawns_pd42.push(addItemEntry('HDAmBoxUnarmed', pd42_clipbox_spawn_bias)); + spawns_pd42.push(addItemEntry('HdAmBox', pd42_clipbox_spawn_bias)); + addItem('PDFourRandom', spawns_pd42, pd42_persistent_spawning); + + // Six-12 + Array spawns_six12; + spawns_six12.push(addItemEntry('Hunter', six12_hunter_spawn_bias)); + spawns_six12.push(addItemEntry('Slayer', six12_slayer_spawn_bias)); + addItem('Six12Random', spawns_six12, six12_persistent_spawning); + + // UMP + Array spawns_ump; + spawns_ump.push(addItemEntry('HDAmBoxUnarmed', ump45_clipbox_spawn_bias)); + spawns_ump.push(addItemEntry('HdAmBox', ump45_clipbox_spawn_bias)); + addItem('UMPrandom', spawns_ump, ump45_persistent_spawning); + + // USP + Array spawns_usp; + spawns_usp.push(addItemEntry('HDPistol', usp45_pistol_spawn_bias)); + addItem('USPRandom', spawns_usp, usp45_persistent_spawning); + + + //------------ + // Ammunition + //------------ + + // Flamenwerfer Gas Tank + Array spawns_gastank; + spawns_gastank.push(addItemEntry('RocketAmmo', gastank_rocket_spawn_bias)); + spawns_gastank.push(addItemEntry('RocketBigPickup', gastank_rocketbox_spawn_bias)); + spawns_gastank.push(addItemEntry('HDBattery', gastank_battery_spawn_bias)); + addItem('HDGasTank', spawns_gastank, gastank_persistent_spawning); + + // Nyx Magazine + Array spawns_nyxmag; + spawns_nyxmag.push(addItemEntry('ShellBoxPickup', nyxmag_shellbox_spawn_bias)); + spawns_nyxmag.push(addItemEntry('HD9mMag15', nyxmag_clipmag_spawn_bias)); + addItem('HDNyxMag', spawns_nyxmag, nyxmag_persistent_spawning); + + // PD-42 Magazine + Array spawns_pd42mag; + spawns_pd42mag.push(addItemEntry('HD4mMag', pd42mag_clipmag_spawn_bias)); + addItem('HDPDFourMag', spawns_pd42mag, pd42mag_persistent_spawning); + + // Six-12 Shell Magazine + Array spawns_six12shellmag; + spawns_six12shellmag.push(addItemEntry('ShellPickup', six12shellmag_shell_spawn_bias)); + addItem('HDSix12MagShells', spawns_six12shellmag, six12shellmag_persistent_spawning); + + // Six-12 Slug Magazine + Array spawns_six12slugmag; + spawns_six12slugmag.push(addItemEntry('SlugPickup', six12slugmag_slug_spawn_bias)); + addItem('HDSix12MagSlugs', spawns_six12slugmag, six12slugmag_persistent_spawning); + + // UMP Magazine + Array spawns_umpmag; + spawns_umpmag.push(addItemEntry('HD4mMag', ump45mag_clipmag_spawn_bias)); + addItem('HDUMPMag', spawns_umpmag, ump45mag_persistent_spawning); + + // USP Magazine + Array spawns_uspmag; + spawns_uspmag.push(addItemEntry('HD9mMag15', usp45mag_clipmag_spawn_bias)); + addItem('HDUSPMag', spawns_uspmag, usp45mag_persistent_spawning); + + + // -------------------- + // Item Spawns + // -------------------- + + // HEV Armor + Array spawns_hevarmour; + spawns_hevarmour.push(addItemEntry('HDArmour', hevarmour_spawn_bias)); + addItem('HEVArmour', spawns_hevarmour, hevarmour_persistent_spawning); + } + + // Random stuff, stores it and forces negative values just to be 0. + bool giveRandom(int chance) { + if (chance > -1) { + let result = random(0, chance); + + if (hd_debug) console.printf("Rolled a "..(result + 1).." out of "..(chance + 1)); + + return result == 0; + } + + return false; + } + + // Tries to create the item via random spawning. + bool tryCreateItem(Actor thing, string spawnName, int chance, bool rep) { + if (giveRandom(chance)) { + if (Actor.Spawn(spawnName, thing.pos) && rep) { + if (hd_debug) console.printf(thing.getClassName().." -> "..spawnName); + + thing.destroy(); + + return true; + } + } + + return false; + } + + override void worldLoaded(WorldEvent e) { + + // Populates the main arrays if they haven't been already. + if (!cvarsAvailable) init(); + + foreach (bl : backpackBlacklist) { + if (hd_debug) console.printf("Removing "..bl.getClassName().." from Backpack Spawn Pool"); + + BPSpawnPool.removeItem(bl); + } + } + + override void worldThingSpawned(WorldEvent e) { + + // If thing spawned doesn't exist, quit + if (!e.thing) return; + + // If thing spawned is blacklisted, quit + foreach (bl : blacklist) if (e.thing is bl) return; + + string candidateName = e.thing.getClassName(); + + // Pointers for specific classes. + let ammo = HDAmmo(e.thing); + + // If the thing spawned is an ammunition, add any and all items that can use this. + if (ammo) handleAmmoUses(ammo, candidateName); + + // Return if range before replacing things. + if (level.MapName == 'RANGE') return; + + if (e.thing is 'HDAmBox') { + handleAmmoBoxLootTable(); + } else { + handleWeaponReplacements(e.thing, ammo, candidateName); + } + } + + private void handleAmmoBoxLootTable() { + if (!ammoBoxList) { + ammoBoxList = HDAmBoxList.Get(); + + foreach (bl : backpackBlacklist) { + let index = ammoBoxList.invClasses.find(bl.getClassName()); + + if (index != ammoBoxList.invClasses.Size()) { + if (hd_debug) console.printf("Removing "..bl.getClassName().." from Ammo Box Loot Table"); + + ammoBoxList.invClasses.Delete(index); + } + } + } + } + + private void handleAmmoUses(HDAmmo ammo, string candidateName) { + foreach (ammoSpawn : ammoSpawnList) if (candidateName ~== ammoSpawn.ammoName) { + if (hd_debug) { + console.printf("Adding the following to the list of items that use "..ammo.getClassName()..""); + foreach (weapon : ammoSpawn.weaponNames) console.printf("* "..weapon); + } + + ammo.itemsThatUseThis.append(ammoSpawn.weaponNames); + } + } + + private void handleWeaponReplacements(Actor thing, HDAmmo ammo, string candidateName) { + + // Checks if the level has been loaded more than 1 tic. + bool prespawn = !(level.maptime > 1); + + // Iterates through the list of item candidates for e.thing. + foreach (itemSpawn : itemSpawnList) { + + // if an item is owned or is an ammo (doesn't retain owner ptr), + // do not replace it. + let item = Inventory(thing); + if ((prespawn || itemSpawn.isPersistent) && (!(item && item.owner) && (!ammo || prespawn))) { + foreach (spawnReplace : itemSpawn.spawnReplaces) { + if (spawnReplace.name ~== candidateName) { + if (hd_debug) console.printf("Attempting to replace "..candidateName.." with "..itemSpawn.spawnName.."..."); + + if (tryCreateItem(thing, itemSpawn.spawnName, spawnReplace.chance, itemSpawn.replaceItem)) return; + } + } + } + } + } +} diff --git a/zscript/HEV Armor/hevArmor.zs b/zscript/icarus/items/HEV Armor/hevArmor.zs similarity index 95% rename from zscript/HEV Armor/hevArmor.zs rename to zscript/icarus/items/HEV Armor/hevArmor.zs index dc901e1..c17ae64 100644 --- a/zscript/HEV Armor/hevArmor.zs +++ b/zscript/icarus/items/HEV Armor/hevArmor.zs @@ -1,31 +1,3 @@ -Class HEVArmorHandler : EventHandler -{ - Override Void CheckReplacement(ReplaceEvent e) - { - if (!e.Replacement) - { - return; - } - - switch (e.Replacement.GetClassName()) - { - case 'BattleArmour': - if (random[hevrand]() <= 48) - { - e.Replacement = "HEVArmour"; - } - break; - - case 'GarrisonArmour': - if (random[hevrand]() <= 48) - { - e.Replacement = "HEVArmour"; - } - break; - } - } -} - CONST HDCONST_HEVARMOUR = 107; CONST ENC_HEVARMOUR = 530; @@ -35,9 +7,9 @@ Class HDHEVArmour : HDArmour { HDMagAmmo.MaxPerUnit HDCONST_HEVARMOUR; HDMagAmmo.MagBulk ENC_HEVARMOUR; - Tag "HEV Armor"; + Tag "$TAG_HEVARMOUR"; Inventory.Icon "HEVAA0"; - Inventory.PickupMessage "Picked up the Hazardous Environment Armor."; + Inventory.PickupMessage "$PICKUP_HEVARMOUR"; } Override Void AddAMag(int AddAmt) @@ -203,7 +175,7 @@ Class HDHEVArmourWorn : HDArmourWorn { +inventory.isarmor inventory.maxAmount 1; - Tag "HEV Armor"; + Tag "$TAG_HEVARMOUR"; HDDamageHandler.priority 0; HDPickup.WornLayer STRIP_ARMOUR; } @@ -525,9 +497,9 @@ Class HEVArmour : HDPickupGiver inventory.Icon "HEVAA0"; hdpickupgiver.pickuptogive "HDHEVArmour"; hdpickup.bulk ENC_HEVARMOUR; - hdpickup.refid "hva"; - tag "HEV Armor (spare)"; - inventory.PickupMessage "Picked up the Hazardous Environment Armor."; + hdpickup.refid HDLD_HEVARMOURSPARE; + tag "$TAG_HEVARMOURSPARE"; + inventory.PickupMessage "$PICKUP_HEVARMOUR"; } Override Void configureactualpickup() @@ -547,8 +519,8 @@ Class HEVArmourWorn : HDPickup +missilemore -hdpickup.fitsinbackpack +inventory.isarmor - hdpickup.refid "hve"; - tag "HEV Armor"; + hdpickup.refid HDLD_HEVARMOUR; + tag "$TAG_HEVARMOUR"; inventory.maxAmount 1; } diff --git a/zscript/Barracuda/barracuda.zs b/zscript/icarus/weapons/Barracuda/barracuda.zs similarity index 94% rename from zscript/Barracuda/barracuda.zs rename to zscript/icarus/weapons/Barracuda/barracuda.zs index 6a35d77..e4d9a13 100644 --- a/zscript/Barracuda/barracuda.zs +++ b/zscript/icarus/weapons/Barracuda/barracuda.zs @@ -1,42 +1,3 @@ -class BarracudaHandler : EventHandler -{ - override void CheckReplacement(ReplaceEvent e) - { - if (!e.Replacement) - { - return; - } - - switch (e.Replacement.GetClassName()) - { - case 'SSGReplaces': - if (random[barracrand]() <= AceCore.GetScaledChance(-6, 12, acl_spawnscale_min, acl_spawnscale_max)) - { - e.Replacement = "BarracudaRandom"; - } - break; - } - } - - override void WorldThingSpawned(WorldEvent e) - { - let BarracudaAmmo = HDAmmo(e.Thing); - if (!BarracudaAmmo) - { - return; - } - switch (BarracudaAmmo.GetClassName()) - { - case 'HDSlugAmmo': - case 'HDShellAmmo': - case 'HDSix12MagSlugs': - case 'HDSix12MagShells': - BarracudaAmmo.ItemsThatUseThis.Push("HDBarracuda"); - break; - } - } -} - class HDBarracuda : HDSix12 { enum BarracudaFlags @@ -95,6 +56,11 @@ class HDBarracuda : HDSix12 invoker.WeaponStatus[BRProp_MagType] &= ~(1 << which); } } + + override string PickupMessage() + { + return Stringtable.localize("$PICKUP_BARRACUDA_PREFIX")..Stringtable.localize("$TAG_BARRACUDA")..Stringtable.localize("$PICKUP_BARRACUDA_SUFFIX"); + } override string, double GetPickupSprite() { @@ -267,9 +233,8 @@ class HDBarracuda : HDSix12 Weapon.SlotPriority 3; HDWeapon.BarrelSize 24, 1, 2; Scale 0.5; - Tag "Barracuda"; - HDWeapon.Refid "ace"; - Inventory.PickupMessage "You picked up the Barracuda. Watch out. It's got a bite!"; + Tag "$TAG_BARRACUDA"; + HDWeapon.Refid HDLD_BARRACUDA; HDWeapon.Loadoutcodes " \culslugs - Left Magzine loaded with Slugs \curslugs - Right Magazine loaded with Slugs"; diff --git a/zscript/icarus/weapons/Bitch/bitch.zs b/zscript/icarus/weapons/Bitch/bitch.zs new file mode 100644 index 0000000..bf2dbe0 --- /dev/null +++ b/zscript/icarus/weapons/Bitch/bitch.zs @@ -0,0 +1,483 @@ +class HDBitch : HDWeapon +{ + enum BitchFlags + { + BTF_JustUnload = 1, + BTF_RapidFire = 2, + BTF_GrenadeLoaded = 4, + BTF_GL = 8 + } + + enum BitchProperties + { + BTProp_Flags, + BTProp_Chamber, + BTProp_Mode, + BTProp_Heat + } + + override void PostBeginPlay() + { + weaponspecial = 1337; + Super.PostBeginPlay(); + } + + override void tick() + { + super.tick(); + drainheat(BTProp_Heat, 1); + if(WeaponStatus[BTProp_Heat] > 50 && !(level.time % 35)) + { + if(owner)owner.damagemobj(owner, owner, random(1, 3), "electrical"); + } + + if (!(WeaponStatus[BTProp_Flags] & BTF_GL) && WeaponStatus[BTProp_Flags] & BTF_GrenadeLoaded) + { + WeaponStatus[BTProp_Flags] &= ~BTF_GrenadeLoaded; + Actor ptr = owner ? owner : Actor(self); + ptr.A_SpawnItemEx('HDRocketAmmo', cos(ptr.pitch) * 10, 0, ptr.height - 10 - 10 * sin(ptr.pitch), ptr.vel.x, ptr.vel.y, ptr.vel.z, 0, SXF_ABSOLUTEMOMENTUM | SXF_NOCHECKPOSITION | SXF_TRANSFERPITCH); + ptr.A_StartSound("weapons/grenopen", CHAN_WEAPON); + } + } + + override bool AddSpareWeapon(actor newowner) { return AddSpareWeaponRegular(newowner); } + override HDWeapon GetSpareWeapon(actor newowner, bool reverse, bool doselect) { return GetSpareWeaponRegular(newowner, reverse, doselect); } + override double GunMass() + { + double BaseMass = 8.5; + if (WeaponStatus[BTProp_Flags] & BTF_GL) + { + BaseMass += 1.5; + } + if (WeaponStatus[BTProp_Flags] & BTF_GrenadeLoaded) + { + BaseMass += 1; + } + return BaseMass; + } + + override double WeaponBulk() + { + double BaseBulk = 110; + if (WeaponStatus[BTProp_Flags] & BTF_GL) + { + BaseBulk += 25; + } + if (WeaponStatus[BTProp_Flags] & BTF_GrenadeLoaded) + { + BaseBulk += ENC_ROCKETLOADED; + } + return BaseBulk; + } + + override string PickupMessage() + { + string RapidStr = WeaponStatus[BTProp_Flags] & BTF_RapidFire ? Stringtable.localize("$PICKUP_BITCH_RAPID") : ""; + string GLString = WeaponStatus[BTProp_Flags] & BTF_GL ? Stringtable.localize("$PICKUP_BITCH_GL") : ""; + + return Stringtable.localize("$PICKUP_BITCH_PREFIX")..RapidStr..Stringtable.Localize("$TAG_BITCH")..GLString..Stringtable.localize("$PICKUP_BITCH_SUFFIX"); + } + + override string, double GetPickupSprite() + { + return WeaponStatus[BTProp_Flags] & BTF_GL ? "BCHGY0" : "BCHGZ0", 1.0; + } + + override void LoadoutConfigure(string input) + { + if (GetLoadoutVar(input, "rapid", 1) > 0) + { + WeaponStatus[BTProp_Flags] |= BTF_RapidFire; + } + if (GetLoadoutVar(input, "gl", 1) > 0) + { + WeaponStatus[BTProp_Flags] |= BTF_GL; + } + + InitializeWepStats(false); + } + + override void InitializeWepStats(bool idfa) + { + WeaponStatus[BTProp_Chamber] = 1; + if (WeaponStatus[BTProp_Flags] & BTF_GL) + { + WeaponStatus[BTProp_Flags] |= BTF_GrenadeLoaded; + } + } + + override string GetHelpText() + { + return WEPHELP_FIRESHOOT + ..(WeaponStatus[BTProp_Flags] & BTF_GL ? WEPHELP_ALTFIRE.. " Fire GL\n" : "") + ..(WeaponStatus[BTProp_Flags] & BTF_GL ? WEPHELP_ALTRELOAD.. " Load GL\n" : "") + ..(WeaponStatus[BTProp_Flags] & BTF_GL ? WEPHELP_FIREMODE.."+"..WEPHELP_UNLOAD.. " Unload GL\n" : "") + ..WEPHELP_RELOAD.." Reload chamber\n" + ..WEPHELP_MAGMANAGER; + } + + override void DrawHUDStuff(HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl) + { + if (hdw.WeaponStatus[BTProp_Chamber] == 1) + { + sb.DrawRect(-22, -8, 6, 3); + sb.DrawRect(-23, -7, 1, 1); + } + + if (hdw.WeaponStatus[BTProp_Flags] & BTF_GL) + { + sb.DrawImage("ROQPA0",(-50, -4), sb.DI_SCREEN_CENTER_BOTTOM, scale: (0.6, 0.6)); + sb.DrawNum(hpl.CountInv('HDRocketAmmo'), -48, -8, sb.DI_SCREEN_CENTER_BOTTOM); + } + + if (hdw.WeaponStatus[BTProp_Flags] & BTF_GrenadeLoaded) + { + sb.DrawRect(-22, -13, 6, 3); + } + + if (hdw.WeaponStatus[BTProp_Flags] & BTF_RapidFire) + { + sb.DrawWepCounter(hdw.WeaponStatus[BTProp_Mode], -26, -5, "RBRSA3A7", "STBURAUT", "STFULAUT", "STHPRAUT"); + } + else + { + sb.DrawWepCounter(hdw.WeaponStatus[BTProp_Mode], -26, -5, "RBRSA3A7", "STBURAUT", "STFULAUT"); + } + } + + override void DropOneAmmo(int amt) + { + if (owner) + { + double OldAngle = owner.angle; + amt = clamp(amt, 1, 10); + if (owner.CheckInventory('FourMilAmmo', 1)) + { + owner.A_DropInventory('FourMilAmmo', amt * 50); + owner.angle += 15; + } + if (owner.CheckInventory('HDRocketAmmo', 1)) + { + owner.A_DropInventory('HDRocketAmmo', 1); + } + owner.angle = OldAngle; + } + } + + override void DrawSightPicture(HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl, bool sightbob, vector2 bob, double fov, bool scopeview, actor hpc, string whichdot) + { + int cx, cy, cw, ch; + [cx, cy, cw, ch] = Screen.GetClipRect(); + sb.SetClipRect(-16 + bob.x, -4 + bob.y, 32, 16, sb.DI_SCREEN_CENTER); + vector2 bob2 = bob * 2; + bob2.y = clamp(bob2.y, -8, 8); + sb.DrawImage("BCHFRONT", (0, -4) + bob2, sb.DI_SCREEN_CENTER | sb.DI_ITEM_TOP, alpha: 0.9, scale: (0.8, 0.8)); + sb.SetClipRect(cx, cy, cw, ch); + sb.DrawImage("BCHBACK", (0, 2) + bob, sb.DI_SCREEN_CENTER | sb.DI_ITEM_TOP, scale: (0.8, 0.8)); + } + + private action void A_TryLoadChamber() + { + if (invoker.Storage && invoker.Storage.owner == invoker.owner && invoker.Storage.Storage) + { + if (invoker.WeaponStatus[BTProp_Chamber] == 0) + { + if (invoker.AmmoReserve && invoker.AmmoReserve.Amounts.Size() > 0 && invoker.AmmoReserve.Amounts[0] > 0) + { + invoker.Storage.Storage.RemoveItem(invoker.AmmoReserve, null, null, 1); + invoker.WeaponStatus[BTProp_Chamber] = 1; + } + else + { + invoker.AmmoReserve = null; + if (A_FindStorage()) + { + A_TryLoadChamber(); + } + } + } + return; + } + if (A_FindStorage()) + { + A_TryLoadChamber(); + } + } + + private action bool A_FindStorage() + { + for (Inventory Next = Inv; Next; Next = Next.Inv) + { + let bp = HDBackpack(Next); + if (bp && bp.Storage) + { + let nma = bp.Storage.Find('FourMilAmmo'); + if (nma && nma.Amounts.Size() > 0 && nma.Amounts[0] > 0) + { + invoker.AmmoReserve = nma; + invoker.Storage = bp; + return true; + } + } + } + return false; + } + + private HDBackpack Storage; + private StorageItem AmmoReserve; + private int BurstIndex; + transient int OldFireMode; + + Default + { + -HDWEAPON.FITSINBACKPACK + Weapon.SelectionOrder 300; + Weapon.SlotNumber 4; + Weapon.SlotPriority 1.5; + HDWeapon.BarrelSize 25, 2, 4; + Scale 0.75; + Tag "$TAG_BITCH"; + HDWeapon.Refid HDLD_BITCH; + HDWeapon.Loadoutcodes " + \curapid - Fuller Auto Firemode + \cugl - Grenade Launcher"; + } + + States + { + Spawn: + BCHG Y 0 NoDelay A_JumpIf(invoker.WeaponStatus[BTProp_Flags] & BTF_GL, 2); + BCHG Z 0; + #### # -1; + Stop; + Ready: + BCHG A 1 + { + if (JustPressed(BT_FIREMODE)) + { + invoker.OldFireMode = invoker.WeaponStatus[BTProp_Mode]; + int maxMode = invoker.WeaponStatus[BTProp_Flags] & BTF_RapidFire ? 4 : 3; + ++invoker.WeaponStatus[BTProp_Mode] %= maxMode; + } + invoker.BurstIndex = 0; + A_WeaponReady(WRF_ALL & ~WRF_ALLOWUSER2); + } + Goto ReadyEnd; + Select0: + BCHG A 0; + Goto Select0Big; + Deselect0: + BCHG A 0; + Goto Deselect0Big; + + Fire: + BCHG A 1 + { + if (invoker.WeaponStatus[BTProp_Chamber] == 1) + { + SetWeaponState("Shoot"); + return; + } + } + Goto Nope; + Shoot: + BCHG A 1 + { + if (invoker.WeaponStatus[BTProp_Mode] == 1 || invoker.WeaponStatus[BTProp_Mode] == 3) + { + A_SetTics(0); + } + } + BCHF A 2 Bright Offset(0, 34) + { + if (invoker.WeaponStatus[BTProp_Mode] == 1 || invoker.WeaponStatus[BTProp_Mode] == 3) + { + A_SetTics(1); + } + HDBulletActor.FireBullet(self, "HDB_426"); + A_AlertMonsters(); + invoker.WeaponStatus[BTProp_Chamber] = 0; + invoker.WeaponStatus[BTProp_Heat] += random(4, 6); + A_StartSound("weapons/rifle", CHAN_WEAPON, volume: 0.7); + A_ZoomRecoil(1.05); + A_MuzzleClimb(-frandom(-0.24, 0.24), -frandom(0.3, 0.36), -frandom(-0.24, 0.24), -frandom(0.3, 0.36), -frandom(-0.24, 0.24), -frandom(0.3, 0.36)); + A_Light1(); + A_WeaponReady(WRF_NOFIRE); + } + BCHG A 0 + { + if (invoker.WeaponStatus[BTProp_Chamber] <= 0) + A_TryLoadChamber(); + if (invoker.WeaponStatus[BTProp_Heat] > 250 && !random(0, 5)) + { + invoker.WeaponStatus[BTProp_Chamber] = 0; + } + } + BCHG A 0 + { + switch (invoker.WeaponStatus[BTProp_Mode]) + { + case 1: + { + if (invoker.BurstIndex < 2) + { + invoker.BurstIndex++; + A_Refire('Fire'); + } + break; + } + case 2: + { + A_Refire('Fire'); + break; + } + case 3: + { + if (invoker.WeaponStatus[BTProp_Flags] & BTF_RapidFire) + { + A_Refire('Fire'); + break; + } + } + } + } + Goto Nope; + + AltFire: + BCHG A 0 A_JumpIf(!(invoker.WeaponStatus[BTProp_Flags] & BTF_GrenadeLoaded), 'Nope'); + BCHF B 2 Bright + { + A_FireHDGL(); + invoker.WeaponStatus[BTProp_Flags] &= ~BTF_GrenadeLoaded; + A_StartSound("weapons/grenadeshot", CHAN_WEAPON); + A_ZoomRecoil(0.95); + } + BCHG A 2 A_MuzzleClimb(0, 0, 0, 0, -1.2, -3.0, -1.0, -2.8); + Goto Nope; + + Reload: + ChamberManual: + BCHG A 0 A_JumpIf(invoker.WeaponStatus[BTProp_Chamber] == 1, "Nope"); + BCHG A 2 Offset(2, 34); + BCHG A 4 Offset(3, 38) A_StartSound("weapons/rifchamber", 8, CHANF_OVERLAP); + BCHG A 5 Offset(4, 44) + { + A_WeaponBusy(); + if (invoker.WeaponStatus[BTProp_Heat] > 0 && random(0, 4)) + { + invoker.WeaponStatus[BTProp_Chamber] = 0; + } + else A_TryLoadChamber(); + } + BCHG A 2 Offset(3, 38); + BCHG A 2 Offset(2, 34); + BCHG A 2 Offset(0, 32); + Goto Nope; + + Unload: + #### A 0 + { + invoker.WeaponStatus[BTProp_Flags] |= BTF_JustUnload; + if (PressingFiremode() && invoker.WeaponStatus[BTProp_Flags] & BTF_GrenadeLoaded) + { + SetWeaponState('UnloadGL'); + } + } + Goto Nope; + + AltReload: + #### A 0 + { + invoker.WeaponStatus[BTProp_Flags] &= ~BTF_JustUnload; + if (invoker.WeaponStatus[BTProp_Flags] & BTF_GL && !(invoker.WeaponStatus[BTProp_Flags] & BTF_GrenadeLoaded) && CheckInventory("HDRocketAmmo", 1)) + { + SetWeaponState('UnloadGL'); + } + } + Goto Nope; + UnloadGL: + #### A 0 + { + A_SetCrosshair(21); + A_MuzzleClimb(-0.3, -0.3); + } + #### A 2 Offset(0, 34); + #### A 1 Offset(4, 38) A_MuzzleClimb(-0.3,-0.3); + #### A 2 Offset(8, 48) + { + A_StartSound("weapons/grenopen", CHAN_WEAPON, CHANF_OVERLAP); + A_MuzzleClimb(-0.3, -0.3); + + if (invoker.WeaponStatus[BTProp_Flags] & BTF_GrenadeLoaded) + { + A_StartSound("weapons/grenreload", CHAN_WEAPON); + } + } + #### A 8 Offset(10, 49) + { + if (!(invoker.WeaponStatus[BTProp_Flags] & BTF_GrenadeLoaded)) + { + if (invoker.WeaponStatus[BTProp_Flags] & BTF_JustUnload) + { + A_SetTics(3); + } + return; + } + invoker.WeaponStatus[BTProp_Flags] &= ~BTF_GrenadeLoaded; + if(!PressingUnload() || A_JumpIfInventory('HDRocketAmmo', 0, 'Null')) + { + A_SpawnItemEx('HDRocketAmmo', cos(pitch) * 10, 0, height - 10 - 10 * sin(pitch), vel.x, vel.y, vel.z, 0, SXF_ABSOLUTEMOMENTUM | SXF_NOCHECKPOSITION | SXF_TRANSFERPITCH); + } + else + { + A_SetTics(20); + A_StartSound("weapons/pocket", CHAN_WEAPON, CHANF_OVERLAP); + A_GiveInventory('HDRocketAmmo', 1); + A_MuzzleClimb(frandom(0.8, -0.2), frandom(0.4, -0.2)); + } + } + #### A 0 A_JumpIf(invoker.WeaponStatus[BTProp_Flags] & BTF_JustUnload, 'ReloadEndGL'); + LoadGL: + #### A 2 Offset(10, 50) A_StartSound("weapons/pocket", CHAN_WEAPON, CHANF_OVERLAP); + #### AAA 5 Offset(10, 50) A_MuzzleClimb(frandom(-0.2, 0.8), frandom(-0.2, 0.4)); + #### A 15 Offset(8, 50) + { + A_TakeInventory('HDRocketAmmo', 1, TIF_NOTAKEINFINITE); + invoker.WeaponStatus[BTProp_Flags] |= BTF_GrenadeLoaded; + A_StartSound("weapons/grenreload", CHAN_WEAPON); + } + ReloadEndGL: + #### A 4 Offset(4, 44) A_StartSound("weapons/grenopen", CHAN_WEAPON); + #### A 1 Offset(0, 40); + #### A 1 Offset(0, 34) A_MuzzleClimb(frandom(-2.4, 0.2), frandom(-1.4, 0.2)); + Goto Nope; + } +} + +class BitchRandom : IdleDummy +{ + States + { + Spawn: + TNT1 A 0 NoDelay + { + let wpn = HDBitch(Spawn("HDBitch", pos, ALLOW_REPLACE)); + if (!wpn) + { + return; + } + + HDF.TransferSpecials(self, wpn); + if (!random(0, 3)) + { + wpn.WeaponStatus[wpn.BTProp_Flags] |= wpn.BTF_RapidFire; + } + if (!random(0, 3)) + { + wpn.WeaponStatus[wpn.BTProp_Flags] |= wpn.BTF_GL; + } + wpn.InitializeWepStats(false); + } + Stop; + } +} \ No newline at end of file diff --git a/zscript/icarus/weapons/Fenris/fenris.zs b/zscript/icarus/weapons/Fenris/fenris.zs new file mode 100644 index 0000000..9645c16 --- /dev/null +++ b/zscript/icarus/weapons/Fenris/fenris.zs @@ -0,0 +1,560 @@ +class HDFenris : HDCellWeapon +{ + enum FenrisFlags + { + FNF_JustUnload = 1, + FNF_PolyFrame = 2, + FNF_Platinum = 4 + } + + enum FenrisProperties + { + FNProp_Flags, + FNProp_Battery, + FNProp_Charge, + FNProp_Mode + } + + override void PostBeginPlay() + { + weaponspecial = 1337; // [Ace] UaS sling compatibility. + Super.PostBeginPlay(); + } + + override bool AddSpareWeapon(actor newowner) { return AddSpareWeaponRegular(newowner); } + override HDWeapon GetSpareWeapon(actor newowner , bool reverse, bool doselect) { return GetSpareWeaponRegular(newowner, reverse, doselect); } + override double GunMass() + { + return WeaponStatus[FNProp_Battery] >= 0 ? 12 : 11 + + (WeaponStatus[FNProp_Flags] & FNF_PolyFrame ? -2 : 0); + } + override double WeaponBulk() + { + return 175 + + (WeaponStatus[FNProp_Battery] >= 0 ? ENC_BATTERY_LOADED : 0) + + (WeaponStatus[FNProp_Flags] & FNF_PolyFrame ? -30 : 0); + } + + override string PickupMessage() + { + string FraStr = WeaponStatus[FNProp_Flags] & FNF_PolyFrame ? Stringtable.localize("$PICKUP_FENRIS_POLYFRAME") : ""; + string PlaStr = WeaponStatus[FNProp_Flags] & FNF_Platinum ? Stringtable.localize("$PICKUP_FENRIS_PLATINUM") : ""; + + return Stringtable.localize("$PICKUP_FENRIS_PREFIX")..FraStr..Stringtable.localize("$TAG_FENRIS")..PlaStr..Stringtable.localize("$PICKUP_FENRIS_SUFFIX"); + } + + override string, double GetPickupSprite() + { + return WeaponStatus[FNProp_Battery] >= 0 ? "FNRSY0" : "FNRSZ0", 1.0; + } + + override void InitializeWepStats(bool idfa) + { + WeaponStatus[FNProp_Battery] = WeaponStatus[FNProp_Flags] & FNF_Platinum ? 80 : 60; + } + + override void LoadoutConfigure(string input) + { + if (GetLoadoutVar(input, "frame", 1) > 0) + { + WeaponStatus[FNProp_Flags] |= FNF_PolyFrame; + } + + if (GetLoadoutVar(input, "plat", 1) > 0) + { + WeaponStatus[FNProp_Flags] |= FNF_Platinum; + } + + InitializeWepStats(false); + } + + override string GetHelpText() + { + return WEPHELP_FIRE.." Shoot\n" + ..WEPHELP_ALTFIRE.." Launch Snowball\n" + ..WEPHELP_FIREMODE.." Change Firemode\n" + ..WEPHELP_RELOAD.." Load battery\n" + ..WEPHELP_UNLOAD.." Unload battery"; + } + + protected clearscope int GetRealBatteryCharge(bool useUpper) + { + if (WeaponStatus[FNProp_Battery] == -1) + { + return -1; + } + double FracCharge = WeaponStatus[FNProp_Battery] / double(WeaponStatus[FNProp_Flags] & FNF_Platinum ? 4.0 : 3.0); + return int(useUpper ? ceil(FracCharge) : floor(FracCharge)); + } + + override void DrawHUDStuff(HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl) + { + if (sb.HudLevel == 1) + { + sb.DrawBattery(-54, -4, sb.DI_SCREEN_CENTER_BOTTOM, reloadorder: true); + sb.DrawNum(hpl.CountInv("HDBattery"), -46, -8, sb.DI_SCREEN_CENTER_BOTTOM); + } + + sb.DrawWepCounter(hdw.WeaponStatus[FNProp_Mode], -15, -15, "STFULAUT", "RBRSA3A7"); + + int BatteryCharge = GetRealBatteryCharge(true); + if (BatteryCharge > 0) + { + int BatPercent = int((WeaponStatus[FNProp_Battery] / (WeaponStatus[FNProp_Flags] & FNF_Platinum ? 80.0 : 60.0)) * 100); + string Col = "\c[Green]"; + if (BatPercent < 25) + { + Col = "\c[Red]"; + } + else if (BatPercent < 50) + { + Col = "\c[Orange]"; + } + else if (BatPercent < 75) + { + Col = "\c[Yellow]"; + } + sb.DrawString(sb.pSmallFont, Col..BatPercent.."%\c-", (-14, -12), sb.DI_TEXT_ALIGN_RIGHT | sb.DI_SCREEN_CENTER_BOTTOM, Font.CR_DARKGRAY); + } + + else if (BatteryCharge == 0) + { + sb.DrawString(sb.mAmountFont, "00000", (-14, -10), sb.DI_TEXT_ALIGN_RIGHT | sb.DI_TRANSLATABLE | sb.DI_SCREEN_CENTER_BOTTOM, Font.CR_DARKGRAY); + } + } + + override void DrawSightPicture(HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl, bool sightbob, vector2 bob, double fov, bool scopeview, actor hpc, string whichdot) + { + int cx, cy, cw, ch; + int ScaledYOffset = 48; + int ScaledWidth = 89; + + [cx, cy, cw, ch] = Screen.GetClipRect(); + sb.SetClipRect(-16 + bob.x, -4 + bob.y, 32, 16, sb.DI_SCREEN_CENTER); + vector2 bob2 = bob * 2; + bob2.y = clamp(bob2.y, -8, 8); + sb.DrawImage("FENFRNT", (0,-4) + bob2, sb.DI_SCREEN_CENTER | sb.DI_ITEM_TOP, alpha: 0.9, scale: (0.6, 0.6)); + sb.SetClipRect(cx, cy, cw, ch); + sb.DrawImage("FENBACK", (0,-4) + bob, sb.DI_SCREEN_CENTER | sb.DI_ITEM_TOP, scale: (0.6, 0.6)); + + } + + Default + { + -HDWEAPON.FITSINBACKPACK + Weapon.SelectionOrder 300; + Weapon.SlotNumber 6; + Weapon.SlotPriority 1.5; + HDWeapon.BarrelSize 35, 1.5, 2; + Scale 0.6; + Tag "$TAG_FENRIS"; + HDWeapon.Refid HDLD_FENRIS; + HDWeapon.Loadoutcodes " + \cuframe - Lighter Weapon Frame (less bulk) + \cuplat - Platinum Wiring (more efficient batteries)"; + } + + States + { + Spawn: + FNRS Y 0 NoDelay A_JumpIf(invoker.WeaponStatus[FNProp_Battery] >= 0, 2); + FNRS Z 0; + FNRS # -1; + Stop; + Ready: + FNRS A 0; + #### A 1 A_WeaponReady(WRF_ALL); + Goto ReadyEnd; + Select0: + FNRS A 0; + #### A 0; + Goto Select0Big; + Deselect0: + FNRS A 0; + #### A 0; + Goto Deselect0Big; + User3: + FNRS A 0 A_MagManager("HDBattery"); + Goto Ready; + Fire: + FNRS A 0 + { + if (invoker.WeaponStatus[FNProp_Mode] == 0 && invoker.WeaponStatus[FNProp_Battery] > 0) + { + SetWeaponState("Full"); + } + else if (invoker.WeaponStatus[FNProp_Mode] == 1 && invoker.WeaponStatus[FNProp_Battery] >= 2) + { + SetWeaponState("Semi"); + } + } + Goto Nope; + Full: + #### B 2 Bright Offset(0, 36) + { + A_Light0(); + A_StartSound("Fenris/Fire", CHAN_WEAPON); + int Charges = invoker.WeaponStatus[FNProp_Charge]; + int DamageDealt = random(40, 50); + A_FireBullets(0, 0, 0, DamageDealt, "FenrisRayImpact", FBF_NORANDOM | FBF_NORANDOMPUFFZ, HDCONST_ONEMETRE * 300); + A_AlertMonsters(); + A_MuzzleClimb(-frandom(-0.15, 0.15), -frandom(0.4, 0.5), -frandom(-0.2, 0.2), -frandom(0.5, 0.6)); + invoker.WeaponStatus[FNProp_Battery]--; + } + #### A 1 Offset(0, 34); + #### A 1 Offset(0, 32); + Goto Ready; + Semi: + #### B 2 Bright Offset(0, 38) + { + A_Light0(); + A_StartSound("Fenris/Fire", CHAN_WEAPON); + int Charges = invoker.WeaponStatus[FNProp_Charge]; + int DamageDealt = random(100, 120); + A_FireBullets(0, 0, 0, DamageDealt, "FenrisRayImpact", FBF_NORANDOM | FBF_NORANDOMPUFFZ, HDCONST_ONEMETRE * 300); + A_AlertMonsters(); + A_MuzzleClimb(-frandom(-0.15, 0.15), -frandom(0.6, 0.8), -frandom(-0.2, 0.2), -frandom(0.8, 1.0)); + invoker.WeaponStatus[FNProp_Battery] -= 2; + } + #### B 1 Offset(0, 35); + #### A 1 Offset(0, 32); + Goto Nope; + + AltFire: + FNRS A 0 + { + if (invoker.WeaponStatus[FNProp_Battery] >= 10) + { + SetWeaponState("Charge"); + } + } + Goto Nope; + Charge: + FNRC A 0 A_StartSound ("Fenris/SBCharge", CHAN_WEAPON | CHANF_OVERLAP); + FNRC ####### 3 Bright + { + A_Light0(); + A_SpawnItemEx("ColdLight"); + player.GetPSprite(PSP_WEAPON).frame = random[fenrand](0, 3); + A_WeaponBusy(False); + } + Goto Snow; + Snow: + FNRS B 1 Bright Offset(0, 36); + #### B 1 Bright Offset(0, 42); + #### B 1 Bright Offset(0, 46) + { + A_Light0(); + A_StartSound("Fenris/SBFire", CHAN_WEAPON); + int Charges = invoker.WeaponStatus[FNProp_Charge]; + A_FireProjectile("Snowball", spawnheight: (-10.0 * cos(-pitch)) * player.crouchfactor); + A_AlertMonsters(); + A_MuzzleClimb(-frandom(-0.4, 0.4), -frandom(1.5, 1.8), -frandom(-0.6, 0.6), -frandom(1.8, 2.0)); + if (BackupSynergy.CheckForItem(self, "HDGFBlaster")) + { + invoker.WeaponStatus[FNProp_Battery] -= 12; + } + else invoker.WeaponStatus[FNProp_Battery] -= 20; + } + #### A 1 Offset(0, 42); + #### A 1 Offset(0, 36); + #### A 1 Offset(0, 32); + Goto Nope; + + FireMode: + FNRS A 1 offset(1,32) A_WeaponBusy(); + #### A 1 offset(2,32); + #### A 1 offset(1,33); + #### A 1 offset(0,34) + { + ++invoker.WeaponStatus[FNProp_Mode] %= 2; + if (invoker.WeaponStatus[FNProp_Mode] == 0) + { + A_StartSound("Fenris/Charge",8, pitch: 0.85); + } + else A_StartSound("Fenris/Charge",8); + } + #### A 1 offset(-1,35); + #### A 1 offset(-1,36); + #### A 1 offset(-1,35); + #### A 1 offset(0,34); + #### A 1 offset(0,34); + #### A 1 offset(1,33); + Goto Nope; + + Unload: + FNRS A 0 + { + invoker.WeaponStatus[FNProp_Flags] |= FNF_JustUnload; + if(invoker.WeaponStatus[FNProp_Battery] >= 0) return ResolveState("BatteryOut"); + return ResolveState("Nope"); + } + BatteryOut: + FNRS A 2 offset(0,36) + { + A_SetCrosshair(21); + A_MuzzleClimb(frandom(-1.2,-2.4),frandom(1.2,2.4)); + } + #### A 2 offset(1,37) A_StartSound("Fenris/Empty",8); + #### A 2 offset(2,38); + #### A 2 offset(3,42); + #### A 2 offset(5,44); + #### A 2 offset(6,42); + #### A 2 offset(7,43) A_StartSound("Fenris/BattOut",8); + #### A 2 offset(8,42); + #### A 0 + { + int BatteryCharge = invoker.GetRealBatteryCharge(false); // [Ace] Lose fractions if you take out a non-empty battery. + invoker.WeaponStatus[FNProp_Battery] = -1; + if(BatteryCharge < 0)SetWeaponState("MagOut"); + else if((!PressingUnload() && !PressingReload()) || A_JumpIfInventory("HDBattery", 0, "null")) + { + HDMagAmmo.SpawnMag(self,"HDBattery",BatteryCharge); + SetWeaponState("MagOut"); + } + else + { + HDMagAmmo.GiveMag(self,"HDBattery",BatteryCharge); + A_StartSound("weapons/pocket",9); + SetWeaponState("PocketMag"); + } + } + DropMag: + FNRS A 0 + { + int bat = invoker.WeaponStatus[FNProp_Battery]; + invoker.WeaponStatus[FNProp_Battery] = -1; + if(bat >= 0) + { + HDMagAmmo.SpawnMag(self, "HDBattery", bat); + } + } + Goto MagOut; + + PocketMag: + FNRS A 0 + { + int bat = invoker.WeaponStatus[FNProp_Battery]; + invoker.WeaponStatus[FNProp_Battery] = -1; + if(bat >= 0) + { + HDMagAmmo.GiveMag(self,"HDBattery", bat); + } + } + #### A 8 offset(9,43) A_StartSound("weapons/pocket",9); + Goto MagOut; + + MagOut: + FNRS A 0 A_JumpIf(invoker.WeaponStatus[FNProp_Flags] & FNF_JustUnload, "Reload3"); + Goto LoadMag; + + Reload: + FNRS A 0 + { + invoker.WeaponStatus[FNProp_Flags] &= ~FNF_JustUnload; + int MaxBattery = invoker.WeaponStatus[FNProp_Flags] & FNF_Platinum ? 80 : 60; + if (invoker.WeaponStatus[FNProp_Battery] < MaxBattery && CountInv("HDBattery")) + { + SetWeaponState("BatteryOut"); + } + } + Goto Nope; + + LoadMag: + FNRS A 4 offset(8,42); + #### A 4 offset(7,43) A_StartSound("Fenris/BattIn",8); + #### A 4 offset(6,42); + #### A 4 offset(5,44); + #### A 4 offset(3,42); + #### A 4 offset(2,38); + #### A 4 offset(1,37) A_StartSound("Fenris/Charge",8); + #### A 4 offset(0,36); + + #### A 0 + { + let mmm = HDMagAmmo(findinventory("HDBattery")); + double mult = invoker.WeaponStatus[FNProp_Flags] & FNF_Platinum ? 4 : 3; + if(mmm)invoker.WeaponStatus[FNProp_Battery] = int(ceil(mmm.TakeMag(true) * mult)); + } + Goto Reload3; + + Reload3: + FNRS A 6 offset(0,40); + #### A 2 offset(0,36); + #### A 4 offset(0,33); + Goto Nope; + } +} + +class FenrisRandom : IdleDummy +{ + States + { + Spawn: + TNT1 A 0 NoDelay + { + A_SpawnItemEx("HDBattery", -3,flags: SXF_NOCHECKPOSITION); + let wpn = HDFenris(Spawn("HDFenris", pos, ALLOW_REPLACE)); + if (!wpn) + { + return; + } + + HDF.TransferSpecials(self, wpn); + + if (!random(0, 3)) + { + wpn.WeaponStatus[wpn.FNProp_Flags] |= wpn.FNF_PolyFrame; + } + if (!random(0, 3)) + { + wpn.WeaponStatus[wpn.FNProp_Flags] |= wpn.FNF_Platinum; + } + + wpn.InitializeWepStats(false); + } + Stop; + } +} + +class FenrisRayImpact : Actor +{ + Default + { + +FORCEDECAL + +PUFFGETSOWNER + +HITTRACER + +PUFFONACTORS + +PUFFGETSOWNER + +NOINTERACTION + +BLOODLESSIMPACT + +FORCERADIUSDMG + +NOBLOOD + Decal "FenrisScorch"; + DamageType "Cold"; + } + + States + { + Spawn: + TNT1 A 5 NoDelay + { + A_StartSound("Fenris/Impact"); + + for (int i = 0; i < 30; ++i) + { + double pitch = frandom(-85.0, 85.0); + A_SpawnParticle(0x93D3FF, SPF_RELATIVE | SPF_FULLBRIGHT, random(10, 20), random(5, 8), random(0, 359), random(0, 4), 0, 0, random(1, 5) * cos(pitch), 0, random(1, 5) * sin(pitch), 0, 0, -0.5); + } + } + Stop; + } +} + +class Snowball : HDActor +{ + Default + { + Projectile; + Radius 9; + Height 18; + Speed 40; + Gravity 0.05; + DamageFunction (random (300, 350)); + DamageType "Cold"; + DeathSound "Fenris/SBExplode"; + Alpha 0.9; + Scale 1.0; + RenderStyle "Add"; + +BRIGHT + +RIPPER + +FORCEXYBILLBOARD + +NODAMAGETHRUST + } + + States + { + Spawn: + TNT1 A 0 nodelay + { + actor mjl = spawn("SnowballLight", pos + (0, 0, 16), ALLOW_REPLACE); + mjl.target = self; + } + Spawn2: + SNBL ABC 1; + loop; + death: + TNT1 A 0 + { + A_HDBlast(HDCONST_ONEMETRE * 4, random(100,120), HDCONST_ONEMETRE * 2, "Cold"); + A_SpawnChunks("HDB_frag", 42, 100, 700); + A_SpawnChunks("BigWallChunk", 14, 4, 12); + } + BXPL ABCDEFGHIJKL 2 { Alpha -= 0.05; } + stop; + } +} + +class ColdLight : PointLight +{ + override void PostBeginPlay() + { + Super.PostBeginPlay(); + args[0] = 22; + args[1] = 168; + args[2] = 215; + args[3] = 64; + } + + override void Tick() + { + if (--ReactionTime <= 0) + { + Destroy(); + return; + } + + Args[3] = random(50, 72); + } + + Default + { + ReactionTime 20; + } +} + +class SnowballLight : PointLight +{ + override void PostBeginPlay() + { + Super.PostBeginPlay(); + args[0]=189; + args[1]=227; + args[2]=254; + args[3]=0; + } + + override void tick() + { + if(!target) + { + args[3]+=random(-20,4); + if(args[3]<1)destroy(); + } + else + { + SetOrigin(target.pos, true); + if(target.bmissile)args[3] = random(28,44); + else args[3] = random(32,64); + } + } +} + +class BackupSynergy play +{ + static clearscope bool CheckForItem(Actor other, Name item, int amt = 1) + { + class cls = item; + return cls && other && other.CountInv(cls) >= amt; + } +} \ No newline at end of file diff --git a/zscript/Flamenwerfer 77/flamenwerfer77.zs b/zscript/icarus/weapons/Flamenwerfer 77/flamenwerfer77.zs similarity index 89% rename from zscript/Flamenwerfer 77/flamenwerfer77.zs rename to zscript/icarus/weapons/Flamenwerfer 77/flamenwerfer77.zs index d61511f..3009a95 100644 --- a/zscript/Flamenwerfer 77/flamenwerfer77.zs +++ b/zscript/icarus/weapons/Flamenwerfer 77/flamenwerfer77.zs @@ -1,53 +1,3 @@ -class FlamethrowerHandler : EventHandler -{ - Override Void CheckReplacement(ReplaceEvent e) - { - if (!e.Replacement) - { - return; - } - - switch (e.Replacement.GetClassName()) - { - case 'BFG9K': - if (random[flamerand]() <= AceCore.GetScaledChance(12, 48, acl_spawnscale_min, acl_spawnscale_max)) - { - e.Replacement = "FlamethrowerSpawner"; - } - break; - case 'RLReplaces': - if (random[flamerand]() <= AceCore.GetScaledChance(-6, 12, acl_spawnscale_min, acl_spawnscale_max)) - { - e.Replacement = "FlamethrowerSpawner"; - } - break; - case 'RocketBoxRandom': - case 'CellPackReplacer': - if (random[flamerand]() <= AceCore.GetScaledChance(-6, 12, acl_spawnscale_min, acl_spawnscale_max)) - { - e.Replacement = "HDGasTank"; - } - break; - case 'RocketAmmo': - case 'CellRandom': - if (random[flamerand]() <= AceCore.GetScaledChance(-8, 8, acl_spawnscale_min, acl_spawnscale_max)) - { - e.Replacement = "HDGasTank"; - } - break; - } - } - - Override Void WorldThingSpawned(WorldEvent e) - { - let FlamethrowerAmmo = HDGasTank(e.Thing); - if (FlamethrowerAmmo) - { - FlamethrowerAmmo.ItemsThatUseThis.Push("HDFlamethrower"); - } - } -} - class FlamethrowerSpawner : IdleDummy { states @@ -108,11 +58,10 @@ class HDFlamethrower : HDWeapon weapon.slotnumber 7; Weapon.SlotPriority 1.5; scale 0.5; - inventory.pickupmessage "Picked up the Flammenwerfer 77. It werfs flammen."; - obituary "%o was deep fried by %k."; + obituary "$OB_FLAMENWERFER77"; HDWeapon.BarrelSize 35, 1.2, 1.2; - HDWeapon.refid "fw7"; - tag "Flammenwerfer 77"; + HDWeapon.refid HDLD_FLAMENWERFER77; + tag "$TAG_FLAMENWERFER77"; } Override bool AddSpareWeapon(actor newowner) @@ -125,6 +74,11 @@ class HDFlamethrower : HDWeapon return GetSpareWeaponRegular(newowner,reverse); } + override string PickupMessage() + { + return Stringtable.localize("$PICKUP_FLAMENWERFER77_PREFIX")..Stringtable.localize("$TAG_FLAMENWERFER77")..Stringtable.localize("$PICKUP_FLAMENWERFER77_SUFFIX"); + } + Override string, double GetPickupSprite() { return WeaponStatus[FTProp_Gasoline] >= 0 ? "WFLMA0" : "WFLMB0", 0.8; @@ -408,6 +362,11 @@ class HDFlamethrower : HDWeapon class HDGasTank : HDMagAmmo { + override string PickupMessage() + { + return Stringtable.localize("$PICKUP_GASTANK_PREFIX")..Stringtable.localize("$TAG_GASTANK")..Stringtable.localize("$PICKUP_GASTANK_SUFFIX"); + } + Override string,string,name,double getmagsprite(int thismagamt) { String magsprite=(thismagamt > 0) ? "AGASA0" : "AGASB0"; @@ -473,9 +432,9 @@ class HDGasTank : HDMagAmmo HDMagAmmo.RoundType ""; HDMagAmmo.RoundBulk TankFuel; HDMagAmmo.MagBulk EncTankEmpty; - Tag "Fuel Tank"; - Inventory.PickupMessage "Picked up a Fuel Tank. The cheap chineseum casing might react violently to extreme heat, pressure or sudden shock."; - HDPickup.RefID "gas"; + Tag "$TAG_GASTANK"; + Inventory.PickupMessage "$PICKUP_GASTANK"; + HDPickup.RefID HDLD_GASTANK; Scale 0.4; } diff --git a/zscript/Frontiersman/frontiersman.zs b/zscript/icarus/weapons/Frontiersman/frontiersman.zs similarity index 93% rename from zscript/Frontiersman/frontiersman.zs rename to zscript/icarus/weapons/Frontiersman/frontiersman.zs index ce072e1..f0cb9f4 100644 --- a/zscript/Frontiersman/frontiersman.zs +++ b/zscript/icarus/weapons/Frontiersman/frontiersman.zs @@ -1,53 +1,3 @@ -class FrontierHandler : EventHandler -{ - override void CheckReplacement(ReplaceEvent e) - { - if (!e.Replacement) - { - return; - } - - switch (e.Replacement.GetClassName()) - { - case 'ClipBoxPickup': - if (random[frontrand]() <= AceCore.GetScaledChance(8, 32, acl_spawnscale_min, acl_spawnscale_max)) - { - e.Replacement = "FrontierSpawner"; - } - break; - case 'ShotgunReplaces': - if (random[frontrand]() <= AceCore.GetScaledChance(4, 16, acl_spawnscale_min, acl_spawnscale_max)) - { - e.Replacement = "FrontierSpawner"; - } - break; - case 'SSGReplaces': - if (random[frontrand]() <= AceCore.GetScaledChance(6, 24, acl_spawnscale_min, acl_spawnscale_max)) - { - e.Replacement = "FrontierSpawner"; - } - break; - } - } - - override void WorldThingSpawned(WorldEvent e) - { - let FrontierAmmo = HDAmmo(e.Thing); - if (!FrontierAmmo) - { - return; - } - if (FrontierAmmo.GetClassName() == 'SevenMilAmmo') - { - FrontierAmmo.ItemsThatUseThis.Push("HDFrontier"); - } - if (FrontierAmmo.GetClassName() == 'HD7mClip') - { - FrontierAmmo.ItemsThatUseThis.Push("HDFrontier"); - } - } -} - class FrontierSpawner : IdleDummy { states @@ -55,17 +5,13 @@ class FrontierSpawner : IdleDummy Spawn: TNT1 A 0 NoDelay { - A_SpawnItemEx("HD7mClip", 3,flags: SXF_NOCHECKPOSITION); - A_SpawnItemEx("HD7mClip", 1, flags: SXF_NOCHECKPOSITION); - A_SpawnItemEx("HD7mClip", -3,flags: SXF_NOCHECKPOSITION); let wpn = HDWeapon(Spawn('HDFrontier', pos, ALLOW_REPLACE)); - if (!wpn) - { - return; - } + if (!wpn) return; HDF.TransferSpecials(self, wpn); wpn.InitializeWepStats(false); + + spawn("HD7mBoxPickup",pos,ALLOW_REPLACE); } Stop; } @@ -105,6 +51,11 @@ class HDFrontier : HDWeapon return 144 + (WeaponStatus[FMProp_SideSaddles] + WeaponStatus[FMProp_Tube]) * ENC_776_LOADED; } + override string PickupMessage() + { + return Stringtable.localize("$PICKUP_FRONTIERSMAN_PREFIX")..Stringtable.localize("$TAG_FRONTIERSMAN")..Stringtable.localize("$PICKUP_NYX_SUFFIX"); + } + override string, double GetPickupSprite() { string BaseSprite = "FRMZ"; @@ -341,9 +292,8 @@ class HDFrontier : HDWeapon Weapon.BobRangeY 0.7; Scale 0.6; HDWeapon.BarrelSize 30, 1, 1; - Tag "Frontiersman"; - Inventory.PickupMessage "You got the 'Frontiersman' 7mm lever-action rifle."; - HDWeapon.Refid "fm7"; + Tag "$TAG_FRONTIERSMAN"; + HDWeapon.Refid HDLD_FRONTIERSMAN; } States diff --git a/zscript/icarus/weapons/GFB-9/gfb9.zs b/zscript/icarus/weapons/GFB-9/gfb9.zs new file mode 100644 index 0000000..f3cd891 --- /dev/null +++ b/zscript/icarus/weapons/GFB-9/gfb9.zs @@ -0,0 +1,304 @@ +class HDGFBlaster : HDHandgun +{ + enum GFBlasterFlags + { + GFB_Capacitor = 1, + } + + enum GFBlasterProperties + { + GBProp_Flags, + GBProp_Charge, + GBProp_Timer, + GBProp_Shards + } + + override bool AddSpareWeapon(actor newowner) + { + return AddSpareWeaponRegular(newowner); + } + + override HDWeapon GetSpareWeapon(actor newowner, bool reverse, bool doselect) + { + return GetSpareWeaponRegular(newowner, reverse, doselect); + } + + override double GunMass() + { + double BaseMass = 12; + if (WeaponStatus[GBProp_Flags] & GFB_Capacitor) + { + BaseMass *= 1.25; + } + return BaseMass; + } + + override double WeaponBulk() + { + double BaseBulk = 60; + if (WeaponStatus[GBProp_Flags] & GFB_Capacitor) + { + BaseBulk *= 1.25; + } + return BaseBulk; + } + + override string, double GetPickupSprite() + { + return "GFBNZ0", 1.2; + } + + override void InitializeWepStats(bool idfa) + { + WeaponStatus[GBProp_Charge] = GetMaxCharge(); + WeaponStatus[GBProp_Timer] = 0; + } + override void LoadoutConfigure(string input) + { + if (GetLoadoutVar(input, "cap", 1) > 0) + { + WeaponStatus[GBProp_Flags] |= GFB_Capacitor; + } + InitializeWepStats(false); + } + + override string GetHelpText() + { + return WEPHELP_FIRE.." Fire\n" + ..WEPHELP_ALTFIRE.."/"..WEPHELP_RELOAD.." Charge Capacitor\n"; + } + + override string PickupMessage() + { + string CapStr = WeaponStatus[GBProp_Flags] & GFB_Capacitor ? Stringtable.localize("$PICKUP_GFB9_CAPACITOR") : ""; + + return Stringtable.localize("$PICKUP_GFB9_PREFIX")..CapStr..Stringtable.localize("$TAG_GFB9")..Stringtable.localize("$PICKUP_GFB9_SUFFIX"); + } + + protected clearscope int GetMaxCharge() + { + return WeaponStatus[GBProp_Flags] & GFB_Capacitor ? 20 : 15; + } + + override void DrawHUDStuff(HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl) + { + sb.DrawWepNum(hdw.WeaponStatus[GBProp_Charge], GetMaxCharge()); + int lod=clamp(hdw.weaponstatus[GBProp_Charge]%100,0,50); + sb.drawnum(lod,-18,-18,sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_GREEN); + } + + override void DrawSightPicture(HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl, bool sightbob, vector2 bob, double fov, bool scopeview, actor hpc, string whichdot) + { + int cx, cy, cw, ch; + [cx, cy, cw, ch] = Screen.GetClipRect(); + sb.SetClipRect(-16 + bob.x, -4 + bob.y, 32, 16, sb.DI_SCREEN_CENTER); + vector2 bobb = bob * 2; + bobb.y = clamp(bobb.y, -8, 8); + sb.drawimage("GFBFRNT", bobb, sb.DI_SCREEN_CENTER | sb.DI_ITEM_TOP, alpha: 0.9); + sb.SetClipRect(cx, cy, cw, ch); + sb.drawimage("GFBBACK", bob, sb.DI_SCREEN_CENTER | sb.DI_ITEM_TOP); + } + + Default + { + +HDWEAPON.FITSINBACKPACK + Weapon.SelectionOrder 300; + Weapon.SlotNumber 2; + Weapon.SlotPriority 2.0; + HDWeapon.BarrelSize 12, 0.3, 0.5; + Scale 0.5; + Tag "$TAG_GFB9"; + HDWeapon.Refid HDLD_GFB9; + HDWeapon.Loadoutcodes " + \cucap - Extended Capacitor"; + } + + States + { + Spawn: + GFBN Z -1; + Stop; + Select0: + GFBN A 0; + #### # 0; + Goto Select0Small; + Deselect0: + GFBN A 0; + #### # 0 + { + invoker.WeaponStatus[GBProp_Timer] = 0; + } + Goto Deselect0Small; + Ready: + GFBN A 0; + #### A 0 A_JumpIf(invoker.weaponstatus[GBProp_Charge]>0,2); + #### C 0; + #### # 1 A_WeaponReady(WRF_ALL); + Goto ReadyEnd; + User3: + ---- A 0 A_MagManager("HDBattery"); + Goto Ready; + Fire: + #### # 0 + { + invoker.WeaponStatus[GBProp_Timer] = 0; + if (invoker.WeaponStatus[GBProp_Charge] > 0) + { + return ResolveState("Shoot"); + } + + return ResolveState("Nope"); + } + Stop; + Reload: + AltReload: + AltFire: + #### # 0 + { + if (invoker.WeaponStatus[GBProp_Charge] < invoker.GetMaxCharge()) + { + return ResolveState("Charge"); + } + + return ResolveState("Nope"); + } + Stop; + Shoot: + #### A 2 Offset(0, 36); + #### B 2 Bright Offset(0, 44) + { + A_Light0(); + A_StartSound("GFBlaster/Fire", CHAN_WEAPON); + A_FireBullets(0, 0, 0, 0, "GFBBlastImpact", FBF_NORANDOM | FBF_NORANDOMPUFFZ, HDCONST_ONEMETRE * 50); + A_AlertMonsters(); + A_MuzzleClimb(-frandom(1.0, 1.25), -frandom(1.5, 2.0)); + invoker.WeaponStatus[GBProp_Charge] -= 1; + } + Goto Hold; + Hold: + #### A 0; + Goto Nope; + Charge: + #### C 4; + #### D 4; + #### E 4; + ActualCharge: + #### F 4 + { + if (PressingReload()||invoker.WeaponStatus[GBProp_Charge] >= invoker.GetMaxCharge()) + { + invoker.WeaponStatus[GBProp_Timer] = 0; + SetWeaponState("EndCharge"); + return; + } + + if (PressingFire()||PressingAltFire()||PressingFireMode()) + { + SetWeaponState("EndCharge"); + } + + if (++invoker.WeaponStatus[GBProp_Timer] > 3 - (Synergy.CheckForItem(self, "HDFenris") ? 1 : 0)) + { + invoker.WeaponStatus[GBProp_Timer] = 0; + invoker.WeaponStatus[GBProp_Charge]++; + } + + A_WeaponBusy(false); + A_StartSound("GFBlaster/Charge", 8); + BFG9k.Spark(self, 1, height - 10); + if(!random(0, 30) && invoker.WeaponStatus[GBProp_Shards] <= 4) + { + A_FireProjectile("BFGNecroShard",random(170,190),spawnofs_xy:random(-20,20)); + invoker.WeaponStatus[GBProp_Shards]++; + } + A_WeaponReady(WRF_NOFIRE); + } + Loop; + EndCharge: + #### E 4; + #### D 4; + #### C 4 + { + invoker.weaponstatus[GBProp_Shards] = 0; + } + Goto Ready; + } +} + +class GFBlasterRandom : IdleDummy +{ + States + { + Spawn: + TNT1 A 0 nodelay + { + let wpn = HDGFBlaster(Spawn("HDGFBlaster", pos, ALLOW_REPLACE)); + if (!wpn) + { + return; + } + + HDF.TransferSpecials(self, wpn); + + if (!random(0, 3)) + { + wpn.WeaponStatus[wpn.GBProp_Flags] |= wpn.GFB_Capacitor; + } + wpn.InitializeWepStats(false); + } + Stop; + } +} + +class GFBBlastImpact : HDActor +{ + Default + { + +FORCEDECAL + +PUFFGETSOWNER + +HITTRACER + +PUFFONACTORS + +PUFFGETSOWNER + +NOINTERACTION + +BLOODLESSIMPACT + +FORCERADIUSDMG + +NOBLOOD + Decal "GFBScorch"; + damagetype "Bashing"; + } + + States + { + Spawn: + TNT1 A 1 NoDelay + { + //int BlastDamage = random(1,2); + //A_HDBlast(42, BlastDamage, 21, "Electrical", 0, 0, 0, false, 0, "None", 0, 0, 0, true, null, false, 180); + A_Explode(frandom(15,45),6,XF_HURTSOURCE,1,8); + + /* + A_HDBlast(blastradius:8, blastdamage:random(1,4), fullblastradius:5, blastdamagetype:"Electrical", pushradius:0, pushamount:0, fragradius:HDCONST_ONEMETRE*1, fragtype:"HDB_frag", + fragments:(HDEXPL_FRAGS>>0), immolateradius:15,immolateamount:random(4,20), immolatechance:20, source:target); + */ + + A_StartSound("GFBlaster/Impact"); + bool Freedoom = Wads.CheckNumForName("id", 0) == -1; + + for (int i = 0; i < 30; ++i) + { + double pitch = frandom(-85.0, 85.0); + A_SpawnParticle(Freedoom ? 0x0084FF : 0x44D61D, SPF_RELATIVE | SPF_FULLBRIGHT, random(10, 20), random(5, 8), random(0, 359), random(0, 4), 0, 0, random(1, 5) * cos(pitch), 0, random(1, 5) * sin(pitch), 0, 0, -0.5); + } + } + Stop; + } +} + +class Synergy play +{ + static clearscope bool CheckForItem(Actor other, Name item, int amt = 1) + { + class cls = item; + return cls && other && other.CountInv(cls) >= amt; + } +} \ No newline at end of file diff --git a/zscript/icarus/weapons/NCT/nct.zs b/zscript/icarus/weapons/NCT/nct.zs new file mode 100644 index 0000000..61a2191 --- /dev/null +++ b/zscript/icarus/weapons/NCT/nct.zs @@ -0,0 +1,307 @@ +class HDNCT : HDCellWeapon +{ + enum NCTProperties + { + NCProp_Flags, + NCProp_Battery, + NCProp_LoadType + } + + override bool AddSpareWeapon(actor newowner) { return AddSpareWeaponRegular(newowner); } + override HDWeapon GetSpareWeapon(actor newowner, bool reverse, bool doselect) { return GetSpareWeaponRegular(newowner, reverse, doselect); } + override double GunMass() { return WeaponStatus[NCProp_Battery] >= 0 ? 10 : 8; } + override double WeaponBulk() { return 20 + (WeaponStatus[NCProp_Battery] >= 0 ? ENC_BATTERY_LOADED : 0); } + + override string PickupMessage() + { + return Stringtable.localize("$PICKUP_NCT_PREFIX")..Stringtable.localize("$TAG_NCT")..Stringtable.localize("$PICKUP_NCT_SUFFIX"); + } + + override string, double GetPickupSprite() + { + return "NCTPA0", 0.8; + } + + override void InitializeWepStats(bool idfa) + { + WeaponStatus[NCProp_Battery] = 20; + } + + override string GetHelpText() + { + return WEPHELP_FIRE.." Shoot\n" + ..WEPHELP_RELOAD.." Reload battery\n" + ..WEPHELP_UNLOADUNLOAD; + } + + override void DrawHUDStuff(HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl) + { + if (sb.HudLevel == 1) + { + sb.DrawBattery(-54, -4, sb.DI_SCREEN_CENTER_BOTTOM, reloadorder: true); + sb.DrawNum(hpl.CountInv("HDBattery"), -46, -8, sb.DI_SCREEN_CENTER_BOTTOM); + } + + int BatteryCharge = hdw.WeaponStatus[NCProp_Battery]; + if (BatteryCharge > 0) + { + string Col = "\c[Green]"; + if (BatteryCharge <= 19) + { + Col = "\c[Red]NOT "; + } + sb.DrawString(sb.pSmallFont, Col.."READY\c-", (-14, -12), sb.DI_TEXT_ALIGN_RIGHT | sb.DI_SCREEN_CENTER_BOTTOM, Font.CR_DARKGRAY); + } + else if (BatteryCharge == 0) + { + sb.DrawString(sb.mAmountFont, "00000", (-16, -9), sb.DI_TEXT_ALIGN_RIGHT | sb.DI_TRANSLATABLE | sb.DI_SCREEN_CENTER_BOTTOM, Font.CR_DARKGRAY); + } + } + + private action void A_Chirpchirp() + { + invoker.WeaponStatus[NCProp_Battery] -= 20; + HDBulletActor.FireBullet(self, "HDB_Chirp"); + A_MuzzleClimb(-frandom(20.0, 25.0), -frandom(25.0, 30.0)); + A_Light1(); + A_StartSound("weapons/plascrack", CHAN_WEAPON); + A_AlertMonsters(); + A_ChangeVelocity(-5, 0, 2.5, CVF_RELATIVE); + Actor plr = self; + double oldAngle = (2 * angle); + DropInventory(invoker); + plr.angle = oldAngle; + damagemobj(invoker,self,30,"bashing"); + HDPlayerPawn(self).A_Incapacitated( HDPlayerPawn.HDINCAP_SCREAM, 175 ); + } + + Default + { + +HDWEAPON.FITSINBACKPACK + Weapon.SelectionOrder 50; + Weapon.SlotNumber 2; + Weapon.SlotPriority 0.5; + HDWeapon.BarrelSize 6, 0.15, 0.25; + Scale 0.5; + Tag "$TAG_NCT"; + HDWeapon.Refid HDLD_NCT; + } + + States + { + Spawn: + NCTP A -1; + Stop; + Ready: + NCTG A 1 A_WeaponReady(WRF_ALL); + Goto ReadyEnd; + Select0: + NCTG A 0; + Goto Select0Big; + Deselect0: + NCTG A 0; + Goto Deselect0Big; + User3: + #### A 0 A_MagManager("HDBattery"); + Goto Ready; + Fire: + NCTG A 0 A_JumpIf(invoker.WeaponStatus[NCProp_Battery] < 20, 'Nope'); + NCTF A 2 Bright Offset(0, 36); + NCTF B 2 Bright Offset(0, 44); + NCTF A 2 Offset(0, 38) + { + if (invoker.WeaponStatus[NCProp_Battery] >= 20) + { + A_Chirpchirp(); + } + A_StartSound("NCT/Fail", CHAN_WEAPON); + return ResolveState("Nope"); + } + Goto Nope; + Reload: + NCTG A 0 + { + if (invoker.weaponstatus[NCProp_Battery] >= 20 || !CheckInventory("HDBattery", 1)) + { + SetWeaponState("Nope"); + return; + } + invoker.WeaponStatus[NCProp_LoadType] = 1; + } + Goto Reload1; + Unload: + #### A 0 + { + if (invoker.WeaponStatus[NCProp_Battery] == -1) + { + SetWeaponState("Nope"); + return; + } + invoker.WeaponStatus[NCProp_LoadType] = 0; + } + Goto Reload1; + Reload1: + #### A 4; + #### A 2 Offset(0, 36) A_MuzzleClimb(-frandom(1.2, 2.4), frandom(1.2, 2.4)); + #### A 2 Offset(0, 38) A_MuzzleClimb(-frandom(1.2, 2.4), frandom(1.2, 2.4)); + #### A 4 Offset(0, 40) + { + A_MuzzleClimb(-frandom(1.2, 2.4), frandom(1.2, 2.4)); + A_StartSound("weapons/plasopen", 8); + } + #### A 2 Offset(0, 42) + { + A_MuzzleClimb(-frandom(1.2, 2.4), frandom(1.2, 2.4)); + if(invoker.WeaponStatus[NCProp_Battery] >= 0) + { + if (PressingReload() || PressingUnload()) + { + HDMagAmmo.GiveMag(self, "HDBattery", invoker.WeaponStatus[NCProp_Battery]); + A_SetTics(10); + } + else + { + HDMagAmmo.SpawnMag(self, "HDBattery", invoker.WeaponStatus[NCProp_Battery]); + A_SetTics(4); + } + } + invoker.WeaponStatus[NCProp_Battery] = -1; + } + Goto BatteryOut; + BatteryOut: + #### A 4 Offset(0, 42) + { + if (invoker.WeaponStatus[NCProp_LoadType] == 0) + { + SetWeaponState("Reload3"); + } + else + { + A_StartSound("weapons/pocket", 9); + } + } + #### A 12; + #### A 12 Offset(0, 42) A_StartSound("weapons/bfgbattout", 8); + #### A 10 Offset(0, 36) A_StartSound("weapons/plasclose2", 8); + #### A 0 + { + let Battery = HDMagAmmo(FindInventory("HDBattery")); + if (Battery && Battery.Amount > 0) + { + invoker.WeaponStatus[NCProp_Battery] = Battery.TakeMag(true); + } + else + { + SetWeaponState("Reload3"); + return; + } + } + Reload3: + #### A 6 Offset(0, 38) A_StartSound("weapons/plasload", 8); + #### A 8 Offset(0, 37) A_StartSound("weapons/plasclose", 8); + #### A 2 Offset(0, 38); + #### A 2 Offset(0, 36); + #### A 2 Offset(0, 34); + #### A 12; + Goto Ready; + Reload4: + #### A 6; + Goto Nope; + } +} + +class NCTRandom : IdleDummy +{ + States + { + Spawn: + TNT1 A 0 nodelay + { + let wpn = HDNCT(Spawn("HDNCT", pos, ALLOW_REPLACE)); + if (!wpn) + { + return; + } + + HDF.TransferSpecials(self, wpn); + + wpn.InitializeWepStats(false); + } + Stop; + } +} + +class HDB_Chirp : HDBulletActor +{ + default + { + Pushfactor 0.05; + Mass 5000; + Speed HDCONST_MPSTODUPT*420; + Accuracy 600; + Stamina 3700; + HDBulletActor.DistantSound "world/shotgunfar"; + HDBulletActor.DistantSoundVol 2.; + MissileType "HDGunsmoke"; + Scale 0.08; + Translation "128:151=%[1,1,1]:[0.2,0.2,0.2]"; + SeeSound "weapons/riflecrack"; + Obituary "$OB_NCT"; + } + + Override Actor Puff() + { + if(max(abs(pos.x), abs(pos.y)) >= 32768) return null; + setorigin(pos - (2 * (cos(angle), sin(angle)), 0), false); + A_SprayDecal("BrontoScorch", 16); + if(vel == (0, 0, 0))A_ChangeVelocity(cos(pitch), 0, -sin(pitch), CVF_RELATIVE | CVF_REPLACE); + else vel *= 0.01; + if(tracer) + { + int dmg = random(1000, 1200); + vector3 hitpoint = pos + vel.unit() * tracer.radius; + vector3 tracmid = (tracer.pos.xy, tracer.pos.z + tracer.height * 0.618); + dmg=int((1. - ((hitpoint - tracmid).length() / tracer.radius)) * dmg); + tracer.damagemobj(self, target, dmg, "Piercing", DMG_THRUSTLESS); + } + doordestroyer.destroydoor(self, 128, frandom(24, 36), 6, dedicated:true); + A_HDBlast(fragradius:256, fragtype:"HDB_fragBronto", immolateradius:64, immolateamount:random(4,20), immolatechance:32, source:target); + DistantQuaker.Quake(self, 3, 35, 256, 12); + actor aaa = Spawn("WallChunker", pos,ALLOW_REPLACE); + A_SpawnChunks("BigWallChunk", 20, 4, 20); + A_SpawnChunks("HDSmoke", 4, 1, 7); + aaa = spawn("HDExplosion", pos, ALLOW_REPLACE); + aaa.vel.z = 2; + distantnoise.make(aaa, "world/rocketfar"); + A_SpawnChunks("HDSmokeChunk", random(3, 4), 6, 12); + A_AlertMonsters(); + bmissile=false; + bnointeraction=true; + vel = (0, 0, 0); + if(!instatesequence(curstate, findstate("death")))setstatelabel("death"); + return null; + } + + Override void OnHitActor(actor hitactor, vector3 hitpos, vector3 vu, int flags) + { + double spbak = speed; + super.onhitactor(hitactor, hitpos, vu, flags); + if(spbak - speed > 10)puff(); + } + + Override void PostBeginPlay() + { + Super.PostBeginPlay(); + for(int i=2; i; i--) + { + A_SpawnItemEx("TerrorSabotPiece", 0, 0, 0, speed * cos(pitch) * 0.01, (i == 2 ? 3 : -3), speed * sin(pitch) * 0.01, 0, SXF_NOCHECKPOSITION | SXF_TRANSFERPOINTERS); + } + } + + States + { + Death: + TNT1 A 0{if(tracer)puff();} + goto super::death; + } +} \ No newline at end of file diff --git a/zscript/icarus/weapons/Nyx/nyx.zs b/zscript/icarus/weapons/Nyx/nyx.zs new file mode 100644 index 0000000..9c6a519 --- /dev/null +++ b/zscript/icarus/weapons/Nyx/nyx.zs @@ -0,0 +1,468 @@ +class HDNyx : HDHandgun +{ + enum NyxFlags + { + NXF_JustUnload = 1 + } + + enum NyxProperties + { + NXProp_Flags, + NXProp_Chamber, + NXProp_Mag, + NXProp_Mode + } + + override bool AddSpareWeapon(actor newowner) { return AddSpareWeaponRegular(newowner); } + override HDWeapon GetSpareWeapon(actor newowner , bool reverse, bool doselect) { return GetSpareWeaponRegular(newowner, reverse, doselect); } + + override double GunMass() + { + return 12 + 0.03 * WeaponStatus[NXProp_Mag]; + } + + override double WeaponBulk() + { + double BaseBulk = 40; + int Mag = WeaponStatus[NXProp_Mag]; + if (Mag >= 0) + { + BaseBulk += HDNyxMag.EncMagLoaded + Mag * ENC_355_LOADED; + } + return BaseBulk; + } + + override string PickupMessage() + { + return Stringtable.localize("$PICKUP_NYX_PREFIX")..Stringtable.localize("$TAG_NYX")..Stringtable.localize("$PICKUP_NYX_SUFFIX"); + } + + override string, double GetPickupSprite() + { + string NChamber = WeaponStatus[NXProp_Chamber] <= 0 ? "E" : "C"; + return "NYXP"..NChamber.."0", 1.0; + } + + override void InitializeWepStats(bool idfa) + { + WeaponStatus[NXProp_Chamber] = 2; + WeaponStatus[NXProp_Mag] = HDNyxMag.MagCapacity; + } + + override void ForceBasicAmmo() + { + owner.A_TakeInventory("HDRevolverAmmo"); + owner.A_TakeInventory("HDNyxMag"); + owner.A_GiveInventory("HDNyxMag"); + } + + override void DropOneAmmo(int amt) + { + if (owner) + { + amt = clamp(amt, 1, 10); + if (owner.CheckInventory("HDRevolverAmmo", 1)) + { + owner.A_DropInventory("HDRevolverAmmo", amt * 10); + } + else + { + owner.A_DropInventory("HDNyxMag", amt); + } + } + } + + override string GetHelpText() + { + return WEPHELP_FIRESHOOT + ..WEPHELP_FIREMODE.." Semi Auto/Burst\n" + ..WEPHELP_RELOAD.." Reload mag\n" + ..WEPHELP_USE.."+"..WEPHELP_RELOAD.." Reload chamber\n" + ..WEPHELP_MAGMANAGER; + } + + override void DrawHUDStuff(HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl) + { + if (sb.hudlevel == 1) + { + int NextMagLoaded = sb.GetNextLoadMag(HDMagAmmo(hpl.findinventory("HDNyxMag"))); + if (NextMagLoaded >= HDNyxMag.MagCapacity) + { + sb.DrawImage("NYXMA0", (-46, -3),sb. DI_SCREEN_CENTER_BOTTOM); + } + else if (NextMagLoaded <= 0) + { + sb.DrawImage("NYXMB0", (-46, -3), sb.DI_SCREEN_CENTER_BOTTOM, alpha: NextMagLoaded ? 0.6 : 1.0); + } + else + { + sb.DrawBar("NYXMNORM", "NYXMGREY", NextMagLoaded, HDNyxMag.MagCapacity, (-46, -3), -1, sb.SHADER_VERT, sb.DI_SCREEN_CENTER_BOTTOM); + } + sb.DrawNum(hpl.CountInv("HDNyxMag"), -43, -8, sb.DI_SCREEN_CENTER_BOTTOM); + } + sb.DrawWepNum(hdw.WeaponStatus[NXProp_Mag], HDNyxMag.MagCapacity); + + if(hdw.WeaponStatus[NXProp_Chamber] == 2) + { + sb.DrawRect(-19, -11, 3, 1); + } + + sb.DrawWepCounter(hdw.WeaponStatus[NXProp_Mode], -22, -10, "RBRSA3A7", "STBURAUT"); + } + + override void DrawSightPicture(HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl, bool sightbob, vector2 bob, double fov, bool scopeview, actor hpc, string whichdot) + { + int cx, cy, cw, ch; + [cx, cy, cw, ch] = Screen.GetClipRect(); + sb.SetClipRect(-16 + bob.x, -4 + bob.y, 32, 13, sb.DI_SCREEN_CENTER); + vector2 bob2 = bob * 2; + bob2.y = clamp(bob2.y, -8, 8); + sb.DrawImage("NYXFRNT", bob2, sb.DI_SCREEN_CENTER | sb.DI_ITEM_TOP, alpha: 0.9, scale: (0.8, 0.6)); + sb.SetClipRect(cx, cy, cw, ch); + sb.DrawImage("NYXBACK", bob, sb.DI_SCREEN_CENTER | sb.DI_ITEM_TOP, scale: (0.8, 0.7)); + } + + Private Int BurstIndex; + + Default + { + +HDWEAPON.FITSINBACKPACK + Weapon.SelectionOrder 300; + Weapon.SlotNumber 2; + Weapon.SlotPriority 3; + HDWeapon.BarrelSize 15, 0.5, 0.5; + Scale 0.5; + Tag "$TAG_NYX"; + HDWeapon.Refid HDLD_NYX; + Inventory.PickupMessage "$PICKUP_NYX"; + } + + States + { + Spawn: + NYXP C 0 NoDelay; + #### # -1 + { + frame = invoker.WeaponStatus[NXProp_Chamber] == 0 ? 4 : 2; + } + Stop; + Ready: + NYXG A 0 A_JumpIf(invoker.WeaponStatus[NXProp_Chamber] > 0, 2); + #### D 0; + #### # 1 + { + invoker.BurstIndex = 0; + A_WeaponReady(WRF_ALL); + } + Goto ReadyEnd; + Select0: + NYXG A 0 A_JumpIf(invoker.WeaponStatus[NXProp_Chamber] > 0, 2); + #### D 0; + #### # 0; + Goto Select0Small; + Deselect0: + NYXG A 0 A_JumpIf(invoker.WeaponStatus[NXProp_Chamber] > 0, 2); + #### D 0; + #### # 0; + Goto Deselect0Small; + User3: + NYXG A 0 A_MagManager("HDNyxMag"); + Goto Ready; + + Firemode: + NYXG A 1 + { + ++invoker.WeaponStatus[NXProp_Mode] %= 2; + } + Goto Nope; + + Fire: + NYXG A 0 + { + if (invoker.WeaponStatus[NXProp_Chamber] == 2) + { + SetWeaponState("Pull"); + } + else if (invoker.WeaponStatus[NXProp_Mag] > 0) + { + SetWeaponState("ChamberManual"); + } + } + Goto Nope; + Pull: + NYXG B 1; + Shoot: + NYXG C 1 Bright Offset(0, 38) + { + HDFlashAlpha(128); + A_Light1(); + A_StartSound("Nyx/Fire", CHAN_WEAPON); + HDBulletActor.FireBullet(self, "HDB_355", spread: 1.0, speedfactor: frandom(1.10, 1.15)); + A_AlertMonsters(); + A_ZoomRecoil(0.98); + invoker.WeaponStatus[NXProp_Chamber] = 1; + } + Recoil: + NYXG D 1 Offset(0, 34) + { + if (invoker.WeaponStatus[NXProp_Mode] == 1) + { + A_MuzzleClimb(-frandom(0.1, 0.3), -frandom(0.1, 0.3), -frandom(0.1, 0.3), -frandom(0.1, 0.3), -frandom(0.1, 0.3), -frandom(0.1, 0.3), -frandom(0.1, 0.5), -frandom(1.0, 2.5)); + } + else + { + A_MuzzleClimb(-frandom(0.1, 0.5), -frandom(1.0, 1.5)); + } + A_EjectCasing("HDSpent355",frandom(-1,2),(-frandom(2,3),frandom(0,0.2),frandom(0.4,0.5)),(-2,0,-1)); + invoker.WeaponStatus[NXProp_Chamber] = 0; + + if (invoker.WeaponStatus[NXProp_Mag] <= 0) + { + A_StartSound("weapons/pistoldry", 8, CHANF_OVERLAP, 0.9); + SetWeaponState("Nope"); + } + + if (invoker.WeaponStatus[NXProp_Mag] > 0) + { + invoker.WeaponStatus[NXProp_Chamber] = 2; + invoker.WeaponStatus[NXProp_Mag]--; + } + + A_WeaponReady(WRF_NOFIRE); + } + #### B 0 + { + switch (invoker.WeaponStatus[NXProp_Mode]) + { + case 1: + { + if (invoker.BurstIndex < 2) + { + invoker.BurstIndex++; + SetWeaponState("Shoot"); + } + break; + } + } + } + Goto Nope; + + Reload: + #### # 0 + { + invoker.WeaponStatus[NXProp_Flags] &=~ NXF_JustUnload; + bool NoMags = HDMagAmmo.NothingLoaded(self, "HDNyxMag"); + if (invoker.WeaponStatus[NXProp_Mag] >= HDNyxMag.MagCapacity) + { + SetWeaponState("Nope"); + } + else if (invoker.WeaponStatus[NXProp_Mag] <= 0 && (PressingUse() || NoMags)) + { + if (CheckInventory("HDRevolverAmmo", 1)) + { + SetWeaponState("LoadChamber"); + } + else + { + SetWeaponState("Nope"); + } + } + else if (NoMags) + { + SetWeaponState("Nope"); + } + } + Goto RemoveMag; + + Unload: + #### # 0 + { + invoker.WeaponStatus[NXProp_Flags] |= NXF_JustUnload; + if (invoker.WeaponStatus[NXProp_Mag] >= 0) + { + SetWeaponState("RemoveMag"); + } + } + Goto ChamberManual; + RemoveMag: + NRLA # 2 Offset(0, 34) A_SetCrosshair(21); + NRLA # 2 Offset(1, 38); + NRLB # 4 Offset(2, 42); + NRLC # 6 Offset(3, 46) A_StartSound("Nyx/MagOut", 8, CHANF_OVERLAP); + #### # 0 + { + int Mag = invoker.WeaponStatus[NXProp_Mag]; + invoker.WeaponStatus[NXProp_Mag] = -1; + if (Mag == -1) + { + SetWeaponState("MagOut"); + } + else if((!PressingUnload() && !PressingReload()) || A_JumpIfInventory("HDNyxMag", 0, "null")) + { + HDMagAmmo.SpawnMag(self, "HDNyxMag", Mag); + setweaponstate("MagOut"); + } + else{ + HDMagAmmo.GiveMag(self, "HDNyxMag", Mag); + A_StartSound("weapons/pocket", 9); + setweaponstate("PocketMag"); + } + } + PocketMag: + #### ### 5 Offset(0, 46) A_MuzzleClimb(frandom(-0.2, 0.8), frandom(-0.2, 0.4)); + Goto MagOut; + MagOut: + #### # 0 + { + if (invoker.WeaponStatus[NXProp_Flags] & NXF_JustUnload) + { + SetWeaponState("ReloadEnd"); + } + else + { + SetWeaponState("LoadMag"); + } + } + LoadMag: + NRLC # 4 Offset(0, 46) A_MuzzleClimb(frandom(-0.2, 0.8), frandom(-0.2, 0.4)); + #### # 0 A_StartSound("weapons/pocket", 9); + NRLB # 5 Offset(0, 46) A_MuzzleClimb(frandom(-0.2, 0.8), frandom(-0.2, 0.4)); + NRLA # 3; + #### # 0 + { + let Mag = HDMagAmmo(FindInventory("HDNyxMag")); + if (Mag) + { + invoker.WeaponStatus[NXProp_Mag] = Mag.TakeMag(true); + A_StartSound("Nyx/MagIn", 8); + } + } + Goto ReloadEnd; + ReloadEnd: + #### # 2 Offset(3, 46); + #### # 1 Offset(2, 42); + #### # 1 Offset(2, 38); + #### # 1 Offset(1, 34); + #### # 0 A_JumpIf(!(invoker.WeaponStatus[NXProp_Flags] & NXF_JustUnload), "ChamberManual"); + Goto Nope; + + ChamberManual: + #### # 0 A_JumpIf(!(invoker.WeaponStatus[NXProp_Flags] & NXF_JustUnload) && (invoker.WeaponStatus[NXProp_Chamber] == 2 || invoker.WeaponStatus[NXProp_Mag] <= 0), "Nope"); + #### # 3 Offset(0, 34); + #### D 4 Offset(0, 37) + { + A_MuzzleClimb(frandom(0.4, 0.5), -frandom(0.6, 0.8)); + A_StartSound("Nyx/SlideBack", 8); + int Chamber = invoker.WeaponStatus[NXProp_Chamber]; + invoker.WeaponStatus[NXProp_Chamber] = 0; + switch (Chamber) + { + case 1: A_EjectCasing("HDSpent355",frandom(-1,2),(-frandom(2,3),frandom(0,0.2),frandom(0.4,0.5)),(-2,0,-1)); break; + case 2: A_SpawnItemEx("HDRevolverAmmo", cos(pitch * 12), 0, height - 9 - sin(pitch) * 12, 1, 2, 3, 0); break; + } + + if (invoker.WeaponStatus[NXProp_Mag] > 0) + { + invoker.WeaponStatus[NXProp_Chamber] = 2; + invoker.WeaponStatus[NXProp_Mag]--; + } + } + #### # 3 Offset(0, 35); + Goto Nope; + LoadChamber: + #### # 0 A_JumpIf(invoker.WeaponStatus[NXProp_Chamber] > 0, "Nope"); + #### D 1 Offset(0, 36) A_StartSound("weapons/pocket",9); + #### D 1 Offset(2, 40); + #### D 1 Offset(2, 50); + #### D 1 Offset(3, 60); + #### D 2 Offset(5, 90); + #### D 2 Offset(7, 80); + #### D 2 Offset(10, 90); + #### D 2 Offset(8, 96); + #### D 3 Offset(6, 88) + { + if (CheckInventory("HDRevolverAmmo", 1)) + { + A_StartSound("Nyx/SlideForward", 8); + A_TakeInventory("HDRevolverAmmo", 1, TIF_NOTAKEINFINITE); + invoker.WeaponStatus[NXProp_Chamber] = 2; + } + } + #### A 2 Offset(5, 76); + #### A 1 Offset(4, 64); + #### A 1 Offset(3, 56); + #### A 1 Offset(2, 48); + #### A 2 Offset(1, 38); + #### A 3 Offset(0, 34); + Goto ReadyEnd; + } +} + +class nyxrandom : IdleDummy +{ + States + { + Spawn: + TNT1 A 0 NoDelay + { + A_SpawnItemEx("HDNyxMag", -3, flags: SXF_NOCHECKPOSITION); + A_SpawnItemEx("HDNyxMag", -1, flags: SXF_NOCHECKPOSITION); + let wpn = HDNyx(Spawn("HDNyx", pos, ALLOW_REPLACE)); + if (!wpn) + { + return; + } + + HDF.TransferSpecials(self, wpn); + + wpn.InitializeWepStats(false); + } + Stop; + } +} + +class HDNyxMag : HDMagAmmo +{ + override string, string, name, double GetMagSprite(int thismagamt) + { + return (thismagamt > 0) ? "NYXMA0" : "NYXMB0", "PRNDA0", "HDRevolverAmmo", 1.0; + } + + override void GetItemsThatUseThis() + { + ItemsThatUseThis.Push("HDNyx"); + } + + const MagCapacity = 12; + const EncMagEmpty = 3; + const EncMagLoaded = EncMagEmpty * 0.8; + + Default + { + HDMagAmmo.MaxPerUnit MagCapacity; + HDMagAmmo.InsertTime 7; + HDMagAmmo.ExtractTime 4; + HDMagAmmo.RoundType "HDRevolverAmmo"; + HDMagAmmo.RoundBulk ENC_355_LOADED; + HDMagAmmo.MagBulk EncMagEmpty; + Tag "$TAG_NYXMAG"; + Inventory.PickupMessage "$PICKUP_NYXMAG"; + HDPickup.RefId HDLD_NYX_MAG; + Scale 0.5; + } + + States + { + Spawn: + NYXM A -1; + Stop; + SpawnEmpty: + NYXM B -1 + { + bROLLSPRITE = true; + bROLLCENTER = true; + roll = randompick(0, 0, 0, 0, 2, 2, 2, 2, 1, 3) * 90; + } + Stop; + } +} diff --git a/zscript/icarus/weapons/PD-42/pd42.zs b/zscript/icarus/weapons/PD-42/pd42.zs new file mode 100644 index 0000000..ead8029 --- /dev/null +++ b/zscript/icarus/weapons/PD-42/pd42.zs @@ -0,0 +1,696 @@ +class HDPDFour : HDWeapon { + + private int BurstIndex; + + Default { + +HDWEAPON.FITSINBACKPACK + Weapon.SelectionOrder 300; + Weapon.SlotNumber 4; + Weapon.SlotPriority 3; + HDWeapon.BarrelSize 20,0.5,1; + Scale 0.45; + Tag "$TAG_PD42"; + HDWeapon.Refid HDLD_PD4; + inventory.icon "PDWGA0"; + + HDWeapon.Loadoutcodes " + \cufiremode - 0-2, semi/burst/auto + \cuslugger - Under-Barrel Slug Thrower + \cureflexsight - 0/1, no/yes + \cudot - 0-5"; + } + + override bool AddSpareWeapon(actor newowner) { + return AddSpareWeaponRegular(newowner); + } + + override HDWeapon GetSpareWeapon(actor newowner, bool reverse, bool doselect) { + return GetSpareWeaponRegular(newowner, reverse, doselect); + } + + override double GunMass() { + return 6 + (weaponStatus[PDS_FLAGS] & PDF_SLUGLAUNCHER ? 1 : 0) + 0.03 * weaponStatus[PDS_MAG]; + } + + override double WeaponBulk() { + double bulk = 0; + + int mag = weaponStatus[PDS_MAG]; + if (mag >= 0) { + bulk += HDPDFourMag.EncMagLoaded + mag * ENC_426_LOADED; + } + + if (weaponStatus[PDS_FLAGS] & PDF_SLUGLAUNCHER) { + bulk += 5; + } + + if (weaponStatus[PDS_FLAGS] & PDF_SLUGLOADED) { + bulk += ENC_SHELLLOADED; + } + + return 80 + bulk; + } + + override void PostBeginPlay() { + Super.PostBeginPlay(); + + weaponspecial = 1337; // [Ace] UaS sling compatibility. + } + + override void Tick() { + Super.Tick(); + + if (!(weaponStatus[PDS_FLAGS] & PDF_SLUGLAUNCHER) && weaponStatus[PDS_FLAGS] & PDF_SLUGLOADED) { + weaponStatus[PDS_FLAGS] &= ~PDF_SLUGLOADED; + Actor ptr = owner ? owner : Actor(self); + ptr.A_SpawnItemEx('HDSlugAmmo', cos(ptr.pitch) * 10, 0, ptr.height - 10 - 10 * sin(ptr.pitch), ptr.vel.x, ptr.vel.y, ptr.vel.z, 0, SXF_ABSOLUTEMOMENTUM | SXF_NOCHECKPOSITION | SXF_TRANSFERPITCH); + ptr.A_StartSound("weapons/huntrackdown", CHAN_WEAPON, CHANF_OVERLAP); + } + } + + override string PickupMessage() + { + String SlugStr = WeaponStatus[PDS_FLAGS] & PDF_SLUGLAUNCHER ? Stringtable.localize("$PICKUP_PD42_SLUGTHROWER") : ""; + + return Stringtable.localize("$PICKUP_PD42_PREFIX")..Stringtable.localize("$TAG_PD42")..SlugStr..Stringtable.localize("$PICKUP_PD42_SUFFIX"); + } + + override string, double GetPickupSprite() + { + string slugFrame = weaponStatus[PDS_FLAGS] & PDF_SLUGLAUNCHER ? "S" : "G"; + + string magFrame = ""; + if (weaponStatus[PDS_MAG] > 0) { + magFrame = weaponStatus[PDS_FLAGS] & PDF_REFLEXSIGHT ? "C" : "A"; + } else { + magFrame = weaponStatus[PDS_FLAGS] & PDF_REFLEXSIGHT ? "D" : "B"; + } + + return "PDW"..slugFrame..magFrame.."0", 1.0; + } + + override void DrawHUDStuff(HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl) { + if (sb.HudLevel == 1) + { + int NextMagLoaded = sb.GetNextLoadMag(HDMagAmmo(hpl.findinventory("HDPDFourMag"))); + if (NextMagLoaded >= HDPDFourMag.MagCapacity) { + sb.DrawImage("PDMGA0", (-46, -3),sb. DI_SCREEN_CENTER_BOTTOM, scale: (1.0, 1.0)); + } else if (NextMagLoaded <= 0) { + sb.DrawImage("PDMGB0", (-46, -3), sb.DI_SCREEN_CENTER_BOTTOM, alpha: NextMagLoaded ? 0.6 : 1.0, scale: (1.0, 1.0)); + } else { + sb.DrawBar("PDMGNORM", "PDMGGREY", NextMagLoaded, HDPDFourMag.MagCapacity, (-46, -3), -1, sb.SHADER_VERT, sb.DI_SCREEN_CENTER_BOTTOM); + } + + sb.DrawNum(hpl.CountInv('HDPDFourMag'), -43, -8, sb.DI_SCREEN_CENTER_BOTTOM); + + if (hdw.weaponStatus[PDS_FLAGS] & PDF_SLUGLAUNCHER) { + sb.DrawImage("SLG1A0",(-59, -8), sb.DI_SCREEN_CENTER_BOTTOM, scale: (0.6, 0.6)); + sb.DrawNum(hpl.CountInv('HDSlugAmmo'), -58, -8, sb.DI_SCREEN_CENTER_BOTTOM); + } + } + + sb.DrawWepNum(hdw.weaponStatus[PDS_MAG], HDPDFourMag.MagCapacity); + + if (hdw.weaponStatus[PDS_CHAMBER] == 1) { + sb.DrawRect(-19, -11, 3, 1); + } + + if (hdw.weaponStatus[PDS_FLAGS] & PDF_SLUGLOADED) { + sb.DrawRect(-20, -15, 4, 2.6); + } + + sb.DrawWepCounter(hdw.weaponStatus[PDS_FIREMODE], -22, -10, "RBRSA3A7", "STBURAUT", "STFULAUT"); + } + + override string GetHelpText() { + return WEPHELP_FIRESHOOT + ..(weaponStatus[PDS_FLAGS] & PDF_SLUGLAUNCHER ? WEPHELP_ALTFIRE.. " Fire Slug Thrower\n" : "") + ..(weaponStatus[PDS_FLAGS] & PDF_SLUGLAUNCHER ? WEPHELP_ALTRELOAD.. " Load Slug Thrower\n" : "") + ..(weaponStatus[PDS_FLAGS] & PDF_SLUGLAUNCHER ? WEPHELP_FIREMODE.."+"..WEPHELP_UNLOAD.. " Unload Slug Thrower\n" : "") + ..WEPHELP_RELOAD.." Reload mag\n" + ..WEPHELP_UNLOADUNLOAD + ..WEPHELP_FIREMODE.." Semi Auto/Double Tap/Full Auto\n" + ..WEPHELP_MAGMANAGER; + } + + override void DrawSightPicture( + HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl, + bool sightbob, vector2 bob, double fov, bool scopeview, actor hpc, string whichdot + ) { + vector2 bobb = bob*1.18; + + if (weaponStatus[PDS_FLAGS] & PDF_REFLEXSIGHT) { + double dotoff = max(abs(bob.x), abs(bob.y)); + if (dotoff < 6) { + string whichdot = sb.ChooseReflexReticle(hdw.weaponStatus[PDS_DOT]); + sb.DrawImage(whichdot, (0, 0) + bob * 3, sb.DI_SCREEN_CENTER | sb.DI_ITEM_CENTER, alpha : 0.8 - dotoff * 0.04, col:0xFF000000 | sb.crosshaircolor.GetInt()); + } + sb.DrawImage("PDWBACK", (0, -18) + bob, sb.DI_SCREEN_CENTER | sb.DI_ITEM_TOP, scale: (0.8, 0.8)); + } else { + int cx,cy,cw,ch; + [cx,cy,cw,ch]=screen.GetClipRect(); + sb.SetClipRect( + -16+bob.x,-4+bob.y,32,16, + sb.DI_SCREEN_CENTER + ); + bobb.y=clamp(bobb.y,-8,8); + sb.drawimage( + "PDFNTSIT",(0,0)+bobb,sb.DI_SCREEN_CENTER|sb.DI_ITEM_TOP + ); + sb.SetClipRect(cx,cy,cw,ch); + sb.drawimage( + "PDBAKSIT",(0,0)+bob,sb.DI_SCREEN_CENTER|sb.DI_ITEM_TOP, + alpha:0.9 + ); + } + } + + override void DropOneAmmo(int amt) { + if (owner) { + double oldAngle = owner.angle; + + amt = clamp(amt, 1, 10); + if (owner.CheckInventory('FourMilAmmo', 1)) { + owner.A_DropInventory('FourMilAmmo', amt * 30); + } else { + owner.A_DropInventory('HDPDFourMag', amt); + } + + owner.angle += 15; + if (owner.CheckInventory('HDSlugAmmo', 1)) { + owner.A_DropInventory('HDSlugAmmo', amt * 4); + } + + owner.angle = oldAngle; + } + } + + override void SetReflexReticle(int which) { + weaponStatus[PDS_DOT] = which; + } + + action void A_CheckReflexSight() { + if(invoker.weaponStatus[PDS_FLAGS] & PDF_REFLEXSIGHT) { + Player.GetPSprite(PSP_WEAPON).sprite=getspriteindex("PDFGA0"); + } else { + Player.GetPSprite(PSP_WEAPON).sprite=getspriteindex("PDFSA0"); + } + } + + states{ + select0: + PDFG A 0 A_CheckDefaultReflexReticle(PDS_DOT); + PDFG A 0 A_CheckReflexSight(); + goto select0Small; + + deselect0: + PDFG A 0 A_CheckReflexSight(); + goto deselect0Small; + PDFG AB 0; + PDFS AB 0; + + ready: + PDFG A 0 A_CheckReflexSight(); + #### A 1 + { + invoker.BurstIndex = 0; + A_WeaponReady(WRF_ALL); + } + goto readyend; + + user3: + ---- A 0 A_MagManager("HDPDFourMag"); + goto ready; + + firemode: + ---- A 1 + { + ++invoker.weaponStatus[PDS_FIREMODE] %= 3; + } + goto nope; + + fire: + #### A 0; + fire2: + #### B 1 + { + if (invoker.weaponStatus[PDS_CHAMBER] > 0) { + A_Overlay(PSP_FLASH, "Flash"); + } else { + SetWeaponState('chamber_manual'); + } + } + #### A 0 + { + A_WeaponOffset(0, 35); + if (invoker.weaponStatus[PDS_MAG] > 0) { + invoker.weaponStatus[PDS_CHAMBER] = 1; + invoker.weaponStatus[PDS_MAG]--; + } + + if (invoker.weaponStatus[PDS_FIREMODE] == 2) { + A_SetTics(2); + } + + A_WeaponReady(WRF_NOFIRE); + } + #### # 0 + { + switch (invoker.weaponStatus[PDS_FIREMODE]) { + case 1: + if (invoker.BurstIndex < 2) { + invoker.BurstIndex++; + A_Refire('fire'); + } + break; + case 2: + A_Refire('fire'); + break; + } + } + goto nope; + + altfire: + #### # 0 A_JumpIf(!(invoker.weaponStatus[PDS_FLAGS] & PDF_SLUGLOADED), 'nope'); + #### # 2 A_Overlay(PSP_FLASH, "AltFlash"); + goto nope; + + flash: + PDFF A 1 + { + HDBulletActor.FireBullet(self, "HDB_426", speedfactor: 0.9); + A_AlertMonsters(HDCONST_ONEMETRE * 15); + A_ZoomRecoil(0.95); + A_StartSound("PD42/Fire", CHAN_WEAPON); + invoker.weaponStatus[PDS_CHAMBER] = 0; + HDFlashAlpha(-200); + A_Light1(); + } + TNT1 A 0 + { + if (invoker.weaponStatus[PDS_FIREMODE] == 1) { + A_MuzzleClimb(-frandom(-0.7, 0.7), -frandom(0.8, 1.2)); + } else { + A_MuzzleClimb(-frandom(-0.5, 0.5), -frandom(0.6, 0.8), -frandom(-0.5, 0.5), -frandom(0.6, 0.8)); + } + } + goto lightdone; + + altflash: + PDFF B 0 + { + A_WeaponOffset(0, 36); + HDBulletActor.FireBullet(self, "HDB_SLUG", speedfactor: 0.65); + invoker.weaponStatus[PDS_FLAGS] &= ~PDF_SLUGLOADED; + A_AlertMonsters(); + A_StartSound("weapons/hunter", CHAN_WEAPON); + A_ZoomRecoil(0.95); + } + #### # 2 bright + { + HDFlashAlpha(-200); + A_Light1(); + } + TNT1 A 0 A_MuzzleClimb(-frandom(-0.5, 0.5), -frandom(1.5, 2.0), -frandom(-0.6, 0.6), -frandom(1.5, 2.0)); + goto lightdone; + + unload: + #### A 0 + { + invoker.weaponStatus[PDS_FLAGS] |= PDF_JUSTUNLOAD; + if (PressingFiremode() && invoker.weaponStatus[PDS_FLAGS] & PDF_SLUGLOADED) { + SetWeaponState('unloadst'); + Return; + } + + if (invoker.weaponStatus[PDS_MAG] >= 0) { + SetWeaponState('unmag'); + } else if (invoker.weaponStatus[PDS_CHAMBER] > 0) { + SetWeaponState('UnloadChamber'); + } + } + goto nope; + + unloadchamber: + #### A 1 A_JumpIf(invoker.weaponStatus[PDS_CHAMBER] == 0, "nope"); + #### A 4 Offset(2, 34) + { + A_StartSound("PD42/BoltPull", 8); + } + #### A 6 Offset(1, 36) + { + class Which = invoker.weaponStatus[PDS_CHAMBER] > 1 ? "FourMilAmmo" : "ZM66DroppedRound"; + invoker.weaponStatus[PDS_CHAMBER] = 0; + A_SpawnItemEx(which, cos(pitch) * 10, 0, height - 8 - sin(pitch) * 10, vel.x, vel.y, vel.z, 0, SXF_ABSOLUTEMOMENTUM | SXF_NOCHECKPOSITION | SXF_TRANSFERPITCH); + } + #### A 2 Offset(0, 34); + goto readyend; + + altreload: + #### A 0 + { + invoker.weaponStatus[PDS_FLAGS] &= ~PDF_JUSTUNLOAD; + if (invoker.weaponStatus[PDS_FLAGS] & PDF_SLUGLAUNCHER && !(invoker.weaponStatus[PDS_FLAGS] & PDF_SLUGLOADED) && CheckInventory('HDSlugAmmo', 1)) + { + SetWeaponState('unloadst'); + } + } + goto nope; + + unloadst: + #### A 0 + { + A_SetCrosshair(21); + A_MuzzleClimb(-0.3, -0.3); + } + #### A 2 Offset(0, 34); + #### A 1 Offset(4, 38) A_MuzzleClimb(-0.3,-0.3); + #### A 2 Offset(8, 48) + { + A_StartSound("weapons/huntrackdown", CHAN_WEAPON, CHANF_OVERLAP); + A_MuzzleClimb(-0.3, -0.3); + + if (invoker.weaponStatus[PDS_FLAGS] & PDF_SLUGLOADED) { + A_StartSound("weapons/huntreload", CHAN_WEAPON); + } + } + #### A 4 Offset(10, 49) + { + if (!(invoker.weaponStatus[PDS_FLAGS] & PDF_SLUGLOADED)) { + if (invoker.weaponStatus[PDS_FLAGS] & PDF_JUSTUNLOAD) { + A_SetTics(3); + } + + return; + } + + invoker.weaponStatus[PDS_FLAGS] &= ~PDF_SLUGLOADED; + + if(!PressingUnload() || A_JumpIfInventory('HDSlugAmmo', 0, 'Null')) { + A_SpawnItemEx('HDSlugAmmo', cos(pitch) * 10, 0, height - 10 - 10 * sin(pitch), vel.x, vel.y, vel.z, 0, SXF_ABSOLUTEMOMENTUM | SXF_NOCHECKPOSITION | SXF_TRANSFERPITCH); + } else { + A_SetTics(20); + A_StartSound("weapons/pocket", CHAN_WEAPON, CHANF_OVERLAP); + A_GiveInventory('HDSlugAmmo', 1); + A_MuzzleClimb(frandom(0.8, -0.2), frandom(0.4, -0.2)); + } + } + #### A 0 A_JumpIf(invoker.weaponStatus[PDS_FLAGS] & PDF_JUSTUNLOAD, 'ReloadEndST'); + + loadst: + #### A 2 Offset(10, 50) A_StartSound("weapons/pocket", CHAN_WEAPON, CHANF_OVERLAP); + #### A 5 Offset(10, 50) A_MuzzleClimb(frandom(-0.2, 0.8), frandom(-0.2, 0.4)); + #### A 10 Offset(8, 50) + { + A_TakeInventory('HDSlugAmmo', 1, TIF_NOTAKEINFINITE); + invoker.weaponStatus[PDS_FLAGS] |= PDF_SLUGLOADED; + A_StartSound("weapons/huntreload", CHAN_WEAPON); + } + + reloadendst: + #### A 4 Offset(4, 44) A_StartSound("weapons/huntrackdown", CHAN_WEAPON); + #### A 1 Offset(0, 40); + #### A 1 Offset(0, 34) A_MuzzleClimb(frandom(-2.4, 0.2), frandom(-1.4, 0.2)); + goto nope; + + reload: + #### A 0 + { + invoker.weaponStatus[PDS_FLAGS] &= ~PDF_JUSTUNLOAD; + bool noMags = HDMagAmmo.NothingLoaded(self, "HDPDFourMag"); + int mag = invoker.weaponStatus[PDS_MAG]; + if (mag >= HDPDFourMag.MagCapacity || mag < HDPDFourMag.MagCapacity && noMags) { + SetWeaponState("nope"); + } + } + goto unmag; + + unmag: + #### A 1 Offset(0,34) A_SetCrosshair(21); + #### A 1 Offset(5,38); + #### A 1 Offset(10,42); + #### A 2 Offset(20,46) A_StartSound("weapons/smgmagclick",8); + #### A 4 Offset(30,52) + { + A_MuzzleClimb(0.3,0.4); + A_StartSound("PD42/MagOut",8,CHANF_OVERLAP); + } + #### A 0 + { + int magamt = invoker.weaponStatus[PDS_MAG]; + if(magamt < 0) { + SetWeaponState("magout"); + return; + } + + invoker.weaponStatus[PDS_MAG]=-1; + if ( + (!PressingUnload() && !PressingReload()) + || A_JumpIfInventory("HDPDFourMag",0,"null") + ) { + HDMagAmmo.SpawnMag(self,"HDPDFourMag", magamt); + SetWeaponState("magout"); + } else { + HDMagAmmo.GiveMag(self,"HDPDFourMag", magamt); + A_StartSound("weapons/pocket",9); + SetWeaponState("pocketmag"); + } + } + pocketmag: + #### AA 7 Offset(34,54) A_MuzzleClimb(frandom(0.2, -0.8), frandom(-0.2, 0.4)); + magout: + #### A 0 + { + if(invoker.weaponStatus[PDS_FLAGS] & PDF_JUSTUNLOAD) { + SetWeaponState("reloadend"); + } else { + SetWeaponState("loadmag"); + } + } + + loadmag: + #### A 0 A_StartSound("weapons/pocket", 9); + #### A 6 Offset(26, 54) A_MuzzleClimb(frandom(0.2, -0.8), frandom(-0.2, 0.4)); + #### A 7 Offset(26, 52) A_MuzzleClimb(frandom(0.2, -0.8), frandom(-0.2, 0.4)); + #### A 10 Offset(24, 50); + #### A 3 Offset(24, 48) + { + let mag = HDMagAmmo(FindInventory("HDPDFourMag")); + if (mag) { + invoker.weaponStatus[PDS_MAG] = mag.TakeMag(true); + A_StartSound("PD42/MagIn", 8, CHANF_OVERLAP); + } + } + goto reloadend; + + reloadend: + #### A 3 Offset(30, 52); + #### A 2 Offset(20, 46); + #### A 1 Offset(10, 42); + #### A 1 Offset(5, 38); + #### A 1 Offset(0, 34); + goto chamber_manual; + + chamber_manual: + #### A 0 A_JumpIf( + invoker.weaponStatus[PDS_MAG] <= 0 + || invoker.weaponStatus[PDS_CHAMBER] == 1, + "nope"); + #### A 2 Offset(2, 34); + #### A 2 Offset(3, 38) A_StartSound("PD42/BoltPull", 8, CHANF_OVERLAP); + #### A 3 Offset(4, 44) + { + if (invoker.weaponStatus[PDS_CHAMBER] == 1) { + A_SpawnItemEx("ZM66DroppedRound", cos(pitch) * 10, 0, height - 10 - sin(pitch) * 10, vel.x, vel.y, vel.z, 0, SXF_ABSOLUTEMOMENTUM | SXF_NOCHECKPOSITION | SXF_TRANSFERPITCH); + invoker.weaponStatus[PDS_CHAMBER] = 0; + } + + A_WeaponBusy(); + invoker.weaponStatus[PDS_MAG]--; + invoker.weaponStatus[PDS_CHAMBER] = 1; + } + #### A 1 Offset(3, 38); + #### A 1 Offset(2, 34); + #### A 1 Offset(0, 32); + goto nope; + + spawn: + TNT1 A 1; + PDWS A 0 A_JumpIf(invoker.weaponStatus[PDS_FLAGS] & PDF_SLUGLAUNCHER, 2); + PDWG A 0; + #### # -1 + { + int offset = invoker.weaponStatus[PDS_FLAGS] & PDF_REFLEXSIGHT ? 2 : 0; + frame = (invoker.weaponStatus[PDS_MAG] < 0 ? 1 : 0) + offset; + } + stop; + } + + override void InitializeWepStats(bool idfa) { + weaponStatus[PDS_MAG] = HDPDFourMag.MagCapacity; + weaponStatus[PDS_CHAMBER] = 1; + + if (weaponStatus[PDS_FLAGS] & PDF_SLUGLAUNCHER) { + weaponStatus[PDS_FLAGS] |= PDF_SLUGLOADED; + } + } + + override void LoadoutConfigure(string input) { + let firemode = GetLoadoutVar(input, "firemode", 1); + if (firemode >= 0) { + weaponStatus[PDS_FIREMODE] = clamp(firemode, 0, 2); + } + + if (GetLoadoutVar(input, "reflexsight", 1) > 0) { + weaponStatus[PDS_FLAGS] |= PDF_REFLEXSIGHT; + + let xhdot = GetLoadoutVar(input, "dot", 3); + if (xhdot >= 0) { + weaponStatus[PDS_DOT] = xhdot; + } + } + + if (GetLoadoutVar(input, "slugger", 1) > 0) { + weaponStatus[PDS_FLAGS] |= PDF_SLUGLAUNCHER; + } + + InitializeWepStats(); + } +} + +enum PDFourStatus { + PDF_JUSTUNLOAD = 1, + PDF_SLUGLOADED = 2, + PDF_SLUGLAUNCHER = 4, + PDF_REFLEXSIGHT = 8, + + PDS_FLAGS = 0, + PDS_MAG = 1, + PDS_CHAMBER = 2, + PDS_FIREMODE = 3, //0 semi, 1 burst, 2 auto + PDS_DOT = 4 +} + +class PDFourRandom : IdleDummy { + states { + spawn: + TNT1 A 0 NoDelay + { + A_SpawnItemEx('HDPDFourMag', -3,flags: SXF_NOCHECKPOSITION); + A_SpawnItemEx('HDPDFourMag', 3,flags: SXF_NOCHECKPOSITION); + + let wpn = HDPDFour(Spawn('HDPDFour', pos, ALLOW_REPLACE)); + if (!wpn) return; + + HDF.TransferSpecials(self, wpn); + + if (!random(0, 2)) { + wpn.weaponStatus[PDS_FLAGS] |= PDF_REFLEXSIGHT; + } + + if (!random(0, 2)) { + wpn.weaponStatus[PDS_FIREMODE] = random(0, 2); + } + + if (!random(0, 2)) { + wpn.weaponStatus[PDS_FLAGS] |= PDF_SLUGLAUNCHER; + A_SpawnItemEx('SlugPickup', -6,flags: SXF_NOCHECKPOSITION); + } + + wpn.InitializeWepStats(false); + } + stop; + } +} + +class HDPDFourMag : HDMagAmmo { + + override string PickupMessage() + { + return Stringtable.localize("$PICKUP_PD42MAG_PREFIX")..Stringtable.localize("$TAG_PD42MAG")..Stringtable.localize("$PICKUP_PD42MAG_SUFFIX"); + } + + override string, string, name, double GetMagSprite(int thismagamt) + { + return (thismagamt > 0) ? "PDMGA0" : "PDMGB0", "RBRSBRN", "FourMilAmmo", 1.0; + } + + override void GetItemsThatUseThis() { + ItemsThatUseThis.Push("HDPDFour"); + } + + const MagCapacity = 36; + const EncMagEmpty = 6; + const EncMagLoaded = EncMagEmpty * 0.8; + + Default { + HDMagAmmo.MaxPerUnit MagCapacity; + HDMagAmmo.InsertTime 8; + HDMagAmmo.ExtractTime 6; + HDMagAmmo.RoundType "FourMilAmmo"; + HDMagAmmo.RoundBulk ENC_426_LOADED; + HDMagAmmo.MagBulk EncMagEmpty; + Tag "$TAG_PD42MAG"; + HDPickup.RefId HDLD_PD4MAG; + Scale 0.35; + } + + override bool Extract() { + SyncAmount(); + int mindex = Mags.Size() - 1; + if (mindex == -1 || Mags[mindex] < 1 || owner.A_JumpIfInventory(roundtype, 0, "null")) { + return false; + } + + ExtractTime = GetDefaultByType(GetClass()).extracttime; + + int toTake = min(random(1, 24), mags[mindex]); + if (toTake < HDPickup.MaxGive(owner, roundtype, roundbulk)) { + HDF.Give(owner, roundtype, totake); + } else { + HDPickup.DropItem(owner, roundtype, totake); + } + + owner.A_StartSound("weapons/rifleclick2", CHAN_WEAPON); + owner.A_StartSound("weapons/rockreload", CHAN_WEAPON, CHANF_OVERLAP, 0.4); + + Mags[mindex] -= totake; + + return true; + } + + override bool Insert() { + SyncAmount(); + + int mindex = Mags.Size() - 1; + if (mindex == -1 || Mags[Mags.Size() - 1] >= MaxPerUnit || owner.CountInv(roundtype) == 0) { + return false; + } + + owner.A_TakeInventory(roundtype, 1, TIF_NOTAKEINFINITE); + owner.A_StartSound("weapons/rifleclick2", 7); + + if (random(0,100) <= 10) { + owner.A_StartSound("weapons/bigcrack", 8, CHANF_OVERLAP); + owner.A_SpawnItemEx("WallChunk", 12, 0, owner.height - 12, 4, frandom(-2, 2), frandom(2, 4)); + return false; + } + owner.A_StartSound("weapons/pocket", 9, volume: frandom(0.1, 0.6)); + Mags[mindex]++; + return true; + } + + states{ + spawn: + PDMG A -1; + stop; + spawnempty: + PDMG B -1 + { + bROLLSPRITE = true; + bROLLCENTER = true; + roll = randompick(0, 0, 0, 0, 2, 2, 2, 2, 1, 3) * 90; + } + stop; + } +} diff --git a/zscript/Six12/six12.zs b/zscript/icarus/weapons/Six12/six12.zs similarity index 86% rename from zscript/Six12/six12.zs rename to zscript/icarus/weapons/Six12/six12.zs index 651ddaf..3e534fc 100644 --- a/zscript/Six12/six12.zs +++ b/zscript/icarus/weapons/Six12/six12.zs @@ -1,59 +1,3 @@ -class Six12Handler : EventHandler -{ - override void CheckReplacement(ReplaceEvent e) - { - if (!e.Replacement) - { - return; - } - - switch (e.Replacement.GetClassName()) - { - case 'ShotgunReplaces': - if (random[sxtwlvrand]() <= AceCore.GetScaledChance(8, 32, acl_spawnscale_min, acl_spawnscale_max)) - { - e.Replacement = "Six12Random"; - } - break; - case 'SSGReplaces': - if (random[sxtwlvrand]() <= AceCore.GetScaledChance(12, 48, acl_spawnscale_min, acl_spawnscale_max)) - { - e.Replacement = "Six12Random"; - } - break; - case 'ShellRandom': - if (random[sxtwlvrand]() <= AceCore.GetScaledChance(4, 16, acl_spawnscale_min, acl_spawnscale_max)) - { - e.Replacement = "HDSix12MagSlugs"; - } - break; - case 'ShellRandom': - if (random[sxtwlvrand]() <= AceCore.GetScaledChance(4, 16, acl_spawnscale_min, acl_spawnscale_max)) - { - e.Replacement = "HDSix12MagShells"; - } - break; - } - } - - override void WorldThingSpawned(WorldEvent e) - { - let Six12Ammo = HDAmmo(e.Thing); - if (!Six12Ammo) - { - return; - } - if (Six12Ammo.GetClassName() == 'HDSlugAmmo') - { - Six12Ammo.ItemsThatUseThis.Push("HDSix12"); - } - if (Six12Ammo.GetClassName() == 'HDShellAmmo') - { - Six12Ammo.ItemsThatUseThis.Push("HDSix12"); - } - } -} - class HDSix12 : HDWeapon { enum Six12Flags @@ -95,12 +39,16 @@ class HDSix12 : HDWeapon } return BaseBulk; } + + override string PickupMessage() + { + return Stringtable.localize("$PICKUP_SIX12_PREFIX")..Stringtable.localize("$TAG_SIX12")..Stringtable.localize("$PICKUP_SIX12_SUFFIX"); + } override string, double GetPickupSprite() { string PrimMagFrame = WeaponStatus[STProp_MagType] == 0 ? "B" : "S"; - string SecMagFrame = WeaponStatus[STProp_Mag] == -1 ? "E" : "F"; - return "ST"..PrimMagFrame..SecMagFrame.."A0", 1.0; + return WeaponStatus[STProp_Mag] == -1 ? "STPEA0" : "ST"..PrimMagFrame.."FA0", 1.0; } override void LoadoutConfigure(string input) { @@ -217,9 +165,9 @@ class HDSix12 : HDWeapon Weapon.SlotPriority 3; HDWeapon.BarrelSize 24, 1, 2; Scale 0.5; - Tag "Six12 Shotgun"; - HDWeapon.Refid "612"; - Inventory.PickupMessage "You picked up the Six12 Shotgun"; + Tag "$TAG_SIX12"; + HDWeapon.Refid HDLD_SIX12; + Inventory.PickupMessage "$PICKUP_SIX12"; HDWeapon.Loadoutcodes " \cuslugs - Loaded with Slug Mag"; } @@ -227,14 +175,22 @@ class HDSix12 : HDWeapon States { RegisterSprites: - STBE A 0; STBF A 0; STSE A 0; STSF A 0; + // Empty Pickup + STPE A 0; + + // Full Pickups + STBF A 0; + STSF A 0; Spawn: STBF A 0 NoDelay { - string PrimMagFrame = invoker.WeaponStatus[STProp_MagType] == 0 ? "B" : "S"; - string SecMagFrame = invoker.WeaponStatus[STProp_Mag] == -1 ? "E" : "F"; - sprite = GetSpriteIndex("ST"..PrimMagFrame..SecMagFrame); + if (invoker.WeaponStatus[STProp_Mag] == -1) { + sprite = GetSpriteIndex("STPE"); + } else { + string PrimMagFrame = invoker.WeaponStatus[STProp_MagType] == 0 ? "B" : "S"; + sprite = GetSpriteIndex("ST"..PrimMagFrame.."F"); + } } RealSpawn: #### A -1; @@ -451,6 +407,11 @@ class Six12Random : IdleDummy class HDSix12MagShells : HDMagAmmo { + override string PickupMessage() + { + return Stringtable.localize("$PICKUP_SIX12MAG_SHELL_PREFIX")..Stringtable.localize("$TAG_SIX12MAG_SHELL")..Stringtable.localize("$PICKUP_SIX12MAG_SHELL_SUFFIX"); + } + override string, string, name, double GetMagSprite(int thismagamt) { string magsprite; @@ -466,6 +427,7 @@ class HDSix12MagShells : HDMagAmmo override void GetItemsThatUseThis() { + ItemsThatUseThis.Push("HDBarracuda"); ItemsThatUseThis.Push("HDSix12"); } @@ -481,9 +443,8 @@ class HDSix12MagShells : HDMagAmmo HDMagAmmo.RoundType "HDShellAmmo"; HDMagAmmo.RoundBulk ENC_SHELLLOADED; HDMagAmmo.MagBulk EncMagEmpty; - Tag "Six12 Shell Mag"; - Inventory.PickupMessage "Picked up a Six12 Shell Magazine."; - HDPickup.RefId "6sh"; + Tag "$TAG_SIX12MAG_SHELL"; + HDPickup.RefId HDLD_SIX12MAG_SHELL; Scale 0.5; } @@ -505,6 +466,11 @@ class HDSix12MagShells : HDMagAmmo class HDSix12MagSlugs : HDMagAmmo { + override string PickupMessage() + { + return Stringtable.localize("$PICKUP_SIX12MAG_SLUG_PREFIX")..Stringtable.localize("$TAG_SIX12MAG_SLUG")..Stringtable.localize("$PICKUP_SIX12MAG_SLUG_SUFFIX"); + } + override string, string, name, double GetMagSprite(int thismagamt) { string magsprite; @@ -520,6 +486,7 @@ class HDSix12MagSlugs : HDMagAmmo override void GetItemsThatUseThis() { + ItemsThatUseThis.Push("HDBarracuda"); ItemsThatUseThis.Push("HDSix12"); } @@ -535,9 +502,8 @@ class HDSix12MagSlugs : HDMagAmmo HDMagAmmo.RoundType "HDSlugAmmo"; HDMagAmmo.RoundBulk ENC_SHELLLOADED; HDMagAmmo.MagBulk EncMagEmpty; - Tag "Six12 Slug Mag"; - Inventory.PickupMessage "Picked up a Six12 Slug Magazine"; - HDPickup.RefId "6sl"; + Tag "$TAG_SIX12MAG_SLUG"; + HDPickup.RefId HDLD_SIX12MAG_SLUG; Scale 0.5; } diff --git a/zscript/icarus/weapons/UMP/ump.zs b/zscript/icarus/weapons/UMP/ump.zs new file mode 100644 index 0000000..639259d --- /dev/null +++ b/zscript/icarus/weapons/UMP/ump.zs @@ -0,0 +1,485 @@ +class HDUMP : HDWeapon +{ + const UMP45ACP_LOADED = 0.85; + enum UMPFlags + { + UMF_JustUnload = 1 + } + + enum UMPProperties + { + UMProp_Flags, + UMProp_Chamber, + UMProp_Mag, + UMProp_Mode + } + + override void PostBeginPlay() + { + weaponspecial = 1337; // [Ace] UaS sling compatibility. + Super.PostBeginPlay(); + } + + override bool AddSpareWeapon(actor newowner) { return AddSpareWeaponRegular(newowner); } + override HDWeapon GetSpareWeapon(actor newowner , bool reverse, bool doselect) { return GetSpareWeaponRegular(newowner, reverse, doselect); } + + override double GunMass() + { + return 9.5 + 0.03 * WeaponStatus[UMProp_Mag]; + } + + override double WeaponBulk() + { + double BaseBulk = 110; + int Mag = WeaponStatus[UMProp_Mag]; + if (Mag >= 0) + { + BaseBulk += HDUMPMag.EncMagLoaded + Mag * UMP45ACP_LOADED; + //BaseBulk += HDUMPMag.EncMagLoaded + Mag * HD45ACPAmmo.UMP45ACP_LOADED; + } + return BaseBulk; + } + + override string PickupMessage() + { + return Stringtable.localize("$PICKUP_UMP_PREFIX")..Stringtable.localize("$TAG_UMP")..Stringtable.localize("$PICKUP_UMP_SUFFIX"); + } + + override string, double GetPickupSprite() + { + return WeaponStatus[UMProp_Mag] >= 0 ? "UMPGZ0" : "UMPGY0", 1.0; + } + + override void InitializeWepStats(bool idfa) + { + WeaponStatus[UMProp_Chamber] = 2; + WeaponStatus[UMProp_Mag] = HDUMPMag.MagCapacity; + } + + override void ForceBasicAmmo() + { + owner.A_TakeInventory("HD45ACPAmmo"); + owner.A_TakeInventory("HDUMPMag"); + owner.A_GiveInventory("HDUMPMag"); + } + + override void DropOneAmmo(int amt) + { + if (owner) + { + amt = clamp(amt, 1, 10); + if (owner.CheckInventory("HD45ACPAmmo", 1)) + { + owner.A_DropInventory("HD45ACPAmmo", amt * 10); + } + else + { + owner.A_DropInventory("HDUMPMag", amt); + } + } + } + + override string GetHelpText() + { + return WEPHELP_FIRESHOOT + ..WEPHELP_FIREMODE.." Semi Auto/Full Auto\n" + ..WEPHELP_RELOAD.." Reload mag\n" + ..WEPHELP_USE.."+"..WEPHELP_RELOAD.." Reload chamber\n" + ..WEPHELP_MAGMANAGER; + } + + override void DrawHUDStuff(HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl) + { + if (sb.hudlevel == 1) + { + int NextMagLoaded = sb.GetNextLoadMag(HDMagAmmo(hpl.findinventory("HDUMPMag"))); + if (NextMagLoaded >= HDUMPMag.MagCapacity) + { + sb.DrawImage("UMPMA0", (-46, -3),sb. DI_SCREEN_CENTER_BOTTOM); + } + else if (NextMagLoaded <= 0) + { + sb.DrawImage("UMPMB0", (-46, -3), sb.DI_SCREEN_CENTER_BOTTOM, alpha: NextMagLoaded ? 0.6 : 1.0); + } + else + { + sb.DrawBar("UMPMNORM", "UMPMGREY", NextMagLoaded, HDUMPMag.MagCapacity, (-46, -3), -1, sb.SHADER_VERT, sb.DI_SCREEN_CENTER_BOTTOM); + } + sb.DrawNum(hpl.CountInv("HDUMPMag"), -43, -8, sb.DI_SCREEN_CENTER_BOTTOM); + } + sb.DrawWepNum(hdw.WeaponStatus[UMProp_Mag], HDUMPMag.MagCapacity); + + if(hdw.WeaponStatus[UMProp_Chamber] == 2) + { + sb.DrawRect(-19, -11, 3, 1); + } + + sb.DrawWepCounter(hdw.WeaponStatus[UMProp_Mode], -22, -10, "RBRSA3A7", "STFULAUT"); + } + + override void DrawSightPicture(HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl, bool sightbob, vector2 bob, double fov, bool scopeview, actor hpc, string whichdot) + { + int cx, cy, cw, ch; + [cx, cy, cw, ch] = Screen.GetClipRect(); + sb.SetClipRect(-10 + bob.x, -4 + bob.y, 20, 20, sb.DI_SCREEN_CENTER); + vector2 bob2 = bob * 2; + bob2.y = clamp(bob2.y, -8, 8); + sb.DrawImage("UMPFRNT", (0, -4) + bob2, sb.DI_SCREEN_CENTER | sb.DI_ITEM_TOP, scale: (1.0, 0.8)); + sb.SetClipRect(cx, cy, cw, ch); + sb.DrawImage("UMPBACK", (0, -4) + bob, sb.DI_SCREEN_CENTER | sb.DI_ITEM_TOP, scale: (1.0, 0.8)); + } + + private action void A_UpdateChamberFrame() + { + let psp = player.GetPSprite(PSP_WEAPON); + psp.frame = invoker.WeaponStatus[UMProp_Chamber] == 0 ? 1 : 0; + } + + Default + { + +HDWEAPON.FITSINBACKPACK + Weapon.SelectionOrder 300; + Weapon.SlotNumber 4; + Weapon.SlotPriority 1.5; + HDWeapon.BarrelSize 20, 2, 3; + Scale 0.5; + Tag "$TAG_UMP"; + HDWeapon.Refid HDLD_UMP; + Inventory.PickupMessage "$PICKUP_UMP"; + } + + States + { + Spawn: + UMPG Z 0 NoDelay A_JumpIf(invoker.WeaponStatus[UMProp_Mag] >= 0, 2); + UMPG Y 0; + #### # -1; + Stop; + Ready: + UMPG A 1 + { + A_UpdateChamberFrame(); + A_WeaponReady(WRF_ALL); + } + Goto ReadyEnd; + Select0: + UMPG A 0 A_UpdateChamberFrame(); + Goto Select0Big; + Deselect0: + UMPG A 0 A_UpdateChamberFrame(); + Goto Deselect0Big; + User3: + #### A 0 A_MagManager("HDUMPMag"); + Goto Ready; + Firemode: + UMPG A 1 + { + ++invoker.WeaponStatus[UMProp_Mode] %= 2; + } + Goto Nope; + + Fire: + UMPG # 0 + { + if (invoker.WeaponStatus[UMProp_Chamber] == 2) + { + SetWeaponState("Shoot"); + } + else if (invoker.WeaponStatus[UMProp_Mag] > 0) + { + SetWeaponState("ChamberManual"); + } + } + Goto Nope; + Shoot: + UMPF A 2 + { + HDFlashAlpha(128); + A_Light1(); + A_StartSound("UMP/Fire", CHAN_WEAPON); + HDBulletActor.FireBullet(self, "HDB_45ACP", spread: 1.0, speedfactor: 1.1); + A_AlertMonsters(); + A_ZoomRecoil(1.05); + A_MuzzleClimb(-frandom(-0.5, 0.5), -frandom(0.5, 0.6), -frandom(-0.5, 0.5), -frandom(0.5, 0.6)); + invoker.WeaponStatus[UMProp_Chamber] = 1; + } + UMPG A 1 + { + if (invoker.WeaponStatus[UMProp_Chamber] == 1) + { + A_EjectCasing('HDSpent45ACP', frandom(-1,2),(frandom(0.2,0.3),-frandom(7,7.5),frandom(0,0.2)),(0,0,-2)); + invoker.WeaponStatus[UMProp_Chamber] = 0; + } + + if (invoker.WeaponStatus[UMProp_Mag] <= 0) + { + A_StartSound("weapons/pistoldry", 8, CHANF_OVERLAP, 0.9); + SetWeaponState("Nope"); + } + else + { + A_Light0(); + invoker.WeaponStatus[UMProp_Chamber] = 2; + invoker.WeaponStatus[UMProp_Mag]--; + } + } + UMPG A 1 + { + + switch (invoker.WeaponStatus[UMProp_Mode]) + { + case 1: + { + A_Refire('Shoot'); + break; + } + } + } + Goto Nope; + + Unload: + #### # 0 + { + invoker.WeaponStatus[UMProp_Flags] |= UMF_JustUnload; + if (invoker.WeaponStatus[UMProp_Mag] >= 0) + { + SetWeaponState('RemoveMag'); + } + else if (invoker.WeaponStatus[UMProp_Chamber] > 0) + { + SetWeaponState('ChamberManual'); + } + } + Goto Nope; + RemoveMag: + UMPG # 2 Offset(0,36) + { + A_SetCrosshair(21); + A_MuzzleClimb(frandom(-1.2,-2.4),frandom(1.2,2.4)); + } + #### # 2 Offset(1,37); + #### # 2 Offset(2,38); + #### # 2 Offset(3,42); + #### # 2 Offset(5,44); + #### # 2 Offset(6,42); + #### # 2 Offset(7,43) A_StartSound("UMP/MagOut",8); + #### # 2 Offset(8,42); + #### # 0 + { + if (invoker.WeaponStatus[UMProp_Mag] > -1) + { + int mag = invoker.WeaponStatus[UMProp_Mag]; + invoker.WeaponStatus[UMProp_Mag] = -1; + if ((!PressingUnload() && !PressingReload()) || A_JumpIfInventory('HDUMPMag', 0, 'null')) + { + HDMagAmmo.SpawnMag(self, 'HDUMPMag', mag); + } + else + { + HDMagAmmo.GiveMag(self, 'HDUMPMag', mag); + A_StartSound("weapons/pocket", 9); + SetWeaponState('PocketMag'); + } + } + } + #### # 0 A_JumpIf(!(invoker.WeaponStatus[UMProp_Flags] & UMF_JustUnload), 'LoadMag'); + #### # 2; + UMPG A 0 A_UpdateChamberFrame(); + Goto Nope; + PocketMag: + UMPG #### 5 Offset(8,42) + { + A_MuzzleClimb(frandom(-0.2, 0.8), frandom(-0.2, 0.4)); + } + Goto MagOut; + MagOut: + UMPG # 0 A_JumpIf(invoker.WeaponStatus[UMProp_Flags] & UMF_JustUnload, "ReloadEnd"); + Goto LoadMag; + + Reload: + UMPG # 0 + { + invoker.WeaponStatus[UMProp_Flags] &=~ UMF_JustUnload; + bool noMags = HDMagAmmo.NothingLoaded(self, 'HDUMPMag'); + if (invoker.WeaponStatus[UMProp_Mag] >= 25) + { + SetWeaponState('Nope'); + } + else if (invoker.WeaponStatus[UMProp_Mag] <= 0 && (PressingUse() || noMags)) + { + if (CheckInventory('HD45ACPAmmo', 1)) + { + SetWeaponState('LoadChamber'); + } + else + { + SetWeaponState('Nope'); + } + } + else if (noMags) + { + SetWeaponState('Nope'); + } + } + Goto RemoveMag; + LoadMag: + UMPG # 4 Offset(8,42) A_MuzzleClimb(frandom(-0.2, 0.8), frandom(-0.2, 0.4)); + #### # 4 Offset(7,43) A_StartSound("weapons/pocket", 9); + #### # 4 Offset(6,42) A_MuzzleClimb(frandom(-0.2, 0.8), frandom(-0.2, 0.4)); + #### # 4 Offset(5,44); + #### # 4 Offset(3,42); + #### # 4 Offset(2,38); + #### # 4 Offset(1,37) A_StartSound("UMP/MagIn", 8); + #### # 4 Offset(0,36); + #### A 0 + { + let mag = HDMagAmmo(FindInventory('HDUMPMag')); + if (mag) + { + invoker.WeaponStatus[UMProp_Mag] = mag.TakeMag(true); + } + } + UMPG A 1 A_UpdateChamberFrame(); + UMPG # 1 Offset(0, 36) ; + UMPG # 0 A_JumpIf(!(invoker.WeaponStatus[UMProp_Flags] & UMF_JustUnload) && (invoker.WeaponStatus[UMProp_Chamber] < 2 && invoker.WeaponStatus[UMProp_Mag] > 0), 'ChamberManual'); + Goto ReloadEnd; + ReloadEnd: + UMPG A 6 Offset(0,40); + #### A 2 Offset(0,36); + #### A 4 Offset(0,33); + Goto Nope; + + ChamberManual: + UMPG A 2 Offset(2, 34) A_UpdateChamberFrame(); + UMPG B 2 Offset(3, 38); + UMPG B 3 Offset(4, 44) + { + if (invoker.WeaponStatus[UMProp_Chamber] > 0) + { + A_MuzzleClimb(frandom(0.4, 0.5), -frandom(0.6, 0.8)); + A_StartSound("UMP/SlideBack", 8); + int chamber = invoker.WeaponStatus[UMProp_Chamber]; + invoker.WeaponStatus[UMProp_Chamber] = 0; + switch (Chamber) + { + case 1: A_EjectCasing('HDSpent45ACP', frandom(-1,2),(frandom(0.2,0.3),-frandom(7,7.5),frandom(0,0.2)),(0,0,-2)); + case 2: A_SpawnItemEx('HD45ACPAmmo', cos(pitch * 12), 0, height - 9 - sin(pitch) * 12, 1, 2, 3, 0); break; + } + } + + if (invoker.WeaponStatus[UMProp_Mag] > 0) + { + invoker.WeaponStatus[UMProp_Chamber] = 2; + invoker.WeaponStatus[UMProp_Mag]--; + A_StartSound("UMP/SlideForward", 9); + } + A_UpdateChamberFrame(); + } + UMPG A 1 Offset(3, 38); + UMPG A 1 Offset(2, 34); + UMPG A 1 Offset(0, 32); + Goto Nope; + + LoadChamber: + UMPG # 0 A_JumpIf(invoker.WeaponStatus[UMProp_Chamber] > 0, "Nope"); + #### B 1 Offset(0, 36) A_StartSound("weapons/pocket",9); + #### B 1 Offset(2, 40); + #### B 1 Offset(2, 50); + #### B 1 Offset(3, 60); + #### B 2 Offset(5, 90); + #### B 2 Offset(7, 80); + #### B 2 Offset(10, 90); + #### B 2 Offset(8, 96); + #### B 3 Offset(6, 88) + { + if (CheckInventory("HD45ACPAmmo", 1)) + { + A_StartSound("UMP/SlideForward", 8); + A_TakeInventory('HD45ACPAmmo', 1, TIF_NOTAKEINFINITE); + invoker.WeaponStatus[UMProp_Chamber] = 2; + } + } + #### A 2 Offset(5, 76); + #### A 1 Offset(4, 64); + #### A 1 Offset(3, 56); + #### A 1 Offset(2, 48); + #### A 2 Offset(1, 38); + #### A 3 Offset(0, 34); + Goto ReadyEnd; + } +} + +class UMPrandom : IdleDummy +{ + States + { + Spawn: + TNT1 A 0 NoDelay + { + A_SpawnItemEx("HDUMPMag", -3, flags: SXF_NOCHECKPOSITION); + A_SpawnItemEx("HDUMPMag", -1, flags: SXF_NOCHECKPOSITION); + let wpn = HDUMP(Spawn("HDUMP", pos, ALLOW_REPLACE)); + if (!wpn) + { + return; + } + + HDF.TransferSpecials(self, wpn); + + wpn.InitializeWepStats(false); + } + Stop; + } +} + +class HDUMPMag : HDMagAmmo +{ + + override string PickupMessage() + { + return Stringtable.localize("$PICKUP_UMPMAG_PREFIX")..Stringtable.localize("$TAG_UMPMAG")..Stringtable.localize("$PICKUP_UMPMAG_SUFFIX"); + } + + override string, string, name, double GetMagSprite(int thismagamt) + { + return (thismagamt > 0) ? "UMPMA0" : "UMPMB0", "45RNA0", "HD45ACPAmmo", 0.75; + } + + override void GetItemsThatUseThis() + { + ItemsThatUseThis.Push("HDUMP"); + } + const UMP45ACP_LOADED = 0.85; + const MagCapacity = 25; + const EncMagEmpty = 9; + const EncMagLoaded = EncMagEmpty * 0.9; + + Default + { + HDMagAmmo.MaxPerUnit MagCapacity; + HDMagAmmo.InsertTime 7; + HDMagAmmo.ExtractTime 4; + HDMagAmmo.RoundType "HD45ACPAmmo"; + HDMagAmmo.RoundBulk UMP45ACP_LOADED; + //HDMagAmmo.RoundBulk HD45ACPAmmo.UMP45ACP_LOADED; + HDMagAmmo.MagBulk EncMagEmpty; + Tag "$TAG_UMPMAG"; + HDPickup.RefId HDLD_UMPMAG; + Scale 0.5; + } + + States + { + Spawn: + UMPM A -1; + Stop; + SpawnEmpty: + UMPM B -1 + { + bROLLSPRITE = true; + bROLLCENTER = true; + roll = randompick(0, 0, 0, 0, 2, 2, 2, 2, 1, 3) * 90; + } + Stop; + } +} diff --git a/zscript/icarus/weapons/USP/usp.zs b/zscript/icarus/weapons/USP/usp.zs new file mode 100644 index 0000000..b474381 --- /dev/null +++ b/zscript/icarus/weapons/USP/usp.zs @@ -0,0 +1,447 @@ +class HDUSP : HDHandgun +{ + const USP45ACP_LOADED = 0.85; + enum USPFlags + { + USF_JustUnload = 1 + } + + enum USPProperties + { + USProp_Flags, + USProp_Chamber, + USProp_Mag + } + + override bool AddSpareWeapon(actor newowner) { return AddSpareWeaponRegular(newowner); } + override HDWeapon GetSpareWeapon(actor newowner , bool reverse, bool doselect) { return GetSpareWeaponRegular(newowner, reverse, doselect); } + + override double GunMass() + { + return 10 + 0.03 * WeaponStatus[USProp_Mag]; + } + + override double WeaponBulk() + { + double BaseBulk = 40; + int Mag = WeaponStatus[USProp_Mag]; + if (Mag >= 0) + { + BaseBulk += HDUSPMag.EncMagLoaded + Mag * USP45ACP_LOADED; + } + return BaseBulk; + } + + override string PickupMessage() + { + return Stringtable.localize("$PICKUP_USP_PREFIX")..Stringtable.localize("$TAG_USP")..Stringtable.localize("$PICKUP_USP_SUFFIX"); + } + + override string, double GetPickupSprite() + { + string USPChamber = WeaponStatus[USProp_Chamber] <= 0 ? "Z" : "Y"; + return "USPG"..USPChamber.."0", 0.4; + } + + override void InitializeWepStats(bool idfa) + { + WeaponStatus[USProp_Chamber] = 2; + WeaponStatus[USProp_Mag] = HDUSPMag.MagCapacity; + } + + override void ForceBasicAmmo() + { + owner.A_TakeInventory("HD45ACPAmmo"); + owner.A_TakeInventory("HDUSPMag"); + owner.A_GiveInventory("HDUSPMag"); + } + + override void DropOneAmmo(int amt) + { + if (owner) + { + amt = clamp(amt, 1, 10); + if (owner.CheckInventory("HD45ACPAmmo", 1)) + { + owner.A_DropInventory("HD45ACPAmmo", amt * 10); + } + else + { + owner.A_DropInventory("HDUSPMag", amt); + } + } + } + + override string GetHelpText() + { + return WEPHELP_FIRESHOOT + ..WEPHELP_RELOAD.." Reload mag\n" + ..WEPHELP_USE.."+"..WEPHELP_RELOAD.." Reload chamber\n" + ..WEPHELP_MAGMANAGER; + } + + override void DrawHUDStuff(HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl) + { + if (sb.hudlevel == 1) + { + int NextMagLoaded = sb.GetNextLoadMag(HDMagAmmo(hpl.findinventory("HDUSPMag"))); + if (NextMagLoaded >= HDUSPMag.MagCapacity) + { + sb.DrawImage("USPMA0", (-46, -3),sb. DI_SCREEN_CENTER_BOTTOM); + } + else if (NextMagLoaded <= 0) + { + sb.DrawImage("USPMB0", (-46, -3), sb.DI_SCREEN_CENTER_BOTTOM, alpha: NextMagLoaded ? 0.6 : 1.0); + } + else + { + sb.DrawBar("USPMNORM", "USPMGREY", NextMagLoaded, HDUSPMag.MagCapacity, (-46, -3), -1, sb.SHADER_VERT, sb.DI_SCREEN_CENTER_BOTTOM); + } + sb.DrawNum(hpl.CountInv("HDUSPMag"), -43, -8, sb.DI_SCREEN_CENTER_BOTTOM); + } + sb.DrawWepNum(hdw.WeaponStatus[USProp_Mag], HDUSPMag.MagCapacity); + + if(hdw.WeaponStatus[USProp_Chamber] == 2) + { + sb.DrawRect(-19, -11, 3, 1); + } + } + + override void DrawSightPicture(HDStatusBar sb, HDWeapon hdw, HDPlayerPawn hpl, bool sightbob, vector2 bob, double fov, bool scopeview, actor hpc, string whichdot) + { + int cx, cy, cw, ch; + [cx, cy, cw, ch] = Screen.GetClipRect(); + sb.SetClipRect(-16 + bob.x, -4 + bob.y, 32, 13, sb.DI_SCREEN_CENTER); + vector2 bob2 = bob * 2; + bob2.y = clamp(bob2.y, -8, 8); + sb.DrawImage("USPFRNT", bob2, sb.DI_SCREEN_CENTER | sb.DI_ITEM_TOP, alpha: 0.9, scale: (0.8, 0.6)); + sb.SetClipRect(cx, cy, cw, ch); + sb.DrawImage("USPBACK", bob, sb.DI_SCREEN_CENTER | sb.DI_ITEM_TOP, scale: (0.8, 0.7)); + } + + private action void A_UpdateSlideFrame() + { + let psp = player.GetPSprite(PSP_WEAPON); + psp.frame = invoker.WeaponStatus[USProp_Chamber] == 0 ? 1 : 0; + } + + private action void A_UpdateReloadSprite() + { + let psp = player.GetPSprite(PSP_WEAPON); + psp.sprite = GetSpriteIndex(invoker.WeaponStatus[USProp_Chamber] == 0 ? "USPE" : "USPR"); + } + + Default + { + +HDWEAPON.FITSINBACKPACK + Weapon.SelectionOrder 300; + Weapon.SlotNumber 2; + Weapon.SlotPriority 3; + HDWeapon.BarrelSize 15, 0.5, 0.5; + Scale 0.5; + Tag "$TAG_USP"; + HDWeapon.Refid HDLD_USP; + } + + States + { + RegisterSprites: + USPR A 0; USPE A 0; + + Spawn: + USPG Y 0 NoDelay; + #### # -1 + { + frame = (invoker.WeaponStatus[USProp_Chamber] == 0 ? 25 : 24); + } + Stop; + Ready: + USPG A 1 + { + A_UpdateSlideFrame(); + A_WeaponReady(WRF_ALL); + } + Goto ReadyEnd; + Select0: + USPG A 0 A_UpdateSlideFrame(); + Goto Select0Small; + Deselect0: + USPG A 0 A_UpdateSlideFrame(); + Goto Deselect0Small; + User3: + #### A 0 A_MagManager("HDUSPMag"); + Goto Ready; + + Fire: + USPG # 0 + { + if (invoker.WeaponStatus[USProp_Chamber] == 2) + { + SetWeaponState("Shoot"); + } + else if (invoker.WeaponStatus[USProp_Mag] > 0) + { + SetWeaponState("ChamberManual"); + } + } + Goto Nope; + Shoot: + USPF A 1 + { + HDFlashAlpha(128); + A_Light1(); + A_StartSound("USP/Fire", CHAN_WEAPON); + HDBulletActor.FireBullet(self, "HDB_45ACP", spread: 1.0); + A_AlertMonsters(); + A_ZoomRecoil(1.05); + A_MuzzleClimb(-frandom(0.1, 0.5), -frandom(1.0, 2.5)); + invoker.WeaponStatus[USProp_Chamber] = 1; + } + USPG B 1 + { + if (invoker.WeaponStatus[USProp_Chamber] == 1) + { + A_EjectCasing('HDSpent45ACP',frandom(-1,2),(-frandom(2,3),frandom(0,0.2),frandom(0.4,0.5)),(-2,0,-1)); + invoker.WeaponStatus[USProp_Chamber] = 0; + } + + if (invoker.WeaponStatus[USProp_Mag] <= 0) + { + A_StartSound("weapons/pistoldry", 8, CHANF_OVERLAP, 0.9); + SetWeaponState("Nope"); + } + else + { + A_Light0(); + invoker.WeaponStatus[USProp_Chamber] = 2; + invoker.WeaponStatus[USProp_Mag]--; + } + } + USPG A 1; + Goto Nope; + + Reload: + #### # 0 + { + invoker.WeaponStatus[USProp_Flags] &=~ USF_JustUnload; + bool noMags = HDMagAmmo.NothingLoaded(self, 'HDUSPMag'); + if (invoker.WeaponStatus[USProp_Mag] >= 12) + { + SetWeaponState('Nope'); + } + else if (invoker.WeaponStatus[USProp_Mag] <= 0 && (PressingUse() || noMags)) + { + if (CheckInventory('HD45ACPAmmo', 1)) + { + SetWeaponState('LoadChamber'); + } + else + { + SetWeaponState('Nope'); + } + } + else if (noMags) + { + SetWeaponState('Nope'); + } + } + Goto RemoveMag; + + Unload: + #### # 0 + { + invoker.WeaponStatus[USProp_Flags] |= USF_JustUnload; + if (invoker.WeaponStatus[USProp_Mag] >= 0) + { + SetWeaponState('RemoveMag'); + } + else if (invoker.WeaponStatus[USProp_Chamber] > 0) + { + SetWeaponState('ChamberManual'); + } + } + Goto Nope; + RemoveMag: + #### A 2 Offset(0, 34) + { + A_SetCrosshair(21); + A_UpdateReloadSprite(); + } + #### B 2 Offset(1, 38); + #### C 2 Offset(2, 42); + #### C 5 Offset(3, 46) + { + if (invoker.WeaponStatus[USProp_Mag] > -1) + { + A_StartSound("USP/MagOut", 8, CHANF_OVERLAP); + int mag = invoker.WeaponStatus[USProp_Mag]; + invoker.WeaponStatus[USProp_Mag] = -1; + if ((!PressingUnload() && !PressingReload()) || A_JumpIfInventory('HDUSPMag', 0, 'null')) + { + HDMagAmmo.SpawnMag(self, 'HDUSPMag', mag); + } + else + { + HDMagAmmo.GiveMag(self, 'HDUSPMag', mag); + A_StartSound("weapons/pocket", 9); + SetWeaponState('PocketMag'); + } + } + } + #### C 0 A_JumpIf(!(invoker.WeaponStatus[USProp_Flags] & USF_JustUnload), 'LoadMag'); + #### B 2 Offset(1, 38); + USPG A 0 A_UpdateSlideFrame(); + Goto Nope; + + PocketMag: + #### CCCC 5 A_MuzzleClimb(frandom(-0.2, 0.8), frandom(-0.2, 0.4)); + Goto RemoveMag + 4; + + LoadMag: + #### C 2 Offset(3, 46) A_MuzzleClimb(frandom(-0.2, 0.8), frandom(-0.2, 0.4)); + #### C 2 Offset(3, 46) A_StartSound("weapons/pocket", 9); + #### C 3 Offset(3, 46) A_MuzzleClimb(frandom(-0.2, 0.8), frandom(-0.2, 0.4)); + #### C 3 Offset(2, 42); + #### B 2 Offset(1, 38) A_StartSound("USP/MagIn", 8); + #### A 3 Offset(0, 34) + { + let mag = HDMagAmmo(FindInventory('HDUSPMag')); + if (mag) + { + invoker.WeaponStatus[USProp_Mag] = mag.TakeMag(true); + } + } + USPG A 1 A_UpdateSlideFrame(); + USPG # 1 Offset(0, 32); + USPG # 0 A_JumpIf(!(invoker.WeaponStatus[USProp_Flags] & USF_JustUnload) && (invoker.WeaponStatus[USProp_Chamber] < 2 && invoker.WeaponStatus[USProp_Mag] > 0), 'ChamberManual'); + Goto Nope; + + ChamberManual: + USPG # 3 Offset(0, 34) A_UpdateSlideFrame(); + USPG # 4 Offset(0, 37) + { + if (invoker.WeaponStatus[USProp_Chamber] > 0) + { + A_MuzzleClimb(frandom(0.4, 0.5), -frandom(0.6, 0.8)); + A_StartSound("USP/SlideBack", 8); + int chamber = invoker.WeaponStatus[USProp_Chamber]; + invoker.WeaponStatus[USProp_Chamber] = 0; + switch (Chamber) + { + case 1: A_EjectCasing('HDSpent45ACP',frandom(-1,2),(-frandom(2,3),frandom(0,0.2),frandom(0.4,0.5)),(-2,0,-1)); + case 2: A_SpawnItemEx('HD45ACPAmmo', cos(pitch * 12), 0, height - 9 - sin(pitch) * 12, 1, 2, 3, 0); break; + } + } + + if (invoker.WeaponStatus[USProp_Mag] > 0) + { + invoker.WeaponStatus[USProp_Chamber] = 2; + invoker.WeaponStatus[USProp_Mag]--; + A_StartSound("USP/SlideForward", 9); + } + A_UpdateSlideFrame(); + } + USPG # 3 Offset(0, 35); + Goto Nope; + + LoadChamber: + #### # 0 A_JumpIf(invoker.WeaponStatus[USProp_Chamber] > 0, "Nope"); + #### B 1 Offset(0, 36) A_StartSound("weapons/pocket",9); + #### B 1 Offset(2, 40); + #### B 1 Offset(2, 50); + #### B 1 Offset(3, 60); + #### B 2 Offset(5, 90); + #### B 2 Offset(7, 80); + #### B 2 Offset(10, 90); + #### B 2 Offset(8, 96); + #### B 3 Offset(6, 88) + { + if (CheckInventory("HD45ACPAmmo", 1)) + { + A_StartSound("USP/SlideForward", 8); + A_TakeInventory('HD45ACPAmmo', 1, TIF_NOTAKEINFINITE); + invoker.WeaponStatus[USProp_Chamber] = 2; + } + } + #### A 2 Offset(5, 76); + #### A 1 Offset(4, 64); + #### A 1 Offset(3, 56); + #### A 1 Offset(2, 48); + #### A 2 Offset(1, 38); + #### A 3 Offset(0, 34); + Goto ReadyEnd; + } +} + +class USPrandom : IdleDummy +{ + States + { + Spawn: + TNT1 A 0 NoDelay + { + A_SpawnItemEx("HDUSPMag", -3, flags: SXF_NOCHECKPOSITION); + A_SpawnItemEx("HDUSPMag", -1, flags: SXF_NOCHECKPOSITION); + let wpn = HDUSP(Spawn("HDUSP", pos, ALLOW_REPLACE)); + if (!wpn) + { + return; + } + + HDF.TransferSpecials(self, wpn); + + wpn.InitializeWepStats(false); + } + Stop; + } +} + +class HDUSPMag : HDMagAmmo +{ + override string PickupMessage() + { + return Stringtable.localize("$PICKUP_USPMAG_PREFIX")..Stringtable.localize("$TAG_USPMAG")..Stringtable.localize("$PICKUP_USPMAG_SUFFIX"); + } + + override string, string, name, double GetMagSprite(int thismagamt) + { + return (thismagamt > 0) ? "USPMA0" : "USPMB0", "45RNA0", "HD45ACPAmmo", 0.75; + } + + override void GetItemsThatUseThis() + { + ItemsThatUseThis.Push("HDUSP"); + } + const USP45ACP_LOADED = 0.85; + const MagCapacity = 12; + const EncMagEmpty = 3; + const EncMagLoaded = EncMagEmpty * 0.8; + + Default + { + HDMagAmmo.MaxPerUnit MagCapacity; + HDMagAmmo.InsertTime 7; + HDMagAmmo.ExtractTime 4; + HDMagAmmo.RoundType "HD45ACPAmmo"; + HDMagAmmo.RoundBulk USP45ACP_LOADED; + HDMagAmmo.MagBulk EncMagEmpty; + Tag "$TAG_USPMAG"; + HDPickup.RefId HDLD_USPMAG; + Scale 0.5; + } + + States + { + Spawn: + USPM A -1; + Stop; + SpawnEmpty: + USPM B -1 + { + bROLLSPRITE = true; + bROLLCENTER = true; + roll = randompick(0, 0, 0, 0, 2, 2, 2, 2, 1, 3) * 90; + } + Stop; + } +}