mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-16 02:39:48 -04:00
change variable case to match others
This commit is contained in:
parent
93d72aaa59
commit
80a742c304
@ -24,8 +24,8 @@ import scala.ref.WeakReference
|
||||
class Trade(val info: TradeInfo) extends AbstractValue {
|
||||
def this() = this(new TradeInfo())
|
||||
|
||||
def this(upgrade: UpgradeTrading, merchant: IMerchant, recipeID: Int, merchantId: Int) =
|
||||
this(new TradeInfo(upgrade.host, merchant, recipeID, merchantId))
|
||||
def this(upgrade: UpgradeTrading, merchant: IMerchant, recipeID: Int, merchantID: Int) =
|
||||
this(new TradeInfo(upgrade.host, merchant, recipeID, merchantID))
|
||||
|
||||
def maxRange = Settings.get.tradingRange
|
||||
|
||||
@ -42,7 +42,7 @@ class Trade(val info: TradeInfo) extends AbstractValue {
|
||||
|
||||
@Callback(doc = "function():number -- Returns a sort index of the merchant that provides this trade")
|
||||
def getMerchantId(context: Context, arguments: Arguments): Array[AnyRef] =
|
||||
result(info.merchantId)
|
||||
result(info.merchantID)
|
||||
|
||||
@Callback(doc = "function():table, table -- Returns the items the merchant wants for this trade.")
|
||||
def getInput(context: Context, arguments: Arguments): Array[AnyRef] =
|
||||
@ -126,11 +126,11 @@ class Trade(val info: TradeInfo) extends AbstractValue {
|
||||
}
|
||||
}
|
||||
|
||||
class TradeInfo(var host: Option[EnvironmentHost], var merchant: WeakReference[IMerchant], var recipeID: Int, var merchantId: Int) {
|
||||
class TradeInfo(var host: Option[EnvironmentHost], var merchant: WeakReference[IMerchant], var recipeID: Int, var merchantID: Int) {
|
||||
def this() = this(None, new WeakReference[IMerchant](null), -1, -1)
|
||||
|
||||
def this(host: EnvironmentHost, merchant: IMerchant, recipeID: Int, merchantId: Int) =
|
||||
this(Option(host), new WeakReference[IMerchant](merchant), recipeID, merchantId)
|
||||
def this(host: EnvironmentHost, merchant: IMerchant, recipeID: Int, merchantID: Int) =
|
||||
this(Option(host), new WeakReference[IMerchant](merchant), recipeID, merchantID)
|
||||
|
||||
def recipe = merchant.get.map(_.getRecipes(null).get(recipeID).asInstanceOf[MerchantRecipe])
|
||||
|
||||
@ -148,7 +148,7 @@ class TradeInfo(var host: Option[EnvironmentHost], var merchant: WeakReference[I
|
||||
case _ => null
|
||||
})
|
||||
recipeID = nbt.getInteger("recipeID")
|
||||
merchantId = if (nbt.hasKey("merchantId")) nbt.getInteger("merchantId") else -1
|
||||
merchantID = if (nbt.hasKey("merchantID")) nbt.getInteger("merchantID") else -1
|
||||
}
|
||||
|
||||
def save(nbt: NBTTagCompound): Unit = {
|
||||
@ -173,7 +173,7 @@ class TradeInfo(var host: Option[EnvironmentHost], var merchant: WeakReference[I
|
||||
case _ =>
|
||||
}
|
||||
nbt.setInteger("recipeID", recipeID)
|
||||
nbt.setInteger("merchantId", merchantId)
|
||||
nbt.setInteger("merchantID", merchantID)
|
||||
}
|
||||
|
||||
private def loadEntity(nbt: NBTTagCompound, uuid: UUID): Option[Entity] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user