-
add_amend_rule_motion
int add_amend_rule_motion(string area,
int rule_no,
string amendment,
string creator)
This method adds in a request to amend a rule.
- Parameters:
area - the area to put the amendment in
rule_no - the rule to amend
amendment - the amendment text
creator - the person doing the amendment
- Returns:
1 on success, 0 on failure
-
add_create_rule_motion
int add_create_rule_motion(string area,
int type,
string text,
string creator)
This method puts a new rule up for voting. It is first placed into
the hands of the magistrates, then into the hands of the players.
- Parameters:
area - the area for the rule to be voted on in
type - the type of the rules
text - the text associated with the new rule
- Returns:
1 on success, 0 on failure
-
add_document_handler
int add_document_handler(string area,
string document)
This method adds a document handler for an area.
- Parameters:
area - the area to add to
document - the full file path of the document handler
- Returns:
1 on success
-
add_move_rule_type_motion
int add_move_rule_type_motion(string area,
int rule_no,
int type,
string creator)
This method puts up a request to move a rule from one type to another.
- Parameters:
area - the area to do the move in
rule_no - the rule number to move
type - the type to move the rule to
creator - the creator of this request
- Returns:
1 on success, 0 on failure
-
add_remove_rule_motion
int add_remove_rule_motion(string area,
int rule_no,
string creator)
This method remove a request to amend a rule.
- Parameters:
area - the area to put the amendment in
rule_no - the rule to amend
amendment - the amendment text
creator - the person doing the amendment
- Returns:
1 on success, 0 on failure
-
add_setting_to_all_areas
int add_setting_to_all_areas(string name,
string short,
string creator_short,
mixed default_value,
mixed lower,
mixed upper,
int visible)
Adds a new setting to every area. Will return if any area already
has this setting.
- Parameters:
name - The name of the setting, also used as the key in the
settings mapping.
short - The description of this setting to be shown to players.
creator_short - The description of this setting to be shown to
creators. Should explain the value of the setting.
default_value - The default value of the setting.
lower - The lower value of the setting.
upper - The upper value of the setting.
- Returns:
0 if the setting is already there in any area, 1 if it is added.
- See also:
add_setting_to_area, set_setting
.c
-
add_setting_to_area
int add_setting_to_area(string area,
string name,
string short,
string creator_short,
mixed default_value,
mixed lower,
mixed upper,
int visible)
Adds a new setting to one area. Will return if the setting already
exists.
- Parameters:
area - The area to use
name - The name of the setting, also used as the key in the
settings mapping.
short - The description of this setting to be shown to players.
creator_short - The description of this setting to be shown to
creators. Should explain the value of the setting.
default_value - The default value of the setting.
lower - The lower value of the setting.
upper - The upper value of the setting.
- Returns:
0 if the setting is already there, 1 if it is added.
- See also:
add_setting_to_all_areas, set_setting
.c
-
amend_motion
int amend_motion(string area,
int id,
string amend_text,
string amender)
This method adds an amendment to the new rule/amendment/whatever, this
rewrites the text of the amendment of whatever it is.
- Parameters:
area - the area the amendment is to go in
id - the rule update id
amend_text - the amendment to make
amender - the person amending
- Returns:
1 on success, 0 on failure
-
check_for_completions
void check_for_completions(int midnight)
This method figures out all the current things and when they completed.
-
comment_on_motion
int comment_on_motion(string area,
int id,
string comment_text,
string commenter)
This method adds a comment to the new rule/amendment/whatever.
- Parameters:
area - the area the comment is to go in
id - the rule update id
comment - the comment to make
commenter - the person commenting
- Returns:
1 on success, 0 on failure
-
complete_motion
int complete_motion(string area,
int id)
This method completes the vote on the specified new rule.
- Parameters:
area - the area to complete the rule in
id - the id to complete
- Returns:
1 on success, 0 on failure
-
create_area
void create_area(string area)
This method creates a new area.
- Parameters:
area - the new area
-
delete_setting
int delete_setting(string area,
string name,
string setting)
Deletes a setting from an area
- Parameters:
area - The area to use
name - The name of the setting, also used as the key in the
settings mapping.
-
find_motion
class nomic_motion find_motion(string area,
int rule_no,
int type)
This method finds the specified motion.
- Parameters:
area - the area to look in
rule_no - the rule number
type - the type of the motion
- Returns:
the motion if successful, 0 if not
-
has_voted_for_motion
int has_voted_for_motion(string area,
int id,
string voter)
This method checks to see if the person has voted for the specified
new rule/amendment/whatever
- Parameters:
area - the area to check
id - the id to check
voter - the person to check for voting
- Returns:
1 on success, 0 on failure
-
motion_as_html
string motion_as_html(string area,
class nomic_motion motion)
This method returns the new motion as a string.
- Parameters:
area - the area the motion is defined in
motion - the new motion to turn into a styring
- Returns:
the string version of the motion
-
motion_as_string
string motion_as_string(int indent,
string area,
class nomic_motion motion,
int brief)
This method returns the new motion as a string.
- Parameters:
indent - the indentation to putin front of all the lines
area - the area the motion is defined in
motion - the new motion to turn into a styring
brief - disable comments
- Returns:
the string version of the motion
-
query_all_motions
class nomic_motion * query_all_motions(string area)
This method returns all the new rules for the specified area.
- Parameters:
area - the area to return the new rules in
- Returns:
the array of new rules
-
query_all_settings
varargs mapping query_all_settings(string area)
Returns the setting array for an area.
- Returns:
an array of setting classes (name, short, value)
- See also:
query_setting
.c
-
query_completion_time
int query_completion_time(string area,
class nomic_motion motion)
This method figures out the compleion time for the specified motion.
- Parameters:
area - the area to check
the - motion in the area
- Returns:
the completion time
-
query_document_handlers
string * query_document_handlers(string area)
Returns an array of document handlers for an area.
- Returns:
an array of document handler file names.
-
query_motion
class nomic_motion query_motion(string area,
int id)
This method returns a nice new rule.
- Parameters:
area - the areat to look in
id - the id of the new rule to find
- Returns:
1 on success, 0 on failure
-
query_setting
mixed query_setting(string area,
string name)
Gets the value for a setting.
- Parameters:
area - The area to check
name - The name of the setting to check
- Returns:
The value for the setting, or 0 if it is not set.
- See also:
set_setting, query_setting_short, query_all_settings
.c
-
query_setting_creator_short
mixed query_setting_creator_short(string area,
string name)
Gets the creator string for a setting.
- Parameters:
area - The area to check
name - The name of the setting to check
- Returns:
The value for the setting, or 0 if it is not set.
- See also:
set_setting, query_setting, query_setting_short
.c
-
query_setting_lower
mixed query_setting_lower(string area,
string name)
Gets the player-visible short name for a setting.
- Parameters:
area - The area to check
name - The name of the setting to check
- Returns:
The description for the setting, or 0 if it is not set.
- See also:
set_setting, query_setting, query_setting_creator_short
.c
-
query_setting_short
string query_setting_short(string area,
string name)
Gets the player-visible short name for a setting.
- Parameters:
area - The area to check
name - The name of the setting to check
- Returns:
The description for the setting, or 0 if it is not set.
- See also:
set_setting, query_setting, query_setting_creator_short
.c
-
query_setting_upper
mixed query_setting_upper(string area,
string name)
Gets the player-visible short name for a setting.
- Parameters:
area - The area to check
name - The name of the setting to check
- Returns:
The description for the setting, or 0 if it is not set.
- See also:
set_setting, query_setting, query_setting_creator_short
.c
-
query_setting_visible
int query_setting_visible(string area,
string name)
Gets the player-visible short name for a setting.
- Parameters:
area - The area to check
name - The name of the setting to check
- Returns:
The description for the setting, or 0 if it is not set.
- See also:
set_setting, query_setting, query_setting_creator_short
.c
-
query_votes_for_motion
int * query_votes_for_motion(string area,
int id)
This method returns the current set of votes for the specied new rule.
- Parameters:
area - the area to lookup the votes in
id - the idea to check
- Returns:
({ yes, no, abstain })
-
remove_document_handler
int remove_document_handler(string area,
string document)
This method removes a document handler from an area.
- Parameters:
area - the area to remove
document - the full file path of the document handler
- Returns:
1 if the document was removed, 0 if it was not.
-
rule_as_html
string rule_as_html(class nomic_rule rule)
This method turns a rule into html.
- Parameters:
rule - the rule to turn into html
- Returns:
the rule as a string
-
send_council_inform
void send_council_inform(string area,
int only_magistrates,
string mess)
This method sends informs to all the specified council of some sort of
nifty council event.
- Parameters:
area - the area the council is for
only_magistrates - only send it to the magistrates?
mess - the message to send
-
set_setting
int set_setting(string area,
string name,
mixed value)
Sets up a setting value for an area. This is the
- Parameters:
area - The area to use
name - The name of the setting, also used as the key in the
settings mapping.
value - The (arbitrary) value of the setting.
- Returns:
0 of the setting doesn't already exist (via add_setting),
1 if it does and has been changed.
- See also:
add_setting_to_area, query_setting, query_setting_short
.c
-
update_immutables
void update_immutables(string area)
This method updates the immutable laws with the new set of general rules.
- Parameters:
area - the area to update.
-
vote_for_motion
int vote_for_motion(string area,
int id,
int vote_type,
string voter)
This method votes for the specified ammentment/whatever.
- Parameters:
area - the area to vote in
id - the id to vote for
vote_type - the type of the vote
voter - the person is voting
- Returns:
1 on success, 0 on failure