mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-09-14 15:28:11 -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
|
continue
|
||||||
}
|
}
|
||||||
props := strings.Split(line, "\t")
|
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)
|
continue // any line without a definition id is skipped (e.g. the "Expansion" line)
|
||||||
}
|
}
|
||||||
rec := createLevelPresetRecord(props)
|
rec := createLevelPresetRecord(props)
|
||||||
|
@ -319,7 +319,7 @@ func loadMissileCalc(r *[]string, inc func() int, params int) MissileCalc {
|
|||||||
}
|
}
|
||||||
result.Params = make([]MissileCalcParam, params)
|
result.Params = make([]MissileCalcParam, params)
|
||||||
for p := 0; p < params; p++ {
|
for p := 0; p < params; p++ {
|
||||||
result.Params[p] = loadMissileCalcParam(r, inc);
|
result.Params[p] = loadMissileCalcParam(r, inc)
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,6 @@ func createWeaponRecord(line string) WeaponRecord {
|
|||||||
StrengthBonus: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
StrengthBonus: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||||
DexterityBonus: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
DexterityBonus: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||||
|
|
||||||
|
|
||||||
RequiredStrength: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
RequiredStrength: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||||
RequiredDexterity: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
RequiredDexterity: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||||
Durability: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
Durability: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||||
@ -190,7 +189,6 @@ func createWeaponRecord(line string) WeaponRecord {
|
|||||||
GemSockets: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
GemSockets: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||||
GemApplyType: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
GemApplyType: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
|
||||||
|
|
||||||
|
|
||||||
SpecialFeature: r[inc()],
|
SpecialFeature: r[inc()],
|
||||||
|
|
||||||
Useable: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
Useable: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
|
||||||
@ -261,7 +259,7 @@ func createWeaponVendorParams(r *[]string, inc func() int) map[string]*WeaponVen
|
|||||||
MagicMax: StringToInt(EmptyToZero((*r)[inc()])),
|
MagicMax: StringToInt(EmptyToZero((*r)[inc()])),
|
||||||
MagicLevel: StringToUint8(EmptyToZero((*r)[inc()])),
|
MagicLevel: StringToUint8(EmptyToZero((*r)[inc()])),
|
||||||
}
|
}
|
||||||
result[name] = &wvp;
|
result[name] = &wvp
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user