Sheen HMG progress (still not functional).

This commit is contained in:
Mari the Deer 2022-07-21 22:01:41 +02:00
commit 1ba22e8eb6
46 changed files with 237 additions and 74 deletions

View file

@ -63,10 +63,12 @@ Class SheenAmmo : SWWMAmmo
Inventory.MaxAmount 300;
Ammo.BackpackAmount 60;
Ammo.BackpackMaxAmount 900;
Ammo.DropAmount 3;
Ammo.DropAmount 10;
+FLOATBOB;
FloatBobStrength 0.25;
Accuracy 35;
Radius 4;
Height 24;
}
States
{
@ -80,6 +82,7 @@ Class SheenAmmo2 : SheenAmmo
Default
{
Inventory.Amount 2;
Radius 6;
}
}
Class SheenAmmo3 : SheenAmmo
@ -87,27 +90,23 @@ Class SheenAmmo3 : SheenAmmo
Default
{
Inventory.Amount 3;
}
}
Class SheenTinyAmmo : SheenAmmo
{
Default
{
Inventory.Amount 10;
Radius 6;
}
}
Class SheenSmallAmmo : SheenAmmo
{
Default
{
Inventory.Amount 50;
Inventory.Amount 10;
Radius 6;
}
}
Class SheenBigAmmo : SheenAmmo
{
Default
{
Inventory.Amount 100;
Inventory.Amount 50;
Radius 16;
}
}

View file

