-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Began deprecated module test coverage
- Loading branch information
Showing
6 changed files
with
100 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* Tests backward compatibility | ||
* With https://github.com/Subtixx/mtasa-typescript | ||
*/ | ||
|
||
import { mtasa as server } from 'types/mtasa/server'; | ||
import { mtasa as client } from 'types/mtasa/client'; | ||
|
||
const exportsClient: LuaTable = client.exports; | ||
const exports: LuaTable = server.exports; | ||
|
||
const resourceClient: client.Resource = client.resource; | ||
const resourceServer: server.Resource = server.resource; | ||
|
||
const resourceRootClient: client.Element = client.resourceRoot; | ||
const resourceRootServer: server.Element = server.resourceRoot; | ||
|
||
const root: client.Element = client.root; | ||
const rootClient: server.Element = server.root; | ||
|
||
const guiRoot: client.Element = client.guiRoot; | ||
|
||
const localPlayer: client.Player = client.localPlayer; | ||
|
||
const sourceClient: client.Element = client.source; | ||
const source: server.Element = server.source; | ||
|
||
const eventNameClient: string = client.eventName; | ||
const eventNameServer: string = server.eventName; | ||
|
||
const clientSource: server.Player = server.client; | ||
|
||
const sourceResourceRoot: server.Element = server.sourceResourceRoot; | ||
const sourceResource: server.Resource = server.sourceResource; | ||
|
||
const sourceTimerClient: client.Timer = client.sourceTimer; | ||
const sourceTimerServer: server.Timer = server.sourceTimer; | ||
|
||
client.addCommandHandler('command', () => null); | ||
client.addCommandHandler('command', () => null, false); | ||
server.addCommandHandler('command', () => null, true, false); | ||
server.addCommandHandler('command', () => null, true); | ||
server.addCommandHandler('command', () => null); | ||
|
||
client.outputChatBox('message', 255, 255, 255, true); | ||
client.outputChatBox('message'); | ||
server.outputChatBox('message', server.getRandomPlayer(), 255, 255, 255, true); | ||
server.outputChatBox('message', server.getRandomPlayer()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* Tests backward compatibility | ||
* With https://github.com/Subtixx/mtasa-typescript | ||
*/ | ||
|
||
import { mtasa } from 'types/mtasa/server'; | ||
|
||
let blip: mtasa.Blip = mtasa.createBlip( | ||
10, | ||
10, | ||
10, | ||
1, | ||
1, | ||
255, | ||
255, | ||
255, | ||
255, | ||
1, | ||
100, | ||
mtasa.root, | ||
); | ||
|
||
blip = mtasa.createBlipAttachedTo( | ||
mtasa.getRandomPlayer(), | ||
1, | ||
1, | ||
255, | ||
255, | ||
255, | ||
255, | ||
1, | ||
100, | ||
mtasa.root, | ||
); | ||
|
||
const color: [number, number, number, number] = mtasa.getBlipColor(blip); | ||
const icon: number = mtasa.getBlipIcon(blip); | ||
const size: number = mtasa.getBlipSize(blip); | ||
const colorR: boolean = mtasa.setBlipColor(blip, 255, 255, 255, 10); | ||
const iconR: boolean = mtasa.setBlipIcon(blip, 3); | ||
const sizeR: boolean = mtasa.setBlipSize(blip, 3); | ||
const ordering: number = mtasa.getBlipOrdering(blip); | ||
const orderingR: boolean = mtasa.setBlipOrdering(blip, 0); | ||
const visibleDistance: number = mtasa.getBlipVisibleDistance(blip); | ||
const visibleDistanceR: boolean = mtasa.setBlipVisibleDistance(blip, 60); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
303a541
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #18