-
Notifications
You must be signed in to change notification settings - Fork 7
server.services.ToolService.ToolService
server/services/ToolService.ToolService
Manages the state of a player's tools and contains utility functions for interfacing with tools.
OnInit
• new ToolService()
• store: Store<State, Actions>
src/server/services/ToolService.ts:118
▸ Private InitModelInterface(): void
Begins the tool-model interface to allow empty models to create AET tools.
void
src/server/services/ToolService.ts:128
▸ Private InitStore(): void
Initalizes the tool store by connecting to various events to ensure the tool store is always up to date.
void
src/server/services/ToolService.ts:163
▸ InitTool(tool): void
Tracks a tool so that it's information if properly displayed in the tool store.
| Name | Type | Description |
|---|---|---|
tool |
ITool |
The tool to be tracked in the tool store |
void
src/server/services/ToolService.ts:187
▸ Private TryAddModelToTool(instance, parent): void
Makes an empty model with a tool's name into a tool if compatible and then tracks when the model is destroyed which destroys the tool.
| Name | Type | Description |
|---|---|---|
instance |
Instance |
an instance which if a model will be made into a tool |
parent |
Player |
- |
void
src/server/services/ToolService.ts:149
▸ addTool(toolName, parent): Model
Creates a new tool which has the model of the toolName provided and parents the tool to the parent provided.
| Name | Type | Description |
|---|---|---|
toolName |
"Shield" | "Kopis" | "Sparta" | "Athens"
|
name of a tool model |
parent |
Instance | Player
|
a player or part to parent the tool to |
Model
src/server/services/ToolService.ts:219
▸ onInit(): void
void
OnInit.onInit
- client/controllers/SpringCam
- client/controllers/Direction
- client/controllers/Rotation
- client/controllers/Shake
- client/controllers/Input
- server/modules/InputParser
- server/modules/Middleware
- server/modules/AnimPlayer
- server/modules/Action
- server/modules/Defer