@ -1 +1,35 @@
// DrawWeapon code for DLC weapons
// Sheen HMG
extend Class HeavyMahSheenGun
{
ui TextureID WeaponBox, BulletTex[2], SpeedTex, BarTex[4];
override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss )
{
if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/SheenDisplay.png",TexMan.Type_Any);
if ( !BulletTex[0] ) BulletTex[0] = TexMan.CheckForTexture("graphics/HUD/SheenRound.png",TexMan.Type_Any);
if ( !BulletTex[1] ) BulletTex[1] = TexMan.CheckForTexture("graphics/HUD/SheenCasing.png",TexMan.Type_Any);
if ( !SpeedTex ) SpeedTex = TexMan.CheckForTexture("graphics/HUD/SheenSpeed.png",TexMan.Type_Any);
if ( !BarTex[0] ) BarTex[0] = TexMan.CheckForTexture("graphics/HUD/SheenBar0.png",TexMan.Type_Any);
if ( !BarTex[1] ) BarTex[1] = TexMan.CheckForTexture("graphics/HUD/SheenBar1.png",TexMan.Type_Any);
if ( !BarTex[2] ) BarTex[2] = TexMan.CheckForTexture("graphics/HUD/SheenBar2.png",TexMan.Type_Any);
if ( !BarTex[3] ) BarTex[3] = TexMan.CheckForTexture("graphics/HUD/SheenBar3.png",TexMan.Type_Any);
Screen.DrawTexture(WeaponBox,false,bx-23,by-24,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( firespeed == 0 ) for ( int i=0; i<2; i++ ) Screen.DrawTexture(SpeedTex,false,bx-21,(by-14)+i*8,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
else if ( firespeed == 1 ) for ( int i=0; i<3; i++ ) Screen.DrawTexture(SpeedTex,false,bx-21,(by-14)+i*4,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
else if ( firespeed == 2 ) for ( int i=0; i<5; i++ ) Screen.DrawTexture(SpeedTex,false,bx-21,(by-14)+i*2,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
// TODO heat bar
if ( fired )
{
Screen.DrawTexture(BulletTex[1],false,bx-15,(by-10)-4*TicFrac,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( Ammo1.Amount <= 0 ) return;
Screen.DrawTexture(BulletTex[0],false,bx-15,(by-14)-4*TicFrac,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
}
else for ( int i=0; i<2; i++ )
{
if ( Ammo1.Amount <= i ) break;
Screen.DrawTexture(BulletTex[0],false,bx-15,(by-10)+i*4,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
}
}
}

View file

@ -3,6 +3,11 @@
Class HeavyMahSheenGun : SWWMWeapon
{
bool fired;
int firespeed;
double barrelheat;
bool incooldown;
Default
{
Tag "$T_SHEENHMG";
@ -10,20 +15,54 @@ Class HeavyMahSheenGun : SWWMWeapon
Obituary "$O_SHEENHMG";
SWWMWeapon.Tooltip "$TT_SHEENHMG";
SWWMWeapon.GetLine "getheavymahsheengun";
Weapon.UpSound "sheen/select";
Weapon.SlotNumber 5;
Weapon.SlotPriority 2.;
Weapon.SelectionOrder 100;
Weapon.AmmoType1 "SheenAmmo";
Weapon.AmmoGive1 200;
Weapon.AmmoGive1 30;
SWWMWeapon.DropAmmoType "SheenAmmo";
Stamina 100000;
Radius 30;
Height 28;
}
override void MarkPrecacheSounds()
{
Super.MarkPrecacheSounds();
MarkSound("sheen/specialpick");
MarkSound("sheen/select");
MarkSound("sheen/deselect");
MarkSound("sheen/meleestart");
MarkSound("sheen/meleeend");
MarkSound("sheen/fire1");
MarkSound("sheen/fire2");
MarkSound("sheen/fire3");
MarkSound("sheen/700rpm");
MarkSound("sheen/2100rpm");
MarkSound("sheen/crankin");
MarkSound("sheen/crankout");
}
States
{
Spawn:
XZW1 A -1;
Stop;
Select:
XZW2 K 3 A_FullRaise();
XZW2 LMNOP 3;
XZW2 QRSTUV 2;
XZW2 WX 3;
Goto Ready;
Ready:
XZW2 A 1 A_WeaponReady();
Wait;
Fire:
XZW2 A 1;
Goto Ready;
Deselect:
XZW2 A 2 A_StartSound("sheen/deselect",CHAN_WEAPON,CHANF_OVERLAP);
XZW2 BCDEFGHIJK 2;
XZW2 K -1 A_FullLower();
Stop;
}
}

View file

@ -110,7 +110,7 @@ Class SWWMClipAmmoSmall : SWWMAmmoSpawner
if ( !Random[Replacements](0,4) )
{
if ( Random[Replacements](0,1) && (notondemand || SWWMUtility.ItemExists('HeavyMahsheenGun')) )
return Random[Replacements](0,2)?'SheenAmmo3':'SheenTinyAmmo';
return Random[Replacements](0,2)?'SheenAmmo3':'SheenSmallAmmo';
if ( notondemand || SWWMUtility.ItemExists('Eviscerator') )
return 'EvisceratorShell';
}
@ -137,7 +137,7 @@ Class SWWMBlastAmmoSmall : SWWMAmmoSpawner
static Class<Actor> PickAmmo( bool notondemand = false )
{
if ( Random[Replacements](0,1) && (notondemand || SWWMUtility.ItemExists('HeavyMahsheenGun')) )
return Random[Replacements](0,2)?'SheenSmallAmmo':'SheenTinyAmmo';
return Random[Replacements](0,2)?'SheenAmmo3':'SheenSmallAmmo';
return 'EvisceratorShell';
}
}
@ -148,7 +148,7 @@ Class SWWMBlastAmmoBig : SWWMAmmoSpawner
static Class<Actor> PickAmmo( bool notondemand = false )
{
if ( Random[Replacements](0,1) && (notondemand || SWWMUtility.ItemExists('HeavyMahsheenGun')) )
return Random[Replacements](0,2)?'SheenBigAmmo':'SheenSmallAmmo';
return Random[Replacements](0,2)?'SheenSmallAmmo':'SheenBigAmmo';
return Random[Replacements](0,2)?'EvisceratorShell':Random[Replacements](0,1)?'EvisceratorShell2':'EvisceratorShell3';
}
}