mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-09-01 08:54:20 -04:00
run goimports
to format all Go source files of the project (#88)
Actual command run: find . -type f -name '*.go' | xargs -I '{}' goimports -w '{}'
This commit is contained in:
parent
4a24fc0b8c
commit
ab7d19197e
@ -79,7 +79,7 @@ func LoadLevelPresets(fileProvider FileProvider) {
|
||||
continue
|
||||
}
|
||||
props := strings.Split(line, "\t")
|
||||
if(props[1] == "") {
|
||||
if props[1] == "" {
|
||||
continue // any line without a definition id is skipped (e.g. the "Expansion" line)
|
||||
}
|
||||
rec := createLevelPresetRecord(props)
|
||||
|
@ -319,7 +319,7 @@ func loadMissileCalc(r *[]string, inc func() int, params int) MissileCalc {
|
||||
}
|
||||
result.Params = make([]MissileCalcParam, params)
|
||||
for p := 0; p < params; p++ {
|
||||
result.Params[p] = loadMissileCalcParam(r, inc);
|
||||
result.Params[p] = loadMissileCalcParam(r, inc)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
@ -135,14 +135,14 @@ func createWeaponRecord(line string) WeaponRecord {
|
||||
AlternateGfx: r[inc()],
|
||||
NameString: r[inc()],
|
||||
Version: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
CompactSave : StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
CompactSave: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
Rarity: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
Spawnable : StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
Spawnable: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
|
||||
MinDamage: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
MaxDamage: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
BarbOneOrTwoHanded : StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
UsesTwoHands : StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
BarbOneOrTwoHanded: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
UsesTwoHands: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
Min2HandDamage: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
Max2HandDamage: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
MinMissileDamage: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
@ -153,11 +153,10 @@ func createWeaponRecord(line string) WeaponRecord {
|
||||
StrengthBonus: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
DexterityBonus: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
|
||||
|
||||
RequiredStrength: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
RequiredDexterity: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
Durability: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
NoDurability : StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
NoDurability: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
|
||||
Level: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
RequiredLevel: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
@ -176,7 +175,7 @@ func createWeaponRecord(line string) WeaponRecord {
|
||||
HitClass: r[inc()],
|
||||
InventoryWidth: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
InventoryHeight: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
Stackable : StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
Stackable: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
MinStack: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
MaxStack: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
SpawnStack: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
@ -186,28 +185,27 @@ func createWeaponRecord(line string) WeaponRecord {
|
||||
UniqueInventoryFile: r[inc()],
|
||||
SetInventoryFile: r[inc()],
|
||||
|
||||
HasInventory : StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
HasInventory: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
GemSockets: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
GemApplyType: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
|
||||
|
||||
SpecialFeature: r[inc()],
|
||||
|
||||
Useable : StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
Useable: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
|
||||
DropSound: r[inc()],
|
||||
DropSfxFrame: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
UseSound: r[inc()],
|
||||
|
||||
Unique : StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
Transparent : StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
Unique: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
Transparent: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
TransTable: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
Quivered : StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
Quivered: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
LightRadius: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
Belt : StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
Belt: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
|
||||
Quest: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
QuestDifficultyCheck : StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
QuestDifficultyCheck: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
|
||||
MissileType: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
DurabilityWarning: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
@ -222,12 +220,12 @@ func createWeaponRecord(line string) WeaponRecord {
|
||||
ColorTransform: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
InventoryColorTransform: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||
|
||||
SkipName : StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
SkipName: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
NightmareUpgrade: r[inc()],
|
||||
HellUpgrade: r[inc()],
|
||||
|
||||
Nameable : StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
PermStoreItem : StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
Nameable: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
PermStoreItem: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||
}
|
||||
return result
|
||||
}
|
||||
@ -261,7 +259,7 @@ func createWeaponVendorParams(r *[]string, inc func() int) map[string]*WeaponVen
|
||||
MagicMax: StringToInt(EmptyToZero((*r)[inc()])),
|
||||
MagicLevel: StringToUint8(EmptyToZero((*r)[inc()])),
|
||||
}
|
||||
result[name] = &wvp;
|
||||
result[name] = &wvp
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user