removed export system

This commit is contained in:
2024-03-12 21:47:49 +01:00
parent 72654b1036
commit fdcb81b565
12 changed files with 2 additions and 404 deletions

View File

@@ -1,9 +1,6 @@
package kernel.peripherals;
import lib.exporter.ExportConfig;
import lib.exporter.IExportable;
class EnergyStorage implements IPeripheral implements IExportable {
class EnergyStorage implements IPeripheral {
public static inline final TYPE_NAME:String = "energyCell";
private final addr:String;
@@ -29,13 +26,4 @@ class EnergyStorage implements IPeripheral implements IExportable {
public function getType():String {
return TYPE_NAME;
}
public function export():ExportConfig {
return {
getDelegates: [
"energy" => _ -> Number(this.getEnergy()),
"capacity" => _ -> Number(this.getEnergyCapacity()),
],
}
}
}

View File

@@ -1,7 +1,5 @@
package kernel.peripherals;
import lib.exporter.ExportConfig;
import lib.exporter.IExportable;
import haxe.ds.ReadOnlyArray;
import lib.Color;
@@ -43,8 +41,7 @@ abstract BundleMask(Int) from cc.Colors.Color to cc.Colors.Color {
}
}
@:build(macros.Exporter.buildExport())
class Redstone implements IPeripheral implements IExportable {
class Redstone implements IPeripheral {
public static inline final TYPE_NAME:String = "redstone"; // TODO: there is technically not a type for redstone.
public final onChange:Signal<Noise>;
@@ -89,12 +86,10 @@ class Redstone implements IPeripheral implements IExportable {
cc.Redstone.setOutput(this.addr, on);
}
@export("output")
public inline function getOutput():Bool {
return cc.Redstone.getOutput(this.addr);
}
@export("input")
public inline function getInput():Bool {
return cc.Redstone.getInput(this.addr);
}