Skip to content

Commit

Permalink
(core) 修复逻辑绘图中content图标丢失
Browse files Browse the repository at this point in the history
  • Loading branch information
way-zer committed Mar 1, 2022
1 parent 117ca7a commit 5ecd386
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions core/src/cf/wayzer/ContentsLoader.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package cf.wayzer

import arc.Core
import arc.Events
import arc.files.Fi
import arc.func.Cons
Expand All @@ -8,10 +9,7 @@ import arc.struct.Seq
import mindustry.Vars
import mindustry.content.*
import mindustry.core.ContentLoader
import mindustry.ctype.Content
import mindustry.ctype.ContentList
import mindustry.ctype.ContentType
import mindustry.ctype.MappableContent
import mindustry.ctype.*
import mindustry.game.EventType
import mindustry.io.SaveVersion
import mindustry.logic.LExecutor
Expand Down Expand Up @@ -207,6 +205,16 @@ object ContentsLoader : ContentLoader() {
doMeasureTimeLog("Vars.schematics.load") {
Vars.schematics.load()
}
doMeasureTimeLog("Set UnlockableContent.iconId") {
//copy from mindustry.ui.Fonts.loadContentIcons
var lastCid = 1
each {
if (it is UnlockableContent && Core.atlas.find(it.name + "-icon-logic").found()) {
it.iconId = lastCid
lastCid++
}
}
}
}
}

Expand Down

0 comments on commit 5ecd386

Please sign in to comment.