Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions HDCINFO
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ newMerchantStoreItem => { "enabled": "#hdb_enable_4gslug", "type": "ammo", "cate
newMerchantStoreItem => { "enabled": "#hdb_enable_500sw", "type": "ammo", "category": "$MERCH_CAT_500SWH", "item": "HD500SWHeavyAmmo", "amount": "20", "icon": "5HBXA0", "displayName": "$MERCH_TAG_500SWH", "basePrice": "40", "flavorText": "$MERCH_FLAVOR_500SWH" }
newMerchantStoreItem => { "enabled": "#hdb_enable_500sw", "type": "ammo", "category": "$MERCH_CAT_500SWL", "item": "HD500SWLightAmmo", "amount": "40", "icon": "5LBXA0", "displayName": "$MERCH_TAG_500SWL", "basePrice": "50", "flavorText": "$MERCH_FLAVOR_500SWL" }
newMerchantStoreItem => { "enabled": "#hdb_enable_50am", "type": "ammo", "category": "$MERCH_CAT_50AM", "item": "HD50AM_Ammo", "amount": "60", "icon": "50AMX0", "displayName": "$MERCH_TAG_50AM", "basePrice": "50", "flavorText": "$MERCH_FLAVOR_50AM" }
newMerchantStoreItem => { "enabled": "#hdb_enable_50omg", "type": "ammo", "category": "$MERCH_CAT_50OMG", "item": "HD50OMG50OMGAmmo", "amount": "20", "icon": "OGBXA0", "displayName": "$MERCH_TAG_50OMG", "basePrice": "70", "flavorText": "$MERCH_FLAVOR_50OMG" }
newMerchantStoreItem => { "enabled": "#hdb_enable_50omg", "type": "ammo", "category": "$MERCH_CAT_50OMG", "item": "HD50OMGAmmo", "amount": "20", "icon": "OGBXA0", "displayName": "$MERCH_TAG_50OMG", "basePrice": "70", "flavorText": "$MERCH_FLAVOR_50OMG" }
newMerchantStoreItem => { "enabled": "#hdb_enable_5mmbr", "type": "ammo", "category": "$MERCH_CAT_5MMBR", "item": "HD5mm_Ammo", "amount": "160", "icon": "5MBXA0", "displayName": "$MERCH_TAG_5MMBR", "basePrice": "45", "flavorText": "$MERCH_FLAVOR_5MMBR" }
newMerchantStoreItem => { "enabled": "#hdb_enable_6mmflechette", "type": "ammo", "category": "$MERCH_CAT_6MMFLECHETTE", "item": "HD6mmFlechetteAmmo", "amount": "42", "icon": "ACRPK0", "displayName": "$MERCH_TAG_6MMFLECHETTE", "basePrice": "60", "flavorText": "$MERCH_FLAVOR_6MMFLECHETTE" }
newMerchantStoreItem => { "enabled": "#hdb_enable_762tokarev", "type": "ammo", "category": "$MERCH_CAT_762TOKAREV", "item": "HD762TokarevAmmo", "amount": "50", "icon": "T7BXA0", "displayName": "$MERCH_TAG_762TOKAREV", "basePrice": "50", "flavorText": "$MERCH_FLAVOR_762TOKAREV" }
Expand All @@ -306,4 +306,4 @@ newMerchantStoreItem => { "enabled": "#hdb_enable_ndm", "type": "ammo", "categor
newMerchantStoreItem => { "enabled": "#hdb_enable_thunderrocket", "type": "ammo", "category": "$MERCH_CAT_THUNDERROCKET", "item": "WAN_ThuRKTAmmo", "amount": "1", "icon": "THRKB0", "displayName": "$MERCH_TAG_THUNDERROCKET", "basePrice": "10", "flavorText": "$MERCH_FLAVOR_THUNDERROCKET" }
newMerchantStoreItem => { "enabled": "#hdb_enable_tortoiserocket", "type": "ammo", "category": "$MERCH_CAT_TORTOISEROCKET", "item": "WAN_TortRKTAmmo", "amount": "1", "icon": "TRTRB0", "displayName": "$MERCH_TAG_TORTOISEROCKET", "basePrice": "10", "flavorText": "$MERCH_FLAVOR_TORTOISEROCKET" }
newMerchantStoreItem => { "enabled": "#hdb_enable_xshell", "type": "ammo", "category": "$MERCH_CAT_XSHELL", "item": "HDExplosiveShellAmmo", "amount": "20", "icon": "XLBXA0", "displayName": "$MERCH_TAG_XSHELL", "basePrice": "45", "flavorText": "$MERCH_FLAVOR_XSHELL" }
newMerchantStoreItem => { "enabled": "#hdb_enable_microcell", "type": "ammo", "category": "$MERCH_CAT_MICROCELL", "item": "HDMicroCell", "icon": "MCLLA0", "displayName": "$MERCH_TAG_MICROCELL", "basePrice": "15", "flavorText": "$MERCH_FLAVOR_MICROCELL" }
newMerchantStoreItem => { "enabled": "#hdb_enable_microcell", "type": "ammo", "category": "$MERCH_CAT_MICROCELL", "item": "HDMicroCell", "icon": "MCLLA0", "displayName": "$MERCH_TAG_MICROCELL", "basePrice": "15", "flavorText": "$MERCH_FLAVOR_MICROCELL" }
50 changes: 32 additions & 18 deletions zscript/HDBulletLib/Ammunition/MicroCells.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class HDMicroCell:HDMagAmmo{
hdpickup.bulk ENC_BATTERY/2;
hdmagammo.magbulk ENC_BATTERY/2;
hdmagammo.mustshowinmagmanager true;
inventory.pickupmessage "$PICKUP_MICROCELL";
inventory.icon "MCLLA0";
scale 0.4;
}
Expand All @@ -26,9 +27,6 @@ class HDMicroCell:HDMagAmmo{
int ticker;
int lastamount;
int chargemode;
override string pickupmessage(){
return Stringtable.Localize("$PICKUP_MICROCELL");
}
override void doeffect(){
//testingdoeffect();return;
if(chargemode==BATT_UNDEFINED)chargemode=BATT_CHARGEDEFAULT;
Expand Down Expand Up @@ -57,7 +55,7 @@ class HDMicroCell:HDMagAmmo{
ChargeMicroCell(usetop:true);
ChargeMicroCell();
}

void ChargeMicroCell(int chargestodo=-1,bool usetop=false){
SyncAmount();
if(amount<1)return;
Expand Down Expand Up @@ -134,26 +132,29 @@ class HDMicroCell:HDMagAmmo{
if(hd_debug)LogAmounts();
}

override string,string,name,double getmagsprite(int thismagamt){
string magsprite="MCLLA0";
if(thismagamt>6)magsprite="MCLLA0";
else if(thismagamt>3)magsprite="MCLLB0";
else if(thismagamt>0)magsprite="MCLLC0";
else magsprite="MCLLD0";
return magsprite,"MCLPA0","HDMicroCell",0.8;
override string,string,name,double getmagsprite(int thismagamt) {
return HDCore.getMicroCellIcon(thismagamt),"MCLPA0","HDMicroCell",0.8;
}

override void DrawRoundCount(HDStatusBar sb,HDPlayerPawn hpl,name roundsprite,double scl,int offx,int offy){
bool helptext=hpl.hd_helptext.getbool();
offx+=40;
scl=1;
let battt=chargemode;
string batts="uNone";
if(battt==hdbattery.BATT_CHARGEMAX)batts="eAuto";
else if(battt==hdbattery.BATT_CHARGESELECTED)batts="ySelected";
string batts="$BATTERYCHARGE_NONE";
if(battt==hdbattery.BATT_CHARGEMAX)batts="$BATTERYCHARGE_AUTO";
else if(battt==hdbattery.BATT_CHARGESELECTED)batts="$BATTERYCHARGE_SELECTED";
sb.DrawString(
sb.psmallfont,string.format(Stringtable.Localize("$MBAT_HELPTEXT_1"),helptext?Stringtable.Localize("$MBAT_HELPTEXT_2"):"",batts,helptext?Stringtable.Localize("$MBAT_HELPTEXT_3"):""),(offx+2,offy),
sb.DI_SCREEN_CENTER|sb.DI_TEXT_ALIGN_LEFT,
wrapwidth:smallfont.StringWidth("m")*80
sb.psmallfont,
(helptext?StringTable.Localize("$BATTERYCHARGE_CHARGING"):"")
.."\c"..
StringTable.Localize(batts)..
(helptext?StringTable.Localize("$BATTERYCHARGE_RELOAD"):"")
,

(offx+2,offy),
sb.DI_SCREEN_CENTER|sb.DI_TEXT_ALIGN_LEFT,
wrapwidth:smallfont.StringWidth("m")*80
);

sb.drawimage("MCLLA0",(offx,offy),
Expand All @@ -165,7 +166,7 @@ class HDMicroCell:HDMagAmmo{
itemsthatusethis.push("PhazerPistol");
itemsthatusethis.push("HDStunGun");
}

states(actor){
spawn:
MCLL CAB -1 nodelay{
Expand All @@ -179,3 +180,16 @@ class HDMicroCell:HDMagAmmo{
stop;
}
}
class HDMicroCellEmpty:IdleDummy{
default{
//$Category "Ammo/Hideous Destructor/"
//$Title "Micro-Cell (Spent)"
//$Sprite "MCLLD0"
}
override void postbeginplay(){
super.postbeginplay();
angle=frandom(0,360);
HDMagAmmo.SpawnMag(self,"HDMicroCell",0);
destroy();
}
}