diff --git a/app/routes/home.tsx b/app/routes/home.tsx index 415ae12..586f1a0 100644 --- a/app/routes/home.tsx +++ b/app/routes/home.tsx @@ -3,6 +3,7 @@ import { Welcome } from "../welcome/welcome"; import { Awareness } from "../skills/awareness"; import { Body } from "../skills/body"; import { Control } from "../skills/control"; +import { Education } from "../skills/education" export function meta({ }: Route.MetaArgs) { return [ @@ -18,6 +19,7 @@ export default function Home() { + ); diff --git a/app/skills/education.tsx b/app/skills/education.tsx new file mode 100644 index 0000000..f954d50 --- /dev/null +++ b/app/skills/education.tsx @@ -0,0 +1,159 @@ +import { useState, useEffect } from 'react' + +const baseUrl = typeof window !== 'undefined' + ? window.location.origin + : process.env.VITE_VERCEL_URL || 'http://localhost:5173' // Fallback for your server env + +export function Education() { + + const [stats, setStats] = useState([]) + const [skills, setSkills] = useState([]) + + useEffect(() => { + fetch(`${baseUrl}/characters/collateral/stats.json`) + .then(r => r.json()) + .then(j => setStats(j)) + + fetch(`${baseUrl}/characters/collateral/skills.json`) + .then(r => r.json()) + .then(j => setSkills(j)) + }) + + + return ( +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EDUCATION SKILLSRANKSSTATBASE
ACCOUNTING{skills.accounting}{stats.int}{stats.int + skills.accounting}
ANIMAL HANDLING{skills.animalhandling}{stats.int}{stats.int + skills.animalhandling}
BUREAUCRAY{skills.bureaucracy}{stats.int}{stats.int + skills.bureaucracy}
BUSINESS{skills.business}{stats.int}{stats.int + skills.business}
COMPOSITION{skills.composition}{stats.int}{stats.int + skills.composition}
CRIMINOLOGY{skills.criminology}{stats.int}{stats.int + skills.criminology}
CRYPTOGRAPHY{skills.cryptography}{stats.int}{stats.int + skills.cryptography}
DEDUCTION{skills.deduction}{stats.int}{stats.int + skills.deduction}
EDUCATION{skills.education}{stats.int}{stats.int + skills.education}
GAMBLE{skills.gamble}{stats.int}{stats.int + skills.gamble}
LANGUAGE:------
-- STREETSLANG{skills.lang_streetslang}{stats.int}{stats.int + skills.lang_streetslang}
-- ENGLISH{skills.lang_english}{stats.int}{stats.int + skills.lang_english}
-- SPANISH{skills.lang_spanish}{stats.int}{stats.int + skills.lang_spanish}
LIBRARY SEARCH{skills.librarysearch}{stats.int}{stats.int + skills.librarysearch}
LOCAL EXPERT:------
-- OLD COMBAT ZONE{skills.localex_ocz}{stats.int}{stats.int + skills.localex_ocz}
-- HOT ZONE{skills.localex_hotzone}{stats.int}{stats.int + skills.localex_hotzone}
TACTICS{skills.tactics}{stats.int}{stats.int + skills.tactics}
WILDERNESS SEARCH{skills.wildernesssearch}{stats.int}{stats.int + skills.wildernesssearch}
+
+ ) +} diff --git a/public/characters/collateral/skills.json b/public/characters/collateral/skills.json index 48db23b..d36e536 100644 --- a/public/characters/collateral/skills.json +++ b/public/characters/collateral/skills.json @@ -13,5 +13,23 @@ "driveland": 0, "pilotair": 0, "pilotsea": 0, - "riding": 0 + "riding": 0, + "accounting": 0, + "animalhandling": 0, + "bureaucracy": 0, + "business": 0, + "composition": 0, + "criminology": 0, + "cryptography": 0, + "deduction": 0, + "education": 2, + "gamble": 0, + "lang_streetslang": 2, + "lang_english": 4, + "lang_spanish": 2, + "librarysearch": 0, + "localex_ocz": 0, + "localex_hotzone": 0, + "tactics": 0, + "wildernesssearch": 0 }