User:Nescius: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 10: Line 10:
_string_default_delegate = { ... } //contains string functions
_string_default_delegate = { ... } //contains string functions
_number_default_delegate = { ... } //contains integer, float, bool functions
_number_default_delegate = { ... } //contains integer, float, bool functions
_handle_default_delegate = { ... } //?
_handle_default_delegate = { ... } //contains chandle functions (only tointeger(), used with point_script_use_target)
_utlstringtoken_default_delegate = { ... } //?
_utlstringtoken_default_delegate = { ... } //?
_generator_default_delegate = { ... } //contains generator functions
_generator_default_delegate = { ... } //contains generator functions

Revision as of 16:29, 21 April 2022

I just want to see my name in blue. You can leave now

personal notes

temp_reg = null
_stack = { ... }
_registry = { ... }
_table_default_delegate = { ... } //contains table functions
_array_default_delegate = { ... } //contains array functions
_string_default_delegate = { ... } //contains string functions
_number_default_delegate = { ... } //contains integer, float, bool functions
_handle_default_delegate = { ... } //contains chandle functions (only tointeger(), used with point_script_use_target)
_utlstringtoken_default_delegate = { ... } //?
_generator_default_delegate = { ... } //contains generator functions
_thread_default_delegate = { ... } //contains thread functions
_closure_default_delegate = { ... } //contains function functions
_class_default_delegate = { ... } //contains class functions
_instance_default_delegate = { ... } //contains instance functions
_weakref_default_delegate = { ... } //contains weak reference functions
_metamethodsmap = {
  _add: 0
  _sub: 1
  _mul: 2
  _div: 3
  _unm: 4
  _modulo: 5
  _set: 6
  _get: 7
  _typeof: 8
  _nexti: 9
  _cmp: 10
  _call: 11
  _cloned: 12
  _newslot: 13
  _delslot: 14
  _tostring: 15
  _newmember: 16
  _inherited: 17
}
_lasterror = null
_errorhandler = (native function) //can be set to something else with seterrorhandler()
_consts = { ... } //variables made with const and enum go here (getconsttable())
_roottable = { //script and script_execute scripts are executed in this scope (getroottable())

    //global shortcuts {
    g_ModeScript = DirectorScript.MapScript.ChallengeScript
    g_MapScript = DirectorScript.MapScript

    SessionOptions = g_ModeScript.DirectorOptions
    SessionState = g_ModeScript.MutationState
    SessionSpawns = g_MapScript.MapSpawns
    // }

    g_RoundState = { ... } //used by hints and StartBox stuff in sm_utilities

    g_rr = { ... } //response rules related stuff

    GameEventCallbacks = { ... } //OnGameEvent_
    ScriptEventCallbacks = { ... } //OnScriptEvent_

    DirectorScript = { //director_base.nut executed in this scope
        DirectorOptions = { ... } //4

        MapScript = { //mapscripts, trigger_finale scripts and scriptedmode.nut executed in this scope
            DirectorOptions = { ... } //3
            BaseScriptedDOTable = { ... } //added into ChallengeScript.DirectorOptions

            //these come from mapscripts {
            MapOptions = { ... } //added into ChallengeScript.DirectorOptions
            MapState = { ... } //added into ChallengeScript.MutationState
            MapSpawns = [] //entity groups to spawn

            SanitizeTable = { ... } //entities to remove
            // }

            ChallengeScript = { //modescripts executed in this scope
                MutationOptions = { ... } //added into DirectorOptions (below)
                MutationState = { ... }
                ModeSpawns = [] //added into MapSpawns

                DirectorOptions = { ... } //1
            }

            LocalScript = { //director's BeginScript input runs script in this scope
                DirectorOptions = { ... } //2
            }

            ScriptedDamageInfo = { ... } //used by AllowTakeDamage

            //entity group related
            EntityGroups = { ... }
            InstancedEntityGroup = { ... }
            ReplacementParms = { ... }
            UniqueTargetnames = { ... }

            //startbox related
            StartboxFloating_Info = { ... }
            StartboxCenter_Info = { ... }
            StartboxSpeedbump_Info = { ... }

            defaultClearout = { ... } //for clearout (used in holdout)
        }
    }

    g_ClearoutTable = { ... } //for clearout (used in holdout)

    //script_debug commands related
    ScriptDebugTraces = { ... }
    ScriptDebugTextFilters = { ... }

    //documentation
    _PublishedHelp = { ... }
    Documentation = {
        classes = { ... }
        instances = { ... }
        functions = { ... }
    }

    SPAWN_FLAGS = { ... } //entitygroup related, used in MapSpawns thingy

    //entity scopes are created in getroottable() example:
    //<uniquestring><targetname or classname if no targetname> = {}
    _10dc_worldspawn = { ... }
    //name of this scope is saved in entity's m_iszScriptId
    //entity's RunScriptCode,RunScriptFile inputs create this scope if it doesn't exist and executes script in it
    //also scripts specified in entity's 'vscripts' keyvalue executed in this scope
}