From 77d61861667585999ebcd4a9f5abbd332cbefe34 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 5 Mar 2012 14:08:13 +0100 Subject: [PATCH] implement the menuqc part too --- qcsrc/menu/xonotic/weaponslist.c | 5 ++++- qcsrc/server/mutators/mutator_new_toys.qc | 12 ++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/qcsrc/menu/xonotic/weaponslist.c b/qcsrc/menu/xonotic/weaponslist.c index 1f06b9d88b..6790befe12 100644 --- a/qcsrc/menu/xonotic/weaponslist.c +++ b/qcsrc/menu/xonotic/weaponslist.c @@ -97,7 +97,10 @@ void XonoticWeaponsList_drawListBoxItem(entity me, float i, vector absSize, floa if(isSelected) draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED); e = get_weaponinfo(stof(argv(i))); - draw_Text(me.realUpperMargin * eY, e.message, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0); + string msg = e.message; + if(e.spawnflags & WEP_FLAG_MUTATORBLOCKED) + msg = sprintf(_("%s (mutator weapon)"), msg); + draw_Text(me.realUpperMargin * eY, msg, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0); } float XonoticWeaponsList_keyDown(entity me, float scan, float ascii, float shift) diff --git a/qcsrc/server/mutators/mutator_new_toys.qc b/qcsrc/server/mutators/mutator_new_toys.qc index 5642cf1e54..cc4f94324b 100644 --- a/qcsrc/server/mutators/mutator_new_toys.qc +++ b/qcsrc/server/mutators/mutator_new_toys.qc @@ -43,8 +43,8 @@ In "replace random" mode, Nex will have the default replacement "nex rifle". This mutator's replacements run BEFORE regular weaponreplace! - The New Toys guns do NOT get a spawn function, so they can only ever be spawned - when this mutator is active. +The New Toys guns do NOT get a spawn function, so they can only ever be spawned +when this mutator is active. Likewise, warmup, give all, give ALL and impulse 99 will not give them unless this mutator is active. @@ -58,11 +58,11 @@ Outside this mutator, they still can be spawned by: This mutator performs the default replacements on the DEFAULTS of the start weapon selection. - These weapons appear in the menu's priority list, BUT get a suffix - "(Mutator weapon)". +These weapons appear in the menu's priority list, BUT get a suffix +"(Mutator weapon)". - Picking up a "new toys" weapon will not play standard weapon pickup sound, but - roflsound "New toys, new toys!" sound. +Picking up a "new toys" weapon will not play standard weapon pickup sound, but +roflsound "New toys, new toys!" sound. */ -- 2.39.2