Home

[Package Index | Mudlib Index | Effect Index]

File /d/am/buildings/dysk_dev/inherits/theatre_control.c

An inherit for managerial rooms for Theatres. @author Gin @started 31/05/2002

Inherits

This class inherits the following classes .c

Includes

This class includes the following files /include/money.h, /include/shops/bank.h, /d/am/buildings/dysk_dev/inherits/path.h, /include/mail.h, /include/player_handler.h and /include/move_failures.h

Class Index

Method index

  • add_playwright(string, int)
    This method is used to add a playwright to the theatre's list of official playwrights.
  • convert_file(string)
    This method converts a save file for a script into an array containing the author and title.
  • do_accept()
    This method accepts a script as valid for the theatre.
  • do_add()
    This method adds a script to the current lineup of scripts to be performed.
  • do_collect()
    This method is used to collect royalties for players
  • do_demote(string, string)
    This method is used to demote a manager back to playwright
  • do_fine(string, string, string)
    This method is used to fine a playwright of royalties.
  • do_fire(string, string)
    This method fires a playwright or manager.
  • do_hire(string, int)
    This method hires a person to the theatre, either as a playwright or * manager.
  • do_list(int)
    This method lists the avaliable scripts.
  • do_pay(string, string, string)
    This method is used to pay a playwright a bonus.
  • do_play()
    This method plays a script for a manager.
  • do_reject()
    This method rejects a script, returning it to the owner.
  • do_remove()
    This method removes a script from the current lineup of scripts to be performed.
  • do_retrieve(int)
    This method is used to retrieve a script in object form
  • do_set(string, int, int)
    This method sets the pay rat (in terms of a percentage of the takings of takings for their plays) for a particular person, the default payrat, or that for all the playwrights.
  • do_transfer_ownership(string)
    This method transfers control of the theatre to a new owner.
  • do_view()
    This method is used to view a script's file.
  • employee_details(string)
    This method returns details on an employee
  • get_details(string)
    This method gives a list of details on an employee, such as the level at which they have been employed, the date on which they were employed, their current royalties, plays approved and their pay percentage.
  • is_hired(string)
    This method is used to identify if someone is an employee
  • is_owner(string)
    This method is used to identify if someone is the owner of the theatre
  • list_d_employees()
    This method produces a detailed list of the employees
  • list_employees()
    this method lists all employees along with their levels within the organisation
  • list_managers()
    This method produces a list of the managers
  • pay_royalties(string, float)
    This method pays royalties to the author of a play.
  • query_owner()
    This method returns the current owner of the theatre.
  • reject_this_script(class h_script)
  • return_script(object)
    This method returns a script object to the theatre
  • set_theatre_log(string)
  • set_theatre_name(string, string)
    This method sets the theatre name
  • view_log()
    This method displays the log file for the theatre.
  • view_td()
    This method gives a nice message with the details of the theatre
  • write_scripts(class h_script *)
    This method writes an array of scripts to the player.

Public Functions

These are functions that everyone can access.

