Erik Ogenvik
eed786758e
Better log output with entity's name.
2016-06-08 21:46:37 +02:00
Erik Ogenvik
374a691735
Allow destination to be set to another entity.
...
This only works for entities that share the same domain.
It also allows for entities to follow other entities.
2016-04-03 21:25:39 +02:00
Erik Ogenvik
58f3cabb73
Set both location and radius when setting destination.
2016-03-20 22:48:03 +01:00
Erik Ogenvik
fa4eb7bb0b
Limit too long distances.
...
If the character wants to travel too far, we shouldn't try to map the whole
path straight away. Instead we'll cut down on the lenght, and increase the
acceptable radius.
This works since the AI will issue a new destination on its next Tick.
2016-03-19 23:05:13 +01:00
Erik Ogenvik
e76e0fc7ad
Skip movement goals that are unreachable.
...
A goal is considered to be unreachable when all tiles in the awareness area
have been mapped, and no path still could be found.
2016-03-19 23:05:13 +01:00
Erik Ogenvik
c1d0bf48c5
Improved querying of paths.
2016-03-19 23:05:13 +01:00
Erik Ogenvik
b683fb3464
Allow for inspection of the path.
...
Authoring clients can send a Think op, wrapping a Get op with a "path"
attribute to get information about the path. The mind code will then
send back a list of points for the path.
2016-03-19 23:05:13 +01:00
Erik Ogenvik
14354137a7
Hooked up steering to the move_me goal.
2016-03-19 23:05:13 +01:00
Erik Ogenvik
7b0d30680c
Setup steering.
...
The setup is that steering is handled separately from the normal mind
ticks. At a closer interval (0.2 seconds currently) steering will be
evaluated.
2016-03-19 23:05:13 +01:00
Olek Wojnar
7f9ff2246d
Remove CVS $Id tags
...
The legacy tags are causing build issues in Debian.
2013-07-15 20:31:59 +02:00
Erik Ogenvik
7adcb1d6c6
Expose whether a thing is currently visible.
...
This is useful in AI scripts when looking for things.
2013-06-15 23:46:59 +02:00
Alistair Riddoch
87a8f7338a
Correct the error type in two cases
2012-01-04 16:52:40 +00:00
Alistair Riddoch
58c0aa0392
Remove empty method table
2011-12-27 15:02:28 +01:00
Alistair Riddoch
3775db4db1
Remove as_entity from the overloaded method table
2011-12-27 14:58:44 +01:00
Alistair Riddoch
efa6b00a88
Remove dict for custom attributes
2011-12-27 10:28:14 +01:00
Alistair Riddoch
940daf5f68
Remove methods that are inherited
2011-12-26 00:17:50 +00:00
Alistair Riddoch
5fc5aa308c
Add support for mind in the new generic wrappers
2011-12-15 13:19:41 +00:00
Alistair Riddoch
8f7c07a49d
Use wrapPyton template for tasks.
2011-12-14 17:42:56 +00:00
Alistair Riddoch
efbfaeef4f
Convert wrapping function into a template
...
This enables other code to be written more generically
2011-12-14 16:37:26 +00:00
Alistair Riddoch
d4f66bbbf8
Separate wrapping new class into its own function
2011-12-14 00:41:02 +00:00
Alistair Riddoch
a8dfc319df
Implement better type checks in Python wrappers
...
These now take into account inheritance, allowing simpler code
and better type safety.
2011-12-13 19:39:09 +00:00
Alistair Riddoch
7002533e40
Don't allow PyThing to promote an Entity to Character
2011-12-13 19:19:09 +00:00
Alistair Riddoch
f9dd66103d
Make the thing types properly inherit from each other
2011-12-13 18:53:35 +00:00
Alistair Riddoch
111581e56a
Remove obsolete m_task in Character
...
This pointer is made obsolete now that TasksProperty holds it
2011-12-02 02:37:42 +00:00
Alistair Riddoch
da5cdefef7
Remove Character.clearTask wrapper
...
Nothing was using it, and functionality shouldn't be hard coded into
the Character class like this.
2011-11-17 16:46:17 +00:00
Alistair Riddoch
5d3d265f08
Merge PyMind code into PyThing, as it is so close
2011-11-07 19:16:50 +00:00
Alistair Riddoch
102d59ff53
Stop using noScript object for scriptless objects
2011-10-13 14:20:46 +01:00
Alistair Riddoch
a1d9c17f8a
Support weak references
2011-10-12 15:29:52 +01:00
Alistair Riddoch
275506b668
Make clearTask wrapper safe
...
There is an assert in Character::clearTask to ensure that it is only
ever called when there is no task at shutdown. In order to ensure this is
safe in the Python API it is necessary to ensure it is never called
when there is no task, so this change adds a check to the wrapper.
2011-10-04 11:41:04 +01:00
Alistair Riddoch
527ba804f6
Fix a logic change that caused Python failures
2011-09-29 20:58:57 +01:00
Alistair Riddoch
0c4fd86b37
When setAttr is called form a script, mark the property as unsent
2011-02-27 23:56:29 +00:00
Alistair Riddoch
5e029672e2
Remove notice of changing an attribute using map data
2011-02-23 13:48:48 +00:00
Alistair Riddoch
65f63510c6
Remove notice message on unexpected attribute set
2011-02-23 13:04:51 +00:00
Alistair Riddoch
6041576e06
Correct an error message to give the correct function name.
2009-11-12 23:35:21 +00:00
Alistair Riddoch
3121e043b3
Add support to allow type to be set on entities not yet in-game.
2009-11-12 22:14:31 +00:00
Alistair Riddoch
3b72367ddd
Replace the binding for obsolete setTask with a new one for startTask.
2009-07-29 12:54:24 +01:00
Alexey Torkhov
97a7b07d24
Fixing assert messages in Entity bindings.
2009-07-14 19:33:03 +04:00
Alistair Riddoch
9f4a1205f3
Clean up stray lines in new object creation functions.
2009-07-04 19:05:32 +01:00
Alistair Riddoch
4f734d050d
Remove commented out obsolete implementations of new object creation.
2009-07-04 19:03:29 +01:00
Alistair Riddoch
d9459d07d6
Ensure null pointers cannot be dereferenced.
2009-07-04 14:16:13 +01:00
Alistair Riddoch
7cd79d77f7
Convert Entity wrappers to being base classes for scripts.
2009-07-01 01:59:54 +01:00
Alistair Riddoch
7cbd4082d9
Make it possible to inherit from Mind and Entity wrappers.
2009-07-01 00:50:38 +01:00
Alistair Riddoch
97816edc45
Convert Entity wrappers to use get/setattro.
2009-07-01 00:00:36 +01:00
Alistair Riddoch
534c69b54c
Convert all the code relating to bindings for IG Entity to use the union
...
based binding for simplicity.
2009-06-12 20:19:52 +01:00
Alistair Riddoch
c73c489e58
Re-write PyEntity as a union of the possible pointer types.
2009-06-12 11:36:07 +01:00
Alistair Riddoch
bdb4c71dd3
Correct the names and doc strings of the available server Entity wrappers.
2009-06-08 01:42:25 +01:00
Alistair Riddoch
1c260a8201
Remove unnecessary tp_new implementations from all bindings that don't need them
2009-06-04 15:29:34 +01:00
Alistair Riddoch
dc02e8d432
Convert tp_dealloc methods to call tp_free as they should in modern types.
2009-06-03 18:23:06 +01:00
Alistair Riddoch
4bf6963697
Rename excessively verbose PyMessageElement to PyMessage.
2009-05-27 18:22:56 +01:00
Alistair Riddoch
f1a5a44bb2
Update all includes for rename of Py_Object.h to Py_Message.h
2009-05-27 14:10:26 +01:00