mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-28 03:55:23 +09:00
1332 lines
48 KiB
HTML
1332 lines
48 KiB
HTML
|
|
|
|
<!doctype html>
|
|
<html class="no-js" lang="">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
<title>utils.event module</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="../spectre.min.css" type="text/css" />
|
|
<link rel="stylesheet" href="../spectre-icons.min.css" type="text/css" />
|
|
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
|
</head>
|
|
<body>
|
|
|
|
<div class="container grid-1280">
|
|
<div class="columns">
|
|
|
|
<!-- sidebar start -->
|
|
|
|
<div id="sidebar" class="column col-3 col-sm-12">
|
|
|
|
<div class="sidebar-custom">
|
|
|
|
<div class="project-infobox">
|
|
|
|
<!-- project title -->
|
|
|
|
<a href="../index.html"><h1>ExpGaming Scenario</h1></a>
|
|
|
|
<!-- project description -->
|
|
<p class="project-desc">Explosive Gaming's server scenario for 0.18</p>
|
|
|
|
<!-- project full description -->
|
|
</div>
|
|
|
|
|
|
<!-- sidebar navigation -->
|
|
<!-- list of items in a module -->
|
|
<ul class="nav nav-module-contents">
|
|
<li class="nav-item">
|
|
<h2>Sections</h2>
|
|
<ul class="nav">
|
|
<li class="nav-item"><a href="#Dependencies"><span class="fragment-hashtag">#</span> Dependencies</a></li>
|
|
<li class="nav-item"><a href="#Functions"><span class="fragment-hashtag">#</span> Functions</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<ul class="nav nav-modules">
|
|
<li class="nav-item">
|
|
<h2>Modules</h2>
|
|
<ul class="nav">
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../modules/control.html"><span class="module-name-item">control</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../modules/modules.addons.station-auto-name.html"><span class="module-name-item">modules.addons.station-auto-name</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../modules/overrides.debug.html"><span class="module-name-item">overrides.debug</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../modules/overrides.math.html"><span class="module-name-item">overrides.math</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../modules/overrides.table.html"><span class="module-name-item">overrides.table</span></a></div></li>
|
|
<li class="nav-item active"><div class="nav-item-block-active block"><a href="../modules/utils.event.html"><span class="module-name-item">utils.event</span></a><i class="icon icon-arrow-left icon-arrow-left-custom"></i></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../modules/utils.event_core.html"><span class="module-name-item">utils.event_core</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../modules/utils.task.html"><span class="module-name-item">utils.task</span></a></div></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<ul class="nav nav-modules">
|
|
<li class="nav-item">
|
|
<h2>Core</h2>
|
|
<ul class="nav">
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../core/Async.html"><span class="module-name-item">Async</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../core/Commands.html"><span class="module-name-item">Commands</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../core/Common.html"><span class="module-name-item">Common</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../core/Datastore.html"><span class="module-name-item">Datastore</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../core/External.html"><span class="module-name-item">External</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../core/Gui.html"><span class="module-name-item">Gui</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../core/Groups.html"><span class="module-name-item">Groups</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../core/PlayerData.html"><span class="module-name-item">PlayerData</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../core/Roles.html"><span class="module-name-item">Roles</span></a></div></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<ul class="nav nav-modules">
|
|
<li class="nav-item">
|
|
<h2>Control</h2>
|
|
<ul class="nav">
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../control/Jail.html"><span class="module-name-item">Jail</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../control/Production.html"><span class="module-name-item">Production</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../control/Protection.html"><span class="module-name-item">Protection</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../control/Reports.html"><span class="module-name-item">Reports</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../control/Rockets.html"><span class="module-name-item">Rockets</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../control/Selection.html"><span class="module-name-item">Selection</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../control/Tasks.html"><span class="module-name-item">Tasks</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../control/Warnings.html"><span class="module-name-item">Warnings</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../control/Warps.html"><span class="module-name-item">Warps</span></a></div></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<ul class="nav nav-modules">
|
|
<li class="nav-item">
|
|
<h2>Addons</h2>
|
|
<ul class="nav">
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/Advanced-Start.html"><span class="module-name-item">Advanced-Start</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/afk-kick.html"><span class="module-name-item">afk-kick</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/Chat-Popups.html"><span class="module-name-item">Chat-Popups</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/Chat-Reply.html"><span class="module-name-item">Chat-Reply</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/Compilatron.html"><span class="module-name-item">Compilatron</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/Damage-Popups.html"><span class="module-name-item">Damage-Popups</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/Death-Logger.html"><span class="module-name-item">Death-Logger</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/Deconlog.html"><span class="module-name-item">Deconlog</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/Discord-Alerts.html"><span class="module-name-item">Discord-Alerts</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/FAGC.html"><span class="module-name-item">FAGC</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/Inventory-Clear.html"><span class="module-name-item">Inventory-Clear</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/Pollution-Grading.html"><span class="module-name-item">Pollution-Grading</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/protection-jail.html"><span class="module-name-item">protection-jail</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/report-jail.html"><span class="module-name-item">report-jail</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/Scorched-Earth.html"><span class="module-name-item">Scorched-Earth</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/Spawn-Area.html"><span class="module-name-item">Spawn-Area</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../addons/Tree-Decon.html"><span class="module-name-item">Tree-Decon</span></a></div></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<ul class="nav nav-modules">
|
|
<li class="nav-item">
|
|
<h2>Guis</h2>
|
|
<ul class="nav">
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../guis/Autofill.html"><span class="module-name-item">Autofill</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../guis/Player-List.html"><span class="module-name-item">Player-List</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../guis/Readme.html"><span class="module-name-item">Readme</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../guis/Rocket-Info.html"><span class="module-name-item">Rocket-Info</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../guis/Science-Info.html"><span class="module-name-item">Science-Info</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../guis/server-ups.html"><span class="module-name-item">server-ups</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../guis/Task-List.html"><span class="module-name-item">Task-List</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../guis/Warps-List.html"><span class="module-name-item">Warps-List</span></a></div></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<ul class="nav nav-modules">
|
|
<li class="nav-item">
|
|
<h2>Data</h2>
|
|
<ul class="nav">
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../data/Alt-View.html"><span class="module-name-item">Alt-View</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../data/Bonus.html"><span class="module-name-item">Bonus</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../data/Greetings.html"><span class="module-name-item">Greetings</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../data/Player-Colours.html"><span class="module-name-item">Player-Colours</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../data/Quickbar.html"><span class="module-name-item">Quickbar</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../data/Tag.html"><span class="module-name-item">Tag</span></a></div></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<ul class="nav nav-modules">
|
|
<li class="nav-item">
|
|
<h2>Commands</h2>
|
|
<ul class="nav">
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Admin-Chat.html"><span class="module-name-item">Admin-Chat</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Admin-Markers.html"><span class="module-name-item">Admin-Markers</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Cheat-Mode.html"><span class="module-name-item">Cheat-Mode</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Clear-Inventory.html"><span class="module-name-item">Clear-Inventory</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Connect.html"><span class="module-name-item">Connect</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Debug.html"><span class="module-name-item">Debug</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Find.html"><span class="module-name-item">Find</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Help.html"><span class="module-name-item">Help</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Home.html"><span class="module-name-item">Home</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Interface.html"><span class="module-name-item">Interface</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Jail.html"><span class="module-name-item">Jail</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Kill.html"><span class="module-name-item">Kill</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/LastLocation.html"><span class="module-name-item">LastLocation</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Me.html"><span class="module-name-item">Me</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Protection.html"><span class="module-name-item">Protection</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Rainbow.html"><span class="module-name-item">Rainbow</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Repair.html"><span class="module-name-item">Repair</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Reports.html"><span class="module-name-item">Reports</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Roles.html"><span class="module-name-item">Roles</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/InventorySearch.html"><span class="module-name-item">InventorySearch</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Spawn.html"><span class="module-name-item">Spawn</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Spectate.html"><span class="module-name-item">Spectate</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Teleport.html"><span class="module-name-item">Teleport</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../commands/Warnings.html"><span class="module-name-item">Warnings</span></a></div></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<ul class="nav nav-modules">
|
|
<li class="nav-item">
|
|
<h2>Configs</h2>
|
|
<ul class="nav">
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/File-Loader.html"><span class="module-name-item">File-Loader</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Advanced-Start.html"><span class="module-name-item">Advanced-Start</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Bonuses.html"><span class="module-name-item">Bonuses</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Chat-Reply.html"><span class="module-name-item">Chat-Reply</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Compilatron.html"><span class="module-name-item">Compilatron</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Death-Logger.html"><span class="module-name-item">Death-Logger</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Deconlog.html"><span class="module-name-item">Deconlog</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Discord-Alerts.html"><span class="module-name-item">Discord-Alerts</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Commands-Auth-Admin.html"><span class="module-name-item">Commands-Auth-Admin</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Commands-Auth-Roles.html"><span class="module-name-item">Commands-Auth-Roles</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Commands-Color-Parse.html"><span class="module-name-item">Commands-Color-Parse</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Commands-Parse.html"><span class="module-name-item">Commands-Parse</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Commands-Parse-Roles.html"><span class="module-name-item">Commands-Parse-Roles</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Commands-Auth-Runtime-Disable.html"><span class="module-name-item">Commands-Auth-Runtime-Disable</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Permission-Groups.html"><span class="module-name-item">Permission-Groups</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Roles.html"><span class="module-name-item">Roles</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Autofill.html"><span class="module-name-item">Autofill</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Player-List.html"><span class="module-name-item">Player-List</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Rockets.html"><span class="module-name-item">Rockets</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Science.html"><span class="module-name-item">Science</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Tasks.html"><span class="module-name-item">Tasks</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Warps.html"><span class="module-name-item">Warps</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/inventory_clear.html"><span class="module-name-item">inventory_clear</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Pollution-Grading.html"><span class="module-name-item">Pollution-Grading</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Popup-Messages.html"><span class="module-name-item">Popup-Messages</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Preset-Player-Colours.html"><span class="module-name-item">Preset-Player-Colours</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Preset-Player-Quickbar.html"><span class="module-name-item">Preset-Player-Quickbar</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Repair.html"><span class="module-name-item">Repair</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Scorched-Earth.html"><span class="module-name-item">Scorched-Earth</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Spawn-Area.html"><span class="module-name-item">Spawn-Area</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Statistics.html"><span class="module-name-item">Statistics</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../configs/Warnings.html"><span class="module-name-item">Warnings</span></a></div></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<ul class="nav nav-modules">
|
|
<li class="nav-item">
|
|
<h2>Topics</h2>
|
|
<ul class="nav">
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../topics/README.md.html"><span class="module-name-item">README.md</span></a></div></li>
|
|
<li class="nav-item"><div class="nav-item-block-inactive block"><a href="../topics/LICENSE.html"><span class="module-name-item">LICENSE</span></a></div></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
<div class="up-to-top">
|
|
<!-- list of items in a module -->
|
|
<ul class="nav nav-module-contents">
|
|
<li class="nav-item">
|
|
<h4>Jump to Section</h4>
|
|
<ul class="nav">
|
|
<li class="nav-item"><a href="#Dependencies"><span class="fragment-hashtag">#</span> Dependencies</a></li>
|
|
<li class="nav-item"><a href="#Functions"><span class="fragment-hashtag">#</span> Functions</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<a href="#">Top <i class="icon icon-upward"></i></a>
|
|
</div>
|
|
</div>
|
|
<!-- sidebar end -->
|
|
|
|
<!-- content body start -->
|
|
<div class="column col-9 col-sm-12">
|
|
|
|
<!-- module list on the main page start -->
|
|
<!-- module list on the main page end -->
|
|
|
|
<!-- module contents -->
|
|
|
|
<!-- module content header start -->
|
|
|
|
<h2><span class="body-module-name"><strong><em>utils.event</em></strong></span> module</h2>
|
|
<p>This Module allows for registering multiple handlers to the same event, overcoming the limitation of script.register.</p>
|
|
<p>
|
|
<p> ** Event.add(event_name, handler) **
|
|
<p> Handlers added with Event.add must be added at the control stage or in Event.on_init or Event.on_load.
|
|
Remember that for each player, on_init or on_load is run, never both. So if you can't add the handler in the
|
|
control stage add the handler in both on_init and on_load.
|
|
Handlers added with Event.add cannot be removed.
|
|
For handlers that need to be removed or added at runtime use Event.add_removable.</p>
|
|
|
|
|
|
<!-- module info start -->
|
|
<!-- module info end -->
|
|
|
|
<!-- module usage start -->
|
|
<h3>Usage</h3>
|
|
<pre class="code" data-lang="Lua"><code>
|
|
<span class="keyword">local</span> Event = <span class="global">require</span> <span class="string">'utils.event'</span> <span class="comment">--- @dep utils.event
|
|
</span> Event.add(
|
|
defines.events.on_built_entity,
|
|
<span class="keyword">function</span>(event)
|
|
game.<span class="global">print</span>(serpent.block(event)) <span class="comment">-- prints the content of the event table to console.
|
|
</span> <span class="keyword">end</span>
|
|
)
|
|
|
|
** Event.add_removable(event_name, token) **
|
|
|
|
For conditional event handlers. Event.add_removable can be safely called at runtime without desync risk.
|
|
Only use this <span class="keyword">if</span> you need to add the handler at runtime <span class="keyword">or</span> need to remove the handler, otherwise use Event.add
|
|
|
|
Event.add_removable can be safely used at the control stage <span class="keyword">or</span> <span class="keyword">in</span> Event.on_init. If used <span class="keyword">in</span> on_init you don<span class="string">'t
|
|
need to also add in on_load (unlike Event.add).
|
|
Event.add_removable cannot be called in on_load, doing so will crash the game on loading.
|
|
Token is used because it'</span>s a desync risk to store closures inside the global <span class="global">table</span>.</code></pre>
|
|
<pre class="code" data-lang="Lua"><code>
|
|
<span class="keyword">local</span> Token = <span class="global">require</span> <span class="string">'utils.token'</span> <span class="comment">--- @dep utils.token
|
|
</span> <span class="keyword">local</span> Event = <span class="global">require</span> <span class="string">'utils.event'</span> <span class="comment">--- @dep utils.event
|
|
</span>
|
|
Token.register must <span class="keyword">not</span> be called inside an event handler.
|
|
<span class="keyword">local</span> handler =
|
|
Token.register(
|
|
<span class="keyword">function</span>(event)
|
|
game.<span class="global">print</span>(serpent.block(event)) <span class="comment">-- prints the content of the event table to console.
|
|
</span> <span class="keyword">end</span>
|
|
)
|
|
|
|
The below code would typically be inside another event <span class="keyword">or</span> a custom command.
|
|
Event.add_removable(defines.events.on_built_entity, handler)
|
|
|
|
When you no longer need the handler.
|
|
Event.remove_removable(defines.events.on_built_entity, handler)
|
|
|
|
It<span class="string">'s not an error to register the same token multiple times to the same event, however when
|
|
removing only the first occurrence is removed.
|
|
|
|
** Event.add_removable_function(event_name, func) **
|
|
|
|
Only use this function if you can'</span>t use Event.add_removable. i.e you are registering the handler at the console.
|
|
The same restrictions that apply to Event.add_removable also apply to Event.add_removable_function.
|
|
func cannot be a closure <span class="keyword">in</span> this case, as there is no safe way to store closures <span class="keyword">in</span> the global <span class="global">table</span>.
|
|
A closure is a <span class="keyword">function</span> that uses a <span class="keyword">local</span> variable <span class="keyword">not</span> defined <span class="keyword">in</span> the <span class="keyword">function</span>.</code></pre>
|
|
<pre class="code" data-lang="Lua"><code>
|
|
<span class="keyword">local</span> Event = <span class="global">require</span> <span class="string">'utils.event'</span> <span class="comment">--- @dep utils.event
|
|
</span>
|
|
If you want to remove the handler you will need to keep a reference to it.
|
|
global.handler = <span class="keyword">function</span>(event)
|
|
game.<span class="global">print</span>(serpent.block(event)) <span class="comment">-- prints the content of the event table to console.
|
|
</span> <span class="keyword">end</span>
|
|
|
|
The below code would typically be used at the command console.
|
|
Event.add_removable_function(defines.events.on_built_entity, global.handler)
|
|
|
|
When you no longer need the handler.
|
|
Event.remove_removable_function(defines.events.on_built_entity, global.handler)
|
|
|
|
** Other Events **
|
|
|
|
Use Event.on_init(handler) <span class="keyword">for</span> script.on_init(handler)
|
|
Use Event.on_load(handler) <span class="keyword">for</span> script.on_load(handler)
|
|
|
|
Use Event.on_nth_tick(tick, handler) <span class="keyword">for</span> script.on_nth_tick(tick, handler)
|
|
Favour this event over Event.add(defines.events.on_tick, handler)
|
|
There are also Event.add_removable_nth_tick(tick, token) <span class="keyword">and</span> Event.add_removable_nth_tick_function(tick, func)
|
|
That work the same as above.
|
|
|
|
** Custom Scenario Events **
|
|
|
|
<span class="keyword">local</span> Event = <span class="global">require</span> <span class="string">'utils.event'</span> <span class="comment">--- @dep utils.event
|
|
</span>
|
|
<span class="keyword">local</span> event_id = script.generate_event_name()
|
|
|
|
Event.add(
|
|
event_id,
|
|
<span class="keyword">function</span>(event)
|
|
game.<span class="global">print</span>(serpent.block(event)) <span class="comment">-- prints the content of the event table to console.
|
|
</span> <span class="keyword">end</span>
|
|
)
|
|
|
|
The <span class="global">table</span> contains extra information that you want to pass to the handler.
|
|
script.raise_event(event_id, {extra = <span class="string">'data'</span>})</code></pre>
|
|
<!-- module usage end -->
|
|
|
|
<!-- module content header end -->
|
|
|
|
<!-- module section list start -->
|
|
<table class="section-content-list">
|
|
<thead>
|
|
<h3><a href="#Dependencies">Dependencies</a></h3>
|
|
<span></span>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="name"><a href="#utils.event_core">utils.event_core</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name"><a href="#utils.global">utils.global</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name"><a href="#utils.token">utils.token</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name"><a href="#overrides.debug">overrides.debug</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<table class="section-content-list">
|
|
<thead>
|
|
<h3><a href="#Functions">Functions</a></h3>
|
|
<span></span>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="name"><a href="#Event.add">Event.add(event_name, handler)</a></td>
|
|
<td class="summary">Register a handler for the event_name event.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name"><a href="#Event.on_init">Event.on_init(handler)</a></td>
|
|
<td class="summary">Register a handler for the script.on_init event.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name"><a href="#Event.on_load">Event.on_load(handler)</a></td>
|
|
<td class="summary">Register a handler for the script.on_load event.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name"><a href="#Event.on_nth_tick">Event.on_nth_tick(tick, handler)</a></td>
|
|
<td class="summary">Register a handler for the nth_tick event.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name"><a href="#Event.add_removable">Event.add_removable(event_name, token)</a></td>
|
|
<td class="summary">Register a token handler that can be safely added and removed at runtime.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name"><a href="#Event.remove_removable">Event.remove_removable(event_name, token)</a></td>
|
|
<td class="summary">Removes a token handler for the given event_name.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name"><a href="#Event.add_removable_function">Event.add_removable_function(event_name, func)</a></td>
|
|
<td class="summary">Register a handler that can be safely added and removed at runtime.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name"><a href="#Event.remove_removable_function">Event.remove_removable_function(event_name, func)</a></td>
|
|
<td class="summary">Removes a handler for the given event_name.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name"><a href="#Event.add_removable_nth_tick">Event.add_removable_nth_tick(tick, token)</a></td>
|
|
<td class="summary">Register a token handler for the nth tick that can be safely added and removed at runtime.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name"><a href="#Event.remove_removable_nth_tick">Event.remove_removable_nth_tick(tick, token)</a></td>
|
|
<td class="summary">Removes a token handler for the nth tick.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name"><a href="#Event.add_removable_nth_tick_function">Event.add_removable_nth_tick_function(tick, func)</a></td>
|
|
<td class="summary">Register a handler for the nth tick that can be safely added and removed at runtime.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name"><a href="#Event.remove_removable_nth_tick_function">Event.remove_removable_nth_tick_function(tick, func)</a></td>
|
|
<td class="summary">Removes a handler for the nth tick.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<!-- module section list end -->
|
|
|
|
<br />
|
|
|
|
<!-- section start -->
|
|
<h3><span id="Dependencies" class="section-title"><a href="#Dependencies">Dependencies</a></span></h3>
|
|
<dl class="section-body-container">
|
|
<dt>
|
|
<div class="divider divider-custom"></div>
|
|
<div class="block section-item-header">
|
|
<a href="#utils.event_core" class="fragment-hashtag">#</a>
|
|
<span class="section-item-title" id="utils.event_core">utils.event_core</span>
|
|
</div>
|
|
</dt>
|
|
<dd>
|
|
<div class="section-item-body">
|
|
|
|
|
|
<!-- parameters start -->
|
|
<!-- parameters end -->
|
|
|
|
<!-- returns start -->
|
|
<!-- returns end -->
|
|
|
|
|
|
<!-- see also start -->
|
|
<!-- see also end -->
|
|
|
|
<!-- usage start -->
|
|
<!-- usage end -->
|
|
|
|
</dd>
|
|
<dt>
|
|
<div class="divider divider-custom"></div>
|
|
<div class="block section-item-header">
|
|
<a href="#utils.global" class="fragment-hashtag">#</a>
|
|
<span class="section-item-title" id="utils.global">utils.global</span>
|
|
</div>
|
|
</dt>
|
|
<dd>
|
|
<div class="section-item-body">
|
|
|
|
|
|
<!-- parameters start -->
|
|
<!-- parameters end -->
|
|
|
|
<!-- returns start -->
|
|
<!-- returns end -->
|
|
|
|
|
|
<!-- see also start -->
|
|
<!-- see also end -->
|
|
|
|
<!-- usage start -->
|
|
<!-- usage end -->
|
|
|
|
</dd>
|
|
<dt>
|
|
<div class="divider divider-custom"></div>
|
|
<div class="block section-item-header">
|
|
<a href="#utils.token" class="fragment-hashtag">#</a>
|
|
<span class="section-item-title" id="utils.token">utils.token</span>
|
|
</div>
|
|
</dt>
|
|
<dd>
|
|
<div class="section-item-body">
|
|
|
|
|
|
<!-- parameters start -->
|
|
<!-- parameters end -->
|
|
|
|
<!-- returns start -->
|
|
<!-- returns end -->
|
|
|
|
|
|
<!-- see also start -->
|
|
<!-- see also end -->
|
|
|
|
<!-- usage start -->
|
|
<!-- usage end -->
|
|
|
|
</dd>
|
|
<dt>
|
|
<div class="divider divider-custom"></div>
|
|
<div class="block section-item-header">
|
|
<a href="#overrides.debug" class="fragment-hashtag">#</a>
|
|
<span class="section-item-title" id="overrides.debug">overrides.debug</span>
|
|
</div>
|
|
</dt>
|
|
<dd>
|
|
<div class="section-item-body">
|
|
|
|
|
|
<!-- parameters start -->
|
|
<!-- parameters end -->
|
|
|
|
<!-- returns start -->
|
|
<!-- returns end -->
|
|
|
|
|
|
<!-- see also start -->
|
|
<!-- see also end -->
|
|
|
|
<!-- usage start -->
|
|
<!-- usage end -->
|
|
|
|
</dd>
|
|
</dl>
|
|
<h3><span id="Functions" class="section-title"><a href="#Functions">Functions</a></span></h3>
|
|
<dl class="section-body-container">
|
|
<dt>
|
|
<div class="divider divider-custom"></div>
|
|
<div class="block section-item-header">
|
|
<a href="#Event.add" class="fragment-hashtag">#</a>
|
|
<span class="section-item-title" id="Event.add">Event.add(event_name, handler)</span>
|
|
</div>
|
|
</dt>
|
|
<dd>
|
|
<div class="section-item-body">
|
|
|
|
<p class="section-item-summary">Register a handler for the event_name event.</p>
|
|
<p class="section-item-description">
|
|
This function must be called in the control stage or in Event.on_init or Event.on_load.
|
|
See documentation at top of file for details on using events.</p>
|
|
|
|
<!-- parameters start -->
|
|
<strong>Parameters:</strong>
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>event_name</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<number>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>handler</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<function>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
<!-- parameters end -->
|
|
|
|
<!-- returns start -->
|
|
<!-- returns end -->
|
|
|
|
|
|
<!-- see also start -->
|
|
<!-- see also end -->
|
|
|
|
<!-- usage start -->
|
|
<!-- usage end -->
|
|
|
|
</dd>
|
|
<dt>
|
|
<div class="divider divider-custom"></div>
|
|
<div class="block section-item-header">
|
|
<a href="#Event.on_init" class="fragment-hashtag">#</a>
|
|
<span class="section-item-title" id="Event.on_init">Event.on_init(handler)</span>
|
|
</div>
|
|
</dt>
|
|
<dd>
|
|
<div class="section-item-body">
|
|
|
|
<p class="section-item-summary">Register a handler for the script.on_init event.</p>
|
|
<p class="section-item-description">
|
|
This function must be called in the control stage or in Event.on_init or Event.on_load
|
|
See documentation at top of file for details on using events.</p>
|
|
|
|
<!-- parameters start -->
|
|
<strong>Parameters:</strong>
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>handler</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<function>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
<!-- parameters end -->
|
|
|
|
<!-- returns start -->
|
|
<!-- returns end -->
|
|
|
|
|
|
<!-- see also start -->
|
|
<!-- see also end -->
|
|
|
|
<!-- usage start -->
|
|
<!-- usage end -->
|
|
|
|
</dd>
|
|
<dt>
|
|
<div class="divider divider-custom"></div>
|
|
<div class="block section-item-header">
|
|
<a href="#Event.on_load" class="fragment-hashtag">#</a>
|
|
<span class="section-item-title" id="Event.on_load">Event.on_load(handler)</span>
|
|
</div>
|
|
</dt>
|
|
<dd>
|
|
<div class="section-item-body">
|
|
|
|
<p class="section-item-summary">Register a handler for the script.on_load event.</p>
|
|
<p class="section-item-description">
|
|
This function must be called in the control stage or in Event.on_init or Event.on_load
|
|
See documentation at top of file for details on using events.</p>
|
|
|
|
<!-- parameters start -->
|
|
<strong>Parameters:</strong>
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>handler</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<function>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
<!-- parameters end -->
|
|
|
|
<!-- returns start -->
|
|
<!-- returns end -->
|
|
|
|
|
|
<!-- see also start -->
|
|
<!-- see also end -->
|
|
|
|
<!-- usage start -->
|
|
<!-- usage end -->
|
|
|
|
</dd>
|
|
<dt>
|
|
<div class="divider divider-custom"></div>
|
|
<div class="block section-item-header">
|
|
<a href="#Event.on_nth_tick" class="fragment-hashtag">#</a>
|
|
<span class="section-item-title" id="Event.on_nth_tick">Event.on_nth_tick(tick, handler)</span>
|
|
</div>
|
|
</dt>
|
|
<dd>
|
|
<div class="section-item-body">
|
|
|
|
<p class="section-item-summary">Register a handler for the nth_tick event.</p>
|
|
<p class="section-item-description">
|
|
This function must be called in the control stage or in Event.on_init or Event.on_load.
|
|
See documentation at top of file for details on using events.</p>
|
|
|
|
<!-- parameters start -->
|
|
<strong>Parameters:</strong>
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>tick</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<number> The handler will be called every nth tick
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>handler</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<function>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
<!-- parameters end -->
|
|
|
|
<!-- returns start -->
|
|
<!-- returns end -->
|
|
|
|
|
|
<!-- see also start -->
|
|
<!-- see also end -->
|
|
|
|
<!-- usage start -->
|
|
<!-- usage end -->
|
|
|
|
</dd>
|
|
<dt>
|
|
<div class="divider divider-custom"></div>
|
|
<div class="block section-item-header">
|
|
<a href="#Event.add_removable" class="fragment-hashtag">#</a>
|
|
<span class="section-item-title" id="Event.add_removable">Event.add_removable(event_name, token)</span>
|
|
</div>
|
|
</dt>
|
|
<dd>
|
|
<div class="section-item-body">
|
|
|
|
<p class="section-item-summary">Register a token handler that can be safely added and removed at runtime.</p>
|
|
<p class="section-item-description">
|
|
Do NOT call this method during on_load.
|
|
See documentation at top of file for details on using events.</p>
|
|
|
|
<!-- parameters start -->
|
|
<strong>Parameters:</strong>
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>event_name</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<number>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>token</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<number>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
<!-- parameters end -->
|
|
|
|
<!-- returns start -->
|
|
<!-- returns end -->
|
|
|
|
|
|
<!-- see also start -->
|
|
<!-- see also end -->
|
|
|
|
<!-- usage start -->
|
|
<!-- usage end -->
|
|
|
|
</dd>
|
|
<dt>
|
|
<div class="divider divider-custom"></div>
|
|
<div class="block section-item-header">
|
|
<a href="#Event.remove_removable" class="fragment-hashtag">#</a>
|
|
<span class="section-item-title" id="Event.remove_removable">Event.remove_removable(event_name, token)</span>
|
|
</div>
|
|
</dt>
|
|
<dd>
|
|
<div class="section-item-body">
|
|
|
|
<p class="section-item-summary">Removes a token handler for the given event_name.</p>
|
|
<p class="section-item-description">
|
|
Do NOT call this method during on_load.
|
|
See documentation at top of file for details on using events.</p>
|
|
|
|
<!-- parameters start -->
|
|
<strong>Parameters:</strong>
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>event_name</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<number>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>token</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<number>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
<!-- parameters end -->
|
|
|
|
<!-- returns start -->
|
|
<!-- returns end -->
|
|
|
|
|
|
<!-- see also start -->
|
|
<!-- see also end -->
|
|
|
|
<!-- usage start -->
|
|
<!-- usage end -->
|
|
|
|
</dd>
|
|
<dt>
|
|
<div class="divider divider-custom"></div>
|
|
<div class="block section-item-header">
|
|
<a href="#Event.add_removable_function" class="fragment-hashtag">#</a>
|
|
<span class="section-item-title" id="Event.add_removable_function">Event.add_removable_function(event_name, func)</span>
|
|
</div>
|
|
</dt>
|
|
<dd>
|
|
<div class="section-item-body">
|
|
|
|
<p class="section-item-summary">Register a handler that can be safely added and removed at runtime.</p>
|
|
<p class="section-item-description">
|
|
The handler must not be a closure, as that is a desync risk.
|
|
Do NOT call this method during on_load.
|
|
See documentation at top of file for details on using events.</p>
|
|
|
|
<!-- parameters start -->
|
|
<strong>Parameters:</strong>
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>event_name</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<number>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>func</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<function>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
<!-- parameters end -->
|
|
|
|
<!-- returns start -->
|
|
<!-- returns end -->
|
|
|
|
|
|
<!-- see also start -->
|
|
<!-- see also end -->
|
|
|
|
<!-- usage start -->
|
|
<!-- usage end -->
|
|
|
|
</dd>
|
|
<dt>
|
|
<div class="divider divider-custom"></div>
|
|
<div class="block section-item-header">
|
|
<a href="#Event.remove_removable_function" class="fragment-hashtag">#</a>
|
|
<span class="section-item-title" id="Event.remove_removable_function">Event.remove_removable_function(event_name, func)</span>
|
|
</div>
|
|
</dt>
|
|
<dd>
|
|
<div class="section-item-body">
|
|
|
|
<p class="section-item-summary">Removes a handler for the given event_name.</p>
|
|
<p class="section-item-description">
|
|
Do NOT call this method during on_load.
|
|
See documentation at top of file for details on using events.</p>
|
|
|
|
<!-- parameters start -->
|
|
<strong>Parameters:</strong>
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>event_name</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<number>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>func</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<function>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
<!-- parameters end -->
|
|
|
|
<!-- returns start -->
|
|
<!-- returns end -->
|
|
|
|
|
|
<!-- see also start -->
|
|
<!-- see also end -->
|
|
|
|
<!-- usage start -->
|
|
<!-- usage end -->
|
|
|
|
</dd>
|
|
<dt>
|
|
<div class="divider divider-custom"></div>
|
|
<div class="block section-item-header">
|
|
<a href="#Event.add_removable_nth_tick" class="fragment-hashtag">#</a>
|
|
<span class="section-item-title" id="Event.add_removable_nth_tick">Event.add_removable_nth_tick(tick, token)</span>
|
|
</div>
|
|
</dt>
|
|
<dd>
|
|
<div class="section-item-body">
|
|
|
|
<p class="section-item-summary">Register a token handler for the nth tick that can be safely added and removed at runtime.</p>
|
|
<p class="section-item-description">
|
|
Do NOT call this method during on_load.
|
|
See documentation at top of file for details on using events.</p>
|
|
|
|
<!-- parameters start -->
|
|
<strong>Parameters:</strong>
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>tick</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<number>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>token</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<number>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
<!-- parameters end -->
|
|
|
|
<!-- returns start -->
|
|
<!-- returns end -->
|
|
|
|
|
|
<!-- see also start -->
|
|
<!-- see also end -->
|
|
|
|
<!-- usage start -->
|
|
<!-- usage end -->
|
|
|
|
</dd>
|
|
<dt>
|
|
<div class="divider divider-custom"></div>
|
|
<div class="block section-item-header">
|
|
<a href="#Event.remove_removable_nth_tick" class="fragment-hashtag">#</a>
|
|
<span class="section-item-title" id="Event.remove_removable_nth_tick">Event.remove_removable_nth_tick(tick, token)</span>
|
|
</div>
|
|
</dt>
|
|
<dd>
|
|
<div class="section-item-body">
|
|
|
|
<p class="section-item-summary">Removes a token handler for the nth tick.</p>
|
|
<p class="section-item-description">
|
|
Do NOT call this method during on_load.
|
|
See documentation at top of file for details on using events.</p>
|
|
|
|
<!-- parameters start -->
|
|
<strong>Parameters:</strong>
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>tick</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<number>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>token</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<number>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
<!-- parameters end -->
|
|
|
|
<!-- returns start -->
|
|
<!-- returns end -->
|
|
|
|
|
|
<!-- see also start -->
|
|
<!-- see also end -->
|
|
|
|
<!-- usage start -->
|
|
<!-- usage end -->
|
|
|
|
</dd>
|
|
<dt>
|
|
<div class="divider divider-custom"></div>
|
|
<div class="block section-item-header">
|
|
<a href="#Event.add_removable_nth_tick_function" class="fragment-hashtag">#</a>
|
|
<span class="section-item-title" id="Event.add_removable_nth_tick_function">Event.add_removable_nth_tick_function(tick, func)</span>
|
|
</div>
|
|
</dt>
|
|
<dd>
|
|
<div class="section-item-body">
|
|
|
|
<p class="section-item-summary">Register a handler for the nth tick that can be safely added and removed at runtime.</p>
|
|
<p class="section-item-description">
|
|
The handler must not be a closure, as that is a desync risk.
|
|
Do NOT call this method during on_load.
|
|
See documentation at top of file for details on using events.</p>
|
|
|
|
<!-- parameters start -->
|
|
<strong>Parameters:</strong>
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>tick</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<number>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>func</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<function>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
<!-- parameters end -->
|
|
|
|
<!-- returns start -->
|
|
<!-- returns end -->
|
|
|
|
|
|
<!-- see also start -->
|
|
<!-- see also end -->
|
|
|
|
<!-- usage start -->
|
|
<!-- usage end -->
|
|
|
|
</dd>
|
|
<dt>
|
|
<div class="divider divider-custom"></div>
|
|
<div class="block section-item-header">
|
|
<a href="#Event.remove_removable_nth_tick_function" class="fragment-hashtag">#</a>
|
|
<span class="section-item-title" id="Event.remove_removable_nth_tick_function">Event.remove_removable_nth_tick_function(tick, func)</span>
|
|
</div>
|
|
</dt>
|
|
<dd>
|
|
<div class="section-item-body">
|
|
|
|
<p class="section-item-summary">Removes a handler for the nth tick.</p>
|
|
<p class="section-item-description">
|
|
Do NOT call this method during on_load.
|
|
See documentation at top of file for details on using events.</p>
|
|
|
|
<!-- parameters start -->
|
|
<strong>Parameters:</strong>
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>tick</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<number>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="section-subitem-li">
|
|
|
|
<strong><em>func</em></strong>
|
|
|
|
<strong> : </strong>
|
|
|
|
|
|
<function>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
<!-- parameters end -->
|
|
|
|
<!-- returns start -->
|
|
<!-- returns end -->
|
|
|
|
|
|
<!-- see also start -->
|
|
<!-- see also end -->
|
|
|
|
<!-- usage start -->
|
|
<!-- usage end -->
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
<!-- section end -->
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="footer container grid-1280">
|
|
<div class="divider divider-custom"></div>
|
|
<div class="footer-columns columns">
|
|
<div class="sidebar-footer column col-3 col-sm-12">
|
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc </a></i>
|
|
</div>
|
|
<div class="content-footer column col-9 col-sm-12">
|
|
<i>Last updated 2022-10-23 17:06:23 UTC</i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|