mirror of
https://github.com/GTNewHorizons/gendustry.git
synced 2026-11-26 06:53:05 +00:00
Added biome emulation upgrades and genetic stabilizer upgrade. Hell upgrade recipe changed.
This commit is contained in:
1 parent
1b676598a3
commit
b1a50d1f13
16 files changed
+106
-35
No files matched your search
+1
-1
@@ -19,7 +19,7 @@ apply plugin: 'forge'
|
||||
apply plugin: 'scala'
|
||||
|
||||
version = "1.0.4"
|
||||
ext.bdlibver = "1.2.0.35"
|
||||
ext.bdlibver = "1.2.0.36"
|
||||
ext.versuffix = "mc164"
|
||||
|
||||
if (project.hasProperty('buildnum')) {
|
||||
|
||||
@@ -44,25 +44,35 @@ SRS => gendustry:PowerModule
|
||||
AGA
|
||||
|
||||
Q = I:netherquartz
|
||||
L = I:dyePowder@4 // Lapis
|
||||
|
||||
|
||||
ifMod "BuildCraft|Silicon" {
|
||||
Y = buildcraft.BuildCraftSilicon[redstoneChipset] @ 4 // BC has no proper item interface?
|
||||
Y = buildcraft.BuildCraftSilicon[redstoneChipset] @ 4 // Pulsating
|
||||
Z = buildcraft.BuildCraftSilicon[redstoneChipset] @ 2 // Golden
|
||||
|
||||
DQD
|
||||
QYQ => gendustry:GeneticsProcessor
|
||||
DQD
|
||||
|
||||
DLD
|
||||
LZL => gendustry:EnvProcessor
|
||||
DLD
|
||||
|
||||
// alternative recipe, cheaper but takes a lot of power
|
||||
assembly: D*2, Y, Q*2, 100000 mj => gendustry:GeneticsProcessor
|
||||
assembly: D*2, Z, L*2, 150000 mj => gendustry:EnvProcessor
|
||||
} else {
|
||||
Y = I:enderPearl
|
||||
|
||||
DQD
|
||||
RYR => gendustry:GeneticsProcessor
|
||||
DQD
|
||||
}
|
||||
|
||||
DLD
|
||||
LGL => gendustry:EnvProcessor
|
||||
DLD
|
||||
}
|
||||
|
||||
TgT
|
||||
R_R => gendustry:UpgradeFrame
|
||||
@@ -181,12 +191,6 @@ BJB
|
||||
SXS => gendustry:"upgrade.prod"
|
||||
BAB
|
||||
|
||||
Z = I:blazePowder
|
||||
|
||||
AZA
|
||||
QXQ => gendustry:"upgrade.hell"
|
||||
AZA
|
||||
|
||||
F = I:fermentedSpiderEye
|
||||
|
||||
FLF
|
||||
@@ -197,11 +201,35 @@ I_I
|
||||
_X_ => gendustry:"upgrade.territory"
|
||||
I_I
|
||||
|
||||
_Z_
|
||||
RXR => gendustry:"upgrade.stabilizer"
|
||||
_R_
|
||||
|
||||
L = gendustry:ClimateModule
|
||||
R = I:reeds
|
||||
S = B:sand
|
||||
N = B:hellrock
|
||||
O = I:snowball
|
||||
Z = I:blazePowder
|
||||
E = gendustry:EnvProcessor
|
||||
V = B:vine
|
||||
s = B:grass
|
||||
|
||||
ALA
|
||||
ZXZ => gendustry:"upgrade.hell"
|
||||
AEA
|
||||
|
||||
ALA
|
||||
SXS => gendustry:"upgrade.desert"
|
||||
AEA
|
||||
|
||||
ALA
|
||||
VXV => gendustry:"upgrade.jungle"
|
||||
AEA
|
||||
|
||||
ALA
|
||||
sXs => gendustry:"upgrade.plains"
|
||||
AEA
|
||||
|
||||
SSS
|
||||
BXB => gendustry:"upgrade.dryer"
|
||||
|
||||
@@ -156,8 +156,9 @@ cfg Upgrades {
|
||||
// id is used in saves, changing it will brake any upgrades that already exist
|
||||
// max is the maximum number installed in a single apiary
|
||||
// valid modifiers:
|
||||
// * Boolean: sealed, selfLighted, sunlightSimulated, hellish, automated, collectingPollen
|
||||
// * Boolean: sealed, selfLighted, sunlightSimulated, automated, collectingPollen
|
||||
// * Numeric: lifespan, territory, mutation, production, flowering, geneticDecay, energy, temperature, humidity
|
||||
// * String: biomeOverride
|
||||
|
||||
cfg prod {
|
||||
id = 0
|
||||
@@ -240,7 +241,7 @@ cfg Upgrades {
|
||||
id = 13
|
||||
max = 1
|
||||
energy *= 1.5
|
||||
hellish = Y
|
||||
biomeOverride = Hell
|
||||
}
|
||||
|
||||
cfg auto {
|
||||
@@ -256,6 +257,34 @@ cfg Upgrades {
|
||||
energy *= 1.25
|
||||
collectingPollen = Y
|
||||
}
|
||||
|
||||
cfg desert {
|
||||
id = 16
|
||||
max = 1
|
||||
energy *= 1.20
|
||||
biomeOverride = Desert
|
||||
}
|
||||
|
||||
cfg plains {
|
||||
id = 17
|
||||
max = 1
|
||||
energy *= 1.20
|
||||
biomeOverride = Plains
|
||||
}
|
||||
|
||||
cfg jungle {
|
||||
id = 18
|
||||
max = 1
|
||||
energy *= 1.20
|
||||
biomeOverride = Jungle
|
||||
}
|
||||
|
||||
cfg stabilizer {
|
||||
id = 19
|
||||
max = 1
|
||||
energy *= 2
|
||||
geneticDecay *= 0
|
||||
}
|
||||
}
|
||||
|
||||
cfg Power {
|
||||
|
||||
@@ -15,6 +15,7 @@ item.gendustry.MutagenTank.name=Mutagen Tank
|
||||
item.gendustry.BeeReceptacle.name=Bee Receptacle
|
||||
item.gendustry.PowerModule.name=Power Module
|
||||
item.gendustry.GeneticsProcessor.name=Genetics Processor
|
||||
item.gendustry.EnvProcessor.name=Enviromental Processor
|
||||
item.gendustry.UpgradeFrame.name=Upgrade Frame
|
||||
item.gendustry.ClimateModule.name=Climate Control Module
|
||||
item.gendustry.Labware.name=Genetics Labware
|
||||
@@ -53,13 +54,17 @@ gendustry.upgrades.territory.name=Territory Upgrade
|
||||
gendustry.upgrades.sealing.name=Seal Upgrade
|
||||
gendustry.upgrades.light.name=Light Upgrade
|
||||
gendustry.upgrades.sky.name=Open Sky Upgrade
|
||||
gendustry.upgrades.hell.name=Hell Upgrade
|
||||
gendustry.upgrades.hell.name=Hell Emulation Upgrade
|
||||
gendustry.upgrades.auto.name=Automation Upgrade
|
||||
gendustry.upgrades.humidifier.name=Humidifier Upgrade
|
||||
gendustry.upgrades.dryer.name=Dryer Upgrade
|
||||
gendustry.upgrades.heater.name=Heater Upgrade
|
||||
gendustry.upgrades.sieve.name=Sieve Upgrade
|
||||
gendustry.upgrades.cooler.name=Cooler Upgrade
|
||||
gendustry.upgrades.desert.name=Desert Emulation Upgrade
|
||||
gendustry.upgrades.plains.name=Plains Emulation Upgrade
|
||||
gendustry.upgrades.jungle.name=Jungle Emulation Upgrade
|
||||
gendustry.upgrades.stabilizer.name=Genetic Stabilizer Upgrade
|
||||
|
||||
# ==== GUI AND TOOLTIPS ====
|
||||
|
||||
@@ -86,7 +91,7 @@ gendustry.label.mutatron.death=Death chance (ignoble): %s%%
|
||||
gendustry.label.mutatron.degrade=Degrade chance (pristine): %s%%
|
||||
|
||||
gendustry.label.mod.automated=* Automation
|
||||
gendustry.label.mod.hellish=* Hell Environment Simulation
|
||||
gendustry.label.mod.biome=* Biome Override: %s
|
||||
gendustry.label.mod.sealed=* Rain Protection
|
||||
gendustry.label.mod.selflighted=* Internal Lighting
|
||||
gendustry.label.mod.sky=* Open Sky Simulation
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 618 B |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 939 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 994 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
@@ -9,6 +9,8 @@
|
||||
|
||||
package net.bdew.gendustry.api;
|
||||
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
public class ApiaryModifiers {
|
||||
public float territory = 1;
|
||||
|
||||
@@ -29,10 +31,11 @@ public class ApiaryModifiers {
|
||||
public boolean isSealed = false;
|
||||
public boolean isSelfLighted = false;
|
||||
public boolean isSunlightSimulated = false;
|
||||
public boolean isHellish = false;
|
||||
public boolean isAutomated = false;
|
||||
public boolean isCollectingPollen = false;
|
||||
|
||||
public BiomeGenBase biomeOverride = null;
|
||||
|
||||
public float energy = 1;
|
||||
|
||||
public float temperature = 0;
|
||||
|
||||
@@ -32,6 +32,7 @@ object Items extends ItemManager(Config.IDs) {
|
||||
regSimpleItem("BeeReceptacle")
|
||||
regSimpleItem("PowerModule")
|
||||
regSimpleItem("GeneticsProcessor")
|
||||
regSimpleItem("EnvProcessor")
|
||||
regSimpleItem("UpgradeFrame")
|
||||
regSimpleItem("ClimateModule")
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ with IBeeHousing {
|
||||
def isSealed = mods.isSealed
|
||||
def isSelfLighted = mods.isSelfLighted
|
||||
def isSunlightSimulated = mods.isSunlightSimulated
|
||||
def isHellish = mods.isHellish
|
||||
def isHellish = mods.biomeOverride == BiomeGenBase.hell
|
||||
|
||||
// IBeeHousing
|
||||
def setQueen(itemstack: ItemStack) = setInventorySlotContents(0, itemstack)
|
||||
@@ -216,19 +216,21 @@ with IBeeHousing {
|
||||
def getDrone = getStackInSlot(slots.drone)
|
||||
def canBreed = true
|
||||
|
||||
def getModifiedBiome = if (mods.biomeOverride == null) getBiome else mods.biomeOverride
|
||||
|
||||
// IHousing
|
||||
def setErrorState(state: Int) = errorState := state
|
||||
def getOwnerName = owner
|
||||
def getXCoord = xCoord
|
||||
def getYCoord = yCoord
|
||||
def getZCoord = zCoord
|
||||
def getBiomeId = if (mods.isHellish) BiomeGenBase.hell.biomeID else getBiome.biomeID
|
||||
def getTemperature: EnumTemperature = {
|
||||
if (mods.isHellish || EnumTemperature.isBiomeHellish(getBiome.biomeID))
|
||||
return EnumTemperature.HELLISH
|
||||
return EnumTemperature.getFromValue(getBiome.temperature + mods.temperature)
|
||||
}
|
||||
def getHumidity = EnumHumidity.getFromValue(getBiome.rainfall + mods.humidity)
|
||||
def getBiomeId = getModifiedBiome.biomeID
|
||||
def getTemperature =
|
||||
if (EnumTemperature.isBiomeHellish(getModifiedBiome))
|
||||
EnumTemperature.HELLISH
|
||||
else
|
||||
EnumTemperature.getFromValue(getModifiedBiome.temperature + mods.temperature)
|
||||
def getHumidity = EnumHumidity.getFromValue(getModifiedBiome.rainfall + mods.humidity)
|
||||
def getErrorOrdinal = errorState
|
||||
def addProduct(product: ItemStack, all: Boolean): Boolean = {
|
||||
var p = product
|
||||
|
||||
@@ -45,8 +45,8 @@ class ItemApiaryUpgrade(id: Int) extends Item(id) with IApiaryUpgrade {
|
||||
|
||||
if (mods.isAutomated)
|
||||
l.add(Misc.toLocal(Gendustry.modId + ".label.mod.automated"))
|
||||
if (mods.isHellish)
|
||||
l.add(Misc.toLocal(Gendustry.modId + ".label.mod.hellish"))
|
||||
if (mods.biomeOverride != null)
|
||||
l.add(Misc.toLocalF(Gendustry.modId + ".label.mod.biome", mods.biomeOverride.biomeName))
|
||||
if (mods.isSealed)
|
||||
l.add(Misc.toLocal(Gendustry.modId + ".label.mod.sealed"))
|
||||
if (mods.isSelfLighted)
|
||||
|
||||
@@ -15,6 +15,7 @@ import net.bdew.gendustry.config.{Items, Tuning}
|
||||
import net.bdew.lib.recipes.gencfg.{EntryStr, ConfigSection}
|
||||
import cpw.mods.fml.common.registry.GameRegistry
|
||||
import net.minecraft.item.ItemStack
|
||||
import net.bdew.lib.Misc
|
||||
|
||||
object Upgrades {
|
||||
val map = collection.mutable.Map.empty[Int, Upgrade]
|
||||
@@ -27,7 +28,7 @@ object Upgrades {
|
||||
}
|
||||
}
|
||||
|
||||
def makeMod(upg: String, n: String, e: EntryModifier): ModFunc = {
|
||||
def makeNumMod(upg: String, n: String, e: EntryModifier): ModFunc = {
|
||||
val calc: (Float, Int) => Float = e match {
|
||||
case EntryModifierAdd(v) => (x, n) => x + v * n
|
||||
case EntryModifierSub(v) => (x, n) => x - v * n
|
||||
@@ -48,14 +49,16 @@ object Upgrades {
|
||||
}
|
||||
}
|
||||
|
||||
def makeBoolMod(upg: String, n: String, b: Boolean): ModFunc = n match {
|
||||
case "sealed" => (a, n) => a.isSealed = b
|
||||
case "selfLighted" => (a, n) => a.isSelfLighted = b
|
||||
case "sunlightSimulated" => (a, n) => a.isSunlightSimulated = b
|
||||
case "hellish" => (a, n) => a.isHellish = b
|
||||
case "automated" => (a, n) => a.isAutomated = b
|
||||
case "collectingPollen" => (a, n) => a.isCollectingPollen = b
|
||||
case x => sys.error("Unknown boolean upgrade modifier '%s' in upgrade '%s'".format(x, upg))
|
||||
def str2bool(s: String) = Tuning.trueVals.contains(s.toLowerCase)
|
||||
|
||||
def makeStrMod(upg: String, n: String, v: String): ModFunc = n match {
|
||||
case "sealed" => (a, n) => a.isSealed = str2bool(v)
|
||||
case "selfLighted" => (a, n) => a.isSelfLighted = str2bool(v)
|
||||
case "sunlightSimulated" => (a, n) => a.isSunlightSimulated = str2bool(v)
|
||||
case "automated" => (a, n) => a.isAutomated = str2bool(v)
|
||||
case "collectingPollen" => (a, n) => a.isCollectingPollen = str2bool(v)
|
||||
case "biomeOverride" => (a, n) => a.biomeOverride = Misc.getBiomeByName(v)
|
||||
case x => sys.error("Unknown string upgrade modifier '%s' in upgrade '%s'".format(x, upg))
|
||||
}
|
||||
|
||||
def init() {
|
||||
@@ -63,8 +66,8 @@ object Upgrades {
|
||||
val id = sect.getInt("id")
|
||||
val max = sect.getInt("max")
|
||||
val mods = sect.flatMap({
|
||||
case (pname, EntryStr(_)) => Some(makeBoolMod(name, pname, sect.getBoolean(pname)))
|
||||
case (pname, x: EntryModifier) => Some(makeMod(name, pname, x))
|
||||
case (pname, EntryStr(v)) => Some(makeStrMod(name, pname, v))
|
||||
case (pname, x: EntryModifier) => Some(makeNumMod(name, pname, x))
|
||||
case ("id", _) | ("max", _) => None
|
||||
case (pname, v) => sys.error("Unknown upgrade modifier '%s' - %s in upgrade '%s'".format(pname, v, name))
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user