This file contains core utilities used by the redmew scenario.
utils.game |
resources.color_presets |
Module.distance(pos1, pos2) | Measures distance between pos1 and pos2 |
Module.print_except(msg, player, color) | Takes msg and prints it to all players except provided player |
Module.print_admins(msg, source) | Prints a message to all online admins |
Module.get_actor() | Returns a valid string with the name of the actor of a command. |
Module.format_time(ticks) | Takes a time in ticks and returns a string with the time in format "x hour(s) x minute(s)" |
Module.cant_run(name) | Prints a message letting the player know they cannot run a command |
Module.log_command(actor, command, parameters) | Logs the use of a command and its user |
Module.verify_mult_types(arg, arg_types) | Asserts the argument is one of type arg_types |
Module.random_RGB() | Returns a random RGB color as a table |
Module.set_and_return(tbl, key, value) | Sets a table element to value while also returning value. |
Module.move_position | Moves a position according to the parameters given Notice: only accepts cardinal directions as direction |
Module.opposite_direction | Takes a direction and gives you the opposite |
Module.is_module_available | Takes the string of a module and returns whether is it available or not |
Measures distance between pos1 and pos2
Parameters:Takes msg and prints it to all players except provided player
Parameters: