mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-27 06:53:08 -04:00
Merge pull request #7 from repo-alt/ic2-crop-integration
Ic2 crop integration fix & upstream update
This commit is contained in:
commit
afb7f650e7
@ -2,6 +2,7 @@ sudo: false
|
||||
language: scala
|
||||
scala: 2.11.1
|
||||
jdk: oraclejdk8
|
||||
dist: trusty
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
95
build.gradle
95
build.gradle
@ -9,20 +9,21 @@ buildscript {
|
||||
name = "sonatype"
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
}
|
||||
maven {
|
||||
url = "https://jitpack.io"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
||||
classpath 'com.github.CDAGaming:ForgeGradle:1c670759c5'
|
||||
classpath 'com.github.CDAGaming:CurseGradle:184e4322fd'
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "com.matthewprenger.cursegradle" version "1.0.9"
|
||||
}
|
||||
|
||||
apply plugin: 'scala'
|
||||
apply plugin: 'forge'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'com.matthewprenger.cursegradle'
|
||||
|
||||
file "build.properties" withReader {
|
||||
def prop = new Properties()
|
||||
@ -77,6 +78,15 @@ repositories {
|
||||
name = "mightypirates"
|
||||
url = "https://maven.cil.li/"
|
||||
}
|
||||
// These are necessary because some parts of the maven repo is weirdly structured, this needs to be fixed.
|
||||
ivy {
|
||||
name 'weird maven repos'
|
||||
artifactPattern "https://maven.cil.li/[module]/[revision]/[module]-[revision].[ext]"
|
||||
}
|
||||
ivy {
|
||||
name 'weird maven repos 2'
|
||||
artifactPattern "https://maven.cil.li/[module]/[revision]/[module]-[revision]-[classifier].[ext]"
|
||||
}
|
||||
maven {
|
||||
name = "ic2"
|
||||
url = "http://maven.ic2.player.to/"
|
||||
@ -84,50 +94,49 @@ repositories {
|
||||
}
|
||||
|
||||
configurations {
|
||||
provided
|
||||
embedded
|
||||
compile.extendsFrom embedded
|
||||
implementation.extendsFrom embedded
|
||||
}
|
||||
|
||||
dependencies {
|
||||
provided "appeng:RotaryCraft:${config.rotc.version}:api"
|
||||
provided ("appeng:appliedenergistics2:${config.ae2.version}:dev") {
|
||||
compileOnly "appeng:RotaryCraft:${config.rotc.version}:api"
|
||||
compileOnly ("appeng:appliedenergistics2:${config.ae2.version}:dev") {
|
||||
exclude module: 'buildcraft'
|
||||
}
|
||||
provided "codechicken:CodeChickenLib:${config.minecraft.version}-${config.ccl.version}:dev"
|
||||
provided "codechicken:EnderStorage:${config.minecraft.version}-${config.es.version}:dev"
|
||||
provided "codechicken:ForgeMultipart:${config.minecraft.version}-${config.fmp.version}:dev"
|
||||
provided "codechicken:NotEnoughItems:${config.minecraft.version}-${config.nei.version}:dev"
|
||||
provided "codechicken:WR-CBE:${config.minecraft.version}-${config.wrcbe.version}:dev"
|
||||
provided "com.bluepowermod:BluePower:${config.bluepower.version}:deobf"
|
||||
provided "com.gregoriust.gregtech:gregtech_${config.minecraft.version}:${config.gt.version}:dev"
|
||||
provided "igwmod:IGW-Mod-1.7.10:${config.igwmod.version}:userdev"
|
||||
provided "li.cil.tis3d:TIS-3D:${config.tis3d.version}:dev"
|
||||
provided "mcp.mobius.waila:Waila:${config.waila.version}_${config.minecraft.version}:dev"
|
||||
provided "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev"
|
||||
provided "net.sengir.forestry:forestry_${config.minecraft.version}:${config.forestry.version}:dev"
|
||||
provided "dev.modwarriors.notenoughkeys:NotEnoughKeys:${config.minecraft.version}-${config.nek.version}:deobf-dev"
|
||||
provided "qmunity:QmunityLib:${config.qmunitylib.version}:deobf"
|
||||
provided "tmech:TMechworks:${config.minecraft.version}-${config.tmech.version}:deobf"
|
||||
provided ("mrtjp:ProjectRed:${config.projred.version}:dev") {
|
||||
compileOnly "codechicken:CodeChickenLib:${config.minecraft.version}-${config.ccl.version}:dev"
|
||||
compileOnly "codechicken:EnderStorage:${config.minecraft.version}-${config.es.version}:dev"
|
||||
compileOnly "codechicken:ForgeMultipart:${config.minecraft.version}-${config.fmp.version}:dev"
|
||||
compileOnly "codechicken:NotEnoughItems:${config.minecraft.version}-${config.nei.version}:dev"
|
||||
compileOnly "codechicken:WR-CBE:${config.minecraft.version}-${config.wrcbe.version}:dev"
|
||||
compileOnly "com.bluepowermod:BluePower:${config.bluepower.version}:deobf"
|
||||
compileOnly "com.gregoriust.gregtech:gregtech_${config.minecraft.version}:${config.gt.version}:dev"
|
||||
compileOnly "igwmod:IGW-Mod-1.7.10:${config.igwmod.version}:userdev"
|
||||
compileOnly "li.cil.tis3d:TIS-3D:${config.tis3d.version}:dev"
|
||||
compileOnly "mcp.mobius.waila:Waila:${config.waila.version}_${config.minecraft.version}:dev"
|
||||
compileOnly "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev"
|
||||
compileOnly "net.sengir.forestry:forestry_${config.minecraft.version}:${config.forestry.version}:dev"
|
||||
compileOnly "dev.modwarriors.notenoughkeys:NotEnoughKeys:${config.minecraft.version}-${config.nek.version}:deobf-dev"
|
||||
compileOnly "qmunity:QmunityLib:${config.qmunitylib.version}:deobf"
|
||||
compileOnly "tmech:TMechworks:${config.minecraft.version}-${config.tmech.version}:deobf"
|
||||
compileOnly ("mrtjp:ProjectRed:${config.projred.version}:dev") {
|
||||
exclude module: 'CoFHCore'
|
||||
}
|
||||
// provided "coloredlightscore:ColoredLightsCore:${config.coloredlights.version}:api"
|
||||
// compileOnly "coloredlightscore:ColoredLightsCore:${config.coloredlights.version}:api"
|
||||
|
||||
provided name: 'buildcraft', version: config.bc.version, classifier: "dev", ext: 'jar'
|
||||
provided name: 'GalacticraftCoreAll', version: config.gc.version, ext: 'jar'
|
||||
provided name: 'MekanismAll', version: config.mekanism.version, ext: 'jar'
|
||||
provided name: 'redlogic', version: config.redlogic.version, ext: 'jar'
|
||||
compileOnly name: 'buildcraft', version: config.bc.version, classifier: "dev", ext: 'jar'
|
||||
compileOnly name: 'GalacticraftCoreAll', version: config.gc.version, ext: 'jar'
|
||||
compileOnly name: 'MekanismAll', version: config.mekanism.version, ext: 'jar'
|
||||
compileOnly name: 'redlogic', version: config.redlogic.version, ext: 'jar'
|
||||
|
||||
provided name: 'CoFHLib', version: config.cofhlib.version, ext: 'jar'
|
||||
provided name: 'CoFHCore', version: config.cofhcore.version, ext: 'jar'
|
||||
provided name: 'MineFactoryReloaded', version: config.mfr.version, ext: 'jar'
|
||||
provided name: 'ComputerCraft', version: config.cc.version, ext: 'jar'
|
||||
provided name: 'EnderIO', version: config.eio.version, ext: 'jar'
|
||||
provided name: 'Railcraft', version: config.rc.version, ext: 'jar'
|
||||
provided name: 'BloodMagic', version: config.bloodmagic.version, ext: 'jar'
|
||||
provided name: 'ExtraCells', version: config.ec.version, ext: 'jar'
|
||||
provided name: 'ThaumicEnergistics', version: config.thaumicenergistics.version, ext: 'jar'
|
||||
compileOnly name: 'CoFHLib', version: config.cofhlib.version, ext: 'jar'
|
||||
compileOnly name: 'CoFHCore', version: config.cofhcore.version, ext: 'jar'
|
||||
compileOnly name: 'MineFactoryReloaded', version: config.mfr.version, ext: 'jar'
|
||||
compileOnly name: 'ComputerCraft', version: config.cc.version, ext: 'jar'
|
||||
compileOnly name: 'EnderIO', version: config.eio.version, ext: 'jar'
|
||||
compileOnly name: 'Railcraft', version: config.rc.version, ext: 'jar'
|
||||
compileOnly name: 'BloodMagic', version: config.bloodmagic.version, ext: 'jar'
|
||||
compileOnly name: 'ExtraCells', version: config.ec.version, ext: 'jar'
|
||||
compileOnly name: 'ThaumicEnergistics', version: config.thaumicenergistics.version, ext: 'jar'
|
||||
|
||||
compile 'com.google.code.findbugs:jsr305:1.3.9' // Annotations used by google libs.
|
||||
|
||||
@ -138,13 +147,6 @@ dependencies {
|
||||
testCompile "org.scalatest:scalatest_2.11:2.2.6"
|
||||
}
|
||||
|
||||
// Add the "provided" dependencies to the compile (but NOT runtime) classpath.
|
||||
sourceSets.main.compileClasspath += [configurations.provided]
|
||||
|
||||
idea.module.scopes.PROVIDED.plus += [configurations.provided]
|
||||
// TODO Causes errors on Gradle 2 for me (No such property: allDependencies for class: java.io.File).
|
||||
//eclipse.classpath.plusConfigurations += [configurations.provided]
|
||||
|
||||
minecraft {
|
||||
version = "${config.minecraft.version}-${config.forge.version}"
|
||||
|
||||
@ -259,6 +261,7 @@ curseforge {
|
||||
changelog = file("changelog.md")
|
||||
addGameVersion config.minecraft.version
|
||||
addGameVersion "Java 8"
|
||||
mainArtifact jar
|
||||
}
|
||||
}
|
||||
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=http\://services.gradle.org/distributions/gradle-2.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
|
||||
|
@ -8,6 +8,7 @@ tile.oc.adapter.name=Adapter
|
||||
tile.oc.assembler.name=Elektronik-Werkbank
|
||||
tile.oc.cable.name=Kabel
|
||||
tile.oc.capacitor.name=Kondensator
|
||||
tile.oc.carpetedCapacitor.name=Teppichkondensator
|
||||
tile.oc.case1.name=Computergehäuse (Stufe 1)
|
||||
tile.oc.case2.name=Computergehäuse (Stufe 2)
|
||||
tile.oc.case3.name=Computergehäuse (Stufe 3)
|
||||
@ -57,6 +58,7 @@ item.oc.CircuitBoard.name=Leiterplatte
|
||||
item.oc.ComponentBus0.name=Komponentenschnittstelle (Stufe 1)
|
||||
item.oc.ComponentBus1.name=Komponentenschnittstelle (Stufe 2)
|
||||
item.oc.ComponentBus2.name=Komponentenschnittstelle (Stufe 3)
|
||||
item.oc.ComponentBus3.name=Komponentenschnittstelle (Kreativ)
|
||||
item.oc.ControlUnit.name=Steuerwerk (CU)
|
||||
item.oc.CPU0.name=Hauptprozessor (CPU) (Stufe 1)
|
||||
item.oc.CPU1.name=Hauptprozessor (CPU) (Stufe 2)
|
||||
@ -201,6 +203,8 @@ oc:gui.Chat.WarningRecipes=Es gab Fehler beim Laden eines oder mehrerer Rezepte.
|
||||
oc:gui.Chat.WarningSimpleComponent=Eine Erweiterung (deine?) welche das §aSimpleComponent§f-Interface verwendet, hat etwas §efalsch gemacht§f. Komponentenlogik konnte nicht eingefügt werden. Bitte wirf einen Blick in deine Log-Datei für weitere Informationen.
|
||||
oc:gui.Drive.Managed=Managed
|
||||
oc:gui.Drive.Unmanaged=Unmanaged
|
||||
oc:gui.Drive.ReadOnlyLock=Sperre
|
||||
oc:gui.Drive.ReadOnlyLockWarning=§lNur Lesen§r Sperre. Kann nur entfernt werden, wenn das Laufwerk gelöscht wird.
|
||||
oc:gui.Drive.Warning=§lWarnung§r: Umschalten der Modi führt zum Datenverlust.
|
||||
oc:gui.Error.ComponentOverflow=Zu viele Komponenten sind mit dem Computer verbunden.
|
||||
oc:gui.Error.InternalError=Interner Fehler, bitte sieh in der Logdatei nach. Das ist wahrscheinlich ein Bug.
|
||||
@ -263,6 +267,7 @@ oc:tooltip.APU=Eine CPU mit integrierter GPU (bzw. IGP), falls du unbedingt den
|
||||
oc:tooltip.Assembler=Erlaubt die Fertigung von Robotern und weiteren Geräten aus diversen anderen Computerteilen.
|
||||
oc:tooltip.Cable=Ein billiger Weg, verschiedene Blöcke miteinander zu verbinden.
|
||||
oc:tooltip.Capacitor=Speichert Energie für spätere Verwendung. Kann extrem schnell befüllt und entleert werden.
|
||||
oc:tooltip.CarpetedCapacitor=Speichert Energie für den späteren Gebrauch. Kann sehr schnell befüllt und entleert werden. Lädt auf, wenn Schafe oder Ozelots darauf laufen.
|
||||
oc:tooltip.CardBase=Wie der Name schon sagt, werden alle Erweiterungskarten hieraus hergestellt.
|
||||
oc:tooltip.Case=Das Computergehäuse ist der essentielle Grundbaustein für einen Computer. §fErweiterungskarten§7, §fRAM§7 und §fFestplatten§7 können in einem Gehäuse installiert werden.[nl] Slots: §f%s§7
|
||||
oc:tooltip.Chamelium=Rohmaterial für 3D-Drucke. Nicht zum Verzehr geeignet: kann zu Erblindung und zeitweiligem Verlust von Präsenz führen.
|
||||
@ -286,6 +291,7 @@ oc:tooltip.DiskDrive.CC=ComputerCraft-Disketten werden §aauch unterstützt§7.
|
||||
oc:tooltip.DiskDrive=Erlaubt es, Disketten zu lesen und zu beschreiben. Kann in Robotern installiert werden, um später Disketten einlegen zu können.
|
||||
oc:tooltip.DiskDriveMountable=Funktioniert genauso wie ein normales Diskettenlaufwerk, wird aber in einem Serverschrank installiert.
|
||||
oc:tooltip.DiskUsage=Festplattennutzung: %s/%s Byte
|
||||
oc:tooltip.DiskLocked=Gesperrt von %s
|
||||
oc:tooltip.DiskModeManaged=Modus: Managed
|
||||
oc:tooltip.DiskModeUnmanaged=Modus: Unmanaged
|
||||
oc:tooltip.Drone=Drohnen sind schlichte, flinke Aufklärungseinheiten mit limitierter Inventargröße.
|
||||
|
@ -8,6 +8,7 @@ tile.oc.adapter.name=Адаптер
|
||||
tile.oc.assembler.name=Сборщик
|
||||
tile.oc.cable.name=Кабель
|
||||
tile.oc.capacitor.name=Конденсатор энергии
|
||||
tile.oc.carpetedCapacitor.name=Конденсатор с ковровым покрытием
|
||||
tile.oc.case1.name=Системный блок (1-ый уровень)
|
||||
tile.oc.case2.name=Системный блок (2-ой уровень)
|
||||
tile.oc.case3.name=Системный блок (3-ий уровень)
|
||||
@ -57,6 +58,7 @@ item.oc.CircuitBoard.name=Нетравленая печатная плата
|
||||
item.oc.ComponentBus0.name=Компонентная шина (1-ый уровень)
|
||||
item.oc.ComponentBus1.name=Компонентная шина (2-ой уровень)
|
||||
item.oc.ComponentBus2.name=Компонентная шина (3-ий уровень)
|
||||
item.oc.ComponentBus3.name=Компонентная шина (Творческая)
|
||||
item.oc.ControlUnit.name=Устройство управления (УУ)
|
||||
item.oc.CPU0.name=Центральный процессор (ЦП) (1-ый уровень)
|
||||
item.oc.CPU1.name=Центральный процессор (ЦП) (2-ой уровень)
|
||||
@ -201,6 +203,8 @@ oc:gui.Chat.WarningRecipes=Произошла ошибка при загрузк
|
||||
oc:gui.Chat.WarningSimpleComponent=Некоторый мод §eневерно§f использует интрефейс §aSimpleComponent§f. Логика компонента не смогла быть внедрена. Проверьте логи, чобы узнать подробнее.
|
||||
oc:gui.Drive.Managed=Файловый режим
|
||||
oc:gui.Drive.Unmanaged=Блочный режим
|
||||
oc:gui.Drive.ReadOnlyLock=Блокировка
|
||||
oc:gui.Drive.ReadOnlyLockWarning=Блокировка §lтолько для чтения§r. Не может быть снята, если только носитель не был стёрт.
|
||||
oc:gui.Drive.Warning=§lВнимание§r: переключение режимов очищает диск!
|
||||
oc:gui.Error.ComponentOverflow=Слишком много компонентов подключено к компьютеру.
|
||||
oc:gui.Error.InternalError=Возникла внутренняя ошибка, пожалуйста, посмотрите лог-файл. Возможно, это баг.
|
||||
@ -263,6 +267,7 @@ oc:tooltip.APU=Это процессор со встроенной видеок
|
||||
oc:tooltip.Assembler=Позволяет собирать роботов и другие устройства из ряда различных частей компьютера.
|
||||
oc:tooltip.Cable=Простой и дешёвый способ соединить компоненты между собой.
|
||||
oc:tooltip.Capacitor=Накапливает энергию для дальнейшего использования. Может быть очень быстро заполнен и опустошён.
|
||||
oc:tooltip.CarpetedCapacitor=Накапливает энергию для последующего использования. Может быть заполнен и опорожнен очень быстро. Заряжается, когда по нём гуляют овцы или оцелоты
|
||||
oc:tooltip.CardBase=Как видно из названия, это основа для всех карт расширения.
|
||||
oc:tooltip.Case=Системный блок - основа компьютера, содержащий §fкарты расширения§7, §fОЗУ§7 и §fжёсткие диски§7.[nl] Слотов: §f%s§7
|
||||
oc:tooltip.Chamelium=Базовый материал для 3D печати. Не глотать: может привести к слепоте и временным отсутствием присутствия.
|
||||
@ -286,6 +291,7 @@ oc:tooltip.DiskDrive.CC=§aПоддерживаются§7 дискеты из C
|
||||
oc:tooltip.DiskDrive=Позволяет читать и записывать дискеты. Может быть установлен в роботов, что позволит затем вставлять дискеты.
|
||||
oc:tooltip.DiskDriveMountable=Работает так же, как и обычный дисковод, но может быть вставлен только в серверную стойку.
|
||||
oc:tooltip.DiskUsage=Занято %s/%s байт
|
||||
oc:tooltip.DiskLocked=Блокирован: %s
|
||||
oc:tooltip.DiskModeManaged=Режим: файловый
|
||||
oc:tooltip.DiskModeUnmanaged=Режим: блочный
|
||||
oc:tooltip.Drone=Дроны это легкие и быстрые устройства, но с ограниченным инвентарем.
|
||||
|
@ -181,7 +181,7 @@ function text.internal.reader(txt, mode)
|
||||
}, {__index=text.internal.stream_base((mode or ""):match("b"))})
|
||||
process.closeOnExit(reader)
|
||||
|
||||
return require("buffer").new("r", reader)
|
||||
return require("buffer").new((mode or "r"):match("[rb]+"), reader)
|
||||
end
|
||||
|
||||
function text.internal.writer(ostream, mode, append_txt)
|
||||
@ -223,7 +223,7 @@ function text.internal.writer(ostream, mode, append_txt)
|
||||
}, {__index=text.internal.stream_base((mode or ""):match("b"))})
|
||||
process.closeOnExit(writer)
|
||||
|
||||
return require("buffer").new("w", writer)
|
||||
return require("buffer").new((mode or "w"):match("[awb]+"), writer)
|
||||
end
|
||||
|
||||
function text.detab(value, tabWidth)
|
||||
|
@ -47,17 +47,12 @@ end
|
||||
|
||||
function io.stream(fd,file,mode)
|
||||
checkArg(1,fd,'number')
|
||||
checkArg(2, file, "table", "string", "nil")
|
||||
assert(fd>=0,'fd must be >= 0. 0 is input, 1 is stdout, 2 is stderr')
|
||||
local dio = require("process").info().data.io
|
||||
if file then
|
||||
if type(file) == "string" then
|
||||
local result, reason = io.open(file, mode)
|
||||
if not result then
|
||||
error(reason, 2)
|
||||
end
|
||||
file = result
|
||||
elseif not io.type(file) then
|
||||
error("bad argument #1 (string or file expected, got " .. type(file) .. ")", 2)
|
||||
file = assert(io.open(file, mode))
|
||||
end
|
||||
dio[fd] = file
|
||||
end
|
||||
|
@ -54,7 +54,7 @@ local function checkDeadline()
|
||||
end
|
||||
local function pcallTimeoutCheck(...)
|
||||
local ok, timeout = ...
|
||||
if timeout == tooLongWithoutYielding then
|
||||
if rawequal(timeout, tooLongWithoutYielding) then
|
||||
return ok, tostring(tooLongWithoutYielding)
|
||||
end
|
||||
return ...
|
||||
|
@ -331,7 +331,8 @@ class Rack extends traits.PowerAcceptor with traits.Hub with traits.PowerBalance
|
||||
super.onRedstoneInputChanged(args)
|
||||
components.collect {
|
||||
case Some(mountable: RackMountable) if mountable.node != null =>
|
||||
mountable.node.sendToNeighbors("redstone.changed", args)
|
||||
val toLocalArgs = RedstoneChangedEventArgs(toLocal(args.side), args.oldValue, args.newValue, args.color)
|
||||
mountable.node.sendToNeighbors("redstone.changed", toLocalArgs)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -216,7 +216,8 @@ trait Computer extends Environment with ComponentInventory with Rotatable with B
|
||||
|
||||
override protected def onRedstoneInputChanged(args: RedstoneChangedEventArgs) {
|
||||
super.onRedstoneInputChanged(args)
|
||||
machine.node.sendToNeighbors("redstone.changed", args)
|
||||
val toLocalArgs = RedstoneChangedEventArgs(toLocal(args.side), args.oldValue, args.newValue, args.color)
|
||||
machine.node.sendToNeighbors("redstone.changed", toLocalArgs)
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
@ -18,21 +18,7 @@ public final class DriverCrop extends DriverSidedTileEntity {
|
||||
|
||||
@Override
|
||||
public ManagedEnvironment createEnvironment(World world, int x, int y, int z, ForgeDirection side) {
|
||||
ICropTile tile = (ICropTile) world.getTileEntity(x, y, z);
|
||||
if (tile.getScanLevel() < 4)
|
||||
return new DriverCrop.DummyEnvironment((ICropTile) world.getTileEntity(x, y, z));
|
||||
else
|
||||
return new DriverCrop.Environment((ICropTile) world.getTileEntity(x, y, z));
|
||||
}
|
||||
public static final class DummyEnvironment extends ManagedTileEntityEnvironment<ICropTile> {
|
||||
public DummyEnvironment(final ICropTile tileEntity) {
|
||||
super(tileEntity, "crop");
|
||||
}
|
||||
|
||||
@Callback
|
||||
public Object[] getScanLevel(final Context context, final Arguments args) {
|
||||
return new Object[]{tileEntity.getScanLevel()};
|
||||
}
|
||||
return new DriverCrop.Environment((ICropTile) world.getTileEntity(x, y, z));
|
||||
}
|
||||
public static final class Environment extends ManagedTileEntityEnvironment<ICropTile> {
|
||||
public Environment(final ICropTile tileEntity) {
|
||||
|
@ -18,10 +18,12 @@ object EventHandlerIndustrialCraft2 {
|
||||
val world = e.host.world
|
||||
val tile = world.getTileEntity(e.x, e.y, e.z) match {
|
||||
case crop : ICropTile => {
|
||||
crop.setScanLevel(4)
|
||||
val cc = crop.getCrop
|
||||
e.data += "crop:name" -> cc.name()
|
||||
e.data += "crop:tier" -> Int.box(cc.tier)
|
||||
e.data += "crop:size" -> Int.box(crop.getSize)
|
||||
e.data += "crop:maxSize" -> Int.box(cc.maxSize)
|
||||
e.data += "crop:growth" -> Int.box(crop.getGrowth)
|
||||
e.data += "crop:gain" -> Int.box(crop.getGain)
|
||||
e.data += "crop:resistance" -> Int.box(crop.getResistance)
|
||||
|
@ -382,7 +382,7 @@ object DebugCard {
|
||||
def setGameType(context: Context, args: Arguments): Array[AnyRef] =
|
||||
withPlayer(player => {
|
||||
val gametype = args.checkString(0)
|
||||
player.setGameType(GameType.values.find(_.name == gametype).getOrElse(GameType.SURVIVAL))
|
||||
player.setGameType(GameType.values.find(_.getName == gametype).getOrElse(GameType.SURVIVAL))
|
||||
null
|
||||
})
|
||||
|
||||
|
@ -83,7 +83,8 @@ class UpgradeNavigation(val host: EnvironmentHost with Rotatable) extends prefab
|
||||
Map(
|
||||
"position" -> Array(delta.xCoord, delta.yCoord, delta.zCoord),
|
||||
"redstone" -> waypoint.maxInput,
|
||||
"label" -> waypoint.label
|
||||
"label" -> waypoint.label,
|
||||
"address" -> waypoint.node.address()
|
||||
)
|
||||
}).toArray)
|
||||
}
|
||||
|
@ -158,10 +158,14 @@ object WirelessNetworkCard {
|
||||
override def getDeviceInfo: util.Map[String, String] = deviceInfo
|
||||
|
||||
override protected def isPacketAccepted(packet: Packet, distance: Double): Boolean = {
|
||||
(shouldSendWiredTraffic || distance == 0) && super.isPacketAccepted(packet, distance)
|
||||
if (distance <= maxWirelessRange && (distance > 0 || shouldSendWiredTraffic)) {
|
||||
super.isPacketAccepted(packet, distance)
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Tier2(host: EnvironmentHost) extends Tier1(host) {
|
||||
override protected def wirelessCostPerRange: Double = Settings.get.wirelessCostPerRange(Tier.Two)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user