You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
812 B
28 lines
812 B
// @ts-nocheck
|
|
const METADATA = {
|
|
website: "https://tobspr.io",
|
|
author: "tobspr",
|
|
name: "Mod Example: Modify existing building",
|
|
version: "1",
|
|
id: "modify-existing-building",
|
|
description: "Shows how to modify an existing building",
|
|
minimumGameVersion: ">=1.5.0",
|
|
};
|
|
|
|
class Mod extends shapez.Mod {
|
|
init() {
|
|
// Make Rotator always unlocked
|
|
this.modInterface.replaceMethod(shapez.MetaRotaterBuilding, "getIsUnlocked", function () {
|
|
return true;
|
|
});
|
|
|
|
// Add some custom stats to the info panel when selecting the building
|
|
this.modInterface.replaceMethod(shapez.MetaRotaterBuilding, "getAdditionalStatistics", function (
|
|
root,
|
|
variant
|
|
) {
|
|
return [["Awesomeness", 5]];
|
|
});
|
|
}
|
|
}
|