Commit graph

19 commits

Author SHA1 Message Date
Alistair Riddoch
bbd2e722d2 Call client teardown when editor finalizes 2012-07-27 09:44:28 +01:00
Alistair Riddoch
437278b27b Remove curcular references and clean up syntax
Storing references to bound methds of self makes the object contain
circular references, and makes it hard to GC. Storing the unbound
methods removes this problem. I moved from apply() to the modern syntax
to be certain of getting the change right.
2012-07-26 23:28:56 +01:00
Alistair Riddoch
c51802c34f Add test for combat interface 2011-12-02 01:04:39 +00:00
Alistair Riddoch
f8dc3e5e76 Restructure avatar creation to make more sense 2011-12-01 10:27:13 +00:00
Alistair Riddoch
ce22b00058 Clean up the way editor is set up 2011-12-01 10:11:00 +00:00
Alistair Riddoch
4a0eda93e7 Update client related code for changed bindings 2011-11-30 19:27:11 +00:00
Alistair Riddoch
3b039a7d8b Let's have some variable names that make sense. 2010-12-01 10:06:55 +00:00
Alistair Riddoch
ad0ac2b703 Add a new helper function to simplify client scripts 2010-09-12 15:12:54 +01:00
Al Riddoch
76165cabe8 2008-12-15 Al Riddoch <alriddoch@googlemail.com>
* client/Py_CreatorClient.cpp, client/CreatorClient.h,
	  client/CreatorClient.cpp, rulesets/basic/editor.py: Make a delete
	  method available to the client editor interface.
2008-12-15 18:47:48 +00:00
Al Riddoch
d4968ffcc2 2007-11-28 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/editor.py: Don't pre-pend the name on sentences
	  sent to program the AIs.

	* rulesets/basic/mind/NPCMind.py: Replace all the places where
	  the name of an entity is taken with a function which checks
	  for the name, but then uses the type if it is not present.

	* rulesets/basic/mind/panlingua/interlinguish.py: Fix the code
	  that strips the name from the beginning of sentences so that
	  it checks first.
2007-11-28 20:51:43 +00:00
Al Riddoch
f2f294065a 2007-11-27 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/editor.py: Make the default argument of m.make
	  the type, and name optional.

	* rulesets/mason/define_world.py: Swap the type to the default
	  argument of m.make, and strip the names off most entities.
2007-11-27 18:59:33 +00:00
Al Riddoch
a2914a39e3 2005-12-24 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Re-work the keywords handling in Operation()
	  to avoid bugs in the mapping protocol by using Dict functions, and
	  eliminate wasteful double lookup. No longer accept setting FROM
	  in constructor as its never required.

	* rulesets/werewolf/world/objects/characters/Villager.py,
	  rulesets/basic/editor.py: No longer set FROM on operations at
	  construction. It was never necessary.
2005-12-24 02:23:31 +00:00
Al Riddoch
8e5c27bf80 2004-01-09 Al Riddoch <alriddoch@zepler.org>
* rulesets/mason/define_world.py: Use know() for prices rather
	  than the special case code.

	* rulesets/basic/editor.py, rulesets/basic/mind/NPCMind.py:
	  Remove obsolete special case code for handling knowledge of
	  prices. Improve code to express distance to a location so
	  it neglects the vertical distance, and better handles the
	  very close case.

	* rulesets/basic/mind/goals/humanoid/mason.py: Track the character
	  being helped in the help goal, and turn to face them when speaking.

	* rulesets/basic/mind/panlingua/interlinguish.py: Add more support
	  for pronouns, conjugations and whitespace in regex used to match
	  certain sentence structures.
2005-01-09 21:24:57 +00:00
Al Riddoch
aab495780a 2004-11-18 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/editor.py: Improve the define_world API by making
	  the type argument optional.
2004-11-18 11:41:00 +00:00
Al Riddoch
9f9b0c12a3 2004-06-20 Al Riddoch <alriddoch@zepler.org>
* rulesets/Python_API.cpp: Clean up use of standard error to go
	  via the log subsystem.

	* rulesets/basic/editor.py, rulesets/basic/mind/NPCMind.py,
	  rulesets/basic/mind/panlingua/interlinguish.py,
	  rulesets/mason/define_world.py:
	  Expand handling of the verb "know" so that knowledge
	  is a triple, including predicate, so that know can be used
	  to inform a character of any knowledge. Generalise the client
	  code, and tweak the client data to include the right information.

	* mason.xml: Add new rule for mercenaries.

	* rulesets/basic/mind/goals/humanoid/transaction.py: Add new
	  dynamic goal for NPCs offering their services for hire.

	* rulesets/basic/mind/panlingua/interlinguish.py:
	  Add new words related to hirable NPCs

	* rulesets/mason/define_world.py: Start programming up warriors
	  to be hirable.
2004-06-20 19:24:36 +00:00
Al Riddoch
b89504d49c 2002-08-30 Al Riddoch <alriddoch@zepler.org>
* common/globals.cpp: Only persist this sessions command line
	  options if the user is overriding the installation directory.

	* cyphesis.vconf, client/Py_CreatorClient.cpp,
	  client/Py_CreatorClient.h, client/client.cpp:
	  Add client functionality to allow diferent scripts to be run to
	  perform different functions on the server.

	* client/CharacterClient.cpp: Add debug option.

	* rulesets/Character.h: Make mind operation functions virtual,
	  so they can be overridden.

	* common/BaseWorld.h, server/WorldRouter.cpp,
	  server/WorldRouter.h: Add server functions to search for
	  entities by name or type.

	* rulesets/Creator.h, rulesets/Creator.cpp: Allow creator to
	  specify a look without an id to search for entities with
	  a given name or type.

	* client/CreatorClient.cpp, client/CreatorClient.h,
	  client/ObserverClient.cpp, client/ObserverClient.h,
	  client/Py_CreatorClient.cpp, rulesets/basic/editor.py,
	  rulesets/mason/define_world.py:
	  Add support for looking for entities in the world by name or
	  type from client script, so client scripts can modify existing
	  world.

	* rulesets/Entity.cpp, rulesets/Movement.cpp,
	  rulesets/Py_Object.cpp, rulesets/Py_Operation.cpp,
	  rulesets/Py_Oplist.cpp, rulesets/Python_API.cpp,
	  rulesets/Stackable.cpp, rulesets/Thing.cpp,
	  rulesets/World.cpp, server/Account.cpp,
	  server/CommServer.cpp, server/Connection.cpp,
	  server/Player.cpp, server/ServerRouting.cpp,
	  server/server.cpp, tools/cycmd.cpp,
	  tools/cywatchdog.cpp: Code formatting cleanups.

	* rulesets/basic/world/objects/tools/Bow.py: Fix up bow so it now
	  fires correctly.
2002-08-30 13:48:39 +00:00
Al Riddoch
049497ed01 2002-06-14 Al Riddoch <alriddoch@zepler.org>
* client/CreatorClient.cpp, client/CreatorClient.h,
	  client/Py_CreatorClient.cpp, rulesets/basic/editor.py: Add
	  features to allow query and manipulation of the world from
	  the client.

	* rulesets/mason/define_world.py: Give the world a name.
2002-06-14 13:56:58 +00:00
Al Riddoch
dee412c0a0 * 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>
2001-08-19 18:37:38 +00:00
Al Riddoch
bc167c94d3 New files 2001-08-16 17:59:05 +00:00