mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Exclude weapon names and weights from comparisons.
Only the class ID matters, and the names sometimes change with new pydcs updates.
This commit is contained in:
parent
0b5bdf8151
commit
dc85644d71
@ -4,7 +4,7 @@ import datetime
|
||||
import inspect
|
||||
import logging
|
||||
from collections import defaultdict
|
||||
from dataclasses import dataclass
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Dict, Iterator, Optional, Set, Tuple, Union, cast
|
||||
|
||||
from dcs.unitgroup import FlyingGroup
|
||||
@ -21,8 +21,8 @@ class Weapon:
|
||||
"""Wraps a pydcs weapon dict in a hashable type."""
|
||||
|
||||
cls_id: str
|
||||
name: str
|
||||
weight: int
|
||||
name: str = field(compare=False)
|
||||
weight: int = field(compare=False)
|
||||
|
||||
def available_on(self, date: datetime.date) -> bool:
|
||||
introduction_year = WEAPON_INTRODUCTION_YEARS.get(self)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user