[Package Index | Mudlib Index | Effect Index]

File /std/basic/property.c

The property handling system. This handles all the stuff to do with properties.

Written by Pinkfish

Method index

Public Functions

These are functions that everyone can access.

add_properties
void add_properties(mapping map)

Adds a mapping of properties in, instead of just one.

Parameters:
map - the mapping of properties


add_property
varargs int add_property(string var,
                         mixed val,
                         int tim)

Adds a property onto the object. Allows you to add a property onto the current object. You can also set a time for the property to last.

Parameters:
var - the name of the property
val - the value to give the property
tim - the time before the property should time out

Returns:
1 if it succeeded, 0 if it failed.


query_is_timed_property
int query_is_timed_property(string str)

Is this property value timed?

Parameters:
str - the property to check

Returns:
1 if it is, 0 if not


query_properties
mapping query_properties()

returns a mapping with all the properties in it.

Returns:
a mapping of all the properties


query_property
mixed query_property(string str)

Returns the value of the property. This will return the current value of the named property.

Parameters:
str - the property to find

Returns:
the value of the property

See also:
query_property_exists(), query_is_timed_property(), query_property_time_left()


query_property_exists
int query_property_exists(string str)

Does this property exist?

Parameters:
str - the property to check

Returns:
1 if the property exists, 0 if it does not


query_property_stats
mixed query_property_stats(string var)

Returns some facts about the property, in the format ({ Filename of object which added stat, time added, time expiring })

Parameters:
The - property statistics are wanted on

Returns:
That stuff just mentioned.


query_property_time_left
int query_property_time_left(string str)

If this is a timed property it returns the amount of time left.

Parameters:
str - the property name

Returns:
the amount ot time left


query_stats
mapping query_stats()

Return all property statistics

Returns:
A mapping full of stats

See also:
query_property_stats .c


query_timed_properties
mapping query_timed_properties()

Returns a mapping of all the timed properties.

Returns:
a mapping of all the timed properties


remove_property
int remove_property(string var)

Removes a property off the object. This removes the named property from the object.

Parameters:
var - the name of the property

Returns:
always returns 1


set_properties
void set_properties(mapping map)

Resets all properties

Parameters:
map - the mapping of properties


Protected Functions

These are functions that only objects inheriting the class can access.

reload_player_properties
void reload_player_properties()

Fixes the times back up again after it has been loaded.
save_player_properties
void save_player_properties()

Updates the timeouts and stuff before saving the player object.