Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions scripts/coreMindustry/variables.kts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ registerVarForType<Unit>().apply {
registerChild("health", "当前血量") { it.health }
registerChild("maxHealth", "最大血量") { it.maxHealth }
registerChild("shield", "护盾值") { it.shield }
registerChild("ammo", "弹药") { if (state.rules.unitAmmo) it.shield else resolveVarChild(it, "maxAmmo")?.unwrap() }
registerChild("maxAmmo", "弹药容量") { it.type.ammoCapacity }

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
registerChild("maxAmmo", "弹药容量") { it.type.ammoCapacity }

原来之前ammo一直是错的。这行也删掉吧

}

Expand All @@ -109,4 +108,4 @@ listen<EventType.WorldLoadEvent> {
listen(EventType.Trigger.update) {
if (state.isPaused)
pauseTime += Time.delta / 60
}
}
Loading