[Package Index | Mudlib Index | Effect Index]

File /obj/handlers/playtesters.c

Keeps track of all the current playtesters. This keeps track of all the current playtesters.

Includes

This class includes the following files /include/login.h, /include/player_handler.h, /include/mail.h, /include/login_handler.h, /include/playtesters.h, /include/project_management.h and /include/board.h

Method index

Public Functions

These are functions that everyone can access.

add_jump_point
void add_jump_point(string from,
                    string to)

This method adds a jump point to the list.

Parameters:
from - the from location
to - the to location


add_playtester
int add_playtester(string name)

This method adds the playtester to the array of current play testers. NOTE: This uses get_age_raw(), which will cause lag if called on lots of playerfiles.

Parameters:
name - the name of the player to add

Returns:
1 if successful, 0 on failure

See also:
remove_playtester(), query_playtester(), add_senior_playtester() and valid_playtester()


add_pt_exec
int add_pt_exec(string name)

This method adds the player as a playtester executive. The playtester needs to already be added as a playtester before becoming a playtester executive.

Parameters:
name - the name of the player to add

Returns:
1 on success, 0 on failure

See also:
remove_pt_exec(), add_playtester() and query_pt_exec()


add_senior_playtester
int add_senior_playtester(string name)

This method adds the player as a senior playtester. The playtester needs to already be added as a normal playtester before becoming a senior playtester.

Parameters:
name - the name of the player to add

Returns:
1 on success, 0 on failure

See also:
remove_senior_playtester(), add_playtester() and query_senior_playtester()


add_suspended
int add_suspended(string name,
                  string reason)

This method adds the playtester as suspended. The playtester needs to already be added as a playtester before becoming suspended.

Parameters:
name - the name of the player to add

Returns:
1 on success, 0 on failure

See also:
remove_suspended(), add_playtester() and query_pt_suspended() ->see query_suspended() ()


adjust_bug_squishes
int adjust_bug_squishes(string name,
                        int amount)

This adjusts the number of bugs squished by a playtester.

Parameters:
name - The query_name() of the playtester.
amount - A integer to adjust by.


adjust_quota
void adjust_quota(string name,
                  int amount)

This adjusts the quota of a playtester.

Parameters:
name - The query_name() of the playtester.
amount - A integer to adjust by.


check_playtester
int check_playtester( string)

This method should never ever be used. Use of this call is meant to be broken. Old code that uses check_playtester() probably meant to use query_playtester(). Use this instead (or better, query_tester()). If you wish to hire a playtester using this call (which is what it actually did!), please look at hire_playtester() and add_playtester().

Returns:
Always returns 0.

See also:
query_playtester(), query_tester(), hire_playtester() and add_playtester()


check_playtesters
void check_playtesters(string * who)

This goes through the list of playtesters and checks to make sure they are all still valid. It does so slowly, using a call_out until it gets to the end.

Parameters:
who - A string* of the query_name()'s of the playtesters to check.

See also:
valid_playtester() and remove_playtester()


clean_pt_execs
void clean_pt_execs()
clean_suspended
void clean_suspended()
get_age_cached
int get_age_cached(string name)

This method will get the age of a playtester from this handlers' cache.

Parameters:
name - the name of the playtester to check

Returns:
an integer representing the age of the playtester in seconds. Always >= 0.


get_age_uncached
int get_age_uncached(string name)

This method will update the playtesters' age if they are online and return the value from the cache.

Parameters:
name - the name of the playtester to check

Returns:
an integer representing the age of the playtester in seconds. Always >= 0.


get_age_uncached_offline
int get_age_uncached_offline(string name)

This method will update the playtesters' age from the player handler. NOTE: This causes the playerfile to be loaded if it hasn't been already - this will cause LOTS OF LAG if done on a log of playerfiles.

Parameters:
name - the name of the playtester to check

Returns:
an integer representing the age of the playtester in seconds. Always >= 0.


hire_playtester
int hire_playtester(object thing)

This method checks to make sure an object can be a playtester, and if so, adds them.

Parameters:
thing - The player object to add as a playtester

Returns:
1 on success, 0 on failure.


query_auto_dismiss
int query_auto_dismiss(string name)
query_bug_squishes
int query_bug_squishes(string name)

This adjusts the number of bugs squished by a playtester.

Parameters:
name - The query_name() of the playtester.
amount - A integer to adjust by.


query_bugs
mapping query_bugs(string name)

This will return bug information for a given playtester. The mapping returned will map months to arrays of ints. The format of these arrays is: ({ bugs, online_that_month, age_at_end_of_month }).

See also:
query_months()


query_exec_access
int query_exec_access(string name)
query_guilds
mapping query_guilds()

This method returns a mapping which contains which the playtesters mapped to their guild objects.

Returns:
a lovely mapping


query_idle_months
int query_idle_months(string name)
query_jump_destination
string * query_jump_destination(string from)

This method finds the destination from the start location.

Parameters:
from - the location to find the jump point too


query_jump_points
mapping query_jump_points()

This method returns the current mapping of jump points.

Returns:
the jump points


query_leave
int query_leave(string name)

This tests whether a playtester is "on leave".
query_months
string * query_months()

This returns a sorted list of months, earliest month first.
query_playtester
int query_playtester(string name)

This method tests to see if the given name is a playtester.

Returns:
1 if they are a playtester, 0 if they are not.

See also:
add_playtester(), remove_playtester() and query_senior_playtester()


query_playtester_guilds
mapping query_playtester_guilds()

