mirror of
https://github.com/worldforge/cyphesis
synced 2026-08-13 12:26:04 -04:00
* client/CharacterClient.cpp: Removed commented out code.
* client/CreatorClient.cpp: Fixed processing the response to a create operation, and cleaned up debugging output. * client/ObjserverClient.cpp, client/ObserverClient.h, client/client.cpp: Added setup method, which which handles connecting, negotiation, logging in and creating character. * client/Py_CreatorClient.cpp: Added check if make() failed. * rulesets/Python_API.cpp: Fixed setting the import hooks list properlly to include the ruleset list in use, instead of hardcoding it. * rulesets/acorn/define_world.py: Copied define_world.py script from client directory for Acorn. * rulesets/basic/editor.py: Modified to be used from C++ core. * rulesets/basic/mind/goals/__init__.py, rulesets/basic/mind/goals/humanoid/werewolf.py: Added in goals file to contain goals related to werewolf. * rulesets/basic/mind/panlingua/interlinguish.py: Added in vote and execute verbs for werewolf. * rulesets/werewolf: Added in new ruleset for werewolf. Al Riddoch <alriddoch@zepler.org>
This commit is contained in:
parent
bc167c94d3
commit
dee412c0a0
27 changed files with 460 additions and 121 deletions
|
|
@ -783,17 +783,23 @@ static PyMethodDef misc_methods[] = {
|
|||
void init_python_api()
|
||||
{
|
||||
std::string pypath("");
|
||||
std::string importCmd("ruleset_import_hooks.install([");
|
||||
std::list<std::string>::const_iterator I;
|
||||
for(I = rulesets.begin(); I != rulesets.end(); I++) {
|
||||
pypath = pypath + share_directory + "/cyphesis/rulesets/" +
|
||||
*I + ":";
|
||||
pypath = pypath + share_directory + "/cyphesis/rulesets/" + *I + ":";
|
||||
if (I != rulesets.begin()) {
|
||||
importCmd = importCmd + ",";
|
||||
}
|
||||
importCmd = importCmd + "\"" + *I + "\"";
|
||||
}
|
||||
importCmd = importCmd + "])\n";
|
||||
|
||||
setenv("PYTHONPATH", pypath.c_str(), 1);
|
||||
|
||||
Py_Initialize();
|
||||
|
||||
PyRun_SimpleString("from hooks import ruleset_import_hooks\n");
|
||||
PyRun_SimpleString("ruleset_import_hooks.install([\"acorn\",\"basic\"])\n");
|
||||
PyRun_SimpleString((char *)importCmd.c_str());
|
||||
|
||||
if (Py_InitModule("atlas", atlas_methods) == NULL) {
|
||||
fprintf(stderr, "Failed to Create atlas module\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue