Adding new selfReportSessionTime setting
This commit is contained in:
@@ -62,6 +62,7 @@ export function checkValidRange(
|
||||
export class BaseCMI {
|
||||
jsonString = false;
|
||||
#initialized = false;
|
||||
#start_time;
|
||||
|
||||
/**
|
||||
* Constructor for BaseCMI, just marks the class as abstract
|
||||
@@ -80,12 +81,28 @@ export class BaseCMI {
|
||||
return this.#initialized;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for #start_time
|
||||
* @return {Number}
|
||||
*/
|
||||
get start_time() {
|
||||
return this.#start_time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the API has been initialized after the CMI has been created
|
||||
*/
|
||||
initialize() {
|
||||
this.#initialized = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the player should override the 'session_time' provided by
|
||||
* the module
|
||||
*/
|
||||
setStartTime() {
|
||||
this.#start_time = new Date().getTime();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user