|
Atrinik Server 2.5
|
Functions | |
| static PyObject * | Atrinik_Map_GetFirstObject (Atrinik_Map *map, PyObject *args) |
| static PyObject * | Atrinik_Map_GetLastObject (Atrinik_Map *map, PyObject *args) |
| static PyObject * | Atrinik_Map_GetLayer (Atrinik_Map *map, PyObject *args) |
| static PyObject * | Atrinik_Map_GetMapFromCoord (Atrinik_Map *map, PyObject *args) |
| static PyObject * | Atrinik_Map_PlaySound (Atrinik_Map *map, PyObject *args, PyObject *keywds) |
| static PyObject * | Atrinik_Map_Message (Atrinik_Map *map, PyObject *args, PyObject *keywds) |
| static PyObject * | Atrinik_Map_CreateObject (Atrinik_Map *map, PyObject *args) |
| static PyObject * | Atrinik_Map_CountPlayers (Atrinik_Map *map, PyObject *args) |
| static PyObject * | Atrinik_Map_GetPlayers (Atrinik_Map *map, PyObject *args) |
| static PyObject * | Atrinik_Map_Insert (Atrinik_Map *map, PyObject *args) |
| static PyObject * | Atrinik_Map_Wall (Atrinik_Map *map, PyObject *args) |
| static PyObject * | Atrinik_Map_Blocked (Atrinik_Map *map, PyObject *args) |
| static PyObject * | Atrinik_Map_FreeSpot (Atrinik_Map *map, PyObject *args) |
Map related functions used in Atrinik Python plugin.
| static PyObject* Atrinik_Map_Blocked | ( | Atrinik_Map * | map, |
| PyObject * | args | ||
| ) | [static] |
Check if specified square is blocked for 'ob' using blocked().
If you simply need to check if there's a wall on a square, you should use map.Wall() instead.
| ob | Object we're checking. |
| x | X coordinate. |
| y | Y coordinate. |
| terrain | Terrain object is allowed to go to. One (or combination) of Terrain type flags, or ob.terrain_flag |
| AtrinikError | if there was a problem getting the map (as a result of modified x/y to consider tiling, for example). |
Definition at line 410 of file atrinik_map.c.
| static PyObject* Atrinik_Map_CountPlayers | ( | Atrinik_Map * | map, |
| PyObject * | args | ||
| ) | [static] |
Count number of players on map.
Definition at line 321 of file atrinik_map.c.
| static PyObject* Atrinik_Map_CreateObject | ( | Atrinik_Map * | map, |
| PyObject * | args | ||
| ) | [static] |
Create an object on map.
| archname | Arch name of the object to create. |
| x | X position on the map. |
| y | Y position on the map. |
| AtrinikError | if 'archname' is not a valid archetype. |
Definition at line 292 of file atrinik_map.c.
| static PyObject* Atrinik_Map_FreeSpot | ( | Atrinik_Map * | map, |
| PyObject * | args | ||
| ) | [static] |
Find first free spot around map at x, y.
| ob | Involved object - will be used to find the spot this object could move onto. |
| x | X coordinate. |
| y | Y coordinate. |
| start | Start in the freearr arrays; 0 will also check the tile at xy, 1 will start searching around xy. |
| stop | Where to stop in the freearr arrays; one of Size of free defines. |
| ValueError | if either start or stop are not in a valid range. |
Definition at line 445 of file atrinik_map.c.
| static PyObject* Atrinik_Map_GetFirstObject | ( | Atrinik_Map * | map, |
| PyObject * | args | ||
| ) | [static] |
Get the first object on the tile. Use object::below to browse objects.
| x | X position on the map. |
| y | Y position on the map. |
Definition at line 91 of file atrinik_map.c.
| static PyObject* Atrinik_Map_GetLastObject | ( | Atrinik_Map * | map, |
| PyObject * | args | ||
| ) | [static] |
Get the last object on the tile. Use object::above to browse objects.
| x | X position on the map. |
| y | Y position on the map. |
Definition at line 118 of file atrinik_map.c.
| static PyObject* Atrinik_Map_GetLayer | ( | Atrinik_Map * | map, |
| PyObject * | args | ||
| ) | [static] |
Construct a list containing objects with the specified layer on the specified square.
Note that there is another way to loop through objects on a square:
for ob in WhoIsActivator().map.GetFirstObject(WhoIsActivator().x, WhoIsActivator().y):
print(ob)
| x | X coordinate on map. |
| y | Y coordinate on map. |
| layer | Layer we are looking for, should be one of Layer types. |
| ValueError | if 'layer' is invalid. |
| AtrinikError | if there was an error trying to get the objects (invalid x/y or not on nearby tiled map, for example). |
Definition at line 157 of file atrinik_map.c.
| static PyObject* Atrinik_Map_GetMapFromCoord | ( | Atrinik_Map * | map, |
| PyObject * | args | ||
| ) | [static] |
Get real coordinates from map, taking tiling into consideration.
| x | X position on the map. |
| y | Y position on the map. |
Definition at line 210 of file atrinik_map.c.
| static PyObject* Atrinik_Map_GetPlayers | ( | Atrinik_Map * | map, |
| PyObject * | args | ||
| ) | [static] |
Get all the players on a specified map.
Definition at line 332 of file atrinik_map.c.
| static PyObject* Atrinik_Map_Insert | ( | Atrinik_Map * | map, |
| PyObject * | args | ||
| ) | [static] |
Insert the specified object on map, removing it first if necessary.
| ob | Object to insert. |
| x | X coordinate where to insert 'ob'. |
| y | Y coordinate where to insert 'ob'. |
Definition at line 353 of file atrinik_map.c.
| static PyObject* Atrinik_Map_Message | ( | Atrinik_Map * | map, |
| PyObject * | args, | ||
| PyObject * | keywds | ||
| ) | [static] |
Write a message to all players on a map.
| x | X position on the map. |
| y | Y position on the map. |
| distance | Maximum distance for players to be away from x, y to hear the message. |
| message | Message to write. |
| color | Color to write the message in. Can be one of Color HTML notations or a HTML color notation. |
| flags | Optional flags, one of New draw info flags. |
Definition at line 267 of file atrinik_map.c.
| static PyObject* Atrinik_Map_PlaySound | ( | Atrinik_Map * | map, |
| PyObject * | args, | ||
| PyObject * | keywds | ||
| ) | [static] |
Play a sound on map.
| filename | Sound file to play. |
| x | X position where the sound is playing from. |
| y | Y position where the sound is playing from. |
| type | Sound type being played, one of Sound command types. |
| loop | How many times to loop the sound, -1 for infinite number. |
| volume | Volume adjustment. |
Definition at line 239 of file atrinik_map.c.
| static PyObject* Atrinik_Map_Wall | ( | Atrinik_Map * | map, |
| PyObject * | args | ||
| ) | [static] |
Checks if there's a wall on the specified square.
| x | X coordinate. |
| y | Y coordinate. |
Definition at line 384 of file atrinik_map.c.
1.7.4