]> icculus.org git repositories - divverent/nexuiz.git/blob - data/menuqc/custom/util.qm
Now overtime also gets initiated by equal frags and reaching the fraglimit.
[divverent/nexuiz.git] / data / menuqc / custom / util.qm
1 // Property of Alientrap/AK
2 // custom/util.qm
3
4 void() Nex_Action_TestOnChange =
5 {
6         Raise_DataEvent( self._target, ITEM_DATA_TEST_START );
7 };
8
9 void( bool pSelect, bool pUser ) Nex_Action_TestOnSelect =
10 {
11         if( !pSelect && pUser )
12                 Raise_DataEvent( self._target, ITEM_DATA_TEST_START );
13 };
14
15 // play the sound specified in the target field
16 void() Nex_Action_PlaySound =
17 {
18         if( self.target ) {
19                 Sound_Play( self.target );
20         }
21 };
22
23 void() Nex_Action_PlaySoundOnce =
24 {
25         if( self.target ) {
26                 Sound_Play( self.target );
27         }
28         Menu_DeleteAfterToggle( self );
29 };
30
31 // execute a console cmd on action
32 void() Nex_Action_ConsoleCmd_Destroy =
33 {
34         String_EntityFree( self, syncCmd );
35 };
36
37 void() Nex_Action_ConsoleCmd_Action =
38 {
39         cmd( self.syncCmd );
40 }
41
42 void() Nex_Action_ConsoleCmd =
43 {
44         String_EntityZone( self, syncCmd );
45
46         self.destroy = Nex_Action_ConsoleCmd_Destroy;
47         self.action = Nex_Action_ConsoleCmd_Action;
48 };