Bug fixes & core version bump
Bumped core version due to interfaces changes Fixed cloaking lua script due to cleanup (frequency isn't needed) Fixed radar ping script (it would never find anything) Improved radar scripts to accept any radar connection Fixed laser lift pushing down entities already on the ground Fixed laser lift laser effect
This commit is contained in:
parent
c908bd03f5
commit
1c3f8c7807
6 changed files with 60 additions and 39 deletions
|
@ -18,7 +18,6 @@ if warp == nil then
|
|||
term.setTextColor(colors.white)
|
||||
term.write("No cloak core detected")
|
||||
else
|
||||
warp.setFieldFrequency(1337)
|
||||
warp.setFieldTier(0)
|
||||
warp.enableCloakingField()
|
||||
if warp.isAssemblyValid() then
|
||||
|
|
|
@ -18,7 +18,6 @@ if warp == nil then
|
|||
term.setTextColor(colors.white)
|
||||
term.write("No cloak core detected")
|
||||
else
|
||||
warp.setFieldFrequency(1337)
|
||||
warp.setFieldTier(2)
|
||||
warp.enableCloakingField()
|
||||
if warp.isAssemblyValid() then
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
side = "bottom"
|
||||
if not term.isColor() then
|
||||
print("Advanced computer required")
|
||||
exit()
|
||||
end
|
||||
|
||||
sides = peripheral.getNames()
|
||||
mininglasers = {}
|
||||
for key,side in pairs(sides) do
|
||||
if peripheral.getType(side) == "radar" then
|
||||
print("Wrapping " .. side)
|
||||
radar = peripheral.wrap(side)
|
||||
end
|
||||
end
|
||||
|
||||
local argv = { ... }
|
||||
if #argv ~= 1 then
|
||||
|
@ -13,10 +25,8 @@ if radius < 1 or radius > 9999 then
|
|||
return
|
||||
end
|
||||
|
||||
radar = peripheral.wrap(side)
|
||||
|
||||
if radar.getEnergyLevel() < radius * radius then
|
||||
print("Low energy level. Sasaj")
|
||||
print("Low energy level...")
|
||||
return
|
||||
end
|
||||
radar.scanRadius(radius)
|
||||
|
@ -25,17 +35,18 @@ sleep(2)
|
|||
print("Scanning...")
|
||||
|
||||
local seconds = 2
|
||||
local count = nil
|
||||
repeat
|
||||
local count = radar.getResultsCount()
|
||||
sleep(1)
|
||||
seconds = seconds + 1
|
||||
count = radar.getResultsCount()
|
||||
sleep(1)
|
||||
seconds = seconds + 1
|
||||
until count ~= nil or seconds > 10
|
||||
print("took "..seconds.." seconds")
|
||||
|
||||
if count ~= nil then
|
||||
for i=0, count-1 do
|
||||
freq, x, y, z = radar.getResult(i)
|
||||
print("Shit: "..freq.." ("..x.. " " .. y .. " " .. z .. ")")
|
||||
print("Ship '"..freq.."' @ ("..x.. " " .. y .. " " .. z .. ")")
|
||||
end
|
||||
else
|
||||
print("Nothing is found =(")
|
||||
|
|
|
@ -1,43 +1,55 @@
|
|||
radar = peripheral.wrap("bottom")
|
||||
radius = 500
|
||||
scale = 50
|
||||
|
||||
if not term.isColor() then
|
||||
print("Advanced computer required")
|
||||
exit()
|
||||
end
|
||||
|
||||
sides = peripheral.getNames()
|
||||
mininglasers = {}
|
||||
for key,side in pairs(sides) do
|
||||
if peripheral.getType(side) == "radar" then
|
||||
print("Wrapping " .. side)
|
||||
radar = peripheral.wrap(side)
|
||||
end
|
||||
end
|
||||
|
||||
w, h = term.getSize()
|
||||
|
||||
term.clear()
|
||||
|
||||
function colorScreen(color)
|
||||
for a = 2,w-1 do
|
||||
for b = 1,h do
|
||||
paintutils.drawPixel(a,b,color)
|
||||
end
|
||||
for b = 1,h do
|
||||
paintutils.drawPixel(a,b,color)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function textOut(x, y, text, fg, bg)
|
||||
term.setCursorPos(x, y)
|
||||
term.setTextColor(fg)
|
||||
term.setBackgroundColor(bg)
|
||||
term.write(text)
|
||||
local xt,yt = term.getCursorPos()
|
||||
term.setCursorPos(1, yt + 1)
|
||||
term.setCursorPos(x, y)
|
||||
term.setTextColor(fg)
|
||||
term.setBackgroundColor(bg)
|
||||
term.write(text)
|
||||
local xt,yt = term.getCursorPos()
|
||||
term.setCursorPos(1, yt + 1)
|
||||
end
|
||||
|
||||
function translateXZ(oldX, oldZ, i)
|
||||
local x = radarX - oldX
|
||||
local z = radarZ - oldZ
|
||||
|
||||
x = x / (radius / scale)
|
||||
z = z / (radius / scale)
|
||||
|
||||
x = x + (w / 2)
|
||||
z = z + (h / 2)
|
||||
|
||||
|
||||
x = math.floor(x);
|
||||
z = math.floor(z);
|
||||
|
||||
return x,z
|
||||
local x = radarX - oldX
|
||||
local z = radarZ - oldZ
|
||||
|
||||
x = x / (radius / scale)
|
||||
z = z / (radius / scale)
|
||||
|
||||
x = x + (w / 2)
|
||||
z = z + (h / 2)
|
||||
|
||||
x = math.floor(x);
|
||||
z = math.floor(z);
|
||||
|
||||
return x,z
|
||||
end
|
||||
|
||||
function drawContact(x, y, z, name, color)
|
||||
|
@ -94,8 +106,8 @@ end
|
|||
|
||||
mrun = true
|
||||
while (mrun) do
|
||||
radarX, radarY, radarZ = radar.pos();
|
||||
scanAndDraw();
|
||||
radarX, radarY, radarZ = radar.pos();
|
||||
scanAndDraw();
|
||||
end
|
||||
|
||||
term.clear();
|
||||
|
|
|
@ -117,13 +117,13 @@ public class TileEntityLift extends WarpEnergyTE implements IPeripheral {
|
|||
}
|
||||
}
|
||||
} else if (mode == MODE_DOWN) {
|
||||
AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(xmin, firstUncoveredY + 2, zmin, xmax, yCoord + 2, zmax);
|
||||
AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(xmin, firstUncoveredY + 3, zmin, xmax, yCoord + 2, zmax);
|
||||
List list = worldObj.getEntitiesWithinAABBExcludingEntity(null, aabb);
|
||||
if (list != null) {
|
||||
for (Object o : list) {
|
||||
if (o != null && o instanceof EntityLivingBase && consumeEnergy(WarpDriveConfig.LL_LIFT_ENERGY, true)) {
|
||||
((EntityLivingBase)o).setPositionAndUpdate(xCoord + 0.5f, firstUncoveredY + 1, zCoord + 0.5f);
|
||||
WarpDrive.sendLaserPacket(worldObj, new Vector3(this).translate(0.5), new Vector3(xCoord, firstUncoveredY + 1, zCoord).translate(0.5), 1F, 1F, 0F, 40, 0, 100);
|
||||
WarpDrive.sendLaserPacket(worldObj, new Vector3(this).translate(0.5), new Vector3(xCoord, firstUncoveredY + 0.5, zCoord).translate(0.5), 1F, 1F, 0F, 40, 0, 100);
|
||||
worldObj.playSoundEffect(xCoord + 0.5f, yCoord, zCoord + 0.5f, "warpdrive:hilaser", 4F, 1F);
|
||||
consumeEnergy(WarpDriveConfig.LL_LIFT_ENERGY, true);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public class WCDummyContainer extends DummyModContainer
|
|||
ModMetadata meta = getMetadata();
|
||||
meta.modId = "WarpDriveCore";
|
||||
meta.name = "WarpDriveCore";
|
||||
meta.version = "1.0.0.2";
|
||||
meta.version = "1.0.0.3";
|
||||
meta.credits = "Cr0s";
|
||||
meta.authorList = Arrays.asList("cr0s");
|
||||
meta.description = "";
|
||||
|
|
Loading…
Reference in a new issue