Control Module - Rockets - Stores rocket stats for each force.
-- import the module from the control modules
local Rockets = require 'modules.control.rockets' --- @dep modules.control.rockets
-- Some basic information is stored for each silo that has been built
-- the data includes: the tick it was built, the rockets launched from it and more
Rockets.get_silo_data(rocket_silo_entity)
-- Some information is also stored for each force
Rockets.get_stats('player')
-- You can get the rocket data for all silos for a force by using get_silos
Rockets.get_silos('player')
-- You can get the launch time for a rocket, meaning what game tick the 50th rocket was launched
Rockets.get_rocket_time('player', 50)
-- The rolling average will work out the time to launch one rocket based on the last X rockets
Rockets.get_rolling_average('player', 10)
utils.event |
utils.global |
config.rockets |
get_silo_data(silo) | Gets the silo data for a given silo entity |
get_silo_data_by_name(silo_name) | Gets the silo data for a given silo entity |
get_silo_entity(silo_name) | Gets the silo entity from its silo name, reverse to get_silo_data |
get_stats(force_name) | Gets the rocket stats for a force |
get_silos(force_name) | Gets all the rocket silos that belong to a force |
get_rocket_time(force_name, rocket_number) | Gets the launch time of a given rocket, due to cleaning not all counts are valid |
get_rocket_count(force_name) | Gets the number of rockets that a force has launched |
get_game_rocket_count() | Gets the total number of rockets launched by all forces |
get_rolling_average(force_name, count) | Gets the rolling average time to launch a rocket |
silo_data.launched | Adds this 1 to the launch count for this silo |
Gets the silo data for a given silo entity
Parameters:Gets the silo data for a given silo entity
Parameters:Gets the silo entity from its silo name, reverse to get_silo_data
Parameters:Gets the rocket stats for a force
Parameters:Gets all the rocket silos that belong to a force
Parameters:Gets the launch time of a given rocket, due to cleaning not all counts are valid
Parameters:Gets the number of rockets that a force has launched
Parameters:Gets the total number of rockets launched by all forces
Returns:Gets the rolling average time to launch a rocket
Parameters:Adds this 1 to the launch count for this silo