From 1e3e173dfeb131e250e52c4183863fe6b2923aeb Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 4 Apr 2024 13:27:43 -0400 Subject: [PATCH] Final class cleanup. --- src/engine/objects/ItemTemplate.java | 62 ++++++++++++++-------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index 5ca557f9..c581ed49 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -32,15 +32,15 @@ public class ItemTemplate { public Vector3fImmutable obj_default_alignment; public int obj_render_object; public int obj_icon; - public HashMap obj_sparse_data = new HashMap<>(); + public final HashMap obj_sparse_data = new HashMap<>(); public float combat_health_current; public float combat_health_full; - public HashMap combat_attack_resist = new HashMap<>(); + public final HashMap combat_attack_resist = new HashMap<>(); public Enum.ItemType item_type; public int item_eq_slots_value; public boolean item_eq_slots_type; - public EnumSet item_eq_slots_or = EnumSet.noneOf(Enum.EquipSlotType.class); - public EnumSet item_eq_slots_and = EnumSet.noneOf(Enum.EquipSlotType.class); + public final EnumSet item_eq_slots_or = EnumSet.noneOf(Enum.EquipSlotType.class); + public final EnumSet item_eq_slots_and = EnumSet.noneOf(Enum.EquipSlotType.class); public boolean item_takeable; public int item_value; public int item_wt; @@ -53,34 +53,34 @@ public class ItemTemplate { public String item_skill_mastery_used = ""; public int item_parry_anim_id; public float item_bulk_factor; - public HashMap item_offering_info = new HashMap<>(); + public final HashMap item_offering_info = new HashMap<>(); public int item_defense_rating; public float item_weapon_wepspeed; public float item_weapon_max_range; public int item_weapon_projectile_id; public float item_weapon_projectile_speed; public int item_weapon_combat_idle_anim; - public HashMap item_weapon_damage = new HashMap<>(); - public ArrayList weapon_attack_anim_right = new ArrayList(); - public ArrayList weapon_attack_anim_left = new ArrayList(); + public final HashMap item_weapon_damage = new HashMap<>(); + public final ArrayList weapon_attack_anim_right = new ArrayList<>(); + public final ArrayList weapon_attack_anim_left = new ArrayList<>(); public Enum.AttributeType item_primary_attr = Enum.AttributeType.None; public Enum.AttributeType item_secondary_attr = Enum.AttributeType.None; - public EnumSet item_flags = EnumSet.noneOf(Enum.ItemFlags.class); - public EnumSet item_use_flags = EnumSet.noneOf(Enum.ItemUseFlags.class); + public final EnumSet item_flags = EnumSet.noneOf(Enum.ItemFlags.class); + public final EnumSet item_use_flags = EnumSet.noneOf(Enum.ItemUseFlags.class); public int item_initial_charges; - public HashMap item_skill_required = new HashMap<>(); - public EnumSet item_race_req = EnumSet.noneOf(Enum.MonsterType.class); - public EnumSet item_race_res = EnumSet.noneOf(Enum.MonsterType.class); - public EnumSet item_class_req = EnumSet.noneOf(Enum.ClassType.class); - public EnumSet item_class_res = EnumSet.noneOf(Enum.ClassType.class); - public EnumSet item_disc_req = EnumSet.noneOf(Enum.DisciplineType.class); - public EnumSet item_disc_res = EnumSet.noneOf(Enum.DisciplineType.class); + public final HashMap item_skill_required = new HashMap<>(); + public final EnumSet item_race_req = EnumSet.noneOf(Enum.MonsterType.class); + public final EnumSet item_race_res = EnumSet.noneOf(Enum.MonsterType.class); + public final EnumSet item_class_req = EnumSet.noneOf(Enum.ClassType.class); + public final EnumSet item_class_res = EnumSet.noneOf(Enum.ClassType.class); + public final EnumSet item_disc_req = EnumSet.noneOf(Enum.DisciplineType.class); + public final EnumSet item_disc_res = EnumSet.noneOf(Enum.DisciplineType.class); public int item_level_req; public Enum.SexType item_sex_req; - public HashMap item_user_power_action = new HashMap<>(); - public HashMap item_power_grant = new HashMap<>(); - public HashMap item_power_action = new HashMap<>(); - public HashMap item_resource_cost = new HashMap<>(); + public final HashMap item_user_power_action = new HashMap<>(); + public final HashMap item_power_grant = new HashMap<>(); + public final HashMap item_power_action = new HashMap<>(); + public final HashMap item_resource_cost = new HashMap<>(); public int modTable; public int deed_type; public int deed_furniture_id; @@ -93,11 +93,11 @@ public class ItemTemplate { public float deed_namelookup_val; public boolean deed_custom_city; public int deed_structure_id; - public HashMap rune_attr_adj = new HashMap<>(); - public HashMap rune_max_attr_adj = new HashMap<>(); - public HashMap rune_skill_grant = new HashMap<>(); - public HashMap skill_granted_skills = new HashMap<>(); - public HashMap power_granted_skills = new HashMap<>(); + public final HashMap rune_attr_adj = new HashMap<>(); + public final HashMap rune_max_attr_adj = new HashMap<>(); + public final HashMap rune_skill_grant = new HashMap<>(); + public final HashMap skill_granted_skills = new HashMap<>(); + public final HashMap power_granted_skills = new HashMap<>(); public String rune_type; public String rune_sub_type; public boolean rune_is_standard_character_creation = false; @@ -115,7 +115,7 @@ public class ItemTemplate { public int rune_attack; public int rune_defense; public int rune_level; - public HashMap rune_speed = new HashMap<>(); + public final HashMap rune_speed = new HashMap<>(); public int rune_group_type; public boolean rune_group_is_faction = false; public boolean rune_group_is_guild = false; @@ -125,10 +125,10 @@ public class ItemTemplate { public int rune_group_role_set; public boolean rune_renderable = false; public int rune_natural_power_attack; - public HashMap rune_sparse_data = new HashMap<>(); - public HashMap rune_skill_adj = new HashMap<>(); - public EnumSet rune_enemy_monster_types = EnumSet.noneOf(Enum.MonsterType.class); - public EnumSet rune_not_enemy_monster_types = EnumSet.noneOf(Enum.MonsterType.class); + public final HashMap rune_sparse_data = new HashMap<>(); + public final HashMap rune_skill_adj = new HashMap<>(); + public final EnumSet rune_enemy_monster_types = EnumSet.noneOf(Enum.MonsterType.class); + public final EnumSet rune_not_enemy_monster_types = EnumSet.noneOf(Enum.MonsterType.class); public ItemTemplate(JSONObject jsonObject) {