This method returns a mapping which contains which Guilds the playtesters belong to.

Returns:
a lovely mapping


query_playtester_guilds_pk
mapping query_playtester_guilds_pk()

This method returns a mapping which contains which Guilds the playtesters belong to with a PK flag.

Returns:
a lovely mapping


query_playtesters
string * query_playtesters()

This method returns a list of the current play testers. This is a list of string names in an array.

Returns:
the list of current playtesters


query_pt_data
mixed query_pt_data(string name)

Returns the raw playtester data for processing! DEPRECATED AND WILL NOT RETURN UP TO DATE INFORMATION!

See also:
query_bugs() and query_months()


query_pt_exec
int query_pt_exec(string name)
query_pt_execs
string * query_pt_execs()
query_pt_suspended
int query_pt_suspended(string name)
query_recent_leave
int query_recent_leave(string name)

This tests whether a playtester was recently on leave.
query_senior_playtester
int query_senior_playtester(string name)

This method determines if they are a senior playtester.

Parameters:
name - the name of the playtester to check

Returns:
1 if they are a senior playteser, 0 if they are not

See also:
add_senior_playtester(), remove_senior_playtester() and query_playtester()


query_show_bug_squishes
string query_show_bug_squishes()

This is a nice way of showing a list of the current play testers. It prints a table of their bug squishes
query_show_list
string query_show_list()

This is a nice way of showing a list of the current play testers. It prints a table of the previous four and current months, with columns of bug reports made and number of hours online spent.
query_show_list_colour
string query_show_list_colour()

This is a nice way of showing a list of the current play testers. It prints a table of the previous four and current months, with columns of bug reports made and number of hours online spent.
query_show_pt_colour
string query_show_pt_colour(string name)

This is a nice way of showing a current playtesters' activity. It prints a table of the previous four and current months, with columns of bug reports made and number of hours online spent.
query_show_pt_text
string query_show_pt_text(string name)

This is a nice way of showing a current playtesters' activity. It prints it as text rather than as a table.
query_suspended
string * query_suspended()
query_tester
int query_tester(mixed person)

This method tests to see if "person" is an authorized tester, i.e. a playtester, creator or has the "test character" property.

Parameters:
person - A string or object to determine tester status for.

Returns:
1 if they are a tester, 0 if they are not.

See also:
query_playtester()


reason_invalid_playtester
string reason_invalid_playtester(string name)

THis method returns a string reason why they are an invalid play tester. NOTE: This uses the player_handler, which will cause lag if called on lots of playerfiles.

Parameters:
name - the player to check

Returns:
the string reason, 0 if none

See also:
valid_playtester()


remove_jump_point
void remove_jump_point(string from,
                       string to)

This method removes a specific jump point from the list.

Parameters:
from - the from location to remove
to - the to location to remove


remove_jump_point_from
void remove_jump_point_from(string from)

This method removes a specific jump point from the list.

Parameters:
from - the specific jump point to remove


remove_playtester
int remove_playtester(string name,
                      string reason)

This method will remove the playtester from the current list of play testers.

Parameters:
name - the name of the player to remove
reason - the reason for the removal

Returns:
1 on success, 0 on failure

See also:
add_playtester(), remove_senior_playtester() and query_playtester()


remove_pt_exec
int remove_pt_exec(string name)

This method removes the player as a playtester executive.

Parameters:
name - the name of the player to add

Returns:
1 on success, 0 on failure

See also:
add_pt_exec(), add_playtester() and query_pt_exec()


remove_senior_playtester
int remove_senior_playtester(string name,
                             string reason)

This method adds the player as a senior playtester. The playtester needs to already be added to become a senior playtester.

Parameters:
name - the name of the player to remove

Returns:
1 on success, 0 on failure

See also:
add_senior_playtester(), remove_playtester() and query_senior_playtester()


remove_suspended
int remove_suspended(string name)

This method removes the playtester as suspended.

Parameters:
name - the name of the player to remove

Returns:
1 on success, 0 on failure

See also:
add_suspended(), add_playtester() and query_pt_suspended()


report_made
void report_made(string name,
                 string type,
                 string file,
                 string text)

This is called when a playtester makes a bug report.

Parameters:
name - the name of the playtester
type - the type of report
file - the file the report is on
text - the text associated with the report


reset_leave
int reset_leave(string name)

This marks a playtester as no longer "on leave", and logs it.
set_leave
int set_leave(string name,
              string reason)

This marks a playtester as "on leave", logs it, with a reason.
valid_playtester
int valid_playtester(string name)

This method determins if they are a valid playtester or not. NOTE: This uses reason_invalid_playtester(), which will cause lag if called on lots of playerfiles.

Parameters:
name - the name of the player to test

Returns:
1 if they are, 0 if they are not

See also:
reason_invalid_playtester()


Protected Functions

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

check_playtesters_one
void check_playtesters_one(string name)

This method determines if a playtester is valid or not, and if not will automagically remove them (does not remove senior playtesters automatically). NOTE: This uses valid_playtester() and reason_invalid_playtester(), which will cause lag if called on lots of playerfiles.

Parameters:
name - the name of the player to test

See also:
reason_invalid_playtester()


get_age_raw
int get_age_raw(string name)

This method finds the age of the playtester from the player handler. NOTE: This causes the playerfile to be loaded if it hasn't been already - this will cause LOTS OF LAG if done on a lot of playerfiles.

Parameters:
name - the name of the playtester to check

Returns:
an integer representing the age of the playtester in seconds. Always >= 0.