Commit graph

48 commits

Author SHA1 Message Date
Alistair Riddoch
58acb15154 Use new template for properties, and rename some
Properties must now be strictly in the same namespace as other definitions,
so I had to rename a few.
2013-03-01 21:52:09 +00:00
Alistair Riddoch
434d177256 Rename "area" class to "region"
This makes a little more sense in the semantics, and avoids the collision
now that properties are in the same namespace.
2013-03-01 21:30:03 +00:00
Alistair Riddoch
261283ac50 Fix formatting and floating point formats 2009-11-01 20:48:05 +00:00
Al Riddoch
351058f34c 2008-09-13 Al Riddoch <alriddoch@googlemail.com>
* data/basic.xml, data/characters.xml, data/mason.xml: Add tick
	  properties to a bunch of entity classes so they no longer need
	  a setup operation to get them going.

	* rulesets/mason/world/objects/Weather.py,
	  rulesets/mason/world/objects/elements/Fire.py,
	  rulesets/mason/world/objects/plants/seeds/Apple.py: Remove setup
	  handlers from a bunch of scripts as it is now handled by
	  properties.

	* data/buildings.xml: Add setup property to entity classes which
	  really need a setup op at startup.

	* client/BaseClient.cpp: Send a look when creating the avatar, so
	  that notifications get back without the need for a special case.

	* common/op_switch.h, rulesets/Creator.cpp, rulesets/Entity.cpp,
	  rulesets/Entity.h, server/WorldRouter.cpp:
	  Remove the setup operation sent to all entities on startup by
	  default. Get rid of some special cases that depended on it.

	* rulesets/InternalProperties.cpp, rulesets/InternalProperties.h:
	  Make the tick property schedule the operation on apply(), and
	  use the property value as the time to schedule it.
2008-09-13 18:02:08 +00:00
Al Riddoch
4cf4d75741 2008-09-08 Al Riddoch <alriddoch@googlemail.com>
* data/basic.xml, data/characters.xml, data/plants.xml: Remove some
	  obsolete classes which have no role in the world, and no media
	  to represent them.
2008-09-08 16:43:36 +00:00
Al Riddoch
d83aad9062 2008-08-27 Al Riddoch <alriddoch@googlemail.com>
* server/ScriptFactory.cpp: Simplify way the name of a class
	  is determined by removing the hack to upercase the type name.

	* server/EntityFactory.cpp: Break python type name on the last
	  . making the name of the class independant of the Atlas type.

	* data/basic.xml, data/buildings.xml, data/characters.xml,
	  data/clothing.xml, data/mason.xml, data/plants.xml,
	  data/tools.xml, data/weapons.xml, data/werewolf.xml: Modify all
	  python type names in the classes to include the name of the class
	  explicitly.
2008-08-27 16:42:38 +00:00
Al Riddoch
9d1b0710a5 2007-12-03 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml: Add status to the fire entity as the script needs
	  it to be there.
2007-12-03 17:29:19 +00:00
Al Riddoch
5e7c576768 2007-10-19 Al Riddoch <alriddoch@zepler.org>
* data/food.xml, data/basic.xml, data/mason.xml: Move some food types
	  from basic and mason into their own file.

	* data/construction.xml, data/basic.xml: Move a construction type from
	  basic into the right file.
2007-10-19 14:51:20 +00:00
Al Riddoch
aa96944ce0 2007-10-19 Al Riddoch <alriddoch@zepler.org>
* data/operations.xml, data/basic.xml: Move some operation definitions
	  from basic into their own rules file.
2007-10-19 14:05:07 +00:00
Al Riddoch
cbcf2450a1 2007-10-19 Al Riddoch <alriddoch@zepler.org>
* data/weapons.xml, data/basic.xml: Move some weapon types
	  from basic into their own rules file.
2007-10-19 13:55:01 +00:00
Al Riddoch
2e1c64f0c1 2007-10-19 Al Riddoch <alriddoch@zepler.org>
* data/operations.xml, data/tasks.xml: Move some operation definitions
	  from basic into their own rules file.
2007-10-19 13:46:16 +00:00
Al Riddoch
0f3a86c9ce 2007-10-18 Al Riddoch <alriddoch@zepler.org>
* data/characters.xml, data/basic.xml: Move some character types
	  from basic into their own rules file.
