mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
mark all abstract functions abstract (#1383)
This commit is contained in:
parent
81d65e5801
commit
561318b7db
@ -211,6 +211,7 @@ export class GameState {
|
||||
/**
|
||||
* Should return the html code of the state.
|
||||
* @returns {string}
|
||||
* @abstract
|
||||
*/
|
||||
getInnerHTML() {
|
||||
abstract;
|
||||
|
@ -11,6 +11,7 @@ export class BaseSprite {
|
||||
/**
|
||||
* Returns the raw handle
|
||||
* @returns {HTMLImageElement|HTMLCanvasElement}
|
||||
* @abstract
|
||||
*/
|
||||
getRawTexture() {
|
||||
abstract;
|
||||
|
@ -29,6 +29,7 @@ export class BaseItem extends BasicSerializableObject {
|
||||
/**
|
||||
* Returns a string id of the item
|
||||
* @returns {string}
|
||||
* @abstract
|
||||
*/
|
||||
getAsCopyableKey() {
|
||||
abstract;
|
||||
@ -49,9 +50,9 @@ export class BaseItem extends BasicSerializableObject {
|
||||
|
||||
/**
|
||||
* Override for custom comparison
|
||||
* @abstract
|
||||
* @param {BaseItem} other
|
||||
* @returns {boolean}
|
||||
* @abstract
|
||||
*/
|
||||
equalsImpl(other) {
|
||||
abstract;
|
||||
@ -62,6 +63,7 @@ export class BaseItem extends BasicSerializableObject {
|
||||
* Draws the item to a canvas
|
||||
* @param {CanvasRenderingContext2D} context
|
||||
* @param {number} size
|
||||
* @abstract
|
||||
*/
|
||||
drawFullSizeOnCanvas(context, size) {
|
||||
abstract;
|
||||
@ -86,6 +88,7 @@ export class BaseItem extends BasicSerializableObject {
|
||||
* @param {number} y
|
||||
* @param {DrawParameters} parameters
|
||||
* @param {number=} diameter
|
||||
* @abstract
|
||||
*/
|
||||
drawItemCenteredImpl(x, y, parameters, diameter = globalConfig.defaultItemDiameter) {
|
||||
abstract;
|
||||
|
@ -4,6 +4,7 @@ export class Component extends BasicSerializableObject {
|
||||
/**
|
||||
* Returns the components unique id
|
||||
* @returns {string}
|
||||
* @abstract
|
||||
*/
|
||||
static getId() {
|
||||
abstract;
|
||||
|
@ -224,6 +224,7 @@ export class Entity extends BasicSerializableObject {
|
||||
/**
|
||||
* override, should draw the entity
|
||||
* @param {DrawParameters} parameters
|
||||
* @abstract
|
||||
*/
|
||||
drawImpl(parameters) {
|
||||
abstract;
|
||||
|
@ -144,6 +144,7 @@ export class GameMode extends BasicSerializableObject {
|
||||
/**
|
||||
* @param {number} w
|
||||
* @param {number} h
|
||||
* @abstract
|
||||
*/
|
||||
adjustZone(w = 0, h = 0) {
|
||||
abstract;
|
||||
|
@ -25,6 +25,7 @@ export class BaseHUDPart {
|
||||
|
||||
/**
|
||||
* Should initialize the element, called *after* the elements have been created
|
||||
* @abstract
|
||||
*/
|
||||
initialize() {
|
||||
abstract;
|
||||
|
@ -278,6 +278,7 @@ export class MetaBuilding {
|
||||
* Should setup the entity components
|
||||
* @param {Entity} entity
|
||||
* @param {GameRoot} root
|
||||
* @abstract
|
||||
*/
|
||||
setupEntityComponents(entity, root) {
|
||||
abstract;
|
||||
|
@ -92,6 +92,7 @@ export class AchievementProviderInterface {
|
||||
/**
|
||||
* Initializes the achievement provider.
|
||||
* @returns {Promise<void>}
|
||||
* @abstract
|
||||
*/
|
||||
initialize() {
|
||||
abstract;
|
||||
@ -102,6 +103,7 @@ export class AchievementProviderInterface {
|
||||
* Opportunity to do additional initialization work with the GameRoot.
|
||||
* @param {GameRoot} root
|
||||
* @returns {Promise<void>}
|
||||
* @abstract
|
||||
*/
|
||||
onLoad(root) {
|
||||
abstract;
|
||||
@ -118,6 +120,7 @@ export class AchievementProviderInterface {
|
||||
* Call to activate an achievement with the provider
|
||||
* @param {string} key - Maps to an Achievement
|
||||
* @returns {Promise<void>}
|
||||
* @abstract
|
||||
*/
|
||||
activate(key) {
|
||||
abstract;
|
||||
@ -127,6 +130,7 @@ export class AchievementProviderInterface {
|
||||
/**
|
||||
* Checks if achievements are supported in the current build
|
||||
* @returns {boolean}
|
||||
* @abstract
|
||||
*/
|
||||
hasAchievements() {
|
||||
abstract;
|
||||
|
@ -19,6 +19,7 @@ export class AdProviderInterface {
|
||||
/**
|
||||
* Returns if this provider serves ads at all
|
||||
* @returns {boolean}
|
||||
* @abstract
|
||||
*/
|
||||
getHasAds() {
|
||||
abstract;
|
||||
@ -29,6 +30,7 @@ export class AdProviderInterface {
|
||||
* Returns if it would be possible to show a video ad *now*. This can be false if for
|
||||
* example the last video ad is
|
||||
* @returns {boolean}
|
||||
* @abstract
|
||||
*/
|
||||
getCanShowVideoAd() {
|
||||
abstract;
|
||||
|
@ -11,6 +11,7 @@ export class AnalyticsInterface {
|
||||
/**
|
||||
* Initializes the analytics
|
||||
* @returns {Promise<void>}
|
||||
* @abstract
|
||||
*/
|
||||
initialize() {
|
||||
abstract;
|
||||
|
@ -11,6 +11,7 @@ export class GameAnalyticsInterface {
|
||||
/**
|
||||
* Initializes the analytics
|
||||
* @returns {Promise<void>}
|
||||
* @abstract
|
||||
*/
|
||||
initialize() {
|
||||
abstract;
|
||||
@ -43,6 +44,7 @@ export class GameAnalyticsInterface {
|
||||
/**
|
||||
* Activates a DLC
|
||||
* @param {string} dlc
|
||||
* @abstract
|
||||
*/
|
||||
activateDlc(dlc) {
|
||||
abstract;
|
||||
|
@ -13,6 +13,7 @@ export class StorageInterface {
|
||||
/**
|
||||
* Initializes the storage
|
||||
* @returns {Promise<void>}
|
||||
* @abstract
|
||||
*/
|
||||
initialize() {
|
||||
abstract;
|
||||
@ -24,6 +25,7 @@ export class StorageInterface {
|
||||
* @param {string} filename
|
||||
* @param {string} contents
|
||||
* @returns {Promise<void>}
|
||||
* @abstract
|
||||
*/
|
||||
writeFileAsync(filename, contents) {
|
||||
abstract;
|
||||
@ -34,6 +36,7 @@ export class StorageInterface {
|
||||
* Reads a string asynchronously. Returns Promise<FILE_NOT_FOUND> if file was not found.
|
||||
* @param {string} filename
|
||||
* @returns {Promise<string>}
|
||||
* @abstract
|
||||
*/
|
||||
readFileAsync(filename) {
|
||||
abstract;
|
||||
|
@ -81,6 +81,7 @@ export class PlatformWrapperInterface {
|
||||
* Attempt to open an external url
|
||||
* @param {string} url
|
||||
* @param {boolean=} force Whether to always open the url even if not allowed
|
||||
* @abstract
|
||||
*/
|
||||
openExternalLink(url, force = false) {
|
||||
abstract;
|
||||
@ -88,6 +89,7 @@ export class PlatformWrapperInterface {
|
||||
|
||||
/**
|
||||
* Attempt to restart the app
|
||||
* @abstract
|
||||
*/
|
||||
performRestart() {
|
||||
abstract;
|
||||
@ -103,6 +105,7 @@ export class PlatformWrapperInterface {
|
||||
/**
|
||||
* Should set the apps fullscreen state to the desired state
|
||||
* @param {boolean} flag
|
||||
* @abstract
|
||||
*/
|
||||
setFullscreen(flag) {
|
||||
abstract;
|
||||
@ -117,6 +120,7 @@ export class PlatformWrapperInterface {
|
||||
|
||||
/**
|
||||
* Attempts to quit the app
|
||||
* @abstract
|
||||
*/
|
||||
exitApp() {
|
||||
abstract;
|
||||
|
@ -64,6 +64,7 @@ export class BaseSetting {
|
||||
/**
|
||||
* Returns the HTML for this setting
|
||||
* @param {Application} app
|
||||
* @abstract
|
||||
*/
|
||||
getHtml(app) {
|
||||
abstract;
|
||||
@ -84,6 +85,7 @@ export class BaseSetting {
|
||||
|
||||
/**
|
||||
* Attempts to modify the setting
|
||||
* @abstract
|
||||
*/
|
||||
modify() {
|
||||
abstract;
|
||||
@ -107,6 +109,7 @@ export class BaseSetting {
|
||||
* Validates the set value
|
||||
* @param {any} value
|
||||
* @returns {boolean}
|
||||
* @abstract
|
||||
*/
|
||||
validate(value) {
|
||||
abstract;
|
||||
|
@ -48,6 +48,7 @@ export class BaseDataType {
|
||||
/**
|
||||
* Serializes a given raw value
|
||||
* @param {any} value
|
||||
* @abstract
|
||||
*/
|
||||
serialize(value) {
|
||||
abstract;
|
||||
@ -68,6 +69,7 @@ export class BaseDataType {
|
||||
* @param {object} targetObject
|
||||
* @param {string|number} targetKey
|
||||
* @returns {string|void} String error code or null on success
|
||||
* @abstract
|
||||
*/
|
||||
deserialize(value, targetObject, targetKey, root) {
|
||||
abstract;
|
||||
@ -92,6 +94,7 @@ export class BaseDataType {
|
||||
|
||||
/**
|
||||
* INTERNAL Should return the json schema representation
|
||||
* @abstract
|
||||
*/
|
||||
getAsJsonSchemaUncached() {
|
||||
abstract;
|
||||
@ -131,6 +134,7 @@ export class BaseDataType {
|
||||
|
||||
/**
|
||||
* Should return a cacheable key
|
||||
* @abstract
|
||||
*/
|
||||
getCacheKey() {
|
||||
abstract;
|
||||
|
Loading…
Reference in New Issue
Block a user