More Spreadgun progress:
- Sounds and visuals done, only the actual firing effects left. - While I was at it, touched up the library text again. - Fixed the ammo fabricator sound being too loud, turns out I saved the lower volume edit in the wrong folder.
BIN
graphics/HUD/BlackShell.png
Normal file
|
After Width: | Height: | Size: 157 B |
BIN
graphics/HUD/BlueShell.png
Normal file
|
After Width: | Height: | Size: 177 B |
BIN
graphics/HUD/GoldShell.png
Normal file
|
After Width: | Height: | Size: 169 B |
BIN
graphics/HUD/GreenShell.png
Normal file
|
After Width: | Height: | Size: 168 B |
BIN
graphics/HUD/LoadedBlackShell.png
Normal file
|
After Width: | Height: | Size: 256 B |
BIN
graphics/HUD/LoadedBlueShell.png
Normal file
|
After Width: | Height: | Size: 287 B |
BIN
graphics/HUD/LoadedGoldShell.png
Normal file
|
After Width: | Height: | Size: 268 B |
BIN
graphics/HUD/LoadedGreenShell.png
Normal file
|
After Width: | Height: | Size: 270 B |
BIN
graphics/HUD/LoadedPurpleShell.png
Normal file
|
After Width: | Height: | Size: 282 B |
BIN
graphics/HUD/LoadedRedShell.png
Normal file
|
After Width: | Height: | Size: 261 B |
BIN
graphics/HUD/LoadedWhiteShell.png
Normal file
|
After Width: | Height: | Size: 284 B |
BIN
graphics/HUD/PurpleShell.png
Normal file
|
After Width: | Height: | Size: 175 B |
|
Before Width: | Height: | Size: 780 B After Width: | Height: | Size: 712 B |
|
Before Width: | Height: | Size: 149 B After Width: | Height: | Size: 142 B |
BIN
graphics/HUD/RedShell.png
Normal file
|
After Width: | Height: | Size: 166 B |
BIN
graphics/HUD/SpreadgunDisplay.png
Normal file
|
After Width: | Height: | Size: 167 B |
BIN
graphics/HUD/WhiteShell.png
Normal file
|
After Width: | Height: | Size: 168 B |
22
language.txt
|
|
@ -208,7 +208,7 @@ SWWM_LORETXT_AKARILABS =
|
|||
"Addendum: Akari Labs was one of the sponsors of the 2020 Tokyo Olympic Games. Saya's personal Maidbot singing the national anthem was one of the major highlights of the event.";
|
||||
SWWM_LORETAG_ANARUKON = "Anarukon";
|
||||
SWWM_LORETAB_ANARUKON = "Lore";
|
||||
SWWM_LOREREL_ANARUKON = "Gods;Novoskhana;Hell;Saya";
|
||||
SWWM_LOREREL_ANARUKON = "Gods;Novoskhana;Hell;Saya;Kirin";
|
||||
SWWM_LORETXT_ANARUKON =
|
||||
"Name: Anarukon\n"
|
||||
"Classification: Immortal beings\n"
|
||||
|
|
@ -216,9 +216,19 @@ SWWM_LORETXT_ANARUKON =
|
|||
"\n"
|
||||
"Summary: The Anarukon are a race of immortal beings created by a god known as Noskas Kurenai (in their tongue, \"Father of Eternity\"). They are entirely unkillable, able to recover even if burned to ashes. While most of the population is in the Empire of Novoskhana, other groups split off from it following major disagreements with the empire's policies.\n"
|
||||
"\n"
|
||||
"Addendum: The Anarukon are one of the few races that the Demons of Hell have never dared fight against.\n"
|
||||
"Addendum: The Anarukon are the humanoid race with the highest ratio of individuals who don't conform to the sex or gender binaries according to a recent census. Approximately 40% of the population falls under the \"intersex\" classification, and only 30% of the total population could be considered \"cisgender\". A study by Mosse Anderken traced this to a mutation in the Anarukon genome that appeared many years after the creation of the empire.\n"
|
||||
"\n"
|
||||
"Saya's Note: More stuff about gods here. Really not joking around, they ARE real.";
|
||||
SWWM_LORETXT_ANARUKON2 =
|
||||
"Name: Anarukon\n"
|
||||
"Classification: Immortal beings\n"
|
||||
"Location: Various\n"
|
||||
"\n"
|
||||
"Summary: The Anarukon are a race of immortal beings created by a god known as Noskas Kurenai (in their tongue, \"Father of Eternity\"). They are entirely unkillable, able to recover even if burned to ashes. While most of the population is in the Empire of Novoskhana, other groups split off from it following major disagreements with the empire's policies. Among them the most notable are the Eternal Kingdom, founded by Noskas Kurenai himself and led by Queen Andreki Anderken, and the Rust Empire, founded by Syrakha Yanikov and led by Child Emperor Kirin Xanai.\n"
|
||||
"\n"
|
||||
"Addendum: The Anarukon are the humanoid race with the highest ratio of individuals who don't conform to the sex or gender binaries according to a recent census. Approximately 40% of the population falls under the \"intersex\" classification, and only 30% of the total population could be considered \"cisgender\". A study by Mosse Anderken traced this to a mutation in the Anarukon genome that appeared many years after the creation of the empire.\n"
|
||||
"\n"
|
||||
"Saya's Note: You know... I met Andreki once, after my wedding with Kirin-kun. I seriously thought she was just a little kid, god damn that was embarrassing... I also met some of her relatives, like this witchy looking lady... her aunt I think? I couldn't stare at her for too long, it made me anxious. T-there was also uhhh... her mom, really hardcore looking badass gutsy warrior mommy, another aunt who apparently likes to go around in a creepy costume and uses a voice changer to sound all evil, she was the most fun to talk to. I also met the GOD in all caps himself, the \"Father of Eternity\"... oh boy the tension when he was looking at me... but it was fine because turns out he's a real softly lol. Ahhh... it was so fun finally getting to meet these people after having only ever read about them, and oh boy don't even get me started on what it's like to be married to one, huhu. Finally, an immortal cutie just for me... and hot daaaamn he's a big cutie... and a beast in bed, uheheheheheh~";
|
||||
SWWM_LORETAG_ARGENT = "Argent Energy";
|
||||
SWWM_LORETAB_ARGENT = "Lore";
|
||||
SWWM_LOREREL_ARGENT = "UAC;Hell;Saya;Nukuri;NokronKiny";
|
||||
|
|
@ -362,7 +372,7 @@ SWWM_LOREREL_DECADEMECH = "Sunkaeze;XAnimen";
|
|||
SWWM_LORETXT_DECADEMECH =
|
||||
"Name: Decade Mechanics\n"
|
||||
"Classification: Military Research Facility???\n"
|
||||
"Location: Sunkaeze (X'Animen outer rim)\n"
|
||||
"Location: Sunkaeze, Xathar outer rim, X'Animen Coalition\n"
|
||||
"\n"
|
||||
"Summary: Ever since humanity was made aware of the gateway in Sedna connecting the two solar systems, many expeditions have been made to learn more of the worlds in X'Animen (name given by the governing bodies within). One major discovery that not even the natives were aware of, was that of a ruined research facility in the wasteland planet of Sunkaeze, belonging to a defunct company named \"Decade Mechanics\", run by the long-dead mechanical demigod Maester Mekes. Research material, blueprints and even finished, still functioning products have been found within, giving a general idea of what this facility was specialized in. Various groups have successfully recreated items entirely off their original blueprints, some of which have been commercial successes in the military field.\n"
|
||||
"\n"
|
||||
|
|
@ -959,7 +969,7 @@ SWWM_LORETXT_NOVOSKHANA =
|
|||
"\n"
|
||||
"Summary: A tyrannical society where most of the Anarukon reside, ruled by the Eternal Empress Sythana Va Sarkha Daia Mykha Azanth Serei Yanikov I. It is a strict matriarchal society where men live only to serve their wives. Most if not all women born in Novoskhana are raised to be warriors. The Empire has an approximate population of 13 billion, and no one has dared stand up to them.\n"
|
||||
"\n"
|
||||
"Addendum: Many groups split out due to disagreements with the Empire's policies, such as the Vexx Sisterhood (now the Anderken Royal Family) and the Rust Empire. This happened during a time where a genetic mutation began to surface among the Anarukon people, resulting in a destabilization of the previously stable sex and gender binaries, to which the Empire responded by ordering the execution of any \"deviants\" born, along with their fathers, and anyone who dared protect them.\n"
|
||||
"Addendum: Many groups split out due to disagreements with the Empire's policies, such as the Vexx Sisterhood (now the Eternal Kingdom) and the Rust Empire. This happened during a time where a genetic mutation began to surface among the Anarukon people, resulting in a destabilization of the previously stable sex and gender binaries, to which the Empire responded by ordering the execution of any \"deviants\" born, along with their fathers, and anyone who dared protect them.\n"
|
||||
"\n"
|
||||
"Saya's Note: So... a TERF empire. Wonderful. Just... wonderful.";
|
||||
SWWM_LORETAG_NUGGET = "H/A Nuggets";
|
||||
|
|
@ -1279,7 +1289,7 @@ SWWM_LORETXT_UNISSIX =
|
|||
"\n"
|
||||
"Addendum: Rose to fame on Earth during a visit from Zanaveth II, her wife, who leads Nekuratek, a massive tech giant in the Nukuri homeworld. Misa is a big fan of videogames, finding it rather exciting to finally be able to go on adventures of her own, without having to put much physical effort into it.\n"
|
||||
"\n"
|
||||
"Saya's Note: I remember having some chats with her. She's got good taste, and her wife is hot af (and really smart, I mean she made the AI you're built on). I'm still pissy that we haven't been in contact much thanks to those American idiots causing the Nukuri to leave. I could send messages sometimes through the embassy in the Lunar Capital, but those damn bunnies always made it hard. BTW... I remember this one time we went to the hot springs and I saw... her down there... omg... huge... ohhhhhhh...... Zana-sama you lucky devil, no wonder I can hear you two going at it from across the house.";
|
||||
"Saya's Note: I remember having some chats with her. She's got good taste, and her wife is hot af (and really smart, I mean she made the AI you're built on). I'm still pissy that we haven't been in contact much thanks to those American idiots causing the Nukuri to leave. I could send messages sometimes through the embassy in the Lunar Capital, but those damn bunnies always made it hard. BTW... I remember this one time we went to the hot springs and I saw... her down there... omg... huge... ohhhhhhh...... Zana-sama you lucky devil, no wonder I could hear you two going at it from across the house.";
|
||||
SWWM_LORETAG_VOICEBOX = "Loudboi Voicebox";
|
||||
SWWM_LORETAB_VOICEBOX = "Item";
|
||||
SWWM_LOREREL_VOICEBOX = "AkariLabs;Ibuki;Demolitionist";
|
||||
|
|
@ -1364,7 +1374,7 @@ SWWM_LORETXT_XANIMEN =
|
|||
"Classification: Solar System Cluster\n"
|
||||
"Location: Various Galaxies\n"
|
||||
"\n"
|
||||
"Summary: X'Animen is the name of a group of planetary systems, comprising several inhabited worlds, all connected through portals. During the first days following the \"Luna Incident\", it was discovered that our own solar system had a portal connecting to them, in the remote dwarf planet of Sedna, from which the Nukuri had come to our world in order to study us as potential candidates for joining the group.\n"
|
||||
"Summary: X'Animen is the name of a group of planetary systems, comprising several inhabited worlds, all connected through portals. During the first days following the \"Luna Incident\", it was discovered that our own solar system had a portal connecting to them, in the remote dwarf planet of Sedna, from which the Nukuri had come to our world in order to study us as potential candidates for joining the group. The current member systems are Xanthar (where the Nukuri homeworld is), Zenna, Mondakan and Kryudon.\n"
|
||||
"\n"
|
||||
"Addendum: Things aren't always peaceful in here. Several member races are prone to waging war among themselves, or fighting over the nonexistent leadership of the X'Animen Coalition.\n"
|
||||
"\n"
|
||||
|
|
|
|||
1016
modeldef.spreadgun
29
sndinfo.txt
|
|
@ -419,6 +419,35 @@ pusher/bounce2 sounds/pusher/push_bounce2.ogg
|
|||
pusher/bounce3 sounds/pusher/push_bounce3.ogg
|
||||
$random pusher/bounce { pusher/bounce1 pusher/bounce2 pusher/bounce3 }
|
||||
|
||||
spreadgun/open sounds/spreadgun/spread_open.ogg
|
||||
spreadgun/hammer sounds/spreadgun/spread_hammer.ogg
|
||||
spreadgun/close sounds/spreadgun/spread_close.ogg
|
||||
spreadgun/shellin sounds/spreadgun/spread_load.ogg
|
||||
spreadgun/select sounds/spreadgun/spread_select.ogg
|
||||
spreadgun/deselect sounds/spreadgun/spread_deselect.ogg
|
||||
spreadgun/redfire1 sounds/spreadgun/spread_redfire1.ogg
|
||||
spreadgun/redfire2 sounds/spreadgun/spread_redfire2.ogg
|
||||
$random spreadgun/redfire { spreadgun/redfire1 spreadgun/redfire2 }
|
||||
spreadgun/greenfire1 sounds/spreadgun/spread_greenfire1.ogg
|
||||
spreadgun/greenfire2 sounds/spreadgun/spread_greenfire2.ogg
|
||||
$random spreadgun/greenfire { spreadgun/greenfire1 spreadgun/greenfire2 }
|
||||
spreadgun/whitefire1 sounds/spreadgun/spread_whitefire1.ogg
|
||||
spreadgun/whitefire2 sounds/spreadgun/spread_whitefire2.ogg
|
||||
$random spreadgun/whitefire { spreadgun/whitefire1 spreadgun/whitefire2 }
|
||||
spreadgun/bluefire1 sounds/spreadgun/spread_bluefire1.ogg
|
||||
spreadgun/bluefire2 sounds/spreadgun/spread_bluefire2.ogg
|
||||
$random spreadgun/bluefire { spreadgun/bluefire1 spreadgun/bluefire2 }
|
||||
spreadgun/blackfire1 sounds/spreadgun/spread_blackfire1.ogg
|
||||
spreadgun/blackfire2 sounds/spreadgun/spread_blackfire2.ogg
|
||||
$random spreadgun/blackfire { spreadgun/blackfire1 spreadgun/blackfire2 }
|
||||
spreadgun/purplefire1 sounds/spreadgun/spread_purplefire1.ogg
|
||||
spreadgun/purplefire2 sounds/spreadgun/spread_purplefire2.ogg
|
||||
$random spreadgun/purplefire { spreadgun/purplefire1 spreadgun/purplefire2 }
|
||||
spreadgun/goldfire1 sounds/spreadgun/spread_goldfire1.ogg
|
||||
spreadgun/goldfire2 sounds/spreadgun/spread_goldfire2.ogg
|
||||
$random spreadgun/goldfire { spreadgun/goldfire1 spreadgun/goldfire2 }
|
||||
spreadgun/checkgun sounds/spreadgun/spread_idle.ogg
|
||||
|
||||
candygun/fire1 sounds/candygun/candy_fire1.ogg
|
||||
candygun/fire2 sounds/candygun/candy_fire2.ogg
|
||||
candygun/fire3 sounds/candygun/candy_fire3.ogg
|
||||
|
|
|
|||
BIN
sounds/spreadgun/spread_blackfire1.ogg
Normal file
BIN
sounds/spreadgun/spread_blackfire2.ogg
Normal file
BIN
sounds/spreadgun/spread_bluefire1.ogg
Normal file
BIN
sounds/spreadgun/spread_bluefire2.ogg
Normal file
BIN
sounds/spreadgun/spread_close.ogg
Normal file
BIN
sounds/spreadgun/spread_deselect.ogg
Normal file
BIN
sounds/spreadgun/spread_goldfire1.ogg
Normal file
BIN
sounds/spreadgun/spread_goldfire2.ogg
Normal file
BIN
sounds/spreadgun/spread_greenfire1.ogg
Normal file
BIN
sounds/spreadgun/spread_greenfire2.ogg
Normal file
BIN
sounds/spreadgun/spread_hammer.ogg
Normal file
BIN
sounds/spreadgun/spread_idle.ogg
Normal file
BIN
sounds/spreadgun/spread_load.ogg
Normal file
BIN
sounds/spreadgun/spread_open.ogg
Normal file
BIN
sounds/spreadgun/spread_purplefire1.ogg
Normal file
BIN
sounds/spreadgun/spread_purplefire2.ogg
Normal file
BIN
sounds/spreadgun/spread_redfire1.ogg
Normal file
BIN
sounds/spreadgun/spread_redfire2.ogg
Normal file
BIN
sounds/spreadgun/spread_select.ogg
Normal file
BIN
sounds/spreadgun/spread_whitefire1.ogg
Normal file
BIN
sounds/spreadgun/spread_whitefire2.ogg
Normal file
|
|
@ -243,6 +243,8 @@ Class SWWMLoreLibrary : Thinker
|
|||
{
|
||||
if ( text ~== "SWWM_LORETXT_SAYA" )
|
||||
text = "SWWM_LORETXT_SAYA2"; // married kirin
|
||||
else if ( text ~== "SWWM_LORETXT_ANARUKON" )
|
||||
text = "SWWM_LORETXT_ANARUKON2"; // comments from miyamoto-xanai wedding
|
||||
else if ( text ~== "SWWM_LORETXT_HELL2" )
|
||||
text = "SWWM_LORETXT_HELL3"; // mention the return of manakei
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,17 +3,62 @@
|
|||
|
||||
Class Spreadgun : SWWMWeapon
|
||||
{
|
||||
bool loaded;
|
||||
Class<Ammo> loadammo, nextammo;
|
||||
bool fired; // shell was used
|
||||
Class<Ammo> loadammo, nextammo; // currently loaded shell, next shell to load
|
||||
|
||||
transient ui TextureID WeaponBox;
|
||||
transient ui HUDFont mTewiFont;
|
||||
transient ui TextureID WeaponBox, AmmoIcon[7], LoadedIcon[7];
|
||||
transient ui Font TewiFont;
|
||||
|
||||
override void DrawWeapon( double TicFrac, double bx, double by, Vector2 hs, Vector2 ss )
|
||||
{
|
||||
static const Class<Ammo> types[] = {"RedShell","GreenShell","WhiteShell","BlueShell","BlackShell","PurpleShell","GoldShell"};
|
||||
if ( !WeaponBox )
|
||||
{
|
||||
WeaponBox = TexMan.CheckForTexture("graphics/HUD/SpreadgunDisplay.png",TexMan.Type_Any);
|
||||
AmmoIcon[0] = TexMan.CheckForTexture("graphics/HUD/RedShell.png",TexMan.Type_Any);
|
||||
AmmoIcon[1] = TexMan.CheckForTexture("graphics/HUD/GreenShell.png",TexMan.Type_Any);
|
||||
AmmoIcon[2] = TexMan.CheckForTexture("graphics/HUD/WhiteShell.png",TexMan.Type_Any);
|
||||
AmmoIcon[3] = TexMan.CheckForTexture("graphics/HUD/BlueShell.png",TexMan.Type_Any);
|
||||
AmmoIcon[4] = TexMan.CheckForTexture("graphics/HUD/BlackShell.png",TexMan.Type_Any);
|
||||
AmmoIcon[5] = TexMan.CheckForTexture("graphics/HUD/PurpleShell.png",TexMan.Type_Any);
|
||||
AmmoIcon[6] = TexMan.CheckForTexture("graphics/HUD/GoldShell.png",TexMan.Type_Any);
|
||||
LoadedIcon[0] = TexMan.CheckForTexture("graphics/HUD/LoadedRedShell.png",TexMan.Type_Any);
|
||||
LoadedIcon[1] = TexMan.CheckForTexture("graphics/HUD/LoadedGreenShell.png",TexMan.Type_Any);
|
||||
LoadedIcon[2] = TexMan.CheckForTexture("graphics/HUD/LoadedWhiteShell.png",TexMan.Type_Any);
|
||||
LoadedIcon[3] = TexMan.CheckForTexture("graphics/HUD/LoadedBlueShell.png",TexMan.Type_Any);
|
||||
LoadedIcon[4] = TexMan.CheckForTexture("graphics/HUD/LoadedBlackShell.png",TexMan.Type_Any);
|
||||
LoadedIcon[5] = TexMan.CheckForTexture("graphics/HUD/LoadedPurpleShell.png",TexMan.Type_Any);
|
||||
LoadedIcon[6] = TexMan.CheckForTexture("graphics/HUD/LoadedGoldShell.png",TexMan.Type_Any);
|
||||
}
|
||||
if ( !TewiFont ) TewiFont = Font.GetFont('TewiShaded');
|
||||
Screen.DrawTexture(WeaponBox,false,bx-55,by-44,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
int ox = 7;
|
||||
int oy = 12;
|
||||
for ( int i=0; i<7; i++ )
|
||||
{
|
||||
Screen.DrawTexture(AmmoIcon[i],false,bx-ox,by-oy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,(types[i]==nextammo)?Color(0,0,0,0):Color(128,0,0,0));
|
||||
String astr = String.Format("%3d",Owner.CountInv(types[i]));
|
||||
Screen.DrawText(TewiFont,Font.CR_FIRE,bx-ox-(TewiFont.StringWidth(astr)+1),by-oy-2,astr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,(types[i]==nextammo)?Color(0,0,0,0):Color(128,0,0,0));
|
||||
oy += 10;
|
||||
if ( i == 3 )
|
||||
{
|
||||
oy = 22;
|
||||
ox = 34;
|
||||
}
|
||||
}
|
||||
for ( int i=0; i<7; i++ )
|
||||
{
|
||||
if ( loadammo != types[i] ) continue;
|
||||
Screen.DrawTexture(LoadedIcon[i],false,bx-49,by-9,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,fired?Color(128,0,0,0):Color(0,0,0,0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
override bool ReportHUDAmmo()
|
||||
{
|
||||
static const Class<Ammo> types[] = {"RedShell","GreenShell","WhiteShell","BlueShell","BlackShell","PurpleShell","GoldShell"};
|
||||
for ( int i=0; i<7; i++ ) if ( Owner.CountInv(types[i]) > 0 ) return true;
|
||||
return loaded;
|
||||
return !fired;
|
||||
}
|
||||
|
||||
override bool CheckAmmo( int firemode, bool autoswitch, bool requireammo, int ammocount )
|
||||
|
|
@ -21,7 +66,7 @@ Class Spreadgun : SWWMWeapon
|
|||
static const Class<Ammo> types[] = {"RedShell","GreenShell","WhiteShell","BlueShell","BlackShell","PurpleShell","GoldShell"};
|
||||
if ( (firemode == PrimaryFire) || (firemode == AltFire) )
|
||||
{
|
||||
if ( loaded ) return true;
|
||||
if ( !fired ) return true;
|
||||
for ( int i=0; i<7; i++ ) if ( Owner.CountInv(types[i]) > 0 ) return true;
|
||||
return false;
|
||||
}
|
||||
|
|
@ -35,6 +80,154 @@ Class Spreadgun : SWWMWeapon
|
|||
return false;
|
||||
}
|
||||
|
||||
action void A_SelectUnloadState()
|
||||
{
|
||||
static const Class<Ammo> types[] = {"RedShell","GreenShell","WhiteShell","BlueShell","BlackShell","PurpleShell","GoldShell"};
|
||||
static const statelabel primedstates[] = {"UnloadRed", "UnloadGreen", "UnloadWhite", "UnloadBlue", "UnloadBlack", "UnloadPurple", "UnloadGold"};
|
||||
static const statelabel firedstates[] = {"UnloadRedFired", "UnloadGreenFired", "UnloadWhiteFired", "UnloadBlueFired", "UnloadBlackFired", "UnloadPurpleFired", "UnloadGoldFired"};
|
||||
int amidx = 0;
|
||||
for ( int i=0; i<7; i++ )
|
||||
{
|
||||
if ( invoker.loadammo != types[i] ) continue;
|
||||
amidx = i;
|
||||
break;
|
||||
}
|
||||
if ( !invoker.fired ) player.SetPSprite(PSP_WEAPON,invoker.FindState(primedstates[amidx]));
|
||||
else player.SetPSprite(PSP_WEAPON,invoker.FindState(firedstates[amidx]));
|
||||
A_Overlay(-9999,"UnloadDummy");
|
||||
A_StartSound("spreadgun/deselect",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
}
|
||||
|
||||
action void A_SelectLoadState()
|
||||
{
|
||||
static const Class<Ammo> types[] = {"RedShell","GreenShell","WhiteShell","BlueShell","BlackShell","PurpleShell","GoldShell"};
|
||||
static const statelabel primedstates[] = {"LoadRed", "LoadGreen", "LoadWhite", "LoadBlue", "LoadBlack", "LoadPurple", "LoadGold"};
|
||||
static const statelabel firedstates[] = {"LoadRedFired", "LoadGreenFired", "LoadWhiteFired", "LoadBlueFired", "LoadBlackFired", "LoadPurpleFired", "LoadGoldFired"};
|
||||
int amidx = 0;
|
||||
for ( int i=0; i<7; i++ )
|
||||
{
|
||||
if ( invoker.nextammo != types[i] ) continue;
|
||||
amidx = i;
|
||||
break;
|
||||
}
|
||||
if ( !invoker.fired ) player.SetPSprite(PSP_WEAPON,invoker.FindState(primedstates[amidx]));
|
||||
else player.SetPSprite(PSP_WEAPON,invoker.FindState(firedstates[amidx]));
|
||||
if ( !sv_infiniteammo && !FindInventory('PowerInfiniteAmmo',true) )
|
||||
{
|
||||
TakeInventory(invoker.nextammo,1);
|
||||
}
|
||||
A_Overlay(-9999,"LoadDummy");
|
||||
}
|
||||
|
||||
action void A_DropShell()
|
||||
{
|
||||
static const Class<Ammo> types[] = {"RedShell","GreenShell","WhiteShell","BlueShell","BlackShell","PurpleShell","GoldShell"};
|
||||
if ( !invoker.fired )
|
||||
{
|
||||
for ( int i=0; i<7; i++ )
|
||||
{
|
||||
if ( invoker.loadammo != types[i] ) continue;
|
||||
if ( !GiveInventory(types[i],1) ) Spawn(types[i],Vec3Angle(5,angle,height/2));
|
||||
break;
|
||||
}
|
||||
}
|
||||
else Console.Printf("// TODO drop spent shell");
|
||||
}
|
||||
|
||||
action void A_FireShell()
|
||||
{
|
||||
static const Class<Ammo> types[] = {"RedShell","GreenShell","WhiteShell","BlueShell","BlackShell","PurpleShell","GoldShell"};
|
||||
static const statelabel flashes[] = {"FlashRed","FlashGreen","FlashWhite","FlashBlue","FlashBlack","FlashPurple","FlashGold"};
|
||||
static const String sounds[] = {"spreadgun/redfire","spreadgun/greenfire","spreadgun/whitefire","spreadgun/bluefire","spreadgun/blackfire","spreadgun/purplefire","spreadgun/goldfire"};
|
||||
static const int louds[] = {800,1000,1100,1200,1400,600,2500};
|
||||
static const int quakes[] = {3,4,2,4,3,1,6};
|
||||
static const Color cols[] = {Color(40,255,192,64),Color(36,255,192,80),Color(64,255,160,32),Color(48,32,176,255),Color(72,255,128,16),Color(24,255,224,96),Color(96,255,224,16)};
|
||||
Console.Printf("// TODO fire shell");
|
||||
for ( int i=0; i<7; i++ )
|
||||
{
|
||||
if ( invoker.loadammo != types[i] ) continue;
|
||||
A_SWWMFlash(flashes[i]);
|
||||
A_StartSound(sounds[i],CHAN_WEAPON,CHANF_OVERLAP,attenuation:.6);
|
||||
A_AlertMonsters(louds[i]);
|
||||
A_QuakeEx(quakes[i],quakes[i],quakes[i],9,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:.2*quakes[i]);
|
||||
A_ZoomFactor(1.+quakes[i]*.04,ZOOM_INSTANT);
|
||||
A_ZoomFactor(1.);
|
||||
SWWMHandler.DoFlash(self,cols[i],5);
|
||||
break;
|
||||
}
|
||||
A_StartSound("spreadgun/hammer",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
invoker.fired = true;
|
||||
}
|
||||
|
||||
action void A_LoadShell()
|
||||
{
|
||||
A_StartSound("spreadgun/shellin",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
invoker.loadammo = invoker.nextammo;
|
||||
}
|
||||
|
||||
action void A_Prime()
|
||||
{
|
||||
if ( invoker.fired )
|
||||
{
|
||||
A_StartSound("spreadgun/hammer",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
invoker.fired = false;
|
||||
}
|
||||
if ( CountInv(invoker.nextammo) <= 0 ) A_SwitchAmmoType(true);
|
||||
}
|
||||
|
||||
override void AttachToOwner( Actor other )
|
||||
{
|
||||
static const Class<Ammo> types[] = {"RedShell","GreenShell","WhiteShell","BlueShell","BlackShell","PurpleShell","GoldShell"};
|
||||
Super.AttachToOwner(other);
|
||||
if ( !loadammo ) loadammo = "RedShell";
|
||||
for ( int i=0; i<7; i++ )
|
||||
{
|
||||
Ammo a = Ammo(other.FindInventory(types[i]));
|
||||
if ( !a ) continue;
|
||||
nextammo = types[i];
|
||||
Ammo1 = a;
|
||||
return;
|
||||
}
|
||||
nextammo = AmmoType1;
|
||||
}
|
||||
|
||||
action void A_SwitchAmmoType( bool rev = false )
|
||||
{
|
||||
static const Class<Ammo> types[] = {"RedShell","GreenShell","WhiteShell","BlueShell","BlackShell","PurpleShell","GoldShell"};
|
||||
int cur = 0, next = 0;
|
||||
for ( int i=0; i<7; i++ )
|
||||
{
|
||||
if ( invoker.nextammo != types[i] ) continue;
|
||||
cur = i;
|
||||
break;
|
||||
}
|
||||
for ( int i=0; i<7; i++ )
|
||||
{
|
||||
int ridx;
|
||||
if ( rev )
|
||||
{
|
||||
ridx = (cur-i)%7;
|
||||
if ( ridx < 0 ) ridx = 6;
|
||||
}
|
||||
else ridx = (i+cur+1)%7;
|
||||
if ( CountInv(types[ridx]) <= 0 ) continue;
|
||||
next = ridx;
|
||||
break;
|
||||
}
|
||||
if ( invoker.nextammo != types[next] ) A_StartSound("misc/invchange",CHAN_WEAPONEXTRA,CHANF_UI|CHANF_LOCAL);
|
||||
invoker.nextammo = types[next];
|
||||
invoker.Ammo1 = Ammo(FindInventory(invoker.nextammo));
|
||||
A_WeaponReady(WRF_NOFIRE);
|
||||
}
|
||||
|
||||
action void A_AltHold()
|
||||
{
|
||||
A_WeaponReady(WRF_NOFIRE);
|
||||
if ( player.cmd.buttons&BT_ALTATTACK ) return;
|
||||
if ( !invoker.fired ) player.SetPSPrite(PSP_WEAPON,invoker.FindState("Ready"));
|
||||
else player.SetPSPrite(PSP_WEAPON,invoker.FindState("ReadyFired"));
|
||||
}
|
||||
|
||||
Default
|
||||
{
|
||||
Tag "$T_SPREADGUN";
|
||||
|
|
@ -46,6 +239,7 @@ Class Spreadgun : SWWMWeapon
|
|||
Weapon.AmmoType1 "RedShell";
|
||||
Weapon.AmmoGive1 1;
|
||||
Stamina 15000;
|
||||
+SWWMWEAPON.NOFIRSTGIVE;
|
||||
}
|
||||
|
||||
States
|
||||
|
|
@ -53,5 +247,310 @@ Class Spreadgun : SWWMWeapon
|
|||
Spawn:
|
||||
XZW1 A -1;
|
||||
Stop;
|
||||
Deselect:
|
||||
XZW2 A 1
|
||||
{
|
||||
A_StartSound("spreadgun/deselect",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
return A_JumpIf(invoker.fired,"DeselectFired");
|
||||
}
|
||||
XZW2 BCDEFGHI 1;
|
||||
XZW2 I -1 A_FullLower();
|
||||
Stop;
|
||||
DeselectFired:
|
||||
XZW2 Z 1;
|
||||
XZW3 ABCDEFGH 1;
|
||||
XZW3 H -1 A_FullLower();
|
||||
Stop;
|
||||
Select:
|
||||
XZW2 I 1
|
||||
{
|
||||
A_FullRaise();
|
||||
return A_JumpIf(invoker.fired,"SelectFired");
|
||||
}
|
||||
XZW2 JKLMNOPQ 1;
|
||||
Goto Ready;
|
||||
SelectFired:
|
||||
XZW3 HIJKLMNOP 1;
|
||||
Goto ReadyFired;
|
||||
Ready:
|
||||
XZW2 A 1
|
||||
{
|
||||
int flg = WRF_ALLOWZOOM|WRF_ALLOWUSER1;
|
||||
if ( invoker.nextammo && (CountInv(invoker.nextammo) > 0) )
|
||||
flg |= WRF_ALLOWRELOAD;
|
||||
A_WeaponReady(flg);
|
||||
}
|
||||
Wait;
|
||||
ReadyFired:
|
||||
XZW2 Z 1
|
||||
{
|
||||
int flg = WRF_ALLOWZOOM|WRF_ALLOWUSER1;
|
||||
if ( invoker.nextammo && (CountInv(invoker.nextammo) > 0) )
|
||||
flg |= WRF_ALLOWRELOAD;
|
||||
else flg |= WRF_NOPRIMARY;
|
||||
A_WeaponReady(flg);
|
||||
}
|
||||
Wait;
|
||||
Fire:
|
||||
#### # 1
|
||||
{
|
||||
if ( invoker.fired ) return ResolveState("Reload");
|
||||
A_FireShell();
|
||||
return ResolveState(null);
|
||||
}
|
||||
XZW2 RSTU 1;
|
||||
XZW2 VWXY 2;
|
||||
Goto ReadyFired;
|
||||
AltFire:
|
||||
#### # 1 A_SwitchAmmoType();
|
||||
#### # 1 A_AltHold();
|
||||
Wait;
|
||||
Reload:
|
||||
#### # 1 A_SelectUnloadState();
|
||||
Stop;
|
||||
UnloadDummy: // overlay with shared functions for all unload anims
|
||||
TNT1 A 11;
|
||||
TNT1 A 14 A_StartSound("spreadgun/open",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
TNT1 A 1 A_DropShell();
|
||||
Stop;
|
||||
UnloadRedFired:
|
||||
XZW2 Z 2;
|
||||
XZW3 QRST 2;
|
||||
XZW3 UVWXYZ 1;
|
||||
XZW4 ABCDEFGH 1;
|
||||
XZW8 M 1;
|
||||
Goto Reload2;
|
||||
UnloadGreenFired:
|
||||
XZW2 Z 2;
|
||||
XZW4 IJKL 2;
|
||||
XZW4 MNOPQRSTUVWXYZ 1;
|
||||
XZW9 T 1;
|
||||
Goto Reload2;
|
||||
UnloadWhiteFired:
|
||||
XZW2 Z 2;
|
||||
XZW5 ABCD 2;
|
||||
XZW5 EFGHIJKLMNOPQR 1;
|
||||
XZWB A 1;
|
||||
Goto Reload2;
|
||||
UnloadBlueFired:
|
||||
XZW2 Z 2;
|
||||
XZW5 STUV 2;
|
||||
XZW5 WXYZ 1;
|
||||
XZW6 ABCDEFGHIJ 1;
|
||||
XZWC H 1;
|
||||
Goto Reload2;
|
||||
UnloadBlackFired:
|
||||
XZW2 Z 2;
|
||||
XZW6 KLMN 2;
|
||||
XZW6 OPQRSTUVWXYZ 1;
|
||||
XZW7 AB 1;
|
||||
XZWD O 1;
|
||||
Goto Reload2;
|
||||
UnloadPurpleFired:
|
||||
XZW2 Z 2;
|
||||
XZW7 CDEF 2;
|
||||
XZW7 GHIJKLMNOPQRST 1;
|
||||
XZWE V 1;
|
||||
Goto Reload2;
|
||||
UnloadGoldFired:
|
||||
XZW2 Z 2;
|
||||
XZW7 UVWX 2;
|
||||
XZW7 YZ 1;
|
||||
XZW8 ABCDEFGHIJKL 1;
|
||||
XZWG C 1;
|
||||
Goto Reload2;
|
||||
UnloadRed:
|
||||
XZW2 A 2;
|
||||
XZWK JKLM 2;
|
||||
XZWK NOPQRSTUVWXYZ 1;
|
||||
XZWL A 1;
|
||||
XZWP F 1;
|
||||
Goto Reload2;
|
||||
UnloadGreen:
|
||||
XZW2 A 2;
|
||||
XZWL BCDE 2;
|
||||
XZWL FGHIJKLMNOPQRS 1;
|
||||
XZWQ M 1;
|
||||
Goto Reload2;
|
||||
UnloadWhite:
|
||||
XZW2 A 2;
|
||||
XZWL TUVW 2;
|
||||
XZWL XYZ 1;
|
||||
XZWM ABCDEFGHIJK 1;
|
||||
XZWR T 1;
|
||||
Goto Reload2;
|
||||
UnloadBlue:
|
||||
XZW2 A 2;
|
||||
XZWM LMNO 2;
|
||||
XZWM PQRSTUVWXYZ 1;
|
||||
XZWN ABC 1;
|
||||
XZWT A 1;
|
||||
Goto Reload2;
|
||||
UnloadBlack:
|
||||
XZW2 A 2;
|
||||
XZWN DEFG 2;
|
||||
XZWN HIJKLMNOPQRSTU 1;
|
||||
XZWU H 1;
|
||||
Goto Reload2;
|
||||
UnloadPurple:
|
||||
XZW2 A 2;
|
||||
XZWN VWXY 2;
|
||||
XZWN Z 1;
|
||||
XZWO ABCDEFGHIJKLM 1;
|
||||
XZWV O 1;
|
||||
Goto Reload2;
|
||||
UnloadGold:
|
||||
XZW2 A 2;
|
||||
XZWO NOPQ 2;
|
||||
XZWO RSTUVWXYZ 1;
|
||||
XZWP ABCDE 1;
|
||||
XZWW V 1;
|
||||
Goto Reload2;
|
||||
Reload2:
|
||||
#### # 1 A_SelectLoadState();
|
||||
Stop;
|
||||
LoadDummy: // overlay with shared functions for all load anims
|
||||
TNT1 A 9;
|
||||
TNT1 A 12 A_LoadShell();
|
||||
TNT1 A 2 A_StartSound("spreadgun/close",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
TNT1 A 2 A_Prime();
|
||||
TNT1 A 1 { invoker.PlayUpSound(self); }
|
||||
Stop;
|
||||
LoadRedFired:
|
||||
XZW8 MNOPQRSTUVWXYZ 1;
|
||||
XZW9 ABCDEFGHIJKLMNOPQRS 1;
|
||||
Goto Ready;
|
||||
LoadGreenFired:
|
||||
XZW9 TUVWXYZ 1;
|
||||
XZWA ABCDEFGHIJKLMNOPQRSTUVWXYZ 1;
|
||||
Goto Ready;
|
||||
LoadWhiteFired:
|
||||
XZWB ABCDEFGHIJKLMNOPQRSTUVWXYZ 1;
|
||||
XZWC ABCDEFG 1;
|
||||
Goto Ready;
|
||||
LoadBlueFired:
|
||||
XZWC HIJKLMNOPQRSTUVWXYZ 1;
|
||||
XZWD ABCDEFGHIJKLMN 1;
|
||||
Goto Ready;
|
||||
LoadBlackFired:
|
||||
XZWD OPQRSTUVWXYZ 1;
|
||||
XZWE ABCDEFGHIJKLMNOPQRSTU 1;
|
||||
Goto Ready;
|
||||
LoadPurpleFired:
|
||||
XZWE VWXYZ 1;
|
||||
XZWF ABCDEFGHIJKLMNOPQRSTUVWXYZ 1;
|
||||
XZWG AB 1;
|
||||
Goto Ready;
|
||||
LoadGoldFired:
|
||||
XZWG CDEFGHIJKLMNOPQRSTUVWXYZ 1;
|
||||
XZWH ABCDEFGHI 1;
|
||||
Goto Ready;
|
||||
LoadRed:
|
||||
XZWP FGHIJKLMNOPQRSTUVWXYZ 1;
|
||||
XZWQ ABCDEFGHIJKL 1;
|
||||
Goto Ready;
|
||||
LoadGreen:
|
||||
XZWQ MNOPQRSTUVWXYZ 1;
|
||||
XZWR ABCDEFGHIJKLMNOPQRS 1;
|
||||
Goto Ready;
|
||||
LoadWhite:
|
||||
XZWR TUVWXYZ 1;
|
||||
XZWS ABCDEFGHIJKLMNOPQRSTUVWXYZ 1;
|
||||
Goto Ready;
|
||||
LoadBlue:
|
||||
XZWT ABCDEFGHIJKLMNOPQRSTUVWXYZ 1;
|
||||
XZWU ABCDEFG 1;
|
||||
Goto Ready;
|
||||
LoadBlack:
|
||||
XZWU HIJKLMNOPQRSTUVWXYZ 1;
|
||||
XZWV ABCDEFGHIJKLMN 1;
|
||||
Goto Ready;
|
||||
LoadPurple:
|
||||
XZWV OPQRSTUVWXYZ 1;
|
||||
XZWW ABCDEFGHIJKLMNOPQRSTU 1;
|
||||
Goto Ready;
|
||||
LoadGold:
|
||||
XZWW VWXYZ 1;
|
||||
XZWX ABCDEFGHIJKLMNOPQRSTUVWXYZ 1;
|
||||
XZWY AB 1;
|
||||
Goto Ready;
|
||||
Zoom:
|
||||
XZW2 A 1
|
||||
{
|
||||
A_StartSound("spreadgun/checkgun",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
return A_JumpIf(invoker.fired,"ZoomFired");
|
||||
}
|
||||
XZWH JKLMNOPQRST 1;
|
||||
XZWH UVWXYZ 2;
|
||||
XZWI ABC 2;
|
||||
XZWI DEFGHI 1;
|
||||
Goto Ready;
|
||||
ZoomFired:
|
||||
XZW2 Z 1;
|
||||
XZWI WXYZ 1;
|
||||
XZWJ ABCDEFG 1;
|
||||
XZWJ HIJKLMNOP 2;
|
||||
XZWJ QRSTUV 1;
|
||||
Goto ReadyFired;
|
||||
DummyMelee:
|
||||
TNT1 A 3;
|
||||
TNT1 A 1 A_Melee();
|
||||
Stop;
|
||||
User1:
|
||||
XZW2 A 2
|
||||
{
|
||||
A_StartSound("spreadgun/deselect",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
return A_JumpIf(invoker.fired,"User1Fired");
|
||||
}
|
||||
XZWI JK 2;
|
||||
User1Hold:
|
||||
XZWI L 1
|
||||
{
|
||||
A_StartSound("demolitionist/swing",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
A_Overlay(-9999,"DummyMelee");
|
||||
}
|
||||
XZWI MNOP 2;
|
||||
XZWI QR 3;
|
||||
XZWI S 0 A_JumpIf(player.cmd.buttons&BT_USER1,"User1Hold");
|
||||
XZWI S 0 { invoker.PlayUpSound(self); }
|
||||
XZWI STUV 2;
|
||||
Goto Ready;
|
||||
User1Fired:
|
||||
XZW2 Z 2;
|
||||
XZWJ WX 2;
|
||||
User1FiredHold:
|
||||
XZWJ Y 1
|
||||
{
|
||||
A_StartSound("demolitionist/swing",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
A_Overlay(-9999,"DummyMelee");
|
||||
}
|
||||
XZWJ Z 2;
|
||||
XZWK ABC 2;
|
||||
XZWK DE 3;
|
||||
XZWK F 0 A_JumpIf(player.cmd.buttons&BT_USER1,"User1FiredHold");
|
||||
XZWK F 0 { invoker.PlayUpSound(self); }
|
||||
XZWK FGHI 2;
|
||||
Goto ReadyFired;
|
||||
FlashRed:
|
||||
XZWZ A 2 Bright;
|
||||
Stop;
|
||||
FlashGreen:
|
||||
XZWZ B 2 Bright;
|
||||
Stop;
|
||||
FlashWhite:
|
||||
XZWZ C 2 Bright;
|
||||
Stop;
|
||||
FlashBlue:
|
||||
XZWZ D 2 Bright;
|
||||
Stop;
|
||||
FlashBlack:
|
||||
XZWZ E 2 Bright;
|
||||
Stop;
|
||||
FlashPurple:
|
||||
XZWZ F 2 Bright;
|
||||
Stop;
|
||||
FlashGold:
|
||||
XZWZ G 2 Bright;
|
||||
Stop;
|
||||
}
|
||||
}
|
||||