Skip to content

Commit

Permalink
Merge pull request #10 from UndeadZeratul/9-30-06-clips-not-working-i…
Browse files Browse the repository at this point in the history
…n-loadout

Create Dummy PickupGiver that will decide which clip to give in loadout
  • Loading branch information
UndeadZeratul authored Jul 18, 2023
2 parents d48552f + c106cd1 commit 76dc522
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions zscript/Hexadoken/Weapons/M1 Garand/M1 Garand.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -791,13 +791,26 @@ enum garandstatus{
GARS_CHAMBER=3,
};

class HDGarandClipGiver:HDPickupGiver {
default{
inventory.icon "GCLPA0";
hdpickup.refid "gac";
tag "$TAG_GARANDCLIP";
}

override void beginplay(){
super.beginplay();
pickuptogive = hd_garand_ammotype == 0 ? "HDGarand3006Clip" : "HDGarandClip";
}
}

class HDGarandClip:HDMagAmmo{
default{
hdmagammo.maxperunit 8;
hdmagammo.roundtype "SevenMilAmmo";
hdmagammo.roundbulk ENC_776*0.8;
hdmagammo.magbulk 4;
hdpickup.refid "gac";
hdpickup.refid "";
tag "$TAG_GARANDCLIP";
xscale 0.7; yscale 0.6;
inventory.maxamount 1000;
Expand Down Expand Up @@ -848,7 +861,6 @@ class HDGarand3006Clip:HDGarandClip{
hdmagammo.roundtype "ThirtyAughtSixAmmo";
hdmagammo.roundbulk ENC_776;
hdmagammo.magbulk 4;
hdpickup.refid "";
}
override string,string,name,double getmagsprite(int thismagamt){
string magsprite;
Expand Down

0 comments on commit 76dc522

Please sign in to comment.