Projectile handling
This commit is contained in:
@@ -224,6 +224,32 @@
|
||||
<span class="text-gray-300">Is Throwable</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="flex items-center pt-6">
|
||||
<label class="flex items-center gap-2 cursor-pointer">
|
||||
<input type="checkbox" id="linearProjectileCheck" name="Item.IsLinearProjectile" value="true" checked="@Model.Item.IsLinearProjectile" class="w-4 h-4 rounded border-gray-600 bg-gray-800 text-indigo-600" onchange="toggleLinearFrames()" />
|
||||
<span class="text-gray-300">Linear Projectile</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Linear Projectile Frame Selection -->
|
||||
<div id="linearFramesSection" style="display: @(Model.Item.IsLinearProjectile ? "block" : "none")">
|
||||
<div class="bg-indigo-900/20 border border-indigo-700 rounded-lg p-4">
|
||||
<h3 class="text-sm font-medium text-indigo-200 mb-3">Linear Projectile Frames</h3>
|
||||
<p class="text-xs text-indigo-300 mb-4">Select the front (tip) and back (tail) frame indices from the sprite sheet. The projectile will be oriented toward its direction of travel.</p>
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label class="label">Front Frame Index</label>
|
||||
<input type="number" name="Item.ProjectileFrontFrame" value="@Model.Item.ProjectileFrontFrame" class="input" min="0" />
|
||||
<p class="text-xs text-gray-500 mt-1">Arrow tip pointing forward</p>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Back Frame Index</label>
|
||||
<input type="number" name="Item.ProjectileBackFrame" value="@Model.Item.ProjectileBackFrame" class="input" min="0" />
|
||||
<p class="text-xs text-gray-500 mt-1">Arrow tail/feathers</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Ammunition Type -->
|
||||
@@ -360,6 +386,7 @@
|
||||
}
|
||||
function toggleMaxStack() { const cb = document.getElementById('stackableCheck'); const input = document.getElementById('maxStackInput'); input.disabled = !cb.checked; if (!cb.checked) input.value = 1; }
|
||||
function toggleAmmoFields() { const cb = document.getElementById('requiresAmmoCheck'); const section = document.getElementById('ammoTypeSection'); section.style.display = cb.checked ? 'block' : 'none'; }
|
||||
function toggleLinearFrames() { const cb = document.getElementById('linearProjectileCheck'); const section = document.getElementById('linearFramesSection'); section.style.display = cb.checked ? 'block' : 'none'; }
|
||||
function updateSections() {
|
||||
const type = document.getElementById('itemType').value;
|
||||
const isEquipment = ['Weapon', 'Armor', 'Accessory'].includes(type);
|
||||
|
||||
Reference in New Issue
Block a user