some extra basic items & recipes
This commit is contained in:
parent
39014d3b90
commit
8a935e00db
|
@ -1,5 +1,5 @@
|
|||
import { pickRandom } from '../util';
|
||||
import { DefaultItems, Item, Items, formatItems, getDefaultItem, getItemQuantity } from './items';
|
||||
import { DefaultItems, Item, Items, formatItems, formatItemsArray, getDefaultItem, getItemQuantity } from './items';
|
||||
|
||||
export interface CraftingStation {
|
||||
key: string,
|
||||
|
@ -24,7 +24,8 @@ export const craftingStations: CraftingStation[] = [
|
|||
description: 'Pick up various sticks and stones from the forest',
|
||||
emoji: '🌲',
|
||||
cooldown: 60 * 5,
|
||||
formatRecipe: (_inputs, _requirements, outputs, disableBold = false) => `${outputs.map(i => formatItems(i.item, i.quantity, disableBold) + '?').join(' ')}`,
|
||||
formatRecipe: (_inputs, requirements, outputs, disableBold = false) =>
|
||||
`${requirements.length > 0 ? `w/ ${formatItemsArray(requirements, disableBold)}: ` : ''}${outputs.map(i => formatItems(i.item, i.quantity, disableBold) + '?').join(' ')}`,
|
||||
manipulateResults: (outputs) => {
|
||||
const totalItems = outputs.reduce((a, b) => a + b.quantity, 0);
|
||||
// grab from 1/3 to the entire pool, ensure it never goes below 1
|
||||
|
|
|
@ -16,6 +16,9 @@ export enum DefaultItems {
|
|||
TWIG = 4,
|
||||
APPLE = 5,
|
||||
BERRIES = 6,
|
||||
LOG = 7,
|
||||
AXE = 8,
|
||||
BLOOD = 9,
|
||||
}
|
||||
|
||||
export const defaultItems: DefaultItem[] = [
|
||||
|
@ -71,7 +74,34 @@ export const defaultItems: DefaultItem[] = [
|
|||
type: 'consumable',
|
||||
maxStack: 16,
|
||||
untradable: false
|
||||
}
|
||||
},
|
||||
{
|
||||
id: -7,
|
||||
name: 'Log',
|
||||
description: '㏒',
|
||||
emoji: '🪵',
|
||||
type: 'plain',
|
||||
maxStack: 64,
|
||||
untradable: false
|
||||
},
|
||||
{
|
||||
id: -8,
|
||||
name: 'Axe',
|
||||
description: 'You could chop trees with this. Or commit murder! The choice is up to you',
|
||||
emoji: '🪓',
|
||||
type: 'weapon',
|
||||
maxStack: 1,
|
||||
untradable: false
|
||||
},
|
||||
{
|
||||
id: -9,
|
||||
name: 'Blood',
|
||||
description: 'ow',
|
||||
emoji: '🩸',
|
||||
type: 'plain',
|
||||
maxStack: 1024,
|
||||
untradable: false
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
|
|
|
@ -57,6 +57,41 @@ export const defaultRecipes: DefaultRecipe[] = [
|
|||
{ item: getDefaultItem(DefaultItems.BERRIES), quantity: 6 },
|
||||
]
|
||||
},
|
||||
{
|
||||
id: -5,
|
||||
station: 'forage',
|
||||
inputs: [],
|
||||
requirements: [
|
||||
{ item: getDefaultItem(DefaultItems.AXE), quantity: 1 },
|
||||
],
|
||||
outputs: [
|
||||
{ item: getDefaultItem(DefaultItems.TWIG), quantity: 1 },
|
||||
{ item: getDefaultItem(DefaultItems.LOG), quantity: 3 },
|
||||
]
|
||||
},
|
||||
{
|
||||
id: -6,
|
||||
station: 'workbench',
|
||||
inputs: [
|
||||
{ item: getDefaultItem(DefaultItems.PEBBLE), quantity: 4 },
|
||||
{ item: getDefaultItem(DefaultItems.TWIG), quantity: 2 },
|
||||
],
|
||||
requirements: [],
|
||||
outputs: [
|
||||
{ item: getDefaultItem(DefaultItems.AXE), quantity: 1 },
|
||||
]
|
||||
},
|
||||
{
|
||||
id: -7,
|
||||
station: 'hand',
|
||||
inputs: [],
|
||||
requirements: [
|
||||
{ item: getDefaultItem(DefaultItems.AXE), quantity: 1 },
|
||||
],
|
||||
outputs: [
|
||||
{ item: getDefaultItem(DefaultItems.BLOOD), quantity: 6 },
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
export function getDefaultRecipe(id: number): DefaultRecipe | undefined {
|
||||
|
|
Loading…
Reference in New Issue