Skip to content

Commit

Permalink
Track instances of the global singletons
Browse files Browse the repository at this point in the history
Also remove description support as the new dump engine doesn't support it anymore :(

And correct the spelling of lua_server_declaration, that was an oof
  • Loading branch information
SinZ163 committed Mar 2, 2019
1 parent f344406 commit 72aab9f
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 70 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
panorama/.vscode/
Thumbs.db
.idea/

_site/
.sass-cache/
Gemfile.lock
57 changes: 38 additions & 19 deletions _data/lua_server.json
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,8 @@
"description": "( int ListnerID ) - Unregister a specific listener",
"return": "void"
}
}
},
"instance": "CustomGameEventManager"
},
"CCustomNetTableManager": {
"functions": {
Expand All @@ -1346,7 +1347,8 @@
"description": "( string TableName, string KeyName, script_table Value )",
"return": "bool"
}
}
},
"instance": "CustomNetTables"
},
"CDOTABaseAbility": {
"extends": "CBaseEntity",
Expand Down Expand Up @@ -2933,7 +2935,8 @@
"description": "Get the hero unit name given the hero ID.",
"return": "cstring"
}
}
},
"instance": "DOTAGameManager"
},
"CDOTAGamerules": {
"functions": {
Expand Down Expand Up @@ -3502,7 +3505,8 @@
"description": "Get the current Gamerules state",
"return": "int"
}
}
},
"instance": "GameRules"
},
"CDOTAPlayer": {
"extends": "CBaseAnimating",
Expand Down Expand Up @@ -3733,7 +3737,8 @@
"description": "Upgrade a specific ability for the local hero",
"return": "void"
}
}
},
"instance": "Tutorial"
},
"CDOTAVoteSystem": {
"functions": {
Expand All @@ -3744,7 +3749,8 @@
"description": "Starts a vote, based upon a table of parameters",
"return": "void"
}
}
},
"instance": "VoteSystem"
},
"CDOTA_Ability_Animation_Attack": {
"extends": "CDOTABaseAbility",
Expand Down Expand Up @@ -6486,7 +6492,8 @@
"description": "Set the XP gained per level on this creature.",
"return": "void"
}
}
},
"instance": "spawnedUnit"
},
"CDOTA_BaseNPC_Hero": {
"extends": "CDOTA_BaseNPC",
Expand Down Expand Up @@ -7344,7 +7351,8 @@
"description": "Toggle the visibility of an existing custom hud element ( int PlayerID /*-1 means everyone*/, string ElementID, bool Visible )",
"return": "void"
}
}
},
"instance": "CustomUI"
},
"CDOTA_Item": {
"extends": "CDOTABaseAbility",
Expand Down Expand Up @@ -9658,7 +9666,8 @@
],
"return": "int"
}
}
},
"instance": "PlayerResource"
},
"CDOTA_ShopTrigger": {
"extends": "CBaseTrigger",
Expand Down Expand Up @@ -10178,7 +10187,8 @@
"description": "Draws a arrow associated with a specific yaw. Specify endpoints in world space.",
"return": "void"
}
}
},
"instance": "debugoverlay"
},
"CDotaQuest": {
"extends": "CBaseEntity",
Expand Down Expand Up @@ -10453,7 +10463,8 @@
"description": "Continue an iteration over the list of entities, providing reference to a previously found entity",
"return": "handle"
}
}
},
"instance": "Entities"
},
"CEntityInstance": {
"functions": {
Expand Down Expand Up @@ -10575,7 +10586,8 @@
}
},
"CEntityScriptFramework": {
"functions": {}
"functions": {},
"instance": "NativeFunctions"
},
"CEnvEntityMaker": {
"extends": "CBaseEntity",
Expand Down Expand Up @@ -11192,7 +11204,8 @@
"description": "Returns the number of heroes in the world",
"return": "int"
}
}
},
"instance": "HeroList"
},
"CScriptKeyValues": {
"functions": {
Expand Down Expand Up @@ -11343,7 +11356,8 @@
"description": "int nfxindex, bool bCheckFoW",
"return": "bool"
}
}
},
"instance": "ParticleManager"
},
"CScriptPrecacheContext": {
"functions": {
Expand Down Expand Up @@ -11693,7 +11707,8 @@
"description": "SetStr(name, val) : sets the value of the convar to the string.",
"return": "void"
}
}
},
"instance": "Convars"
},
"Global": {
"functions": {
Expand Down Expand Up @@ -13380,7 +13395,8 @@
"description": "CommandLineStr(name) : returns the command line param as a string.",
"return": "variant"
}
}
},
"instance": "GlobalSys"
},
"GridNav": {
"functions": {
Expand Down Expand Up @@ -13474,7 +13490,8 @@
"description": "Get the Y index of a given world Y position",
"return": "int"
}
}
},
"instance": "GridNav"
},
"ProjectileManager": {
"functions": {
Expand Down Expand Up @@ -13544,7 +13561,8 @@
"description": "Update velocity",
"return": "void"
}
}
},
"instance": "ProjectileManager"
},
"SteamInfo": {
"functions": {
Expand All @@ -13553,6 +13571,7 @@
"description": "Is the script connected to the public Steam universe",
"return": "bool"
}
}
},
"instance": "SteamInfo"
}
}
3 changes: 1 addition & 2 deletions lua_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ permalink: /lua_server/
{% for server_class in site.data.lua_server %}
## {{ server_class[0] }}
{% if server_class[1] contains "extends" %}*extends **{{server_class[1].extends}}*** {% endif %}