.

    add_playwright
    void add_playwright(string name,
                        int level)
    

    This method is used to add a playwright to the theatre's list of official playwrights.
    • Parameters:
      name - The name of the person to add
      level - The level at which they are to be added.
    convert_file
    string * convert_file(string file)
    

    This method converts a save file for a script into an array containing the author and title. @param file the file to convert @return returns a 2-3 part array of author, title and number
      do_accept
      int do_accept()
      

      This method accepts a script as valid for the theatre.
        do_add
        int do_add()
        

        This method adds a script to the current lineup of scripts to be performed.
          do_collect
          int do_collect()
          

          This method is used to collect royalties for players
            do_demote
            int do_demote(string name,
                          string reason)
            

            This method is used to demote a manager back to playwright
            • Parameters:
              name - the name of the person to demote
              reason - the reason for which they are to be demoted.
                do_fine
                int do_fine(string name,
                            string amount,
                            string reason)
                

                This method is used to fine a playwright of royalties. The fine itself is not regained by the theatre, in order to prevent abuse.
                • Parameters:
                  name - The person to pay
                  amount - The amount to pay
                  reason - The reason, used in log files.
                    do_fire
                    int do_fire(string name,
                                string reason)
                    

                    This method fires a playwright or manager.
                    • Parameters:
                      name - The name of the person to fire
                      reason - Why they have been fired.
                        do_hire
                        int do_hire(string name,
                                    int flag)
                        

                        This method hires a person to the theatre, either as a playwright or * manager. * * The flag determines if it is a hire from nothing to playwright or manager, * or if it is a promotion to manager for a current playwright. * @param name The name of the person to demote * @param flag Flag determining what type of hiring is taking place.
                          do_list
                          int do_list(int type)
                          

                          This method lists the avaliable scripts. * @param type the type of script to list
                            do_pay
                            int do_pay(string name,
                                       string amount,
                                       string reason)
                            

                            This method is used to pay a playwright a bonus.
                            • Parameters:
                              name - The person to pay
                              amount - The amount to pay
                              reason - The reason, used in log files.
                                do_play
                                int do_play()
                                

                                This method plays a script for a manager.
                                  do_reject
                                  int do_reject()
                                  

                                  This method rejects a script, returning it to the owner.
                                    do_remove
                                    int do_remove()
                                    

                                    This method removes a script from the current lineup of scripts to be performed.
                                      do_retrieve
                                      int do_retrieve(int type)
                                      

                                      This method is used to retrieve a script in object form
                                      • Parameters:
                                        type - the type of script to get, e.g. accepted.
                                          do_set
                                          int do_set(string name,
                                                     int percent,
                                                     int flag)
                                          

                                          This method sets the pay rat (in terms of a percentage of the takings of takings for their plays) for a particular person, the default payrat, or that for all the playwrights. The flag argument determines if the payrate to be set is the default, that of a particular person, or that of a particular person to a default rate, 1, 2, or 3 respectively.
                                          • Parameters:
                                            name - The name of the person for which to set the pay rate, or all
                                            percent - The percentage to set the payrate to.
                                              do_transfer_ownership
                                              int do_transfer_ownership(string new_owner)
                                              

                                              This method transfers control of the theatre to a new owner.
                                              • Parameters:
                                                new_owner - the new owner of the theatre
                                                  do_view
                                                  int do_view()
                                                  

                                                  This method is used to view a script's file.
                                                    employee_details
                                                    int employee_details(string name)
                                                    

                                                    This method returns details on an employee
                                                    • Parameters:
                                                      name - the person to get details on
                                                        get_details
                                                        string get_details(string name)
                                                        

                                                        This method gives a list of details on an employee, such as the level at which they have been employed, the date on which they were employed, their current royalties, plays approved and their pay percentage.
                                                        • Parameters:
                                                          name - the person to get details about.
                                                            is_hired
                                                            int is_hired(string name)
                                                            

                                                            This method is used to identify if someone is an employee
                                                            • Returns:
                                                              returns 1 or 0, depending on whether someone is employed
                                                                is_owner
                                                                int is_owner(string word)
                                                                

                                                                This method is used to identify if someone is the owner of the theatre
                                                                • Parameters:
                                                                  word - the name to check against
                                                                • Returns:
                                                                  returns 1 or 0, depending on whether the person is the owner
                                                                    list_d_employees
                                                                    int list_d_employees()
                                                                    

                                                                    This method produces a detailed list of the employees
                                                                      list_employees
                                                                      int list_employees()
                                                                      

                                                                      this method lists all employees along with their levels within the organisation
                                                                        list_managers
                                                                        int list_managers()
                                                                        

                                                                        This method produces a list of the managers
                                                                          pay_royalties
                                                                          void pay_royalties(string author,
                                                                                             float amount)
                                                                          

                                                                          This method pays royalties to the author of a play.
                                                                          • Parameters:
                                                                            author - the author of the play
                                                                            amount - the amount to pay them
                                                                              query_owner
                                                                              string query_owner()
                                                                              

                                                                              This method returns the current owner of the theatre.
                                                                              • Returns:
                                                                                returns the current owner of the theatre
                                                                                  reject_this_script
                                                                                  void reject_this_script(class h_script the_script)
                                                                                  
                                                                                    return_script
                                                                                    int return_script(object thing)
                                                                                    

                                                                                    This method returns a script object to the theatre
                                                                                    • Parameters:
                                                                                      thing - The script to return
                                                                                        set_theatre_log
                                                                                        void set_theatre_log(string path)
                                                                                        
                                                                                          set_theatre_name
                                                                                          void set_theatre_name(string name,
                                                                                                                string stage)
                                                                                          

                                                                                          This method sets the theatre name
                                                                                          • Parameters:
                                                                                            name - name of the the theatre
                                                                                            stage - the path of the main stage
                                                                                              view_log
                                                                                              int view_log()
                                                                                              

                                                                                              This method displays the log file for the theatre. *
                                                                                                view_td
                                                                                                int view_td()
                                                                                                

                                                                                                This method gives a nice message with the details of the theatre
                                                                                                  write_scripts
                                                                                                  void write_scripts(class h_script * scripts)
                                                                                                  

                                                                                                  This method writes an array of scripts to the player.
                                                                                                  • Parameters:
                                                                                                    scripts - the scripts to write

                                                                                                    Classes

                                                                                                    These are nice data types for dealing with... Data!

                                                                                                    • playwright
                                                                                                      class playwright {
                                                                                                                         int date_hired;
                                                                                                                         int number_plays;
                                                                                                                         int total_paid;
                                                                                                                         int employee_level;
                                                                                                                         int pay_percent;
                                                                                                      }
                                                                                                      
                                                                                                      
Valid HTML 4.01 Transitional
Valid CSS!
Read More