Skip to content

Commit

Permalink
Size distance conversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
augustjohnson committed Oct 9, 2024
1 parent b27fec4 commit 7b87df2
Show file tree
Hide file tree
Showing 10 changed files with 9,936 additions and 9,940 deletions.
8 changes: 2 additions & 6 deletions api_v2/models/size.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from django.core.validators import MinValueValidator

from .abstracts import HasName
from .abstracts import distance_field
from .document import FromDocument

class Size(HasName, FromDocument):
Expand All @@ -16,9 +17,4 @@ class Size(HasName, FromDocument):
unique=True,
help_text='Ranking of the size, smallest has the lowest values.')

space_diameter = models.DecimalField(
default=0,
max_digits=10,
decimal_places=3,
validators=[MinValueValidator(0)],
help_text='Number representing the diameter of the space controlled by the object.')
space_diameter = distance_field()
2 changes: 1 addition & 1 deletion data/v2/en-publishing/mmenag/Size.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "Titanic",
"document": "mmenag",
"rank": 7,
"space_diameter": "25.000"
"space_diameter": 25.0
}
}
]
24 changes: 12 additions & 12 deletions data/v2/green-ronin/tdcs/CreatureActionAttack.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"parent": "tdcs_firetamer_scimitar",
"attack_type": "WEAPON",
"to_hit_mod": 6,
"reach_ft": 5.0,
"range_ft": null,
"long_range_ft": null,
"reach": 5.0,
"range": null,
"long_range": null,
"distance_unit": null,
"target_creature_only": false,
"damage_die_count": 1,
Expand All @@ -30,9 +30,9 @@
"parent": "tdcs_skydancer_skysail-staff",
"attack_type": "WEAPON",
"to_hit_mod": 7,
"reach_ft": 5.0,
"range_ft": null,
"long_range_ft": null,
"reach": 5.0,
"range": null,
"long_range": null,
"distance_unit": null,
"target_creature_only": false,
"damage_die_count": 1,
Expand All @@ -53,9 +53,9 @@
"parent": "tdcs_stoneguard_granite-maul",
"attack_type": "WEAPON",
"to_hit_mod": 8,
"reach_ft": 5.0,
"range_ft": null,
"long_range_ft": null,
"reach": 5.0,
"range": null,
"long_range": null,
"distance_unit": null,
"target_creature_only": false,
"damage_die_count": 2,
Expand All @@ -76,9 +76,9 @@
"parent": "tdcs_waverider_harpoon",
"attack_type": "WEAPON",
"to_hit_mod": 5,
"reach_ft": 5.0,
"range_ft": 20.0,
"long_range_ft": 60.0,
"reach": 5.0,
"range": 20.0,
"long_range": 60.0,
"distance_unit": null,
"target_creature_only": false,
"damage_die_count": 1,
Expand Down
Loading

0 comments on commit 7b87df2

Please sign in to comment.