mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Added mod checks that combat units have strength and ranged units have rangedStrength
This commit is contained in:
parent
f6f95a7c53
commit
eb0776005f
@ -217,9 +217,14 @@ class Ruleset {
|
|||||||
val lines = ArrayList<String>()
|
val lines = ArrayList<String>()
|
||||||
|
|
||||||
// Checks for all mods
|
// Checks for all mods
|
||||||
for (unit in units.values)
|
for (unit in units.values) {
|
||||||
if (unit.upgradesTo == unit.name)
|
if (unit.upgradesTo == unit.name)
|
||||||
lines += "${unit.name} upgrades to itself!"
|
lines += "${unit.name} upgrades to itself!"
|
||||||
|
if (!unit.unitType.isCivilian() && unit.strength == 0)
|
||||||
|
lines += "${unit.name} is a military unit but has no assigned strength!"
|
||||||
|
if (unit.unitType.isRanged() && unit.rangedStrength == 0)
|
||||||
|
lines += "${unit.name} is a ranged unit but has no assigned rangedStrength!"
|
||||||
|
}
|
||||||
|
|
||||||
for (tech in technologies.values) {
|
for (tech in technologies.values) {
|
||||||
for (otherTech in tech.column!!.techs) {
|
for (otherTech in tech.column!!.techs) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user