Add durable recipe discovery and profession crafting
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { api, el, type RecordCharacter } from './portal-shared';
|
||||
import { statLabel } from './character-stats';
|
||||
|
||||
type Catalog={gathering?:{resources:{id:string;name:string;output:string}[];consumables:{id:string;name:string}[]};items:{id:string;name:string}[];titles:{id:string;name:string}[]};
|
||||
type Catalog={crafting?:{materials:{id:string;name:string}[]};gathering?:{resources:{id:string;name:string;output:string}[];consumables:{id:string;name:string}[]};items:{id:string;name:string}[];titles:{id:string;name:string}[]};
|
||||
export function playerContent(record:RecordCharacter,enabled:boolean,onQueued:()=>void){
|
||||
const root=el('section','','player-content');root.append(el('h3','Manage items and titles'));
|
||||
if(!enabled){root.append(el('p','A living character or survivor with an available world owner is required.','muted'));return root;}
|
||||
@@ -21,6 +21,7 @@ export function playerContent(record:RecordCharacter,enabled:boolean,onQueued:()
|
||||
for(const i of catalog.items)choice.append(new Option(`${i.name} (${i.id})`,i.id));
|
||||
for(const r of catalog.gathering?.resources??[])if(r.output==='self')choice.append(new Option(r.name,r.id));
|
||||
for(const i of catalog.gathering?.consumables??[])choice.append(new Option(i.name,i.id));
|
||||
for(const m of catalog.crafting?.materials??[])choice.append(new Option(m.name,m.id));
|
||||
for(const id of ['axe','flint_and_steel','fishing_pole','wood','ore','herb','bandage','escape_stone'])choice.append(new Option(statLabel(id),id));
|
||||
notice.textContent='Items go into the bag. Equipment requirements still apply when equipping.';break;
|
||||
case 'remove-item':
|
||||
|
||||
Reference in New Issue
Block a user