Skip to content

Commit

Permalink
Merge pull request #21 from way-zer/fix-exFactoryNotConsume
Browse files Browse the repository at this point in the history
修复逻辑绘图中content图标丢失
  • Loading branch information
way-zer authored Mar 1, 2022
2 parents 340bd89 + 5ecd386 commit ec159ca
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 ec159ca

Please sign in to comment.