#### {{server_class[1].description}}

{% for function in server_class[1].functions %}
* {{function[0]}}(
{% if function[1] contains "args" %}{%for arg in function[1].args %}{% if function[1] contains "arg_names" %}*{{arg}}* {{function[1].arg_names[forloop.index0]}}{% else %}{{arg}}{% endif %}{% if forloop.last != true %}, {% endif %}{% endfor %}{% endif %} ) : {{function[1].return | default: "void"}}
Expand Down
24 changes: 3 additions & 21 deletions lua_server_delcaration.md → lua_server_declaration.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ permalink: /lua_server/declaration
{%- assign override = site.data.override_lua_server %}
{%- for server_class in site.data.lua_server %}
{%- if server_class[0] != "Global" %}
/**
* {{server_class[1].description}}
*/
interface {{ server_class[0] }}{% if server_class[1] contains "extends" %} extends {{server_class[1].extends}}{% endif %} {
{%- endif %}
{% for function in server_class[1].functions %}
Expand Down Expand Up @@ -134,6 +131,9 @@ interface {{ server_class[0] }}{% if server_class[1] contains "extends" %} exten
{%- endif %}) : {{return_type}};
{% endfor %}
}
{%- if server_class[1] contains "instance" %}
declare var {{ server_class[1].instance }} : {{ server_class[0] }};
{%- endif %}
{% endfor %}

/**
Expand All @@ -156,22 +156,4 @@ interface CDOTA_Modifier_Lua extends CDOTA_Buff {
{%- endif %}
{%- endfor %}
}

declare var ParticleManager : CScriptParticleManager;

declare var HeroList : HeroList;

declare var GameRules : CDOTAGamerules;

declare var PlayerResource : CDOTA_PlayerResource;

declare var Entities : CEntities;

declare var ConVars : Convars;

declare var CustomGameEventManager : CCustomGameEventManager;

declare var CustomNetTables : CCustomNetTableManager;

declare var Tutorial : CDOTATutorial;
```
32 changes: 4 additions & 28 deletions lua_server_docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ permalink: /lua_server/docs
{% for server_class in site.data.lua_server %}
{% if server_class[0] != "Global" %}
--- @class {{ server_class[0] }} {% if server_class[1] contains "extends" %} : {{server_class[1].extends}}{% endif %}
--- {{server_class[1].description}}
{{ server_class[0] }} = {}
{% endif %}
{%- if server_class[1] contains "instance" %}
--- @type {{ server_class[0] }}
{{ server_class[1].instance }} = {}
{%- endif %}
{% for function in server_class[1].functions %}
{%- assign function_override = nil %}
{%- if override contains server_class[0] %}
Expand Down Expand Up @@ -153,31 +156,4 @@ end
{%- endfor %}
{%- endif %}
{%- endfor %}

--- @type CScriptParticleManager
ParticleManager = {}

--- @type CScriptHeroList
HeroList = {}

--- @type CDOTAGamerules
GameRules = {}

--- @type CDOTA_PlayerResource
PlayerResource = {}

--- @type CEntities
Entities = {}

--- @type Convars
ConVars = {}

--- @type CCustomGameEventManager
CustomGameEventManager = {}

--- @type CCustomNetTableManager
CustomNetTables = {}

--- @type CDOTATutorial
Tutorial = {}
```

0 comments on commit 72aab9f

Please sign in to comment.