Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
A
azurgears
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
Victor Melnik
azurgears
Commits
df008f7d
Commit
df008f7d
authored
2 years ago
by
Victor Melnik
Browse files
Options
Downloads
Patches
Plain Diff
Update ships, fix scripts
parent
4d6238c4
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/data/_fetchShipStats.own
+7
-4
7 additions, 4 deletions
src/data/_fetchShipStats.own
src/data/ships.yml
+24425
-6252
24425 additions, 6252 deletions
src/data/ships.yml
with
24432 additions
and
6256 deletions
src/data/_fetchShipStats.own
+
7
−
4
View file @
df008f7d
...
...
@@ -6,7 +6,7 @@ def jsoupGet(url) = Jsoup.connect(url)
.get()
// Fetch ship classes
doc = jsoupGet("https://azurlane.koumakan.jp/List_of_Ships_by_Class")
doc = jsoupGet("https://azurlane.koumakan.jp/
wiki/
List_of_Ships_by_Class")
shipToClassProjection = {}
rows = doc.select(".wikitable tr:has(td)").toArray()
for row : rows {
...
...
@@ -18,7 +18,7 @@ for row : rows {
}
// Fetch ships stats
doc = jsoupGet("https://azurlane.koumakan.jp/List_of_Ships_by_Stats")
doc = jsoupGet("https://azurlane.koumakan.jp/
wiki/
List_of_Ships_by_Stats")
tables = doc.select(".azltable.sortable").toArray()
ships = stream(tables)
.flatMap(def(table) = table.select("tr").toArray())
...
...
@@ -52,7 +52,9 @@ for ship : ships {
}
level = 1
if arrayKeyExists("level100", shipsById[id]) {
if arrayKeyExists("level120", shipsById[id]) {
level = 125
} else if arrayKeyExists("level100", shipsById[id]) {
level = 120
} else if arrayKeyExists("level1", shipsById[id]) {
level = 100
...
...
@@ -117,12 +119,13 @@ def rarityIndex(rarityName) {
}
def fixCosts(ship) {
for lvl : [1, 100, 120] {
for lvl : [1, 100, 120
, 125
] {
level = "level" + lvl
if arrayKeyExists(level, ship) && toInt(ship[level]["cost"]) == 0 {
costMax = toInt(ship["level1"]["cost"] ?? 0)
costMax = max(costMax, toInt(ship["level100"]["cost"] ?? 0))
costMax = max(costMax, toInt(ship["level120"]["cost"] ?? 0))
costMax = max(costMax, toInt(ship["level125"]["cost"] ?? 0))
ship[level]["cost"] = costMax
}
}
...
...
This diff is collapsed.
Click to expand it.
src/data/ships.yml
+
24425
−
6252
View file @
df008f7d
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment