/
research.c
42 lines (37 loc) · 1.28 KB
/
research.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
//*****************************************************************************
// Copyright (c) 2018 - Allen Cummings, RealmsMUD, All rights reserved. See
// the accompanying LICENSE file for details.
//*****************************************************************************
inherit "/lib/commands/baseCommand.c";
/////////////////////////////////////////////////////////////////////////////
public nomask void reset(int arg)
{
if (!arg)
{
addCommandTemplate("research");
}
}
/////////////////////////////////////////////////////////////////////////////
public nomask void onSelectorCompleted(object caller)
{
caller->cleanUp();
}
/////////////////////////////////////////////////////////////////////////////
public nomask void onSelectorAborted(object caller)
{
caller->cleanUp();
}
/////////////////////////////////////////////////////////////////////////////
public nomask int execute(string command, object initiator)
{
int ret = 0;
if (canExecuteCommand(command))
{
object selector = clone_object("/lib/modules/research/researchSelector.c");
move_object(selector, initiator);
selector->registerEvent(this_object());
selector->initiateSelector(initiator);
ret = 1;
}
return ret;
}