mirror of
https://github.com/wanderer-industries/wanderer
synced 2026-04-21 01:57:58 +00:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ffe95c1ed | ||
|
|
b85ffed19f | ||
|
|
b58db01f64 | ||
|
|
ae50070e70 | ||
|
|
6e9bbd231f | ||
|
|
a86d47ac04 | ||
|
|
34f1d0fa8d | ||
|
|
39b1d09753 | ||
|
|
3d675aa10c | ||
|
|
cb66b73337 | ||
|
|
601bb81724 | ||
|
|
22ae774127 | ||
|
|
6dc0890def | ||
|
|
ab41b38f12 | ||
|
|
3f9eff0d33 | ||
|
|
8e5ed22bc0 |
33
CHANGELOG.md
33
CHANGELOG.md
@@ -2,6 +2,39 @@
|
||||
|
||||
<!-- changelog -->
|
||||
|
||||
## [v1.100.0](https://github.com/wanderer-industries/wanderer/compare/v1.99.1...v1.100.0) (2026-04-17)
|
||||
|
||||
|
||||
|
||||
|
||||
### Features:
|
||||
|
||||
* core: allow wormholes to have multiple destinations
|
||||
|
||||
* make C729 wormholes static to Pochven systems
|
||||
|
||||
## [v1.99.1](https://github.com/wanderer-industries/wanderer/compare/v1.99.0...v1.99.1) (2026-04-15)
|
||||
|
||||
|
||||
|
||||
|
||||
### Bug Fixes:
|
||||
|
||||
* add lost passage mass files
|
||||
|
||||
## [v1.99.0](https://github.com/wanderer-industries/wanderer/compare/v1.98.1...v1.99.0) (2026-04-14)
|
||||
|
||||
|
||||
|
||||
|
||||
### Features:
|
||||
|
||||
* core: Add support for editing passages mass
|
||||
|
||||
### Bug Fixes:
|
||||
|
||||
* Add update mass button for ship
|
||||
|
||||
## [v1.98.1](https://github.com/wanderer-industries/wanderer/compare/v1.98.0...v1.98.1) (2026-04-10)
|
||||
|
||||
|
||||
|
||||
@@ -314,6 +314,13 @@ export const WORMHOLES_ADDITIONAL_INFO_RAW: WormholesAdditionalInfoType[] = [
|
||||
title: 'Reverse',
|
||||
shortTitle: 'K162',
|
||||
},
|
||||
{
|
||||
id: 'c729',
|
||||
shortName: 'C729',
|
||||
wormholeClassID: 10102,
|
||||
title: 'Static',
|
||||
shortTitle: 'C729',
|
||||
},
|
||||
];
|
||||
|
||||
export const WORMHOLES_ADDITIONAL_INFO: Record<string, WormholesAdditionalInfoType> =
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { WORMHOLE_CLASS_STYLES, WORMHOLES_ADDITIONAL_INFO } from '@/hooks/Mapper/components/map/constants';
|
||||
import { K162_TYPES_MAP } from '@/hooks/Mapper/constants';
|
||||
import { MULTI_DEST_WHS, ALL_DEST_TYPES_MAP } from '@/hooks/Mapper/constants';
|
||||
import { parseSignatureCustomInfo } from '@/hooks/Mapper/helpers/parseSignatureCustomInfo';
|
||||
import { WormholeDataRaw } from '@/hooks/Mapper/types/wormholes';
|
||||
import { SystemSignature } from '@/hooks/Mapper/types/signatures';
|
||||
@@ -33,14 +33,14 @@ export function resolveSignatureFillVar(
|
||||
): string {
|
||||
const customInfo = parseSignatureCustomInfo(signature.custom_info);
|
||||
|
||||
// K162 override: use the k162Type to look up the real destination class
|
||||
if (signature.type === 'K162' && customInfo.k162Type) {
|
||||
const k162Option = K162_TYPES_MAP[customInfo.k162Type];
|
||||
if (k162Option) {
|
||||
const k162Data = wormholesData[k162Option.whClassName];
|
||||
const k162Class = k162Data ? WORMHOLES_ADDITIONAL_INFO[k162Data.dest] : null;
|
||||
if (k162Class) {
|
||||
const className = WORMHOLE_CLASS_STYLES[k162Class.wormholeClassID];
|
||||
// Wormholes with multiple exit classes (K162, C729, ...) override: use the destType to look up the real destination class
|
||||
if (MULTI_DEST_WHS.includes(signature.type) && customInfo.destType) {
|
||||
const destTypeOption = ALL_DEST_TYPES_MAP[customInfo.destType];
|
||||
if (destTypeOption) {
|
||||
const whData = wormholesData[destTypeOption.whClassName];
|
||||
const whClass = whData?.dest?.length === 1 ? WORMHOLES_ADDITIONAL_INFO[whData.dest[0]] : null;
|
||||
if (whClass) {
|
||||
const className = WORMHOLE_CLASS_STYLES[whClass.wormholeClassID];
|
||||
if (className && CLASS_NAME_TO_CSS_VAR[className]) {
|
||||
return CLASS_NAME_TO_CSS_VAR[className];
|
||||
}
|
||||
@@ -53,7 +53,7 @@ export function resolveSignatureFillVar(
|
||||
const whData = wormholesData[signature.type];
|
||||
if (!whData) return DEFAULT_FILL;
|
||||
|
||||
const whClass = WORMHOLES_ADDITIONAL_INFO[whData.dest];
|
||||
const whClass = whData?.dest?.length == 1 ? WORMHOLES_ADDITIONAL_INFO[whData.dest[0]] : null;
|
||||
if (!whClass) return DEFAULT_FILL;
|
||||
|
||||
const className = WORMHOLE_CLASS_STYLES[whClass.wormholeClassID];
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
WORMHOLES_ADDITIONAL_INFO_BY_SHORT_NAME,
|
||||
} from '@/hooks/Mapper/components/map/constants.ts';
|
||||
import { SystemSignaturesContent } from '@/hooks/Mapper/components/mapInterface/widgets/SystemSignatures/SystemSignaturesContent';
|
||||
import { K162_TYPES_MAP } from '@/hooks/Mapper/constants.ts';
|
||||
import { MULTI_DEST_WHS, ALL_DEST_TYPES_MAP, DEST_TYPES_MAP_MAP } from '@/hooks/Mapper/constants.ts';
|
||||
import { SETTINGS_KEYS, SignatureSettingsType } from '@/hooks/Mapper/constants/signatures';
|
||||
import { parseSignatureCustomInfo } from '@/hooks/Mapper/helpers/parseSignatureCustomInfo';
|
||||
import { useMapRootState } from '@/hooks/Mapper/mapRootProvider';
|
||||
@@ -16,7 +16,7 @@ import { CommandLinkSignatureToSystem, SignatureGroup, SystemSignature } from '@
|
||||
import { OutCommand } from '@/hooks/Mapper/types/mapHandlers.ts';
|
||||
import { useSystemSignaturesData } from '../../widgets/SystemSignatures/hooks/useSystemSignaturesData';
|
||||
|
||||
const K162_SIGNATURE_TYPE = WORMHOLES_ADDITIONAL_INFO_BY_SHORT_NAME['K162'].shortName;
|
||||
const MULTI_DEST_TYPES = MULTI_DEST_WHS.map((type: string) => WORMHOLES_ADDITIONAL_INFO_BY_SHORT_NAME[type].shortName);
|
||||
|
||||
interface SystemLinkSignatureDialogProps {
|
||||
data: CommandLinkSignatureToSystem;
|
||||
@@ -29,9 +29,9 @@ export const LINK_SIGNTATURE_SETTINGS: SignatureSettingsType = {
|
||||
[SETTINGS_KEYS.SHOW_DESCRIPTION_COLUMN]: true,
|
||||
};
|
||||
|
||||
// Extend the SignatureCustomInfo type to include k162Type
|
||||
// Extend the SignatureCustomInfo type to include destType
|
||||
interface ExtendedSignatureCustomInfo {
|
||||
k162Type?: string;
|
||||
destType?: string;
|
||||
isEOL?: boolean;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
@@ -80,23 +80,22 @@ export const SystemLinkSignatureDialog = ({ data, setVisible }: SystemLinkSignat
|
||||
return true;
|
||||
}
|
||||
|
||||
if (signature.type === K162_SIGNATURE_TYPE) {
|
||||
// Parse the custom info to see if the user has specified what class this K162 leads to
|
||||
if (MULTI_DEST_TYPES.includes(signature.type)) {
|
||||
// Parse the custom info to see if the user has specified what class
|
||||
// this wormhole leads to
|
||||
const customInfo = parseSignatureCustomInfo(signature.custom_info) as ExtendedSignatureCustomInfo;
|
||||
|
||||
// If the user has specified a k162Type for this K162
|
||||
if (customInfo.k162Type) {
|
||||
// Get the K162 type information
|
||||
const k162TypeInfo = K162_TYPES_MAP[customInfo.k162Type];
|
||||
// If the user has specified a destType for this wormhole
|
||||
if (customInfo.destType) {
|
||||
// Get the destination type information
|
||||
const destinationInfo = DEST_TYPES_MAP_MAP[signature.type][customInfo.destType];
|
||||
|
||||
if (k162TypeInfo) {
|
||||
// Check if the k162Type matches our target system class
|
||||
return k162TypeInfo.value.includes(targetSystemClassGroup);
|
||||
if (destinationInfo) {
|
||||
// Check if the destType matches our target system class
|
||||
const isDestMatch = destinationInfo.value.includes(targetSystemClassGroup);
|
||||
return isDestMatch;
|
||||
}
|
||||
}
|
||||
|
||||
// If no k162Type is specified or we couldn't find type info, allow it
|
||||
return true;
|
||||
}
|
||||
|
||||
// Find the wormhole data for this signature type
|
||||
@@ -105,11 +104,12 @@ export const SystemLinkSignatureDialog = ({ data, setVisible }: SystemLinkSignat
|
||||
return true; // If we don't know the destination, don't filter it out
|
||||
}
|
||||
|
||||
// Get the destination system class from the wormhole data
|
||||
// Get the destination system classes from the wormhole data
|
||||
const destinationClass = wormholeData.dest;
|
||||
|
||||
// Check if the destination class matches the target system class
|
||||
const isMatch = destinationClass === targetSystemClassGroup;
|
||||
// If destinationClass is null, then it's K162 and allow, else
|
||||
// check if any of the destination classes matches the target system class
|
||||
const isMatch = destinationClass == null || destinationClass.includes(targetSystemClassGroup);
|
||||
return isMatch;
|
||||
},
|
||||
[targetSystemClassGroup, wormholes],
|
||||
|
||||
@@ -12,7 +12,7 @@ export const LocalCharactersItemTemplate = ({ showShipName, ...options }: LocalC
|
||||
<div
|
||||
className={clsx(
|
||||
classes.CharacterRow,
|
||||
'box-border flex items-center w-full whitespace-nowrap overflow-hidden text-ellipsis min-w-[0px]',
|
||||
'box-border flex items-center w-full whitespace-nowrap overflow-hidden text-ellipsis min-w-[0px] ',
|
||||
'px-1',
|
||||
{
|
||||
'surface-hover': options.odd,
|
||||
|
||||
@@ -2,10 +2,10 @@ import { SystemViewStandalone, TooltipPosition, WHClassView } from '@/hooks/Mapp
|
||||
import { MassState, SignatureGroup, SystemSignature, TimeStatus } from '@/hooks/Mapper/types';
|
||||
import { PrimeIcons } from 'primereact/api';
|
||||
|
||||
import { renderK162Type } from '@/hooks/Mapper/components/mapRootContent/components/SignatureSettings/components/SignatureK162TypeSelect';
|
||||
import { renderDestinationType } from '@/hooks/Mapper/components/mapRootContent/components/SignatureSettings/components/SignatureDestinationTypeSelect';
|
||||
import { WdTooltipWrapper } from '@/hooks/Mapper/components/ui-kit/WdTooltipWrapper';
|
||||
|
||||
import { K162_TYPES_MAP } from '@/hooks/Mapper/constants.ts';
|
||||
import { MULTI_DEST_WHS, ALL_DEST_TYPES_MAP } from '@/hooks/Mapper/constants.ts';
|
||||
import { parseSignatureCustomInfo } from '@/hooks/Mapper/helpers/parseSignatureCustomInfo.ts';
|
||||
import clsx from 'clsx';
|
||||
import { renderName } from './renderName.tsx';
|
||||
@@ -14,7 +14,7 @@ export const renderInfoColumn = (row: SystemSignature) => {
|
||||
if (!row.group || row.group === SignatureGroup.Wormhole) {
|
||||
const customInfo = parseSignatureCustomInfo(row.custom_info);
|
||||
|
||||
const k162TypeOption = customInfo.k162Type ? K162_TYPES_MAP[customInfo.k162Type] : null;
|
||||
const destTypeOption = customInfo.destType ? ALL_DEST_TYPES_MAP[customInfo.destType] : null;
|
||||
|
||||
return (
|
||||
<div className="flex justify-start items-center gap-[4px]">
|
||||
@@ -46,14 +46,17 @@ export const renderInfoColumn = (row: SystemSignature) => {
|
||||
<WHClassView
|
||||
className="text-[11px]"
|
||||
classNameWh="!text-[11px] !font-bold"
|
||||
hideWhClass={!!row.linked_system}
|
||||
hideWhClass={!!destTypeOption || !!row.linked_system}
|
||||
whClassName={row.type}
|
||||
noOffset
|
||||
useShortTitle
|
||||
/>
|
||||
)}
|
||||
|
||||
{!row.linked_system && row.type === 'K162' && k162TypeOption && renderK162Type(k162TypeOption)}
|
||||
{!row.linked_system &&
|
||||
MULTI_DEST_WHS.includes(row.type) &&
|
||||
destTypeOption &&
|
||||
renderDestinationType(destTypeOption)}
|
||||
|
||||
{row.linked_system && (
|
||||
<>
|
||||
|
||||
@@ -17,29 +17,35 @@ import classes from './Connections.module.scss';
|
||||
import { InfoDrawer, SystemView, TimeAgo } from '@/hooks/Mapper/components/ui-kit';
|
||||
import { kgToTons } from '@/hooks/Mapper/utils/kgToTons.ts';
|
||||
import { PassageCard } from './PassageCard';
|
||||
import { PassageMassDialog } from './PassageMassDialog';
|
||||
|
||||
const sortByDate = (a: string, b: string) => new Date(a).getTime() - new Date(b).getTime();
|
||||
|
||||
const itemTemplate = (item: PassageWithSourceTarget, options: VirtualScrollerTemplateOptions) => {
|
||||
return (
|
||||
<div
|
||||
className={clsx(classes.CharacterRow, 'w-full box-border', {
|
||||
'surface-hover': options.odd,
|
||||
['border-b border-gray-600 border-opacity-20']: !options.last,
|
||||
['bg-green-500 hover:bg-green-700 transition duration-300 bg-opacity-10 hover:bg-opacity-10']: false,
|
||||
})}
|
||||
style={{ height: options.props.itemSize + 'px' }}
|
||||
>
|
||||
<PassageCard {...item} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
const getPassageMass = (passage: Passage) => passage.mass ?? parseInt(passage.ship.ship_type_info.mass);
|
||||
|
||||
export interface ConnectionPassagesContentProps {
|
||||
passages: PassageWithSourceTarget[];
|
||||
onEditPassage: (passage: PassageWithSourceTarget) => void;
|
||||
}
|
||||
|
||||
export const ConnectionPassages = ({ passages = [] }: ConnectionPassagesContentProps) => {
|
||||
export const ConnectionPassages = ({ passages = [], onEditPassage }: ConnectionPassagesContentProps) => {
|
||||
const itemTemplate = useCallback(
|
||||
(item: PassageWithSourceTarget, options: VirtualScrollerTemplateOptions) => {
|
||||
return (
|
||||
<div
|
||||
className={clsx(classes.CharacterRow, 'w-full box-border', {
|
||||
'surface-hover': options.odd,
|
||||
['border-b border-gray-600 border-opacity-20']: !options.last,
|
||||
['bg-green-500 hover:bg-green-700 transition duration-300 bg-opacity-10 hover:bg-opacity-10']: false,
|
||||
})}
|
||||
style={{ height: options.props.itemSize + 'px' }}
|
||||
>
|
||||
<PassageCard {...item} onEdit={() => onEditPassage(item)} />
|
||||
</div>
|
||||
);
|
||||
},
|
||||
[onEditPassage],
|
||||
);
|
||||
|
||||
if (passages.length === 0) {
|
||||
return <div className="flex justify-center items-center text-stone-400 select-none">Nobody passed here</div>;
|
||||
}
|
||||
@@ -83,6 +89,7 @@ export const Connections = ({ selectedConnection, onHide }: OnTheMapProps) => {
|
||||
|
||||
const [passages, setPassages] = useState<Passage[]>([]);
|
||||
const [info, setInfo] = useState<ConnectionInfoOutput | null>(null);
|
||||
const [editingPassage, setEditingPassage] = useState<PassageWithSourceTarget | null>(null);
|
||||
|
||||
const loadInfo = useCallback(
|
||||
async (connection: SolarSystemConnection) => {
|
||||
@@ -109,7 +116,7 @@ export const Connections = ({ selectedConnection, onHide }: OnTheMapProps) => {
|
||||
},
|
||||
});
|
||||
|
||||
setPassages(result.passages.sort((a, b) => sortByDate(b.inserted_at, a.inserted_at)));
|
||||
setPassages([...result.passages].sort((a, b) => sortByDate(b.inserted_at, a.inserted_at)));
|
||||
},
|
||||
[outCommand],
|
||||
);
|
||||
@@ -119,7 +126,7 @@ export const Connections = ({ selectedConnection, onHide }: OnTheMapProps) => {
|
||||
return [];
|
||||
}
|
||||
|
||||
return passages
|
||||
return [...passages]
|
||||
.sort((a, b) => sortByDate(b.inserted_at, a.inserted_at))
|
||||
.map<PassageWithSourceTarget>(x => ({
|
||||
...x,
|
||||
@@ -130,16 +137,48 @@ export const Connections = ({ selectedConnection, onHide }: OnTheMapProps) => {
|
||||
|
||||
useEffect(() => {
|
||||
if (!selectedConnection) {
|
||||
setEditingPassage(null);
|
||||
return;
|
||||
}
|
||||
|
||||
setEditingPassage(null);
|
||||
loadInfo(selectedConnection);
|
||||
loadPassages(selectedConnection);
|
||||
}, [selectedConnection]);
|
||||
}, [loadInfo, loadPassages, selectedConnection]);
|
||||
|
||||
const approximateMass = useMemo(() => {
|
||||
return passages.reduce((acc, x) => acc + parseInt(x.ship.ship_type_info.mass), 0);
|
||||
return passages.reduce((acc, x) => acc + getPassageMass(x), 0);
|
||||
}, [passages]);
|
||||
|
||||
const handleEditPassage = useCallback((passage: PassageWithSourceTarget) => {
|
||||
setEditingPassage(passage);
|
||||
}, []);
|
||||
|
||||
const handleHidePassageDialog = useCallback(() => {
|
||||
setEditingPassage(null);
|
||||
}, []);
|
||||
|
||||
const handleSavePassageMass = useCallback(
|
||||
async (mass: number) => {
|
||||
if (!editingPassage) {
|
||||
return;
|
||||
}
|
||||
|
||||
await outCommand({
|
||||
type: OutCommand.updatePassageMass,
|
||||
data: {
|
||||
id: editingPassage.id,
|
||||
mass,
|
||||
},
|
||||
});
|
||||
|
||||
setPassages(prev => prev.map(passage => (passage.id === editingPassage.id ? { ...passage, mass } : passage)));
|
||||
setEditingPassage(prev => (prev ? { ...prev, mass } : prev));
|
||||
handleHidePassageDialog();
|
||||
},
|
||||
[editingPassage, handleHidePassageDialog, outCommand],
|
||||
);
|
||||
|
||||
if (!cnInfo) {
|
||||
return null;
|
||||
}
|
||||
@@ -201,8 +240,15 @@ export const Connections = ({ selectedConnection, onHide }: OnTheMapProps) => {
|
||||
{/* separator */}
|
||||
<div className="w-full h-px bg-neutral-800 px-0.5"></div>
|
||||
|
||||
<ConnectionPassages passages={preparedPassages} />
|
||||
<ConnectionPassages passages={preparedPassages} onEditPassage={handleEditPassage} />
|
||||
</div>
|
||||
|
||||
<PassageMassDialog
|
||||
passage={editingPassage}
|
||||
visible={editingPassage != null}
|
||||
onHide={handleHidePassageDialog}
|
||||
onSave={handleSavePassageMass}
|
||||
/>
|
||||
</Sidebar>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
import clsx from 'clsx';
|
||||
import classes from './PassageCard.module.scss';
|
||||
import { PassageWithSourceTarget } from '@/hooks/Mapper/types';
|
||||
import { SystemView, TimeAgo, TooltipPosition, WdImgButton } from '@/hooks/Mapper/components/ui-kit';
|
||||
import { SystemView, TimeAgo, TooltipPosition, WdImgButton, WdTransition } from '@/hooks/Mapper/components/ui-kit';
|
||||
import { WdTooltipWrapper } from '@/hooks/Mapper/components/ui-kit/WdTooltipWrapper';
|
||||
import { kgToTons } from '@/hooks/Mapper/utils/kgToTons.ts';
|
||||
import { useCallback, useMemo } from 'react';
|
||||
import { MouseEvent, useCallback, useMemo, useState } from 'react';
|
||||
import { ZKB_ICON } from '@/hooks/Mapper/icons';
|
||||
import { charEveWhoLink, charZKBLink } from '@/hooks/Mapper/helpers/linkHelpers.ts';
|
||||
import { getShipName } from './getShipName.ts';
|
||||
|
||||
type PassageCardType = {
|
||||
// compact?: boolean;
|
||||
showShipName?: boolean;
|
||||
// showSystem?: boolean;
|
||||
// useSystemsCache?: boolean;
|
||||
onEdit?: () => void;
|
||||
} & PassageWithSourceTarget;
|
||||
|
||||
const SHIP_NAME_RX = /u'|'/g;
|
||||
export const getShipName = (name: string) => {
|
||||
return name
|
||||
.replace(SHIP_NAME_RX, '')
|
||||
.replace(/\\u([\dA-Fa-f]{4})/g, (_, grp) => {
|
||||
return String.fromCharCode(parseInt(grp, 16));
|
||||
})
|
||||
.replace(/\\x([\dA-Fa-f]{2})/g, (_, grp) => {
|
||||
return String.fromCharCode(parseInt(grp, 16));
|
||||
});
|
||||
};
|
||||
|
||||
export const PassageCard = ({ inserted_at, character: char, ship, source, target, from }: PassageCardType) => {
|
||||
export const PassageCard = ({
|
||||
inserted_at,
|
||||
character: char,
|
||||
ship,
|
||||
source,
|
||||
target,
|
||||
from,
|
||||
mass,
|
||||
onEdit,
|
||||
}: PassageCardType) => {
|
||||
const isOwn = false;
|
||||
const [hovered, setHovered] = useState(false);
|
||||
|
||||
const insertedAt = useMemo(() => {
|
||||
const date = new Date(inserted_at);
|
||||
@@ -37,9 +37,23 @@ export const PassageCard = ({ inserted_at, character: char, ship, source, target
|
||||
|
||||
const handleOpenZKB = useCallback(() => window.open(charZKBLink(char.eve_id), '_blank'), [char]);
|
||||
const handleOpenEveWho = useCallback(() => window.open(charEveWhoLink(char.eve_id), '_blank'), [char]);
|
||||
const handleEdit = useCallback(
|
||||
(event: MouseEvent<HTMLDivElement>) => {
|
||||
event.stopPropagation();
|
||||
onEdit?.();
|
||||
},
|
||||
[onEdit],
|
||||
);
|
||||
|
||||
const handleMouseEnter = useCallback(() => setHovered(true), []);
|
||||
const handleMouseLeave = useCallback(() => setHovered(false), []);
|
||||
|
||||
return (
|
||||
<div className={clsx(classes.CharacterCard, 'w-full text-xs', 'flex flex-col box-border')}>
|
||||
<div
|
||||
className={clsx(classes.CharacterCard, 'w-full text-xs', 'flex flex-col box-border')}
|
||||
onMouseEnter={handleMouseEnter}
|
||||
onMouseLeave={handleMouseLeave}
|
||||
>
|
||||
<div className="flex flex-col justify-between px-2 py-1 gap-1">
|
||||
{/*here icon and other*/}
|
||||
<div className={clsx(classes.CharRow, classes.FourColumns)}>
|
||||
@@ -140,15 +154,30 @@ export const PassageCard = ({ inserted_at, character: char, ship, source, target
|
||||
</WdTooltipWrapper>
|
||||
</span>
|
||||
|
||||
<div className="text-stone-400">{kgToTons(parseInt(ship.ship_type_info.mass))}</div>
|
||||
<div className="text-stone-400">{kgToTons(mass ?? parseInt(ship.ship_type_info.mass))}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/*ship icon*/}
|
||||
<span
|
||||
<div
|
||||
className={clsx(classes.EveIcon, classes.CharIcon, 'wd-bg-default')}
|
||||
style={{ backgroundImage: `url(https://images.evetech.net/types/${ship.ship_type_id}/icon)` }}
|
||||
/>
|
||||
>
|
||||
<WdTransition active={hovered} timeout={50}>
|
||||
<div>
|
||||
{hovered && (
|
||||
<div
|
||||
className={clsx(
|
||||
'transition-all transform ease-in duration-200 cursor-pointer',
|
||||
'pi text-stone-500 text-[17px] w-[33px] h-[32px] !flex items-center justify-center border rounded-[2px]',
|
||||
'pi-cog text-stone-200/80 hover:!text-orange-400 border-stone-500/70 hover:!border-orange-400 bg-stone-800/70',
|
||||
)}
|
||||
onClick={handleEdit}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</WdTransition>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
const SHIP_NAME_RX = /u'|'/g;
|
||||
|
||||
export const getShipName = (name: string) => {
|
||||
return name
|
||||
.replace(SHIP_NAME_RX, '')
|
||||
.replace(/\\u([\dA-Fa-f]{4})/g, (_, grp) => {
|
||||
return String.fromCharCode(parseInt(grp, 16));
|
||||
})
|
||||
.replace(/\\x([\dA-Fa-f]{2})/g, (_, grp) => {
|
||||
return String.fromCharCode(parseInt(grp, 16));
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,140 @@
|
||||
import { WdButton, WdTooltipWrapper } from '@/hooks/Mapper/components/ui-kit';
|
||||
import { PassageWithSourceTarget } from '@/hooks/Mapper/types';
|
||||
import { Dialog } from 'primereact/dialog';
|
||||
import { InputText } from 'primereact/inputtext';
|
||||
import clsx from 'clsx';
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { TimeAgo } from '@/hooks/Mapper/components/ui-kit';
|
||||
import { kgToTons } from '@/hooks/Mapper/utils/kgToTons.ts';
|
||||
import { getShipName } from './PassageCard/getShipName.ts';
|
||||
|
||||
type PassageMassDialogProps = {
|
||||
passage: PassageWithSourceTarget | null;
|
||||
visible: boolean;
|
||||
onHide: () => void;
|
||||
onSave: (mass: number) => Promise<void> | void;
|
||||
};
|
||||
|
||||
const getPassageMass = (passage: PassageWithSourceTarget) => {
|
||||
return passage.mass ?? parseInt(passage.ship.ship_type_info.mass);
|
||||
};
|
||||
|
||||
const parseMassValue = (value: string) => {
|
||||
const sanitized = value.replace(/[^\d]/g, '');
|
||||
|
||||
if (sanitized === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
const parsed = parseInt(sanitized);
|
||||
return Number.isFinite(parsed) && parsed > 0 ? parsed : null;
|
||||
};
|
||||
|
||||
export const PassageMassDialog = ({ passage, visible, onHide, onSave }: PassageMassDialogProps) => {
|
||||
const [massValue, setMassValue] = useState('');
|
||||
const [saving, setSaving] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (!passage) {
|
||||
setMassValue('');
|
||||
return;
|
||||
}
|
||||
|
||||
setMassValue(`${getPassageMass(passage)}`);
|
||||
}, [passage]);
|
||||
|
||||
const parsedMass = useMemo(() => parseMassValue(massValue), [massValue]);
|
||||
|
||||
const handleSave = async () => {
|
||||
if (!passage || parsedMass == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
setSaving(true);
|
||||
|
||||
try {
|
||||
await onSave(parsedMass);
|
||||
} finally {
|
||||
setSaving(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
header="Edit passage mass"
|
||||
visible={visible}
|
||||
draggable
|
||||
resizable={false}
|
||||
style={{ width: '420px' }}
|
||||
onHide={onHide}
|
||||
>
|
||||
{passage && (
|
||||
<div className="flex flex-col gap-4">
|
||||
<div className="rounded border border-stone-700/80 bg-stone-900/70 p-3">
|
||||
<div className="grid grid-cols-[34px_1fr_auto] gap-3 items-start">
|
||||
<div
|
||||
className="w-[34px] h-[34px] rounded-[3px] border border-stone-700 bg-center bg-cover bg-no-repeat"
|
||||
style={{ backgroundImage: `url(https://images.evetech.net/types/${passage.ship.ship_type_id}/icon)` }}
|
||||
/>
|
||||
|
||||
<div className="min-w-0">
|
||||
<div className="text-sm text-stone-100 truncate">{passage.ship.ship_type_info.name}</div>
|
||||
{passage.ship.ship_name && (
|
||||
<div className="text-xs text-stone-400 truncate">{getShipName(passage.ship.ship_name)}</div>
|
||||
)}
|
||||
<div className="mt-2 flex items-center gap-2 text-xs text-stone-400">
|
||||
<span>{passage.character.name}</span>
|
||||
<span className="text-stone-600">|</span>
|
||||
<WdTooltipWrapper content={new Date(passage.inserted_at).toLocaleString()}>
|
||||
<span className="cursor-default">
|
||||
<TimeAgo timestamp={passage.inserted_at} />
|
||||
</span>
|
||||
</WdTooltipWrapper>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
className={clsx(
|
||||
'w-[34px] h-[34px] rounded-[3px] border border-stone-700 bg-center bg-cover bg-no-repeat',
|
||||
'justify-self-end',
|
||||
)}
|
||||
style={{
|
||||
backgroundImage: `url(https://images.evetech.net/characters/${passage.character.eve_id}/portrait)`,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col gap-2">
|
||||
<label className="text-sm text-stone-300" htmlFor="passage-mass">
|
||||
Passage mass
|
||||
</label>
|
||||
|
||||
<InputText
|
||||
id="passage-mass"
|
||||
value={massValue}
|
||||
onChange={event => setMassValue(event.target.value.replace(/[^\d]/g, ''))}
|
||||
placeholder="Mass in kg"
|
||||
className="w-full"
|
||||
/>
|
||||
|
||||
<div className="text-xs text-stone-500">
|
||||
{parsedMass == null ? 'Enter mass in kg' : `Preview: ${kgToTons(parsedMass)}`}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex justify-end gap-2">
|
||||
<WdButton outlined size="small" label="Cancel" onClick={onHide} />
|
||||
<WdButton
|
||||
outlined
|
||||
size="small"
|
||||
label={saving ? 'Saving...' : 'Save'}
|
||||
onClick={handleSave}
|
||||
disabled={parsedMass == null || saving}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Dialog>
|
||||
);
|
||||
};
|
||||
@@ -13,7 +13,7 @@ import { Controller, FormProvider, useForm } from 'react-hook-form';
|
||||
|
||||
type SystemSignaturePrepared = Omit<SystemSignature, 'linked_system'> & {
|
||||
linked_system: string;
|
||||
k162Type: string;
|
||||
destType: string;
|
||||
time_status: TimeStatus;
|
||||
mass_status: MassState;
|
||||
};
|
||||
@@ -47,7 +47,7 @@ export const SignatureSettings = ({ systemId, show, onHide, signatureData }: Map
|
||||
out = {
|
||||
...out,
|
||||
custom_info: JSON.stringify({
|
||||
k162Type: values.k162Type,
|
||||
destType: values.destType,
|
||||
time_status: values.time_status,
|
||||
mass_status: values.mass_status,
|
||||
}),
|
||||
@@ -142,19 +142,19 @@ export const SignatureSettings = ({ systemId, show, onHide, signatureData }: Map
|
||||
|
||||
const { linked_system, custom_info, ...rest } = signatureData;
|
||||
|
||||
let k162Type = null;
|
||||
let destType = null;
|
||||
let time_status = TimeStatus._24h;
|
||||
let mass_status = MassState.normal;
|
||||
if (custom_info) {
|
||||
const customInfo = JSON.parse(custom_info);
|
||||
k162Type = customInfo.k162Type;
|
||||
destType = customInfo.destType;
|
||||
time_status = customInfo.time_status;
|
||||
mass_status = customInfo.mass_status ?? MassState.normal;
|
||||
}
|
||||
|
||||
signatureForm.reset({
|
||||
linked_system: linked_system?.solar_system_id.toString() ?? undefined,
|
||||
k162Type: k162Type,
|
||||
destType: destType,
|
||||
time_status: time_status,
|
||||
mass_status: mass_status,
|
||||
...rest,
|
||||
|
||||
@@ -3,20 +3,25 @@ import clsx from 'clsx';
|
||||
import { Controller, useFormContext } from 'react-hook-form';
|
||||
import { useMemo } from 'react';
|
||||
import { SystemSignature } from '@/hooks/Mapper/types';
|
||||
import { K162_TYPES } from '@/hooks/Mapper/constants.ts';
|
||||
import { renderK162Type } from '.';
|
||||
import { renderDestinationType } from '.';
|
||||
import { DEST_TYPES_MAP } from '@/hooks/Mapper/constants';
|
||||
|
||||
export interface SignatureK162TypeSelectProps {
|
||||
export interface SignatureDestinationTypeSelectProps {
|
||||
name: string;
|
||||
type: string;
|
||||
defaultValue?: string;
|
||||
}
|
||||
|
||||
export const SignatureK162TypeSelect = ({ name, defaultValue = '' }: SignatureK162TypeSelectProps) => {
|
||||
export const SignatureDestinationTypeSelect = ({
|
||||
name,
|
||||
type: whType,
|
||||
defaultValue = '',
|
||||
}: SignatureDestinationTypeSelectProps) => {
|
||||
const { control } = useFormContext<SystemSignature>();
|
||||
|
||||
const options = useMemo(() => {
|
||||
return [{ value: null }, ...K162_TYPES];
|
||||
}, []);
|
||||
return [{ value: null }, ...DEST_TYPES_MAP[whType]];
|
||||
}, [whType]);
|
||||
|
||||
return (
|
||||
<Controller
|
||||
@@ -31,11 +36,11 @@ export const SignatureK162TypeSelect = ({ name, defaultValue = '' }: SignatureK1
|
||||
onChange={field.onChange}
|
||||
options={options}
|
||||
optionValue="value"
|
||||
placeholder="Select K162 type"
|
||||
placeholder="Select destination"
|
||||
className={clsx('w-full')}
|
||||
scrollHeight="240px"
|
||||
itemTemplate={renderK162Type}
|
||||
valueTemplate={renderK162Type}
|
||||
itemTemplate={renderDestinationType}
|
||||
valueTemplate={renderDestinationType}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from './SignatureDestinationTypeSelect.tsx';
|
||||
export * from './renderDestinationType.tsx';
|
||||
@@ -1,9 +1,9 @@
|
||||
import { WHClassView } from '@/hooks/Mapper/components/ui-kit';
|
||||
import { K162Type } from '@/hooks/Mapper/constants.ts';
|
||||
import { DestinationType } from '@/hooks/Mapper/constants.ts';
|
||||
|
||||
const renderNoValue = () => <div className="flex gap-2 items-center">-Unknown-</div>;
|
||||
|
||||
export const renderK162Type = (option: K162Type) => {
|
||||
export const renderDestinationType = (option: DestinationType) => {
|
||||
if (!option) {
|
||||
return renderNoValue();
|
||||
}
|
||||
@@ -1,11 +1,12 @@
|
||||
import { useFormContext } from 'react-hook-form';
|
||||
import { SystemSignature } from '@/hooks/Mapper/types';
|
||||
import { SignatureWormholeTypeSelect } from '@/hooks/Mapper/components/mapRootContent/components/SignatureSettings/components/SignatureWormholeTypeSelect';
|
||||
import { SignatureK162TypeSelect } from '@/hooks/Mapper/components/mapRootContent/components/SignatureSettings/components/SignatureK162TypeSelect';
|
||||
import { SignatureDestinationTypeSelect } from '@/hooks/Mapper/components/mapRootContent/components/SignatureSettings/components/SignatureDestinationTypeSelect';
|
||||
import { SignatureLeadsToSelect } from '@/hooks/Mapper/components/mapRootContent/components/SignatureSettings/components/SignatureLeadsToSelect';
|
||||
import { SignatureLifetimeSelect } from '@/hooks/Mapper/components/mapRootContent/components/SignatureSettings/components/SignatureLifetimeSelect.tsx';
|
||||
import { SignatureTempName } from '@/hooks/Mapper/components/mapRootContent/components/SignatureSettings/components/SignatureTempName.tsx';
|
||||
import { SignatureMassStatusSelect } from '@/hooks/Mapper/components/mapRootContent/components/SignatureSettings/components/SignatureMassStatusSelect.tsx';
|
||||
import { MULTI_DEST_WHS } from '@/hooks/Mapper/constants';
|
||||
|
||||
export const SignatureGroupContentWormholes = () => {
|
||||
const { watch } = useFormContext<SystemSignature>();
|
||||
@@ -18,10 +19,10 @@ export const SignatureGroupContentWormholes = () => {
|
||||
<SignatureWormholeTypeSelect name="type" />
|
||||
</label>
|
||||
|
||||
{type === 'K162' && (
|
||||
{MULTI_DEST_WHS.includes(type) && (
|
||||
<label className="grid grid-cols-[100px_250px_1fr] gap-2 items-center text-[14px]">
|
||||
<span>K162 Type:</span>
|
||||
<SignatureK162TypeSelect name="k162Type" />
|
||||
<span>Destination Class:</span>
|
||||
<SignatureDestinationTypeSelect name="destType" type={type} />
|
||||
</label>
|
||||
)}
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
export * from './SignatureK162TypeSelect.tsx';
|
||||
export * from './renderK162Type.tsx';
|
||||
@@ -77,7 +77,7 @@ export const SignatureLeadsToSelect = ({ name, defaultValue = '' }: SignatureLea
|
||||
}
|
||||
|
||||
const { id: whType } = WORMHOLES_ADDITIONAL_INFO_BY_CLASS_ID[systemStatic.system_class];
|
||||
return whInfo.dest === whType;
|
||||
return whInfo.dest.includes(whType);
|
||||
})
|
||||
.map(x => ({ value: x })),
|
||||
];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export * from './SignatureGroupSelect';
|
||||
export * from './SignatureGroupContent';
|
||||
export * from './SignatureK162TypeSelect';
|
||||
export * from './SignatureDestinationTypeSelect';
|
||||
export * from './SignatureLifetimeSelect';
|
||||
export * from './SignatureMassStatusSelect';
|
||||
|
||||
@@ -42,8 +42,10 @@ export const WHClassView = ({
|
||||
} = useMapRootState();
|
||||
|
||||
const whData = useMemo(() => wormholesData[whClassName], [whClassName, wormholesData]);
|
||||
const whClass = useMemo(() => WORMHOLES_ADDITIONAL_INFO[whData.dest], [whData.dest]);
|
||||
const whClassStyle = WORMHOLE_CLASS_STYLES[whClass?.wormholeClassID] ?? '';
|
||||
const whClass = useMemo(() => {
|
||||
return whData?.dest?.length === 1 ? WORMHOLES_ADDITIONAL_INFO[whData.dest[0]] : null;
|
||||
}, [whData.dest]);
|
||||
const whClassStyle = whClass?.wormholeClassID ? WORMHOLE_CLASS_STYLES[whClass.wormholeClassID] : '';
|
||||
|
||||
const content = (
|
||||
<div
|
||||
|
||||
@@ -66,13 +66,15 @@ export const REGIONS_MAP: Record<number, Spaces> = {
|
||||
[Regions.Pochven]: Spaces.Pochven,
|
||||
};
|
||||
|
||||
export type K162Type = {
|
||||
export type DestinationType = {
|
||||
label: string;
|
||||
value: string;
|
||||
whClassName: string;
|
||||
};
|
||||
|
||||
export const K162_TYPES: K162Type[] = [
|
||||
export const MULTI_DEST_WHS: string[] = ['K162', 'C729'];
|
||||
|
||||
export const ALL_DEST_TYPES: DestinationType[] = [
|
||||
{
|
||||
label: 'Hi-Sec',
|
||||
value: 'hs',
|
||||
@@ -145,11 +147,30 @@ export const K162_TYPES: K162Type[] = [
|
||||
},
|
||||
];
|
||||
|
||||
export const K162_TYPES_MAP: { [key: string]: K162Type } = K162_TYPES.reduce(
|
||||
export const ALL_DEST_TYPES_MAP: { [key: string]: DestinationType } = ALL_DEST_TYPES.reduce(
|
||||
(acc, x) => ({ ...acc, [x.value]: x }),
|
||||
{},
|
||||
);
|
||||
|
||||
export const C729_DEST_TYPES: DestinationType[] = ALL_DEST_TYPES.filter(destType =>
|
||||
['hs', 'ls', 'ns', 'pochven'].includes(destType.value),
|
||||
);
|
||||
|
||||
export const C729_DEST_TYPES_MAP: { [key: string]: DestinationType } = C729_DEST_TYPES.reduce(
|
||||
(acc, x) => ({ ...acc, [x.value]: x }),
|
||||
{},
|
||||
);
|
||||
|
||||
export const DEST_TYPES_MAP: { [key: string]: DestinationType[] } = {
|
||||
K162: ALL_DEST_TYPES,
|
||||
C729: C729_DEST_TYPES,
|
||||
};
|
||||
|
||||
export const DEST_TYPES_MAP_MAP: { [key: string]: { [key: string]: DestinationType } } = {
|
||||
K162: ALL_DEST_TYPES_MAP,
|
||||
C729: C729_DEST_TYPES_MAP,
|
||||
};
|
||||
|
||||
export const MINIMAP_PLACEMENT_MAP = {
|
||||
[PingsPlacement.rightTop]: 'top-right',
|
||||
[PingsPlacement.leftTop]: 'top-left',
|
||||
|
||||
@@ -6,8 +6,10 @@ export type PassageLimitedCharacterType = Pick<
|
||||
>;
|
||||
|
||||
export type Passage = {
|
||||
id: string;
|
||||
from: boolean;
|
||||
inserted_at: string; // Date
|
||||
mass: number | null;
|
||||
ship: ShipTypeRaw;
|
||||
character: PassageLimitedCharacterType;
|
||||
};
|
||||
|
||||
@@ -272,6 +272,7 @@ export enum OutCommand {
|
||||
addSystem = 'add_system',
|
||||
openUserSettings = 'open_user_settings',
|
||||
getPassages = 'get_passages',
|
||||
updatePassageMass = 'update_passage_mass',
|
||||
linkSignatureToSystem = 'link_signature_to_system',
|
||||
getCorporationNames = 'get_corporation_names',
|
||||
getCorporationTicker = 'get_corporation_ticker',
|
||||
|
||||
@@ -28,7 +28,7 @@ export type GroupType = {
|
||||
};
|
||||
|
||||
export type SignatureCustomInfo = {
|
||||
k162Type?: string;
|
||||
destType?: string;
|
||||
time_status?: number;
|
||||
isCrit?: boolean;
|
||||
mass_status?: number;
|
||||
|
||||
@@ -5,7 +5,7 @@ export enum Respawn {
|
||||
}
|
||||
|
||||
export type WormholeDataRaw = {
|
||||
dest: string;
|
||||
dest: string[];
|
||||
id: number;
|
||||
lifetime: string;
|
||||
mass_regen: number;
|
||||
|
||||
@@ -17,12 +17,15 @@ defmodule WandererApp.Api.MapChainPassages do
|
||||
define(:read, action: :read)
|
||||
define(:by_map_id, action: :by_map_id)
|
||||
define(:by_connection, action: :by_connection)
|
||||
define(:update_mass, action: :update_mass)
|
||||
define(:by_id, get_by: [:id], action: :read)
|
||||
end
|
||||
|
||||
actions do
|
||||
default_accept [
|
||||
:ship_type_id,
|
||||
:ship_name,
|
||||
:mass,
|
||||
:solar_system_source_id,
|
||||
:solar_system_target_id
|
||||
]
|
||||
@@ -30,6 +33,12 @@ defmodule WandererApp.Api.MapChainPassages do
|
||||
defaults [:create, :read, :destroy]
|
||||
|
||||
update :update do
|
||||
accept [:mass]
|
||||
require_atomic? false
|
||||
end
|
||||
|
||||
update :update_mass do
|
||||
accept [:mass]
|
||||
require_atomic? false
|
||||
end
|
||||
|
||||
@@ -37,6 +46,7 @@ defmodule WandererApp.Api.MapChainPassages do
|
||||
accept [
|
||||
:ship_type_id,
|
||||
:ship_name,
|
||||
:mass,
|
||||
:solar_system_source_id,
|
||||
:solar_system_target_id,
|
||||
:map_id,
|
||||
@@ -85,8 +95,10 @@ defmodule WandererApp.Api.MapChainPassages do
|
||||
|> WandererApp.Repo.all()
|
||||
|> Enum.map(fn [passage, character] ->
|
||||
%{
|
||||
id: passage.id,
|
||||
ship_type_id: passage.ship_type_id,
|
||||
ship_name: passage.ship_name,
|
||||
mass: passage.mass,
|
||||
inserted_at: passage.inserted_at,
|
||||
character: character
|
||||
}
|
||||
@@ -108,6 +120,7 @@ defmodule WandererApp.Api.MapChainPassages do
|
||||
|
||||
attribute :ship_type_id, :integer
|
||||
attribute :ship_name, :string
|
||||
attribute :mass, :integer
|
||||
attribute :solar_system_source_id, :integer
|
||||
attribute :solar_system_target_id, :integer
|
||||
|
||||
|
||||
@@ -114,6 +114,7 @@ defmodule WandererApp.EveDataService do
|
||||
%{
|
||||
solar_system_id: row["solarSystemID"],
|
||||
solar_system_name: row["solarSystemName"],
|
||||
statics: row["statics"],
|
||||
effect_name: row["effectName"],
|
||||
effect_power: row["effectPower"],
|
||||
invasion_status: row["invasionStatus"]
|
||||
@@ -403,6 +404,7 @@ defmodule WandererApp.EveDataService do
|
||||
%{
|
||||
default_data
|
||||
| triglavian_invasion_status: triglavian_data.invasion_status,
|
||||
statics: triglavian_data.statics,
|
||||
effect_name: triglavian_data.effect_name,
|
||||
effect_power: triglavian_data.effect_power
|
||||
}
|
||||
|
||||
@@ -265,6 +265,42 @@ defmodule WandererAppWeb.MapConnectionsEventHandler do
|
||||
{:reply, passages, socket}
|
||||
end
|
||||
|
||||
def handle_ui_event(
|
||||
"update_passage_mass",
|
||||
%{"id" => passage_id, "mass" => mass} = _event,
|
||||
%{
|
||||
assigns: %{
|
||||
has_tracked_characters?: true,
|
||||
user_permissions: %{update_system: true}
|
||||
}
|
||||
} = socket
|
||||
) do
|
||||
mass_value =
|
||||
cond do
|
||||
is_integer(mass) ->
|
||||
mass
|
||||
|
||||
is_binary(mass) ->
|
||||
case Integer.parse(mass) do
|
||||
{int_val, _} -> int_val
|
||||
:error -> nil
|
||||
end
|
||||
|
||||
true ->
|
||||
nil
|
||||
end
|
||||
|
||||
case WandererApp.Api.MapChainPassages.by_id(passage_id) do
|
||||
{:ok, passage} when not is_nil(passage) ->
|
||||
WandererApp.Api.MapChainPassages.update_mass(passage, %{mass: mass_value})
|
||||
|
||||
_ ->
|
||||
Logger.warning("update_passage_mass: passage not found id=#{passage_id}")
|
||||
end
|
||||
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
def handle_ui_event(event, body, socket),
|
||||
do: MapCoreEventHandler.handle_ui_event(event, body, socket)
|
||||
|
||||
|
||||
@@ -88,7 +88,8 @@ defmodule WandererAppWeb.MapEventHandler do
|
||||
"update_connection_mass_status",
|
||||
"update_connection_ship_size_type",
|
||||
"update_connection_locked",
|
||||
"update_connection_custom_info"
|
||||
"update_connection_custom_info",
|
||||
"update_passage_mass"
|
||||
]
|
||||
|
||||
@map_activity_events [
|
||||
|
||||
2
mix.exs
2
mix.exs
@@ -3,7 +3,7 @@ defmodule WandererApp.MixProject do
|
||||
|
||||
@source_url "https://github.com/wanderer-industries/wanderer"
|
||||
|
||||
@version "1.98.1"
|
||||
@version "1.100.0"
|
||||
|
||||
def project do
|
||||
[
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
{
|
||||
"solarSystemName": "Ignebaener",
|
||||
"solarSystemID": 30005005,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -9,6 +12,9 @@
|
||||
{
|
||||
"solarSystemName": "Kino",
|
||||
"solarSystemID": 30001372,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -16,6 +22,9 @@
|
||||
{
|
||||
"solarSystemName": "Komo",
|
||||
"solarSystemID": 30031392,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -23,6 +32,9 @@
|
||||
{
|
||||
"solarSystemName": "Konola",
|
||||
"solarSystemID": 30002737,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -30,6 +42,9 @@
|
||||
{
|
||||
"solarSystemName": "Krirald",
|
||||
"solarSystemID": 30002079,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -37,6 +52,9 @@
|
||||
{
|
||||
"solarSystemName": "Nalvula",
|
||||
"solarSystemID": 30001445,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -44,6 +62,9 @@
|
||||
{
|
||||
"solarSystemName": "Otanuomi",
|
||||
"solarSystemID": 30000192,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -51,6 +72,9 @@
|
||||
{
|
||||
"solarSystemName": "Otela",
|
||||
"solarSystemID": 30000157,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -58,6 +82,9 @@
|
||||
{
|
||||
"solarSystemName": "Sakenta",
|
||||
"solarSystemID": 30010141,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -65,6 +92,9 @@
|
||||
{
|
||||
"solarSystemName": "Ahtila",
|
||||
"solarSystemID": 30045328,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -72,6 +102,9 @@
|
||||
{
|
||||
"solarSystemName": "Harva",
|
||||
"solarSystemID": 30002225,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -79,6 +112,9 @@
|
||||
{
|
||||
"solarSystemName": "Kuharah",
|
||||
"solarSystemID": 30000021,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -86,6 +122,9 @@
|
||||
{
|
||||
"solarSystemName": "Nani",
|
||||
"solarSystemID": 30001413,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -93,6 +132,9 @@
|
||||
{
|
||||
"solarSystemName": "Niarja",
|
||||
"solarSystemID": 30003504,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -100,6 +142,9 @@
|
||||
{
|
||||
"solarSystemName": "Raravoss",
|
||||
"solarSystemID": 30003495,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -107,6 +152,9 @@
|
||||
{
|
||||
"solarSystemName": "Skarkon",
|
||||
"solarSystemID": 30002411,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -114,6 +162,9 @@
|
||||
{
|
||||
"solarSystemName": "Tunudan",
|
||||
"solarSystemID": 30002770,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -121,6 +172,9 @@
|
||||
{
|
||||
"solarSystemName": "Urhinichi",
|
||||
"solarSystemID": 30040141,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -128,6 +182,9 @@
|
||||
{
|
||||
"solarSystemName": "Ala",
|
||||
"solarSystemID": 30002652,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -135,6 +192,9 @@
|
||||
{
|
||||
"solarSystemName": "Kaunokka",
|
||||
"solarSystemID": 30002797,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -142,6 +202,9 @@
|
||||
{
|
||||
"solarSystemName": "Wirashoda",
|
||||
"solarSystemID": 30000206,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -149,6 +212,9 @@
|
||||
{
|
||||
"solarSystemName": "Archee",
|
||||
"solarSystemID": 30002702,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -156,6 +222,9 @@
|
||||
{
|
||||
"solarSystemName": "Angymonne",
|
||||
"solarSystemID": 30003046,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -163,6 +232,9 @@
|
||||
{
|
||||
"solarSystemName": "Senda",
|
||||
"solarSystemID": 30020141,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -170,6 +242,9 @@
|
||||
{
|
||||
"solarSystemName": "Ichoriya",
|
||||
"solarSystemID": 30045329,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -177,6 +252,9 @@
|
||||
{
|
||||
"solarSystemName": "Arvasaras",
|
||||
"solarSystemID": 30001381,
|
||||
"statics": [
|
||||
"C729"
|
||||
],
|
||||
"effectName": "Dazh Liminality Locus",
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Final"
|
||||
@@ -1343,4 +1421,4 @@
|
||||
"effectPower": 1,
|
||||
"invasionStatus": "Edencom"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[
|
||||
{
|
||||
"mass_regen": "3000000000",
|
||||
"dest": "c13",
|
||||
"dest": ["c13"],
|
||||
"src": ["c1", "c2", "c3", "c4", "c5", "c6", "thera", "c13", "ns"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 5000000,
|
||||
@@ -12,7 +12,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ls",
|
||||
"dest": ["ls"],
|
||||
"src": ["c2"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -23,7 +23,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "hs",
|
||||
"dest": ["hs"],
|
||||
"src": ["hs"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 1000000000,
|
||||
@@ -34,7 +34,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c6",
|
||||
"dest": ["c6"],
|
||||
"src": ["c3", "thera"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -45,7 +45,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 500000000,
|
||||
"dest": "c6",
|
||||
"dest": ["c6"],
|
||||
"src": ["hs"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -56,7 +56,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "hs",
|
||||
"dest": ["hs"],
|
||||
"src": ["c2"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -67,7 +67,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "hs",
|
||||
"dest": ["hs"],
|
||||
"src": ["ls", "ns"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 1000000000,
|
||||
@@ -78,7 +78,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 500000000,
|
||||
"dest": "hs",
|
||||
"dest": ["hs"],
|
||||
"src": ["c6"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -89,7 +89,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": null,
|
||||
"dest": "barbican",
|
||||
"dest": ["barbican"],
|
||||
"src": ["hs", "ls", "ns", "jove"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -100,7 +100,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": "3000000000",
|
||||
"dest": "c5",
|
||||
"dest": ["c5"],
|
||||
"src": ["c1", "c2", "c3", "c4", "c5", "c6", "thera", "c13"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 5000000,
|
||||
@@ -111,7 +111,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c2",
|
||||
"dest": ["c2"],
|
||||
"src": ["c1"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -122,7 +122,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ls",
|
||||
"dest": ["ls"],
|
||||
"src": ["c5", "c6"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 1350000000,
|
||||
@@ -133,7 +133,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c3",
|
||||
"dest": ["c3"],
|
||||
"src": ["c4"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -144,7 +144,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 500000000,
|
||||
"dest": "ns",
|
||||
"dest": ["ns"],
|
||||
"src": ["c6"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 1350000000,
|
||||
@@ -155,7 +155,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 500000000,
|
||||
"dest": "ls",
|
||||
"dest": ["ls"],
|
||||
"src": ["c6"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 1000000000,
|
||||
@@ -166,7 +166,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": null,
|
||||
"dest": "conflux",
|
||||
"dest": ["conflux"],
|
||||
"src": ["hs", "ls", "ns", "jove"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -177,18 +177,18 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "pochven",
|
||||
"src": ["hs", "ls", "ns", "pochven"],
|
||||
"static": false,
|
||||
"dest": ["hs", "ls", "ns", "pochven"],
|
||||
"src": ["pochven"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 1000000000,
|
||||
"lifetime": "12",
|
||||
"total_mass": 1000000000,
|
||||
"name": "C729",
|
||||
"respawn": ["wandering", "reverse"]
|
||||
"respawn": ["static"]
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c2",
|
||||
"dest": ["c2"],
|
||||
"src": ["c5"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -199,7 +199,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c2",
|
||||
"dest": ["c2"],
|
||||
"src": ["c2", "drifter"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -210,7 +210,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "hs",
|
||||
"dest": ["hs"],
|
||||
"src": ["c5", "c6"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 1000000000,
|
||||
@@ -221,7 +221,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 500000000,
|
||||
"dest": "hs",
|
||||
"dest": ["hs"],
|
||||
"src": ["c3", "c4-shattered"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -232,7 +232,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": "3000000000",
|
||||
"dest": "c1",
|
||||
"dest": ["c1"],
|
||||
"src": ["c1", "c2", "c3", "c4", "c5", "c6", "thera", "c13"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 5000000,
|
||||
@@ -243,7 +243,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c4",
|
||||
"dest": ["c4"],
|
||||
"src": ["c5"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -254,7 +254,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ns",
|
||||
"dest": ["ns"],
|
||||
"src": ["c2"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -265,7 +265,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ns",
|
||||
"dest": ["ns"],
|
||||
"src": ["thera"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 1000000000,
|
||||
@@ -276,7 +276,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "thera",
|
||||
"dest": ["thera"],
|
||||
"src": ["c2", "c3", "c4", "c5", "c6"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -287,7 +287,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "pochven",
|
||||
"dest": ["pochven"],
|
||||
"src": ["c2", "c3", "c4", "c5", "c6"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -298,7 +298,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "thera",
|
||||
"dest": ["thera"],
|
||||
"src": ["c1"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -309,7 +309,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": "3000000000",
|
||||
"dest": "c6",
|
||||
"dest": ["c6"],
|
||||
"src": ["c1", "c2", "c3", "c4", "c5", "c6", "thera", "c13"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 5000000,
|
||||
@@ -320,7 +320,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c2",
|
||||
"dest": ["c2"],
|
||||
"src": ["c6"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -331,7 +331,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c1",
|
||||
"dest": ["c1"],
|
||||
"src": ["c1"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -342,7 +342,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c5",
|
||||
"dest": ["c5"],
|
||||
"src": ["c5"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 2000000000,
|
||||
@@ -353,7 +353,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c5",
|
||||
"dest": ["c5"],
|
||||
"src": ["c4"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -364,7 +364,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c2",
|
||||
"dest": ["c2"],
|
||||
"src": ["c3", "thera"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -375,7 +375,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ls",
|
||||
"dest": ["ls"],
|
||||
"src": ["c1"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -386,7 +386,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ls",
|
||||
"dest": ["ls"],
|
||||
"src": ["c1", "c2", "c3", "c4", "thera"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -397,7 +397,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ns",
|
||||
"dest": ["ns"],
|
||||
"src": ["c4"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -408,7 +408,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ns",
|
||||
"dest": ["ns"],
|
||||
"src": ["c3", "c4-shattered", "c5-shattered", "c6-shattered"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -419,7 +419,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": "3000000000",
|
||||
"dest": "c2",
|
||||
"dest": ["c2"],
|
||||
"src": ["c1", "c2", "c3", "c4", "c5", "c6", "thera", "c13"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 5000000,
|
||||
@@ -430,7 +430,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "thera",
|
||||
"dest": ["thera"],
|
||||
"src": ["ns"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 1000000000,
|
||||
@@ -441,7 +441,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c3",
|
||||
"dest": ["c3"],
|
||||
"src": ["c6"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -452,7 +452,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c5",
|
||||
"dest": ["c5"],
|
||||
"src": ["c1", "ns"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -463,7 +463,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": "3000000000",
|
||||
"dest": "c4",
|
||||
"dest": ["c4"],
|
||||
"src": ["c1", "c2", "c3", "c4", "c5", "c6", "thera", "c13"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 5000000,
|
||||
@@ -474,7 +474,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "thera",
|
||||
"dest": ["thera"],
|
||||
"src": ["ls"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -485,7 +485,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c3",
|
||||
"dest": ["c3"],
|
||||
"src": ["c5"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -496,7 +496,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c5",
|
||||
"dest": ["c5"],
|
||||
"src": ["hs"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 1000000000,
|
||||
@@ -507,7 +507,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c4",
|
||||
"dest": ["c4"],
|
||||
"src": ["c1"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -518,7 +518,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c5",
|
||||
"dest": ["c5"],
|
||||
"src": ["c2", "drifter"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -529,7 +529,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "hs",
|
||||
"dest": ["hs"],
|
||||
"src": ["c1"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -540,7 +540,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ls",
|
||||
"dest": ["ls"],
|
||||
"src": ["c4"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -551,7 +551,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c5",
|
||||
"dest": ["c5"],
|
||||
"src": ["ls", "ns"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 2000000000,
|
||||
@@ -562,7 +562,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c2",
|
||||
"dest": ["c2"],
|
||||
"src": ["c4"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -573,7 +573,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c5",
|
||||
"dest": ["c5"],
|
||||
"src": ["c3", "thera"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -584,7 +584,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ls",
|
||||
"dest": ["ls"],
|
||||
"src": ["ls", "ns"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 2000000000,
|
||||
@@ -595,7 +595,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c3",
|
||||
"dest": ["c3"],
|
||||
"src": ["c3", "thera"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -606,7 +606,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 100000000,
|
||||
"dest": "c4",
|
||||
"dest": ["c4"],
|
||||
"src": ["hs", "ls", "ns"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -617,7 +617,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c3",
|
||||
"dest": ["c3"],
|
||||
"src": ["c2", "drifter"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -628,7 +628,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c3",
|
||||
"dest": ["c3"],
|
||||
"src": ["c1", "ns"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -639,7 +639,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c1",
|
||||
"dest": ["c1"],
|
||||
"src": ["c4"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -650,7 +650,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": "3000000000",
|
||||
"dest": "ns",
|
||||
"dest": ["ns"],
|
||||
"src": ["c1", "c2", "c3", "c4", "c5", "c6", "thera", "c13"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 5000000,
|
||||
@@ -661,7 +661,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "hs",
|
||||
"dest": ["hs"],
|
||||
"src": ["thera"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -672,7 +672,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c1",
|
||||
"dest": ["c1"],
|
||||
"src": ["c6"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -683,7 +683,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ls",
|
||||
"dest": ["ls"],
|
||||
"src": ["hs"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 1000000000,
|
||||
@@ -694,7 +694,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c4",
|
||||
"dest": ["c4"],
|
||||
"src": ["pochven"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -705,7 +705,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": null,
|
||||
"dest": "redoubt",
|
||||
"dest": ["redoubt"],
|
||||
"src": ["hs", "ls", "ns", "jove"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -716,7 +716,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c6",
|
||||
"dest": ["c6"],
|
||||
"src": ["c2", "drifter"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -727,7 +727,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c2",
|
||||
"dest": ["c2"],
|
||||
"src": ["hs", "ls", "ns"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -738,7 +738,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "hs",
|
||||
"dest": ["hs"],
|
||||
"src": ["c4"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -749,7 +749,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ns",
|
||||
"dest": ["ns"],
|
||||
"src": ["ls", "ns"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 2000000000,
|
||||
@@ -760,7 +760,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c6",
|
||||
"dest": ["c6"],
|
||||
"src": ["c1", "ns"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -771,7 +771,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": null,
|
||||
"dest": "sentinel",
|
||||
"dest": ["sentinel"],
|
||||
"src": ["hs", "ls", "ns", "jove"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -782,7 +782,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c4",
|
||||
"dest": ["c4"],
|
||||
"src": ["c3", "thera"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -793,7 +793,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "thera",
|
||||
"dest": ["thera"],
|
||||
"src": ["hs"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -804,7 +804,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ls",
|
||||
"dest": ["ls"],
|
||||
"src": ["c3", "c4-shattered", "c5-shattered"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -815,7 +815,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 500000000,
|
||||
"dest": "c6",
|
||||
"dest": ["c6"],
|
||||
"src": ["ls", "ns"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 2000000000,
|
||||
@@ -826,7 +826,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "pochven",
|
||||
"dest": ["pochven"],
|
||||
"src": ["ns"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -837,7 +837,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c6",
|
||||
"dest": ["c6"],
|
||||
"src": ["c4"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -848,7 +848,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ns",
|
||||
"dest": ["ns"],
|
||||
"src": ["hs"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 1000000000,
|
||||
@@ -859,7 +859,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c1",
|
||||
"dest": ["c1"],
|
||||
"src": ["c3", "thera"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -870,7 +870,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c6",
|
||||
"dest": ["c6"],
|
||||
"src": ["c5"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 2000000000,
|
||||
@@ -881,7 +881,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ls",
|
||||
"dest": ["ls"],
|
||||
"src": ["thera"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -892,7 +892,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c5",
|
||||
"dest": ["c5"],
|
||||
"src": ["c6"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 2000000000,
|
||||
@@ -903,7 +903,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": null,
|
||||
"dest": "vidette",
|
||||
"dest": ["vidette"],
|
||||
"src": ["hs", "ls", "ns", "jove"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -914,7 +914,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c6",
|
||||
"dest": ["c6"],
|
||||
"src": ["c6"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 2000000000,
|
||||
@@ -925,7 +925,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ns",
|
||||
"dest": ["ns"],
|
||||
"src": ["pochven"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -936,7 +936,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c3",
|
||||
"dest": ["c3"],
|
||||
"src": ["hs", "ls", "ns"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -947,7 +947,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c4",
|
||||
"dest": ["c4"],
|
||||
"src": ["c4"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -958,7 +958,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c4",
|
||||
"dest": ["c4"],
|
||||
"src": ["c2", "drifter"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -969,7 +969,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c1",
|
||||
"dest": ["c1"],
|
||||
"src": ["c5"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -980,7 +980,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": "3000000000",
|
||||
"dest": "c3",
|
||||
"dest": ["c3"],
|
||||
"src": ["c1", "c2", "c3", "c4", "c5", "c6", "thera", "c13"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 5000000,
|
||||
@@ -991,7 +991,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ns",
|
||||
"dest": ["ns"],
|
||||
"src": ["c1"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -1002,7 +1002,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ns",
|
||||
"dest": ["ns"],
|
||||
"src": ["c5", "c6"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 2000000000,
|
||||
@@ -1013,7 +1013,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c4",
|
||||
"dest": ["c4"],
|
||||
"src": ["c6"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 375000000,
|
||||
@@ -1024,7 +1024,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c1",
|
||||
"dest": ["c1"],
|
||||
"src": ["c2", "drifter"],
|
||||
"static": true,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -1035,7 +1035,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "c1",
|
||||
"dest": ["c1"],
|
||||
"src": ["hs", "ls", "ns"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -1046,7 +1046,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "ls",
|
||||
"dest": ["ls"],
|
||||
"src": ["c1", "c2", "c3", "c4", "c5", "c6"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -1068,7 +1068,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "pochven",
|
||||
"dest": ["pochven"],
|
||||
"src": ["pochven"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -1079,7 +1079,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "pochven",
|
||||
"dest": ["pochven"],
|
||||
"src": ["pochven"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 62000000,
|
||||
@@ -1090,7 +1090,7 @@
|
||||
},
|
||||
{
|
||||
"mass_regen": 0,
|
||||
"dest": "pochven",
|
||||
"dest": ["pochven"],
|
||||
"src": ["pochven"],
|
||||
"static": false,
|
||||
"max_mass_per_jump": 62000000,
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
defmodule WandererApp.Repo.Migrations.AddMassToMapChainPassages do
|
||||
@moduledoc """
|
||||
Updates resources based on their most recent snapshots.
|
||||
|
||||
This file was autogenerated with `mix ash_postgres.generate_migrations`
|
||||
"""
|
||||
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
alter table(:maps_v1) do
|
||||
modify :scopes, {:array, :text}, default: '{wormholes}'
|
||||
end
|
||||
|
||||
alter table(:map_chain_passages_v1) do
|
||||
add :mass, :bigint
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
alter table(:map_chain_passages_v1) do
|
||||
remove :mass
|
||||
end
|
||||
|
||||
alter table(:maps_v1) do
|
||||
modify :scopes, {:array, :text}, default: nil
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,177 @@
|
||||
{
|
||||
"attributes": [
|
||||
{
|
||||
"allow_nil?": false,
|
||||
"default": "fragment(\"gen_random_uuid()\")",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": true,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "id",
|
||||
"type": "uuid"
|
||||
},
|
||||
{
|
||||
"allow_nil?": true,
|
||||
"default": "nil",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "ship_type_id",
|
||||
"type": "bigint"
|
||||
},
|
||||
{
|
||||
"allow_nil?": true,
|
||||
"default": "nil",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "ship_name",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"allow_nil?": true,
|
||||
"default": "nil",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "mass",
|
||||
"type": "bigint"
|
||||
},
|
||||
{
|
||||
"allow_nil?": true,
|
||||
"default": "nil",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "solar_system_source_id",
|
||||
"type": "bigint"
|
||||
},
|
||||
{
|
||||
"allow_nil?": true,
|
||||
"default": "nil",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "solar_system_target_id",
|
||||
"type": "bigint"
|
||||
},
|
||||
{
|
||||
"allow_nil?": false,
|
||||
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "inserted_at",
|
||||
"type": "utc_datetime_usec"
|
||||
},
|
||||
{
|
||||
"allow_nil?": false,
|
||||
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "updated_at",
|
||||
"type": "utc_datetime_usec"
|
||||
},
|
||||
{
|
||||
"allow_nil?": false,
|
||||
"default": "nil",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": true,
|
||||
"references": {
|
||||
"deferrable": false,
|
||||
"destination_attribute": "id",
|
||||
"destination_attribute_default": null,
|
||||
"destination_attribute_generated": null,
|
||||
"index?": false,
|
||||
"match_type": null,
|
||||
"match_with": null,
|
||||
"multitenancy": {
|
||||
"attribute": null,
|
||||
"global": null,
|
||||
"strategy": null
|
||||
},
|
||||
"name": "map_chain_passages_v1_map_id_fkey",
|
||||
"on_delete": null,
|
||||
"on_update": null,
|
||||
"primary_key?": true,
|
||||
"schema": null,
|
||||
"table": "maps_v1"
|
||||
},
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "map_id",
|
||||
"type": "uuid"
|
||||
},
|
||||
{
|
||||
"allow_nil?": false,
|
||||
"default": "nil",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": true,
|
||||
"references": {
|
||||
"deferrable": false,
|
||||
"destination_attribute": "id",
|
||||
"destination_attribute_default": null,
|
||||
"destination_attribute_generated": null,
|
||||
"index?": false,
|
||||
"match_type": null,
|
||||
"match_with": null,
|
||||
"multitenancy": {
|
||||
"attribute": null,
|
||||
"global": null,
|
||||
"strategy": null
|
||||
},
|
||||
"name": "map_chain_passages_v1_character_id_fkey",
|
||||
"on_delete": null,
|
||||
"on_update": null,
|
||||
"primary_key?": true,
|
||||
"schema": null,
|
||||
"table": "character_v1"
|
||||
},
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "character_id",
|
||||
"type": "uuid"
|
||||
}
|
||||
],
|
||||
"base_filter": null,
|
||||
"check_constraints": [],
|
||||
"custom_indexes": [],
|
||||
"custom_statements": [],
|
||||
"has_create_action": true,
|
||||
"hash": "00AA9FB7759FCDF16C5C627E6735E0B568E517A360F2002AFE00018BD6CD8F2A",
|
||||
"identities": [],
|
||||
"multitenancy": {
|
||||
"attribute": null,
|
||||
"global": null,
|
||||
"strategy": null
|
||||
},
|
||||
"repo": "Elixir.WandererApp.Repo",
|
||||
"schema": null,
|
||||
"table": "map_chain_passages_v1"
|
||||
}
|
||||
277
priv/resource_snapshots/repo/maps_v1/20260331192521.json
Normal file
277
priv/resource_snapshots/repo/maps_v1/20260331192521.json
Normal file
@@ -0,0 +1,277 @@
|
||||
{
|
||||
"attributes": [
|
||||
{
|
||||
"allow_nil?": false,
|
||||
"default": "fragment(\"gen_random_uuid()\")",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": true,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "id",
|
||||
"type": "uuid"
|
||||
},
|
||||
{
|
||||
"allow_nil?": false,
|
||||
"default": "nil",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "name",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"allow_nil?": false,
|
||||
"default": "nil",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "slug",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"allow_nil?": true,
|
||||
"default": "nil",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "description",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"allow_nil?": true,
|
||||
"default": "nil",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "personal_note",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"allow_nil?": true,
|
||||
"default": "nil",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "public_api_key",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"allow_nil?": true,
|
||||
"default": "[]",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "hubs",
|
||||
"type": [
|
||||
"array",
|
||||
"text"
|
||||
]
|
||||
},
|
||||
{
|
||||
"allow_nil?": false,
|
||||
"default": "\"wormholes\"",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "scope",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"allow_nil?": true,
|
||||
"default": "false",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "deleted",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"allow_nil?": true,
|
||||
"default": "false",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "only_tracked_characters",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"allow_nil?": true,
|
||||
"default": "nil",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "options",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"allow_nil?": false,
|
||||
"default": "false",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "webhooks_enabled",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"allow_nil?": false,
|
||||
"default": "false",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "sse_enabled",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"allow_nil?": true,
|
||||
"default": "'{wormholes}'",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "scopes",
|
||||
"type": [
|
||||
"array",
|
||||
"text"
|
||||
]
|
||||
},
|
||||
{
|
||||
"allow_nil?": false,
|
||||
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "inserted_at",
|
||||
"type": "utc_datetime_usec"
|
||||
},
|
||||
{
|
||||
"allow_nil?": false,
|
||||
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": null,
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "updated_at",
|
||||
"type": "utc_datetime_usec"
|
||||
},
|
||||
{
|
||||
"allow_nil?": true,
|
||||
"default": "nil",
|
||||
"generated?": false,
|
||||
"precision": null,
|
||||
"primary_key?": false,
|
||||
"references": {
|
||||
"deferrable": false,
|
||||
"destination_attribute": "id",
|
||||
"destination_attribute_default": null,
|
||||
"destination_attribute_generated": null,
|
||||
"index?": false,
|
||||
"match_type": null,
|
||||
"match_with": null,
|
||||
"multitenancy": {
|
||||
"attribute": null,
|
||||
"global": null,
|
||||
"strategy": null
|
||||
},
|
||||
"name": "maps_v1_owner_id_fkey",
|
||||
"on_delete": null,
|
||||
"on_update": null,
|
||||
"primary_key?": true,
|
||||
"schema": null,
|
||||
"table": "character_v1"
|
||||
},
|
||||
"scale": null,
|
||||
"size": null,
|
||||
"source": "owner_id",
|
||||
"type": "uuid"
|
||||
}
|
||||
],
|
||||
"base_filter": null,
|
||||
"check_constraints": [],
|
||||
"custom_indexes": [],
|
||||
"custom_statements": [],
|
||||
"has_create_action": true,
|
||||
"hash": "21B2A84E49086754B40476C11B4EA5F576E8537449FB776941098773C5CD705F",
|
||||
"identities": [
|
||||
{
|
||||
"all_tenants?": false,
|
||||
"base_filter": null,
|
||||
"index_name": "maps_v1_unique_public_api_key_index",
|
||||
"keys": [
|
||||
{
|
||||
"type": "atom",
|
||||
"value": "public_api_key"
|
||||
}
|
||||
],
|
||||
"name": "unique_public_api_key",
|
||||
"nils_distinct?": true,
|
||||
"where": null
|
||||
},
|
||||
{
|
||||
"all_tenants?": false,
|
||||
"base_filter": null,
|
||||
"index_name": "maps_v1_unique_slug_index",
|
||||
"keys": [
|
||||
{
|
||||
"type": "atom",
|
||||
"value": "slug"
|
||||
}
|
||||
],
|
||||
"name": "unique_slug",
|
||||
"nils_distinct?": true,
|
||||
"where": null
|
||||
}
|
||||
],
|
||||
"multitenancy": {
|
||||
"attribute": null,
|
||||
"global": null,
|
||||
"strategy": null
|
||||
},
|
||||
"repo": "Elixir.WandererApp.Repo",
|
||||
"schema": null,
|
||||
"table": "maps_v1"
|
||||
}
|
||||
Reference in New Issue
Block a user