diff --git a/src/assets/warpdrive/lua/warpcontroller/startup b/src/assets/warpdrive/lua/warpcontroller/startup index 4f2c0b3e..0ee1c41a 100644 --- a/src/assets/warpdrive/lua/warpcontroller/startup +++ b/src/assets/warpdrive/lua/warpcontroller/startup @@ -170,6 +170,11 @@ function ShowInfo() Show("Core:") Show(" x, y, z = "..X..", "..Y..", "..Z) local energy = warp.get_energy_level() + local energyMax = 1000000 + if warpcore.get_energy_max ~= nil then + energyMax = warpcore.get_energy_max() + if energyMax == nil then energyMax = 1 end + end Show(" Energy = "..math.floor(energy / 1000000).." % ("..energy.."EU)") Show(" Attached players = "..warp.get_attached_players()) Show("Dimensions:") diff --git a/src/cr0s/WarpDrive/machines/TileEntityProtocol.java b/src/cr0s/WarpDrive/machines/TileEntityProtocol.java index 984fe48b..4661a88b 100644 --- a/src/cr0s/WarpDrive/machines/TileEntityProtocol.java +++ b/src/cr0s/WarpDrive/machines/TileEntityProtocol.java @@ -50,7 +50,7 @@ public class TileEntityProtocol extends TileEntity implements IPeripheral "set_distance", "set_direction", "get_attached_players", "summon", "summon_all", "get_x", "get_y", "get_z", - "get_energy_level", "get_energy_max", "get_energy_required", + "get_energy_level", /* "get_energy_max",/**/ "do_jump", "get_ship_size", "set_beacon_frequency", @@ -58,7 +58,7 @@ public class TileEntityProtocol extends TileEntity implements IPeripheral "set_core_frequency", "is_in_space", "is_in_hyperspace", "set_target_jumpgate", - "isAttached" + "isAttached", "get_energy_required" }; private int ticks = 0;