diff --git a/cvarinfo.txt b/cvarinfo.txt index 453dce846..9e281d0eb 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -93,6 +93,10 @@ user int swwm_shadowdist = 2000; // max distance beyond which blob shadows are server bool swwm_swapweapons = true; // [DLC1] allows carrying only one weapon in each slot (excluding starter melee and pistol) user int swwm_forcestats = 0; // always shows level stats on the HUD, not just when the automap is open (2 - also show map name, otherwise only stats) +// TODO selection order array of weapons, for user tweaking +// if empty, use default selection order defined in zscript +user String swwm_weaponorder = ""; + server noarchive bool swwm_iseriouslywanttoplaythiswithbd = false; // self-explanatory // cross-session achievement cvars (0: locked, 1: unlocked, 2: notified) diff --git a/language.version b/language.version index 982fcd8a3..c956591c0 100644 --- a/language.version +++ b/language.version @@ -1,2 +1,2 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r734 \cu(Tue 5 Jan 12:05:24 CET 2021)"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r735 \cu(Tue 5 Jan 17:01:44 CET 2021)"; diff --git a/zscript/swwm_handler.zsc b/zscript/swwm_handler.zsc index 3c1c54f75..00a0ec8c0 100644 --- a/zscript/swwm_handler.zsc +++ b/zscript/swwm_handler.zsc @@ -2896,7 +2896,7 @@ Class SWWMHandler : EventHandler S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI); S_StartSound("misc/ammo_pkup",CHAN_VOICE,CHANF_UI); } - players[e.Args[0]].mo.GiveInventory("HammerspaceEmbiggener",16,true); + players[e.Args[0]].mo.GiveInventory("HammerspaceEmbiggener",8,true); for ( Inventory i=players[e.Args[0]].mo.inv; i; i=i.inv ) { if ( !(i is 'Ammo') ) continue; diff --git a/zscript/swwm_kbase.zsc b/zscript/swwm_kbase.zsc index fdc53def9..85eb2b7f3 100644 --- a/zscript/swwm_kbase.zsc +++ b/zscript/swwm_kbase.zsc @@ -812,7 +812,6 @@ Class DemolitionistMenu : GenericMenu return true; } EventHandler.SendNetworkEvent(String.Format("swwmstoregive.%s",storelist[sel0].GetClassName()),consoleplayer,price,amt); - if ( (camt+amt) >= max ) ofs1 = sel0 = max(0,sel0-1); MenuSound("menu/buyinv"); } else if ( tabs[curtab] == TAB_LIBRARY ) @@ -2141,6 +2140,8 @@ Class DemolitionistMenu : GenericMenu } else if ( tabs[curtab] == TAB_STORE ) { + Class lastsel = null; + if ( storelist.Size() > 0 ) lastsel = storelist[sel0]; storelist.Clear(); storeunits.Clear(); // price-sorted buyables @@ -2253,6 +2254,9 @@ Class DemolitionistMenu : GenericMenu } // re-sort by category qsort_store(storelist,storeunits,0,storelist.Size()-1); + // shift back if the last selected item was removed + if ( lastsel && (storelist.Find(lastsel)) >= storelist.Size() ) + sel0 = max(0,sel0-1); // crop selection if ( sel0 >= storelist.Size() ) sel0 = max(0,storelist.Size()-1); }