Skip to content

Commit

Permalink
chore(readme): document updated method signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Sep 11, 2024
1 parent 13bcf89 commit b7ae1b6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,35 +41,36 @@ const indexJson = await fetch('https://www.uicons-repo.com/index.json').then(
uicons.init(indexJson)

// Below are some example usages with variable names for demonstration, see intellisense in your IDE for type information
// Please note that in some cases, such as with Stardust, the `reward_id` is the `amount` of the reward
const device = uicons.device(online)
const gym = uicons.gym(team_id, trainer_count, in_battle, ex, ar, power_level)
const invasion = uicons.invasion(grunt_id, confirmed)
const misc = uicons.misc(filename_without_extension)
const nest = uicons.nest(type_id)
const pokemon = uicons.pokemon(
pokemon_id,
form_id,
evolution_id,
gender_id,
form_id,
costume_id,
gender_id,
alignment_id,
bread_id,
shiny
)
const type = uicons.type(type_id)
const pokestop = uicons.pokestop(
lure_id,
power,
display,
invasion_active,
quest_active,
ar
power,
)
// Please note that in some cases, such as with Stardust, the `reward_id` is the `amount` of the reward
const egg = uicons.raidEgg(raid_level, hatched, ex)
const reward = uicons.reward(reward_type_id, reward_id, amount)
const invasion = uicons.invasion(grunt_id, confirmed)
const gym = uicons.gym(team_id, trainer_count, in_battle, ex, ar)
const egg = uicons.egg(raid_level, hatched, ex)
const team = uicons.team(team_id)
const weather = uicons.weather(weather_id)
const nest = uicons.nest(type_id)
const misc = uicons.misc(filename_without_extension)
const device = uicons.device(online)
const rewardWithOutId = uicons.reward(reward_type_id, amount)
const spawnpoint = uicons.spawnpoint(has_known_tth)
const team = uicons.team(team_id)
const type = uicons.type(type_id)
const weather = uicons.weather(weather_id, severity, 'day')
```

## Development
Expand Down
4 changes: 2 additions & 2 deletions src/uicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ export class UICONS<Index extends UiconsIndex = UiconsIndex> {
): string
reward<U extends RewardTypeKeys>(
questRewardType: U = 'unset' as U,
rewardId = 0,
rewardIdOrAmount = 0,
amount = 0
): string {
if (!this.#isReady('reward')) return ''
Expand All @@ -553,7 +553,7 @@ export class UICONS<Index extends UiconsIndex = UiconsIndex> {
Number.isInteger(amountSafe) && amountSafe > 1
? [`_a${amount}`, '']
: ['']
const safeId = +rewardId || amountSafe || 0
const safeId = +rewardIdOrAmount || amountSafe || 0

for (let a = 0; a < amountSuffixes.length; a += 1) {
const result = `${safeId}${amountSuffixes[a]}.${
Expand Down

0 comments on commit b7ae1b6

Please sign in to comment.