Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Peterclark1996/s2ts
/ functions
Functions
82 in github.com/Peterclark1996/s2ts
⨍
Functions
82
◇
Types & classes
44
↓ 5 callers
Function
tryWriteFile
(fullPath: string, content: string, encoding: "utf8" | "base64")
packages/create-s2ts/src/index.ts:86
↓ 3 callers
Function
standardisePath
(fullPath: string)
packages/s2ts/src/cli.ts:81
↓ 2 callers
Function
processFileAtPath
(pathFor: { project: string; file: string })
packages/s2ts/src/cli.ts:40
↓ 2 callers
Function
transpileFromTypeScript
(file: VtsFile)
packages/s2ts/src/compiler/transpile.ts:5
↓ 2 callers
Function
tryCreateFolder
(fullPath: string)
packages/create-s2ts/src/index.ts:95
↓ 1 callers
Function
addS2tsVersion
(data: string)
packages/s2ts/src/compiler/version.ts:3
↓ 1 callers
Function
bundleImports
(pathForProject: string, file: VtsFile)
packages/s2ts/src/compiler/rollup.ts:11
↓ 1 callers
Function
collectInterfaceDeclarations
(node: ts.Node)
scripts/generateInstanceDocs.ts:67
↓ 1 callers
Function
escapeForMarkdown
(text: string)
scripts/generateInstanceDocs.ts:26
↓ 1 callers
Function
extractComments
(node: ts.Node)
scripts/generateInstanceDocs.ts:19
↓ 1 callers
Function
getMemberSignature
(member: ts.TypeElement)
scripts/generateInstanceDocs.ts:53
↓ 1 callers
Function
getMethodSignature
(method: ts.MethodSignature)
scripts/generateInstanceDocs.ts:39
↓ 1 callers
Function
processFileData
(pathForProject: string, file: VtsFile)
packages/s2ts/src/cli.ts:72
↓ 1 callers
Function
run
()
packages/create-s2ts/src/index.ts:10
↓ 1 callers
Function
start
(specifiedPath: string | undefined)
packages/s2ts/src/cli.ts:16
↓ 1 callers
Function
tryParseJSDoc
(comment: string)
scripts/generateInstanceDocs.ts:30
Method
AddScore
* Adds score the to controller. * * @param nPoints the amount of score to add.
packages/s2ts/types/cspointscript.d.ts:295
Method
ChangeTeam
* Sets the team of the pawn (This will kill the player). * * @param iTeamNum the team number to set the pawn to. 0 = Team Selection, 1 = Spe
packages/s2ts/types/cspointscript.d.ts:258
Method
ChangeTeam
* Sets the team of the pawn (This will kill the player). * * @param iTeamNum the team number to set the pawn to. 0 = Team Selection, 1 = Spe
packages/s2ts/types/cspointscript.d.ts:381
Method
ChangeTeam
* Sets the team of the pawn (This will kill the player). * * @param iTeamNum the team number to set the pawn to. 0 = Team Selection, 1 = Spe
packages/s2ts/types/cspointscript.d.ts:439
Method
ChangeTeam
* Sets the team of the pawn (This will kill the player). * * @param iTeamNum the team number to set the pawn to. 0 = Team Selection, 1 = Spe
packages/s2ts/types/cspointscript.d.ts:487
Method
ClientThink
* Needs testing.
packages/s2ts/types/cspointscript.d.ts:124
Method
DebugScreenText
* Prints a message to the screen. * * @param message the message to print to the screen. * @param flScreenX the x position of the messa
packages/s2ts/types/cspointscript.d.ts:95
Method
DestroyWeapon
* Destroys the weapon. * * @param pWeapon the weapon to destroy.
packages/s2ts/types/cspointscript.d.ts:183
Method
DestroyWeapons
* Destroys all weapons apart from the knife.
packages/s2ts/types/cspointscript.d.ts:188
Function
DocsOutdatedAlert
()
documentation/src/components/DocsOutdatedAlert.tsx:3
Method
EntFireAtName
* Triggers an action on an entity. * * @param entityName the targetname of the entity to trigger the action on. * @param action the act
packages/s2ts/types/cspointscript.d.ts:83
Method
EntFireBroadcast
* Triggers an action on an entity. * * @param target the index of the entity to trigger the action on. Target can be an entity targetname, !
packages/s2ts/types/cspointscript.d.ts:105
Method
FindWeapon
* Finds a weapon by name. * * @param sWeaponName the name of the weapon to find. * @returns the weapon found by name.
packages/s2ts/types/cspointscript.d.ts:161
Method
FindWeaponBySlot
* Finds a weapon by slot. * * @param nSlot the slot of the weapon to find. 0 = Primary, 1 = Secondary, 2 = Knife. * @returns the weapon
packages/s2ts/types/cspointscript.d.ts:169
Method
GameMode
* Gets the current game mode. * 0 = Casual (When gametype = 0), Arms Race (When gametype = 1), Training (When gametype = 2), Custom (When gametyp
packages/s2ts/types/cspointscript.d.ts:52
Method
GameType
* Gets the current game type. * 0 = Classic * 1 = Gun Game * 2 = Training * 3 = Custom * 4 = Cooperative * 5 = Skirmish
packages/s2ts/types/cspointscript.d.ts:40
Method
GetAbsOrigin
* Gets the absolute origin of the entity. * * @returns an array of the x y z values.
packages/s2ts/types/cspointscript.d.ts:133
Method
GetAbsOrigin
* Gets the absolute origin of the entity. * * @returns an array of the x y z values.
packages/s2ts/types/cspointscript.d.ts:233
Method
GetAbsOrigin
* Gets the absolute origin of the entity. * * @returns an array of the x y z values.
packages/s2ts/types/cspointscript.d.ts:356
Method
GetAbsOrigin
* Gets the absolute origin of the entity. * * @returns an array of the x y z values.
packages/s2ts/types/cspointscript.d.ts:414
Method
GetAbsOrigin
* Gets the absolute origin of the entity. * * @returns an array of the x y z values.
packages/s2ts/types/cspointscript.d.ts:462
Method
GetActiveWeapon
* Gets the currently active weapon. * * @returns the currently active weapon.
packages/s2ts/types/cspointscript.d.ts:176
Method
GetClassName
* Gets the name of the pawn type. * * @returns the name of the pawn type.
packages/s2ts/types/cspointscript.d.ts:265
Method
GetClassName
* Gets the name of the entity. * * @returns the name of the entity.
packages/s2ts/types/cspointscript.d.ts:388
Method
GetClassName
* Gets the name of the entity. * * @returns the name of the entity.
packages/s2ts/types/cspointscript.d.ts:446
Method
GetClassName
* Gets the name of the entity. * * @returns the name of the entity.
packages/s2ts/types/cspointscript.d.ts:494
Method
GetCurrentController
* Gets the controller of the pawn. * * @returns the controller of the pawn.
packages/s2ts/types/cspointscript.d.ts:219
Method
GetCurrentController
* Gets the controller of this observer. * * @returns the controller of this observer.
packages/s2ts/types/cspointscript.d.ts:407
Method
GetData
* Gets the loadout data for this weapon. * * @returns the loadout data for this weapon.
packages/s2ts/types/cspointscript.d.ts:455
Method
GetEntityOrigin
* Gets the origin of a entity. * * @returns an array of the x y z values.
packages/s2ts/types/cspointscript.d.ts:73
Method
GetGameTime
* Gets the current game time in seconds from when the map started. * * @returns the current game time in second.
packages/s2ts/types/cspointscript.d.ts:26
Method
GetName
* Gets the name of the weapon. * * @returns the name of the weapon.
packages/s2ts/types/cspointscript.d.ts:503
Method
GetObserver
* Gets the observer of this controller. * * @returns the observer of this controller.
packages/s2ts/types/cspointscript.d.ts:281
Method
GetObserverMode
* Needs testing.
packages/s2ts/types/cspointscript.d.ts:395
Method
GetOrigin
* Gets the origin of the entity. * * @returns an array of the x y z values.
packages/s2ts/types/cspointscript.d.ts:140
Method
GetOrigin
* Gets the origin of the entity. * * @returns an array of the x y z values.
packages/s2ts/types/cspointscript.d.ts:240
Method
GetOrigin
* Gets the origin of the entity. * * @returns an array of the x y z values.
packages/s2ts/types/cspointscript.d.ts:363
Method
GetOrigin
* Gets the origin of the entity. * * @returns an array of the x y z values.
packages/s2ts/types/cspointscript.d.ts:421
Method
GetOrigin
* Gets the origin of the entity. * * @returns an array of the x y z values.
packages/s2ts/types/cspointscript.d.ts:469
Method
GetOriginalController
* Gets the controller of the pawn. * * @returns the controller of the pawn.
packages/s2ts/types/cspointscript.d.ts:226
Method
GetPlayer
* Gets the pawn this controller controls. * * @returns the pawn of this Controller.
packages/s2ts/types/cspointscript.d.ts:274
Method
GetPlayerPawn
* Gets a player Pawn handle by their player slot. * * @param playerId the player slot of the player to get the pawn of.
packages/s2ts/types/cspointscript.d.ts:66
Method
GetPlayerSlot
* Get the player slot of the controller. * * @returns the player slot of the controller.
packages/s2ts/types/cspointscript.d.ts:342
Method
GetPrice
* Gets the price of the weapon. * * @returns the price of the weapon.
packages/s2ts/types/cspointscript.d.ts:527
Method
GetScore
* Gets the score of the controller. * * @returns the score of the controller.
packages/s2ts/types/cspointscript.d.ts:288
Method
GetTeamNumber
* Gets the team number of the pawn. * 0 = Team Selection * 1 = Spectator * 2 = Terrorist * 3 = Counter-Terrorist * * @re
packages/s2ts/types/cspointscript.d.ts:151
Method
GetTeamNumber
* Gets the team number of the pawn. * 0 = Team Selection * 1 = Spectator * 2 = Terrorist * 3 = Counter-Terrorist * * @re
packages/s2ts/types/cspointscript.d.ts:251
Method
GetTeamNumber
* Gets the team number of the pawn. * 0 = Team Selection * 1 = Spectator * 2 = Terrorist * 3 = Counter-Terrorist * * @re
packages/s2ts/types/cspointscript.d.ts:374
Method
GetTeamNumber
* Gets the team number of the pawn. * 0 = Team Selection * 1 = Spectator * 2 = Terrorist * 3 = Counter-Terrorist * * @re
packages/s2ts/types/cspointscript.d.ts:432
Method
GetTeamNumber
* Gets the team number of the pawn. * 0 = Team Selection * 1 = Spectator * 2 = Terrorist * 3 = Counter-Terrorist * * @re
packages/s2ts/types/cspointscript.d.ts:480
Method
GetType
* Gets the type of the weapon. * 0 = knife * 1 = pistol * 2 = light machine gun * 3 = rifle * 4 = shotgun * 5 = sniper
packages/s2ts/types/cspointscript.d.ts:520
Method
GetWeaponDataForLoadoutSlot
* Get the weapon data of the players loadout slot. * 0 = weapon_knife_tactical * 1 = weapon_c4 for Ts and undefined for CTs * 2 = Start
packages/s2ts/types/cspointscript.d.ts:328
Method
GiveNamedItem
* Gives an item to the player. * * @param sName the name of the item to give.
packages/s2ts/types/cspointscript.d.ts:212
Function
Home
()
documentation/src/pages/index.tsx:10
Method
InitialActivate
* Runs a function once the script as finished loading. * * @param func the func to run once the script has finished loading.
packages/s2ts/types/cspointscript.d.ts:112
Method
IsFakeClient
* Returns true if the controller is a bot. * * @returns true if the controller is a bot. false otherwise.
packages/s2ts/types/cspointscript.d.ts:349
Method
IsObserving
* Returns true if the controller is observing. * * @returns true if the controller is observing. false otherwise.
packages/s2ts/types/cspointscript.d.ts:335
Method
IsWarmupPeriod
* Returns true if the game is in a warmup period. * * @returns true if the game is in a warmup period. false otherwise.
packages/s2ts/types/cspointscript.d.ts:59
Method
Msg
* Sends a message to the server console. * * @param message the message to send.
packages/s2ts/types/cspointscript.d.ts:7
Method
PublicMethod
* Defines a public method that can be called from the I/O system in the map. * * To pass a value into the method, it must have a type specif
packages/s2ts/types/cspointscript.d.ts:19
Method
SetGunGameImmunity
* Needs testing.
packages/s2ts/types/cspointscript.d.ts:200
Method
SetGunGameImmunityColor
* Needs testing.
packages/s2ts/types/cspointscript.d.ts:205
Method
SetNextClientThink
* Needs testing.
packages/s2ts/types/cspointscript.d.ts:119
Method
SetObserverMode
* Needs testing.
packages/s2ts/types/cspointscript.d.ts:400
Method
SwitchToWeapon
* Switches to a weapon. * * @param pWeapon the weapon to switch to.
packages/s2ts/types/cspointscript.d.ts:195
Function
extractPublicMethods
(data: string)
packages/s2ts/src/compiler/publicMethods.ts:5