2007-10-18 20:49:03 +00:00
Al Riddoch
cbc4d8d097 2007-07-17 Al Riddoch <alriddoch@zepler.org>
* server/EntityFactory.cpp: Complete the code that populates
	  operations on a tool based on the task activations in the
	  ruleset, removing the need for world builders to synchronise
	  this data manually.

	* data/basic.xml, data/mason.xml: Remove operations from all tools
	  that only use them for activating tasks, now that this is handled
	  automatically.
2007-07-17 17:13:25 +00:00
Al Riddoch
2190237e91 2007-07-08 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml: Remove a few pointless entity scripts.
2007-07-08 19:55:28 +00:00
Al Riddoch
ef304a66a0 2007-07-04 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml: Provide entirely data driven definitions for Cut
	  and Chop ops.

	* common/Chop.h, common/Cut.h, common/Makefile.am, common/custom.cpp,
	  common/operations.cpp, common/types.h, tests/Makefile.am,
	  tests/Tasktest.cpp, tests/allOperations.h,
	  tests/inheritancetest.cpp: Remove the hard coded Cut and Chop op
	  definitions completely from the build.
2007-07-04 22:00:14 +00:00
Al Riddoch
ef4942372a 2007-07-04 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml: Strip entity scripts off pickaxe and shovel.

	* rulesets/World.h, rulesets/World.cpp: Remove handlers used to
	  to implement pickaxe and shovel, which are now handled as tasks.

	* common/Delve.h, common/Dig.h, common/Mow.h, common/custom.cpp,
	  common/operations.cpp: Remove a bunch of operations from the build
	  which were only used to do things in an over simple hard coded way.
2007-07-04 21:20:40 +00:00
Al Riddoch
c5960ed932 2007-07-04 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml: Remove the script for scythe as it is no longer
	  used.

	* rulesets/World.cpp: Remove mow operation from World, as this is now
	  handled by a task.
2007-07-04 17:09:39 +00:00
Al Riddoch
e96b7709f9 2007-07-02 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml, data/mason.xml: Add type information for venison
	  from deer.
2007-07-02 14:14:22 +00:00
Al Riddoch
5ed4d0f053 2007-07-02 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml: Set the mass of ham to 1 by default.

	* rulesets/mason/world/tasks/Slaughter.py: Finish task for
	  slaughtering animals for meat.
2007-07-02 14:04:20 +00:00
Al Riddoch
622c9212d5 2007-06-30 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml: Remove the explicit class for butcher, and just use
	  the settler class. Character appearance should not be determined by
	  class.

	* data/mason.xml: Add a new slaughter task class, work in progress.

	* rulesets/mason/world/tasks/Slaughter.py: Incomplete script for
	  slaughter task.

	* rulesets/mason/define_world.py: The butcher is now an instance of
	  settler.
2007-06-30 16:08:46 +00:00
Al Riddoch
3b9202f5de 2007-06-26 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml: Remove the script from sword, as it does nothing
	  useful.
2007-06-26 12:06:55 +00:00
Al Riddoch
e1bb7e4387 2007-06-22 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml, data/mason.xml: Remove inheritance from food class,
	  as food is now entirely property based.
2007-06-22 13:07:04 +00:00
Al Riddoch
bb6ba14903 2007-06-21 Al Riddoch <alriddoch@zepler.org>
* rulesets/ActivePropertyFactory.h,
	  rulesets/ActivePropertyFactory_impl.h: Add a new type of property
	  builder than can install multiple operation handlers.

	* server/CorePropertyManager.cpp: Add a new active dynamic property
	  "biomass" for things which can be eaten, which handles the Eat
	  operation.

	* rulesets/Food.cpp, rulesets/Food.h: Remove the old Eat operation
	  handler.

	* data/basic.xml, data/mason.xml: Give all the food entity rules
	  some biomass.
2007-06-21 20:26:53 +00:00
Al Riddoch
8c0ead4568 2007-06-15 Al Riddoch <alriddoch@zepler.org>
* configure.ac: Check for dirent.h.

	* common/AtlasFileLoader.cpp: Report duplicate IDs when loading rule
	  data.

	* data/basic.xml: Remove obsolete old overriden rules, as we will
	  no longer be doing rules that way.

	* server/EntityFactory.cpp: When loading rulesets directly from
	  files, also load all files in ruleset.d.
