mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
no sin evades his gaze
This commit is contained in:
parent
a34ca12047
commit
a22faa0465
@ -11,8 +11,11 @@ import com.hbm.interfaces.IBomb;
|
|||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.weapon.sedna.factory.XFactoryCatapult;
|
import com.hbm.items.weapon.sedna.factory.XFactoryCatapult;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
import com.hbm.main.NTMSounds;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteDetector;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteDetector.BurstIntensity;
|
||||||
import com.hbm.tileentity.bomb.TileEntityLandmine;
|
import com.hbm.tileentity.bomb.TileEntityLandmine;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||||
@ -205,7 +208,8 @@ public class Landmine extends BlockContainer implements IBomb {
|
|||||||
data.setBoolean("balefire", MainRegistry.polaroidID == 11 || world.rand.nextInt(100) == 0);
|
data.setBoolean("balefire", MainRegistry.polaroidID == 11 || world.rand.nextInt(100) == 0);
|
||||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x + 0.5, y + 0.5, z + 0.5), new TargetPoint(world.provider.dimensionId, x + 0.5, y + 0.5, z + 0.5, 250));
|
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x + 0.5, y + 0.5, z + 0.5), new TargetPoint(world.provider.dimensionId, x + 0.5, y + 0.5, z + 0.5, 250));
|
||||||
|
|
||||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:weapon.mukeExplosion", 25.0F, 0.9F); // this has to be the single worst solution ever
|
SatelliteDetector.reportEvent(world, SatelliteDetector.DURATION_LOW, BurstIntensity.LOW, x + 0.5, z + 0.5);
|
||||||
|
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, NTMSounds.GUN_MINI_NUKE_EXPLOSION, 25.0F, 0.9F); // this has to be the single worst solution ever
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,8 @@ import com.hbm.explosion.ExplosionSolinium;
|
|||||||
import com.hbm.interfaces.Spaghetti;
|
import com.hbm.interfaces.Spaghetti;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteDetector;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteDetector.BurstIntensity;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
@ -141,6 +143,7 @@ public class EntityNukeExplosionMK3 extends EntityExplosionChunkloading {
|
|||||||
sol = new ExplosionSolinium((int) this.posX, (int) this.posY, (int) this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2);
|
sol = new ExplosionSolinium((int) this.posX, (int) this.posY, (int) this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SatelliteDetector.reportEvent(worldObj, SatelliteDetector.DURATION_HIGH, BurstIntensity.HIGH, posX, posZ);
|
||||||
this.did = true;
|
this.did = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,8 @@ import com.hbm.entity.effect.EntityFalloutRain;
|
|||||||
import com.hbm.explosion.ExplosionNukeGeneric;
|
import com.hbm.explosion.ExplosionNukeGeneric;
|
||||||
import com.hbm.explosion.ExplosionNukeRayBatched;
|
import com.hbm.explosion.ExplosionNukeRayBatched;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteDetector;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteDetector.BurstIntensity;
|
||||||
import com.hbm.util.ContaminationUtil;
|
import com.hbm.util.ContaminationUtil;
|
||||||
import com.hbm.util.ContaminationUtil.ContaminationType;
|
import com.hbm.util.ContaminationUtil.ContaminationType;
|
||||||
import com.hbm.util.ContaminationUtil.HazardType;
|
import com.hbm.util.ContaminationUtil.HazardType;
|
||||||
@ -74,6 +76,8 @@ public class EntityNukeExplosionMK5 extends EntityExplosionChunkloading {
|
|||||||
//} else {
|
//} else {
|
||||||
explosion = new ExplosionNukeRayBatched(worldObj, (int) posX, (int) posY, (int) posZ, strength, speed, length);
|
explosion = new ExplosionNukeRayBatched(worldObj, (int) posX, (int) posY, (int) posZ, strength, speed, length);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
SatelliteDetector.reportEvent(worldObj, SatelliteDetector.DURATION_HIGH, BurstIntensity.HIGH, posX, posZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!explosion.isComplete()) {
|
if(!explosion.isComplete()) {
|
||||||
|
|||||||
@ -24,7 +24,8 @@ public class ItemSatellite extends ItemEnumMulti implements ISatChip {
|
|||||||
PRECISION_LASER,
|
PRECISION_LASER,
|
||||||
DEATH_RAY,
|
DEATH_RAY,
|
||||||
XENIUM_RESONATOR,
|
XENIUM_RESONATOR,
|
||||||
RELAY
|
RELAY,
|
||||||
|
DETECTOR,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -33,6 +33,8 @@ import com.hbm.items.weapon.sedna.factory.XFactoryCatapult;
|
|||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.main.NTMSounds;
|
import com.hbm.main.NTMSounds;
|
||||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteDetector;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteDetector.BurstIntensity;
|
||||||
import com.hbm.util.DamageResistanceHandler.DamageClass;
|
import com.hbm.util.DamageResistanceHandler.DamageClass;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||||
@ -245,6 +247,7 @@ public class ItemGrenadeFilling extends ItemEnumMulti {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void spawnMush(EntityGrenadeUniversal grenade) {
|
public static void spawnMush(EntityGrenadeUniversal grenade) {
|
||||||
|
SatelliteDetector.reportEvent(grenade.worldObj, SatelliteDetector.DURATION_LOW, BurstIntensity.LOW, grenade.posX, grenade.posZ);
|
||||||
grenade.worldObj.playSoundEffect(grenade.posX, grenade.posY, grenade.posZ, NTMSounds.GUN_MINI_NUKE_EXPLOSION, 15.0F, 1.0F);
|
grenade.worldObj.playSoundEffect(grenade.posX, grenade.posY, grenade.posZ, NTMSounds.GUN_MINI_NUKE_EXPLOSION, 15.0F, 1.0F);
|
||||||
NBTTagCompound data = new NBTTagCompound();
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
data.setString("type", "muke");
|
data.setString("type", "muke");
|
||||||
|
|||||||
@ -33,6 +33,8 @@ import com.hbm.render.anim.AnimationEnums.GunAnimation;
|
|||||||
import com.hbm.render.anim.BusAnimation;
|
import com.hbm.render.anim.BusAnimation;
|
||||||
import com.hbm.render.anim.BusAnimationSequence;
|
import com.hbm.render.anim.BusAnimationSequence;
|
||||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteDetector;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteDetector.BurstIntensity;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@ -103,6 +105,7 @@ public class XFactoryCatapult {
|
|||||||
|
|
||||||
incrementRad(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 1.5F);
|
incrementRad(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 1.5F);
|
||||||
|
|
||||||
|
SatelliteDetector.reportEvent(bullet.worldObj, SatelliteDetector.DURATION_LOW, BurstIntensity.LOW, bullet.posX, bullet.posZ);
|
||||||
bullet.worldObj.playSoundEffect(mop.hitVec.xCoord, mop.hitVec.yCoord + 0.5, mop.hitVec.zCoord, NTMSounds.GUN_MINI_NUKE_EXPLOSION, 15.0F, 1.0F);
|
bullet.worldObj.playSoundEffect(mop.hitVec.xCoord, mop.hitVec.yCoord + 0.5, mop.hitVec.zCoord, NTMSounds.GUN_MINI_NUKE_EXPLOSION, 15.0F, 1.0F);
|
||||||
NBTTagCompound data = new NBTTagCompound();
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
data.setString("type", "muke");
|
data.setString("type", "muke");
|
||||||
@ -120,6 +123,7 @@ public class XFactoryCatapult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void spawnMush(EntityBulletBaseMK4 bullet, MovingObjectPosition mop) {
|
public static void spawnMush(EntityBulletBaseMK4 bullet, MovingObjectPosition mop) {
|
||||||
|
SatelliteDetector.reportEvent(bullet.worldObj, SatelliteDetector.DURATION_LOW, BurstIntensity.LOW, bullet.posX, bullet.posZ);
|
||||||
bullet.worldObj.playSoundEffect(mop.hitVec.xCoord, mop.hitVec.yCoord + 0.5, mop.hitVec.zCoord, NTMSounds.GUN_MINI_NUKE_EXPLOSION, 15.0F, 1.0F);
|
bullet.worldObj.playSoundEffect(mop.hitVec.xCoord, mop.hitVec.yCoord + 0.5, mop.hitVec.zCoord, NTMSounds.GUN_MINI_NUKE_EXPLOSION, 15.0F, 1.0F);
|
||||||
NBTTagCompound data = new NBTTagCompound();
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
data.setString("type", "muke");
|
data.setString("type", "muke");
|
||||||
@ -138,6 +142,7 @@ public class XFactoryCatapult {
|
|||||||
vnt.explode();
|
vnt.explode();
|
||||||
|
|
||||||
incrementRad(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 0.25F);
|
incrementRad(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 0.25F);
|
||||||
|
SatelliteDetector.reportEvent(bullet.worldObj, SatelliteDetector.DURATION_LOW, BurstIntensity.LOW, bullet.posX, bullet.posZ);
|
||||||
bullet.worldObj.playSoundEffect(mop.hitVec.xCoord, mop.hitVec.yCoord + 0.5, mop.hitVec.zCoord, NTMSounds.GUN_MINI_NUKE_EXPLOSION, 15.0F, 1.0F);
|
bullet.worldObj.playSoundEffect(mop.hitVec.xCoord, mop.hitVec.yCoord + 0.5, mop.hitVec.zCoord, NTMSounds.GUN_MINI_NUKE_EXPLOSION, 15.0F, 1.0F);
|
||||||
NBTTagCompound data = new NBTTagCompound();
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
data.setString("type", "tinytot");
|
data.setString("type", "tinytot");
|
||||||
|
|||||||
@ -48,6 +48,7 @@ import com.hbm.packet.toclient.PlayerInformPacket;
|
|||||||
import com.hbm.packet.toclient.SerializableRecipePacket;
|
import com.hbm.packet.toclient.SerializableRecipePacket;
|
||||||
import com.hbm.particle.helper.BlackPowderCreator;
|
import com.hbm.particle.helper.BlackPowderCreator;
|
||||||
import com.hbm.potion.HbmPotion;
|
import com.hbm.potion.HbmPotion;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteDetector;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineRadarNT;
|
import com.hbm.tileentity.machine.TileEntityMachineRadarNT;
|
||||||
import com.hbm.tileentity.machine.rbmk.RBMKDials;
|
import com.hbm.tileentity.machine.rbmk.RBMKDials;
|
||||||
import com.hbm.tileentity.network.RTTYSystem;
|
import com.hbm.tileentity.network.RTTYSystem;
|
||||||
@ -633,6 +634,8 @@ public class ModEventHandler {
|
|||||||
if(event.phase == Phase.START) {
|
if(event.phase == Phase.START) {
|
||||||
BossSpawnHandler.rollTheDice(world);
|
BossSpawnHandler.rollTheDice(world);
|
||||||
TimedGenerator.automaton(world, 100);
|
TimedGenerator.automaton(world, 100);
|
||||||
|
|
||||||
|
SatelliteDetector.updateSystem(world);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.hbm.tileentity.network.RTTYSystem;
|
|||||||
|
|
||||||
import api.hbm.redstoneoverradio.IRORInteractive;
|
import api.hbm.redstoneoverradio.IRORInteractive;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
@ -40,12 +41,16 @@ public abstract class SatelliteBase {
|
|||||||
this.tx = nbt.getString("tx");
|
this.tx = nbt.getString("tx");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** When a satellite is created, i.e. this frequency is occupied for the first time */
|
||||||
public void onOrbit(World world, double x, double y, double z) {
|
public void onOrbit(World world, double x, double y, double z) {
|
||||||
setTarget((int) Math.floor(x), (int) Math.floor(z));
|
setTarget((int) Math.floor(x), (int) Math.floor(z));
|
||||||
|
|
||||||
RTTYSystem.broadcast(world, CHAN_SATLINK, "Established connection to " + getType() + " at " + targetX + " / " + targetZ);
|
RTTYSystem.broadcast(world, CHAN_SATLINK, "Established connection to " + getType() + " at " + targetX + " / " + targetZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** For subsequent items sent under the same frequency as an existing satellite */
|
||||||
|
public void onPartDelivered(World world, ItemStack part) { }
|
||||||
|
|
||||||
public void onCommand(World world, String... cmd) {
|
public void onCommand(World world, String... cmd) {
|
||||||
onCommandTarget(world, cmd);
|
onCommandTarget(world, cmd);
|
||||||
onCommandImpl(world, cmd);
|
onCommandImpl(world, cmd);
|
||||||
|
|||||||
@ -0,0 +1,114 @@
|
|||||||
|
package com.hbm.saveddata.satellites;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import api.hbm.redstoneoverradio.IRORInteractive;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class SatelliteDetector extends SatelliteBase {
|
||||||
|
|
||||||
|
public List<RadiationBurst> cachedResults = new ArrayList();
|
||||||
|
|
||||||
|
public static final String CMD_SURVEY = "survey";
|
||||||
|
public static final String CMD_COUNT = "count";
|
||||||
|
public static final String CMD_GETTYPE = "gettype";
|
||||||
|
public static final String CMD_GETPOSITION = "getposition";
|
||||||
|
|
||||||
|
public SatelliteDetector() { }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getType() {
|
||||||
|
return "RAY_DETECTOR";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCommandImpl(World world, String... cmd) {
|
||||||
|
if(cmd.length <= 0) return;
|
||||||
|
|
||||||
|
if(cmd[0].equals(CMD_SURVEY)) {
|
||||||
|
cachedResults.clear();
|
||||||
|
|
||||||
|
for(RadiationBurst burst : bursts) {
|
||||||
|
if(world.provider.dimensionId == burst.dimension) cachedResults.add(burst);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cmd[0].equals(CMD_COUNT)) {
|
||||||
|
this.tx = "" + cachedResults.size();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cmd[0].equals(CMD_GETTYPE) && cmd.length == 2) {
|
||||||
|
RadiationBurst burst = getBurstFromIndex(cmd[1]);
|
||||||
|
if(burst == null) { this.tx = ""; return; }
|
||||||
|
this.tx = "" + burst.intensity.name();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cmd[0].equals(CMD_GETPOSITION) && cmd.length == 2) {
|
||||||
|
RadiationBurst burst = getBurstFromIndex(cmd[1]);
|
||||||
|
if(burst == null) { this.tx = ""; return; }
|
||||||
|
this.tx = burst.x + ";" + burst.z;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public RadiationBurst getBurstFromIndex(String cmd) {
|
||||||
|
if(cachedResults.size() <= 0) return null;
|
||||||
|
int index = IRORInteractive.parseInt(cmd, 0, cachedResults.size()) - 1;
|
||||||
|
return cachedResults.get(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<RadiationBurst> bursts = new ArrayList();
|
||||||
|
|
||||||
|
public static final int DURATION_LOW = 15 * 20;
|
||||||
|
public static final int DURATION_MEDIUM = 20 / 2;
|
||||||
|
public static final int DURATION_HIGH = 60 * 20;
|
||||||
|
|
||||||
|
public static final double INACCURACY_LOW = 10_000;
|
||||||
|
public static final double INACCURACY_MEDIUM = 2_500;
|
||||||
|
public static final double INARRCURACY_HIGH = 500;
|
||||||
|
|
||||||
|
public static void reportEvent(World world, int lifetime, BurstIntensity intensity, double x, double z) {
|
||||||
|
bursts.add(new RadiationBurst(world, lifetime, intensity, (int) Math.floor(x), (int) Math.floor(z)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void updateSystem(World world) {
|
||||||
|
|
||||||
|
bursts.removeIf(b -> {
|
||||||
|
return world.provider.dimensionId == b.dimension && world.getTotalWorldTime() > b.expiresOn;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class RadiationBurst {
|
||||||
|
|
||||||
|
public int dimension;
|
||||||
|
public long expiresOn;
|
||||||
|
public BurstIntensity intensity;
|
||||||
|
public int x;
|
||||||
|
public int z;
|
||||||
|
|
||||||
|
public RadiationBurst(World world, int lifetime, BurstIntensity intensity, int x, int z) {
|
||||||
|
this.dimension = world.provider.dimensionId;
|
||||||
|
this.expiresOn = world.getTotalWorldTime() + lifetime;
|
||||||
|
this.intensity = intensity;
|
||||||
|
this.x = x;
|
||||||
|
this.z = z;
|
||||||
|
|
||||||
|
double inaccuracy =
|
||||||
|
intensity == BurstIntensity.LOW ? INACCURACY_LOW :
|
||||||
|
intensity == BurstIntensity.MEDIUM ? INACCURACY_MEDIUM :
|
||||||
|
INARRCURACY_HIGH;
|
||||||
|
|
||||||
|
this.x += world.rand.nextGaussian() * inaccuracy;
|
||||||
|
this.z += world.rand.nextGaussian() * inaccuracy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static enum BurstIntensity {
|
||||||
|
LOW, // mini nukes, detectable for 15 seconds
|
||||||
|
MEDIUM, // particle accelerators and radar, detectable only briefly for half a second
|
||||||
|
HIGH; // full sized nukes, show up for a full minute
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,6 +3,8 @@ package com.hbm.saveddata.satellites;
|
|||||||
import com.hbm.itempool.ItemPoolsSatellite;
|
import com.hbm.itempool.ItemPoolsSatellite;
|
||||||
|
|
||||||
public class SatelliteLunarMiner extends SatelliteMiner {
|
public class SatelliteLunarMiner extends SatelliteMiner {
|
||||||
|
|
||||||
|
@Override public String getType() { return "LUNAR_MINER"; }
|
||||||
|
|
||||||
static {
|
static {
|
||||||
SatelliteMiner.registerCargo(SatelliteLunarMiner.class, ItemPoolsSatellite.POOL_SAT_LUNAR);
|
SatelliteMiner.registerCargo(SatelliteLunarMiner.class, ItemPoolsSatellite.POOL_SAT_LUNAR);
|
||||||
|
|||||||
@ -19,16 +19,17 @@ public class XSatelliteRegistry {
|
|||||||
|
|
||||||
public static void register() {
|
public static void register() {
|
||||||
|
|
||||||
registerSatellite(SatelliteMapper.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.SPY));
|
registerSatellite(SatelliteMapper.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.SPY));
|
||||||
registerSatellite(SatelliteScanner.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.SCANNER));
|
registerSatellite(SatelliteScanner.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.SCANNER));
|
||||||
registerSatellite(SatelliteRadar.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.RADAR));
|
registerSatellite(SatelliteRadar.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.RADAR));
|
||||||
registerSatellite(SatelliteDeathRay.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.DEATH_RAY));
|
registerSatellite(SatelliteDeathRay.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.DEATH_RAY));
|
||||||
registerSatellite(SatelliteResonator.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.XENIUM_RESONATOR));
|
registerSatellite(SatelliteResonator.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.XENIUM_RESONATOR));
|
||||||
registerSatellite(SatelliteRelay.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.XENIUM_RESONATOR));
|
registerSatellite(SatelliteRelay.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.XENIUM_RESONATOR));
|
||||||
registerSatellite(SatelliteMiner.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.MINER_ASTRO));
|
registerSatellite(SatelliteMiner.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.MINER_ASTRO));
|
||||||
registerSatellite(SatelliteLunarMiner.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.MINER_LUNAR));
|
registerSatellite(SatelliteLunarMiner.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.MINER_LUNAR));
|
||||||
registerSatellite(SatelliteHorizons.class, ModItems.sat_gerald);
|
registerSatellite(SatelliteHorizons.class, ModItems.sat_gerald);
|
||||||
registerSatellite(SatellitePrecisionLaser.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.PRECISION_LASER));
|
registerSatellite(SatellitePrecisionLaser.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.PRECISION_LASER));
|
||||||
|
registerSatellite(SatelliteDetector.class, new ComparableStack(ModItems.satellite, 1, EnumSatType.DETECTOR));
|
||||||
|
|
||||||
|
|
||||||
registerSatellite(SatelliteMapper.class, ModItems.sat_mapper);
|
registerSatellite(SatelliteMapper.class, ModItems.sat_mapper);
|
||||||
@ -64,13 +65,22 @@ public class XSatelliteRegistry {
|
|||||||
public static void orbit(World world, ItemStack stack, int freq, double x, double y, double z) {
|
public static void orbit(World world, ItemStack stack, int freq, double x, double y, double z) {
|
||||||
if(world.isRemote) return;
|
if(world.isRemote) return;
|
||||||
|
|
||||||
SatelliteBase sat = createFromItem(stack);
|
SatelliteSavedData data = SatelliteSavedData.getData(world);
|
||||||
|
|
||||||
if(sat != null) {
|
SatelliteBase existing = data.sats.get(freq);
|
||||||
SatelliteSavedData data = SatelliteSavedData.getData(world);
|
|
||||||
data.sats.put(freq, sat);
|
if(existing != null) {
|
||||||
sat.onOrbit(world, x, y, z);
|
existing.onPartDelivered(world, stack);
|
||||||
data.markDirty();
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
SatelliteBase sat = createFromItem(stack);
|
||||||
|
|
||||||
|
if(sat != null) {
|
||||||
|
data.sats.put(freq, sat);
|
||||||
|
sat.onOrbit(world, x, y, z);
|
||||||
|
data.markDirty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,8 @@ import com.hbm.lib.Library;
|
|||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.saveddata.SatelliteSavedData;
|
import com.hbm.saveddata.SatelliteSavedData;
|
||||||
import com.hbm.saveddata.satellites.SatelliteBase;
|
import com.hbm.saveddata.satellites.SatelliteBase;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteDetector;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteDetector.BurstIntensity;
|
||||||
import com.hbm.tileentity.IConfigurableMachine;
|
import com.hbm.tileentity.IConfigurableMachine;
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
import com.hbm.tileentity.IRadarCommandReceiver;
|
import com.hbm.tileentity.IRadarCommandReceiver;
|
||||||
@ -359,6 +361,9 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(worldObj.getTotalWorldTime() % 20 == 0)
|
||||||
|
SatelliteDetector.reportEvent(worldObj, SatelliteDetector.DURATION_MEDIUM, BurstIntensity.MEDIUM, xCoord, zCoord);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRedPower() {
|
public int getRedPower() {
|
||||||
|
|||||||
@ -10,6 +10,8 @@ import com.hbm.inventory.recipes.ParticleAcceleratorRecipes.ParticleAcceleratorR
|
|||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteDetector;
|
||||||
|
import com.hbm.saveddata.satellites.SatelliteDetector.BurstIntensity;
|
||||||
import com.hbm.tileentity.IGUIProvider;
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
import com.hbm.tileentity.machine.albion.TileEntityPASource.PAState;
|
import com.hbm.tileentity.machine.albion.TileEntityPASource.PAState;
|
||||||
import com.hbm.tileentity.machine.albion.TileEntityPASource.Particle;
|
import com.hbm.tileentity.machine.albion.TileEntityPASource.Particle;
|
||||||
@ -160,6 +162,7 @@ public class TileEntityPADetector extends TileEntityCooledBase implements IGUIPr
|
|||||||
for(EntityPlayer player : players) player.triggerAchievement(MainRegistry.achOmega12);
|
for(EntityPlayer player : players) player.triggerAchievement(MainRegistry.achOmega12);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SatelliteDetector.reportEvent(worldObj, SatelliteDetector.DURATION_MEDIUM, BurstIntensity.MEDIUM, xCoord, zCoord);
|
||||||
particle.crash(PAState.SUCCESS);
|
particle.crash(PAState.SUCCESS);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -262,7 +262,7 @@ public class TileEntityPileLoader extends TileEntityPileDeviceBase implements IS
|
|||||||
EnumPileRod rod = EnumUtil.grabEnumSafely(EnumPileRod.class, this.channelStack.getItemDamage());
|
EnumPileRod rod = EnumUtil.grabEnumSafely(EnumPileRod.class, this.channelStack.getItemDamage());
|
||||||
return "" + (int) Math.round(rod.life);
|
return "" + (int) Math.round(rod.life);
|
||||||
}
|
}
|
||||||
if(name.equals(PREFIX_VALUE + "meta")) {
|
if(name.equals(PREFIX_VALUE + "temp")) {
|
||||||
return "" + (int) Math.round(this.channelTemp);
|
return "" + (int) Math.round(this.channelTemp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3297,6 +3297,16 @@ item.sat_miner.name=Asteroiden-Förderschiff (LEGACY)
|
|||||||
item.sat_radar.name=Radar-Überwachungssatellit (LEGACY)
|
item.sat_radar.name=Radar-Überwachungssatellit (LEGACY)
|
||||||
item.sat_resonator.name=Xenium-Resonator-Satellit (LEGACY)
|
item.sat_resonator.name=Xenium-Resonator-Satellit (LEGACY)
|
||||||
item.sat_scanner.name=Satellit mit Tiefenscanning-Modul (LEGACY)
|
item.sat_scanner.name=Satellit mit Tiefenscanning-Modul (LEGACY)
|
||||||
|
item.satellite.death_ray.name=Orbitaler Todesstrahl
|
||||||
|
item.satellite.detector.name=Weitband-Emissionsdetektor-Satellit
|
||||||
|
item.satellite.miner_astro.name=Asteroiden-Förderschiff
|
||||||
|
item.satellite.miner_lunar.name=Mond-Förderschiff
|
||||||
|
item.satellite.precision_laser.name=Orbitaler Präzisionslaser
|
||||||
|
item.satellite.radar.name=Radar-Überwachungssatellit
|
||||||
|
item.satellite.relay.name=Relais-Satellit
|
||||||
|
item.satellite.scanner.name=Tiefenscan-Satellit
|
||||||
|
item.satellite.spy.name=Spionagesatellit
|
||||||
|
item.satellite.xenium_resonator.name=Xenium-Resonator-Satellit
|
||||||
item.sawblade.name=Sägeblatt
|
item.sawblade.name=Sägeblatt
|
||||||
item.schnitzel_vegan.name=Veganes Schnitzel
|
item.schnitzel_vegan.name=Veganes Schnitzel
|
||||||
item.schrabidium_axe.name=Schrabidiumaxt
|
item.schrabidium_axe.name=Schrabidiumaxt
|
||||||
|
|||||||
@ -4410,6 +4410,7 @@ item.sat_radar.name=Radar Survey Satellite (LEGACY)
|
|||||||
item.sat_resonator.name=Xenium Resonator Satellite (LEGACY)
|
item.sat_resonator.name=Xenium Resonator Satellite (LEGACY)
|
||||||
item.sat_scanner.name=Satellite with Depth-Resource Scanning Module (LEGACY)
|
item.sat_scanner.name=Satellite with Depth-Resource Scanning Module (LEGACY)
|
||||||
item.satellite.death_ray.name=Orbital Death Ray
|
item.satellite.death_ray.name=Orbital Death Ray
|
||||||
|
item.satellite.detector.name=Wideband Radio Emission Detector Satellite
|
||||||
item.satellite.miner_astro.name=Asteroid Mining Ship
|
item.satellite.miner_astro.name=Asteroid Mining Ship
|
||||||
item.satellite.miner_lunar.name=Lunar Mining Ship
|
item.satellite.miner_lunar.name=Lunar Mining Ship
|
||||||
item.satellite.precision_laser.name=Orbital Precision Laser
|
item.satellite.precision_laser.name=Orbital Precision Laser
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 467 B |
Loading…
x
Reference in New Issue
Block a user