feat: ability to drag and drop charges (#124)
This commit is contained in:
@@ -72,6 +72,7 @@ const ModuleGroup = (props: { level: number; group: ListingGroup; hideGroup?: bo
|
||||
level={2}
|
||||
content={item.name}
|
||||
onClick={() => shipSnapShot.addCharge(item.typeId)}
|
||||
onDragStart={onItemDragStart(item.typeId, "charge")}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
|
||||
@@ -181,6 +181,11 @@ export const Slot = (props: { type: string; index: number; fittable: boolean; ma
|
||||
return;
|
||||
}
|
||||
|
||||
if (draggedSlotType === "charge") {
|
||||
shipSnapshot.addCharge(draggedTypeId, esiFlag);
|
||||
return;
|
||||
}
|
||||
|
||||
const isValidSlotGroup = draggedSlotType === esiFlagType;
|
||||
if (!isValidSlotGroup) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user