2007-06-15 15:18:55 +00:00
Al Riddoch
1b6e9e4e61 2007-06-12 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml: Remove the tool script for the axe base class, as
	  we now depend entirely on task scripts for axe functionality.
2007-06-12 18:59:17 +00:00
Al Riddoch
7f2891c0c4 2007-01-27 Al Riddoch <alriddoch@zepler.org>
* rulesets/ActivePropertyFactory_impl.h: Correct the header guard
	  comments.

	* rulesets/SolidProperty.cpp, rulesets/SolidProperty.h: New property
	  to handler whether an entities bbox is solid or not.

	* rulesets/EntityPropertyFactory.cpp, rulesets/EntityPropertyFactory.h,
	  rulesets/EntityPropertyFactory_impl.h: New property factory
	  for properties the contructor of which takes an entity pointer of
	  the owning entity.

	* server/CorePropertyManager.cpp: Install the SOLID property on demand.

	* data/basic.xml: Make area entities non-solid by default, so you don't
	  collide with them.
2007-01-27 16:35:36 +00:00
Al Riddoch
9efdc006aa 2007-01-27 Al Riddoch <alriddoch@zepler.org>
* server/Account.cpp: Remove the hack that ensures players always
	  create a settler if they try and create a character that does not
	  exist. Handle setting initial attributes unique to player characters
	  here, rather than setting the defaults on the classes.

	* data/mason.xml: Remove initialising status to a ery low value to
	  make settlers and goblins starve easily.

	* data/basic.xml: Set the mass of a arrow to something sane.
2007-01-27 15:07:54 +00:00
Al Riddoch
e656990464 2007-01-11 Al Riddoch <alriddoch@zepler.org>
* server/CorePropertyManager.cpp: Modify DECAYS Delete handler so
	  that the parent entity handles the creation of entities that
	  have resulted from the decay.

	* rulesets/Character.cpp: Call Entity::operation() from operation()
	  to ensure operation handlers are called, and all future
	  modifications get picked up too.

	* data/basic.xml, data/mason.xml: Add a DECAYS property leaving a
	  skull to all humanoid classes.
2007-01-11 00:26:44 +00:00
Al Riddoch
a5549afaaf 2006-07-19 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml: Make coin inherit from stackable.

	* rulesets/Character.cpp, rulesets/Stackable.cpp: Add debug output
	  to new combine op handlers.
2006-07-19 02:44:18 +00:00
Al Riddoch
852bb1d643 2006-06-30 Al Riddoch <alriddoch@zepler.org>
* FIXME, Makefile.am: Add new FIXME file which documents FIXMEs in
	  the code.

	* server/EntityFactory.cpp: Remove the terrain feature classes
	  implemented as hard coded classes.

	* data/basic.xml: Add the terrain feature classes as soft data
	  defined classes.
2006-06-30 15:11:57 +00:00
Al Riddoch
a7ccf9e9fb 2006-01-26 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml: Add "collapse" action op to trigger a defeated
	  animation.

	* rulesets/mason/world/tasks/Combat.py: Prevent characters from
	  attacking characters that are exhausted. Send a sight of
	  collapse operation when combat finishes.
2006-01-27 17:24:05 +00:00
Al Riddoch
ba4a73dfe5 2005-11-30 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/world/objects/Thing.py: Remove self.attributes
	  from the base class for all python scripts.

	* rulesets/mason/world/objects/Weather.py,
	  rulesets/basic/world/objects/plants/Tree.py,
	  rulesets/basic/world/objects/animals/Animal.py,
	  data/basic.xml, data/mason.xml: Don't use set_kw to handle default
	  attributes, and add the to the .xml rules files.

	* rulesets/basic/world/objects/buildings/House.py,
	  rulesets/basic/world/objects/buildings/StoneHouse.py,
	  rulesets/basic/world/objects/tools/Bow.py,
	  rulesets/basic/world/objects/tools/Sword.py,
	  rulesets/mason/world/objects/animals/Deer.py,
	  rulesets/mason/world/objects/animals/Pig.py,
	  rulesets/mason/world/objects/outdoor/Campfire.py,
	  rulesets/mason/world/objects/outdoor/Gravestone.py,
	  rulesets/mason/world/objects/plants/seeds/Acorn.py,
	  rulesets/mason/world/objects/plants/seeds/Apple.py,
	  rulesets/mason/world/objects/plants/seeds/Fircone.py,
	  rulesets/mason/world/objects/plants/seeds/Seed.py,
	  rulesets/mason/world/objects/tools/Cleaver.py,
	  rulesets/mason/world/objects/undead/Skeleton.py,
	  rulesets/werewolf/world/objects/characters/Villager.py,
	  rulesets/werewolf/world/objects/tools/Gallows.py:
	  Don't import set_kw from misc, as its now obsolete and unused.
