iniquity

A re-imagining of the iconic BBS software.

View on GitHub

Class: Answer

core/src/modules/answer.Answer

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Answer()

Inherited from

IQ.constructor

Properties

access

access: IQModuleACLS

Inherited from

IQ.access

Defined in

core/src/index.ts:346


assets

assets: string

Inherited from

IQ.assets

Defined in

core/src/index.ts:345


basepath

basepath: string

Inherited from

IQ.basepath

Defined in

core/src/index.ts:344


computed

computed: any

Inherited from

IQ.computed

Defined in

core/src/index.ts:349


data

data: IQReactorOptions

Inherited from

IQ.data

Defined in

core/src/index.ts:348


encoding

encoding: "CP437" | "UTF8"

Inherited from

IQ.encoding

Defined in

core/src/index.ts:347


terminfo

terminfo: IQTermInfoObject

Terminal information available to iniquity

Inherited from

IQ.terminfo

Defined in

core/src/index.ts:511

Methods

artwork

artwork(options?): Artwork

Will allow you to render artwork to the screen

see IQArtworkOptions to learn more about the available options.

example

const artwork = iq.artwork({ basepath: "/iniquity/core/src/assets/" })
artwork.render({ filename: Assets.we_iniq3 })

iq.artwork({ basepath: "/iniquity/core/src/assets/", filename: Assets.we_iniq3 }).render({ clearScreenBefore: false })

Parameters

Name Type Description
options? IQArtworkOptions An object containing the various configuration properties.

Returns

Artwork

An instance of Artwork and its return functions.

Inherited from

IQ.artwork

Defined in

core/src/index.ts:544


ask

ask(question): string

Displays a prompt (value) and returns a string of user input (ala clent-side JS)

Parameters

Name Type
question string

Returns

string

response

Inherited from

IQ.ask

Defined in

core/src/index.ts:488


cursor

cursor(options?): IQCursorChainableMethods

Sends the cursor to a particular coordinates on the screen

Parameters

Name Type
options? IQCursorOptions

Returns

IQCursorChainableMethods

Inherited from

IQ.cursor

Defined in

core/src/index.ts:443


disconnect

disconnect(): void

Will disconnect the user immediately.

Returns

void

void

Inherited from

IQ.disconnect

Defined in

core/src/index.ts:496


frame

frame(options): IQFrame

Frame instance

Parameters

Name Type Description
options IQFrameOptions An object containing the various configuration properties.

Returns

IQFrame

An instance of Menu

Inherited from

IQ.frame

Defined in

core/src/index.ts:561


gotoxy

gotoxy(x, y): void

Sends the cursor to a particular coordinates on the screen

Parameters

Name Type
x number
y number

Returns

void

Inherited from

IQ.gotoxy

Defined in

core/src/index.ts:435


logoff

logoff(): void

Returns

void

Inherited from

IQ.logoff

Defined in

core/src/index.ts:500


logout

logout(): void

Returns

void

Inherited from

IQ.logout

Defined in

core/src/index.ts:504


menu(options): IQMenu

Menu instance

Parameters

Name Type Description
options IQMenuOptions An object containing the various configuration properties.

Returns

IQMenu

An instance of Menu

Inherited from

IQ.menu

Defined in

core/src/index.ts:553


pause

pause(options?): void

Display a pause prompt on the screen.

summary This pause prompt does the usual stuff. It also provides a few helpers via its return functions.

see IQPauseOptions to learn more about the available options.

Parameters

Name Type
options? IQPauseOptions

Returns

void

Inherited from

IQ.pause

Defined in

core/src/index.ts:424


print

print(options): IBBSPrintFunctions

Prints something to the user. Parses Renegade MCI/Synchronet @- codes.

see IQPrintOptions to learn more about the available options.

example

iq.print("Display some text on the screen that can parse @ codes.").center()
iq.print("Display some text on the screen that can parse @ codes.".newlines(2).color("background red"))
iq.print("Display some text on the screen that can parse @ codes.".color("cyan")).pause()

Parameters

Name Type Description
options string | IQPrintOptions you would like to print on the screen.

Returns

IBBSPrintFunctions

Inherited from

IQ.print

Defined in

core/src/index.ts:402


say

say(options): IBBSSayFunctions

Says something to the user. Does not parse MCI/@- codes.

see IQPrintOptions to learn more about the available options.

example

iq.say("Say something to the terminal!")
iq.say("This time say something but do some cool string manipulation.".newlines(2).color("bright red").center()).pause()

Parameters

Name Type Description
options any What you would like to say on the screen.

Returns

IBBSSayFunctions

Inherited from

IQ.say

Defined in

core/src/index.ts:364


start

start(): void

Returns

void

Overrides

IQ.start

Defined in

core/src/modules/answer.ts:31


user

user(options): User

User stuff

summary It doesn’t do much right now. But it does create new users and store them in the SBBS backend.

see IUserOptions to learn more about the available options.

Parameters

Name Type Description
options IUserOptions An object containing the various configuration properties.

Returns

User

An instance of User and its return functions.

Inherited from

IQ.user

Defined in

core/src/index.ts:526


wait

wait(options?): void

Halt the screen for a specified period of time.

example iq.wait(100) wait(10) this.wait(1000)

Parameters

Name Type Description
options? number | IQWaitOptions In miliseconds

Returns

void

void

Inherited from

IQ.wait

Defined in

core/src/index.ts:477