Fix MAX subtype numbers

This commit is contained in:
Jakob Gillich 2020-08-26 05:05:59 +02:00
parent 51d71ed732
commit cf9e4ea194
6 changed files with 53 additions and 79 deletions

View file

@ -749,6 +749,7 @@ class AvatarActor(
s"${faction}hev_antiaircraft"
case _ => obj.Name
}
sessionActor ! SessionActor.SendResponse(
AvatarVehicleTimerMessage(
session.get.player.GUID,

View file

@ -1367,11 +1367,11 @@ object GlobalDefinitions {
def MAXArms(subtype: Int, faction: PlanetSideEmpire.Value): ToolDefinition = {
if (subtype == 1) {
AI_MAX(faction)
} else if (subtype == 2) {
AV_MAX(faction)
} else if (subtype == 3) {
AA_MAX(faction)
} else if (subtype == 2) {
AI_MAX(faction)
} else if (subtype == 3) {
AV_MAX(faction)
} else {
suppressor // there are no common pool MAX arms
}

View file

@ -29,14 +29,12 @@ class DeployableToolbox {
*/
private val categoryCounts =
DeployableCategory.values.toSeq.map(value => { value -> new DeployableToolbox.Bin }).toMap
categoryCounts(DeployableCategory.Telepads).Max = 1024
/**
* a map of bins for keeping track of the quantities of individual deployables
* keys: deployable types, values: quantity storage object
*/
private val deployableCounts = DeployedItem.values.toSeq.map(value => { value -> new DeployableToolbox.Bin }).toMap
deployableCounts(DeployedItem.router_telepad_deployable).Max = 1024
/**
* a map of tracked/owned individual deployables
@ -74,7 +72,6 @@ class DeployableToolbox {
DeployableToolbox.UpdateMaxCounts(deployableCounts, categoryCounts, certifications)
}
/**
* Determine if the given deployable can be managed by this toolbox.
* @see `Valid`
@ -457,6 +454,11 @@ object DeployableToolbox {
): Unit = {
import Certification._
counts.foreach(_._2.Max = 0)
// Placing telepads does not require ground support
counts(DeployedItem.router_telepad_deployable).Max = 1024
categories(DeployableCategory.Telepads).Max = 1024
if (certifications.contains(AdvancedEngineering)) {
counts(DeployedItem.boomer).Max = 25
counts(DeployedItem.he_mine).Max = 25
@ -521,9 +523,5 @@ object DeployableToolbox {
counts(DeployedItem.sensor_shield).Max = 20
}
}
if (certifications.contains(Certification.GroundSupport)) {
counts(DeployedItem.router_telepad_deployable).Max = 1024
categories(DeployableCategory.Telepads).Max = 1024
}
}
}

View file

@ -67,12 +67,12 @@ object InfantryLoadout {
weapon match {
case Some(item) =>
item.Definition match {
case GlobalDefinitions.trhev_burster | GlobalDefinitions.nchev_sparrow | GlobalDefinitions.vshev_starfire =>
1
case GlobalDefinitions.trhev_dualcycler | GlobalDefinitions.nchev_scattercannon |
GlobalDefinitions.vshev_quasar =>
1
case GlobalDefinitions.trhev_pounder | GlobalDefinitions.nchev_falcon | GlobalDefinitions.vshev_comet =>
2
case GlobalDefinitions.trhev_burster | GlobalDefinitions.nchev_sparrow | GlobalDefinitions.vshev_starfire =>
case GlobalDefinitions.trhev_pounder | GlobalDefinitions.nchev_falcon | GlobalDefinitions.vshev_comet =>
3
case _ =>
0
@ -99,7 +99,7 @@ object InfantryLoadout {
case ExoSuitType.Standard => 0
case ExoSuitType.Agile => 1
case ExoSuitType.Reinforced => 2
case ExoSuitType.MAX => 3 + subtype //4, 5, 6
case ExoSuitType.MAX => 3 + subtype // 4, 5, 6
case ExoSuitType.Infiltration => 7
}
}