2005-11-30 22:37:50 +00:00
Al Riddoch
c3f98a2ad5 2005-09-16 Al Riddoch <alriddoch@zepler.org>
* common/custom.cpp: Remove some operation types only used in
	  scrypts.

	* data/basic.xml, data/mason.xml: Add the operation definitions
	  into the rule files.
2005-09-16 00:14:18 +00:00
Hagen Moebius
91f6c59708 2005-06-28 Hagen Moebius <hagen.moebius@starschiffchen.de>
* data/basic.xml: Added operations "disperse" and "extinguish".
   Set up "disperse" as the default operation for the pile.
 * rulesets/basic/world/objects/Pile.py: The operation "disperse"
   will call the "extinguish" operation on the target. Maybe it is
   advisable to add an assertion if the target is indeed a fire.
2005-06-28 22:51:49 +00:00
Al Riddoch
f5f68b94b1 2005-06-19 Al Riddoch <alriddoch@zepler.org>
* rulesets/mason/world/objects/tools/Tinderbox.py: Change strength
	  of initial fire spark to 0.05.

	* common/operations.cpp: Fix nourish op, which got broken when mow
	  was added.

	* data/basic.xml: Add a default bbox for lumber, giving it a more
	  apropriate size.

	* rulesets/Py_World.cpp: Add a compare implementation so that
	` scripts can check entities to see if they are the world.

	* rulesets/basic/world/objects/elements/Fire.py: Tune the
	  changes which occur in fire as it burns.
2005-06-19 16:46:52 +00:00
Al Riddoch
b9d5a4ca64 2005-05-27 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml, data/mason.xml, rulesets/mason/define_world.py:
	  Make sure entities with layers all use a different layer ID.
	  Make sure sty has area and bbox in the default attributes.
2005-05-28 20:09:33 +00:00
Al Riddoch
9b76a9c3a7 2005-05-18 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml, data/mason.xml: Add objtype to all rules.
	  Add a rule for ignite operation definition.

	* common/custom.cpp: Remove hardcoded ignite operation definition.

	* server/EntityFactory.cpp, server/EntityFactory.h: Remove some debug
	  output. Add new code to allow op_definitions to be installed as
	  rules.

	* common/inheritance.cpp, common/inheritance.h: Return an error code
	  when a type without parents gets installed, rather than throwing an
	  exception.

	* tests/inheritancetest.cpp: Fix test so it no longer expects an
	  exception.

	* rulesets/mason/world/objects/clothing/Garment.py: Remove some
	  debug output.

	* tools/AdminClient.cpp: Remove hardcoded objtype, depending instead
	  on objtype from the data file. Fix a bug where the full rule
	  was not getting uploaded when updating an existing rule.
	  Improve error reporting when update fails.
2005-05-17 23:51:26 +00:00
Al Riddoch
d3a357943e 2005-05-15 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml: Make the mass of the pig sty large enough it can
	  no longer be moved around.
2005-05-14 23:21:46 +00:00
Al Riddoch
9284d0a4da 2005-05-12 Al Riddoch <alriddoch@zepler.org>
* tools/Formatter.cpp: Change the way lists are formatted to
	  to be cleaner, and match the way existing rules are stored.

	* data/mason.xml, data/basic.xml: Make sure maps are all in
	  alphabetical order, so these files are the same as their machine
	  generated versions.
2005-05-12 11:07:14 +00:00
Al Riddoch
8c445d7b6d 2005-05-10 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml, data/mason.xml: Add bounding boxes for fire
	  and campfire.
2005-05-10 22:24:18 +00:00
Al Riddoch
5aebaefe22 2005-05-10 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml, rulesets/basic/world/objects/Pile.py: Add a new
	  experimental type for piles.

	* TODO: Some random crazy shit.
2005-05-10 15:52:51 +00:00
Al Riddoch
9b61dc803a 2005-05-09 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml: Add a new type for boulder.
2005-05-09 19:50:58 +00:00
Al Riddoch
ccb6388908 2005-05-06 Al Riddoch <alriddoch@zepler.org>
* common/Dig.h, common/Mow.h, common/custom.cpp, common/operations.cpp:
	  Add new Dig and Mow operations, for handling resource gathering.

	* rulesets/basic/world/objects/tools/Shovel.py,
	  rulesets/basic/world/objects/tools/Scythe.py,
	  data/basic.xml: Add new scythe and shovel for gathering resources
	  from the terrain.

	* rulesets/basic/world/objects/tools/Pickaxe.py,
	  common/Delve.h: Fix the comments.

	* rulesets/World.cpp, rulesets/World.h: Move code for determining
	  terrain surface type into a method of its own. Implement handlers
	  for Dig and Mow ops.
2005-05-06 01:41:17 +00:00
Al Riddoch
7ba24a29d9 2005-04-21 Al Riddoch <alriddoch@zepler.org>
* common/custom.cpp, common/Delve.h,
	  common/operations.cpp, common/operations.h:
	  Add new delve operation for digging with a pickaxe.

	* data/basic.xml, rulesets/basic/world/objects/tools/Pickaxe.py:
	  Add new pickaxe entity which emits a Delve operation when
	  used.

	* rulesets/Character.cpp: Fix a bug where a segfault occured
	  if an operation was requested by a tool that was unknown to
	  to the core server code. Instead an error message is emitted.

	* rulesets/World.cpp: Subscribe world terrain to delve ops.
2005-04-22 00:29:10 +00:00
Al Riddoch
bda38097f0 2005-01-25 Al Riddoch <alriddoch@zepler.org>
* data/basic.xml: Clean out a load of obsolete classes and scripts.

	* rulesets/basic/world/objects/buildings/House.py,
	  rulesets/basic/world/objects/buildings/StoneHouse.py,
	  rulesets/basic/world/objects/tools/Bow.py,
	  rulesets/basic/world/objects/tools/Sword.py,
	  rulesets/mason/world/objects/plants/seeds/Seed.py,
	  rulesets/mason/world/objects/undead/Skeleton.py:
	  Remove obsolete constructors, and don't inherit from
	  obsolete scripts.
2005-01-25 23:22:30 +00:00
Al Riddoch
4cc780a559 2004-11-04 Al Riddoch <alriddoch@zepler.org>
* rulesets/Plant.h, rulesets/Plant.cpp: Add handler for chop so
	  we can chop down vegetation.

	* rulesets/basic/world/objects/tools/Axe.py: Modify Axe to comply
	  with new tool use mechanism.

	* rulesets/basic/mind/goals/humanoid/transaction.py,
	  rulesets/basic/mind/goals/common/misc_goal.py,
	  rulesets/mason/define_world.py: Update butcher goals to use tool
	  use mechanism.

	* rulesets/Python_API.cpp: Ensure entities created from Python
	  have an objtype.
2004-11-04 11:39:00 +00:00
Al Riddoch
611839af45 2004-09-24 Al Riddoch <alriddoch@zepler.org>
* data/mason.xml, data/basic.xml: Tweak rules so that sty and house
	  are light enough to move around.
2004-09-24 10:47:29 +00:00
Al Riddoch
91c9437c81 2004-07-12 Al Riddoch <alriddoch@zepler.org>
* common/Database.cpp, common/Database.h: Add capability to specify
	  extra columns in generic Atlas database tables. Query the results
	  columns more robustly. Add a ruleset name column to the rules
	  table.

	* server/EntityFactory.cpp: Re-write rule loader to handle new
	  format rules. Tighten up strictness of rule data. It is no
	  longer possible to specify defaults for location in the rule.

	* tools/cyconvertrules.cpp: Ensure that the playable flag is
	  copied across when converting rules.

	* tools/cyloadrules.cpp: Adapt to load the new format rules,
	  including handling the ruleset name column.
2004-07-12 10:58:20 +00:00