/
troopsSelector.c
44 lines (41 loc) · 1.33 KB
/
troopsSelector.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//*****************************************************************************
// Copyright (c) 2019 - Allen Cummings, RealmsMUD, All rights reserved. See
// the accompanying LICENSE file for details.
//*****************************************************************************
inherit "/lib/core/baseSelector.c";
/////////////////////////////////////////////////////////////////////////////
public nomask void reset(int arg)
{
if (!arg)
{
AllowUndo = 0;
AllowAbort = 1;
Description = "Main Menu";
Type = "Troop Management";
Data = ([]);
}
}
/////////////////////////////////////////////////////////////////////////////
protected nomask void setUpUserForSelection()
{
object dictionary = load_object("/lib/dictionaries/domainDictionary.c");
if (dictionary)
{
Data = dictionary->getTroopsMenu(User);
}
Data[to_string(sizeof(Data) + 1)] = ([
"name":"Exit Troop Management Menu",
"type" : "exit",
"description" : "This option lets you exit the troop management menu.\n",
"canShow" : 1
]);
}
/////////////////////////////////////////////////////////////////////////////
public nomask void onSelectorCompleted(object caller)
{
if (User)
{
tell_object(User, displayMessage());
}
caller->cleanUp();
}