mirror of
https://github.com/Retera/WarsmashModEngine.git
synced 2022-07-31 17:38:59 +02:00
Update some ui and internal systems
This commit is contained in:
parent
ab98d90eab
commit
28a05a8d0f
@ -1,12 +1,20 @@
|
||||
[DataSources]
|
||||
Count=5
|
||||
Type00=Folder
|
||||
Path00="D:\Backups\Warcraft\Data\UIMod"
|
||||
Type01=Folder
|
||||
Path01="..\..\resources"
|
||||
Type02=Folder
|
||||
Path02="D:\Backups\Warsmash\Data"
|
||||
Type03=Folder
|
||||
Path03="D:\Games\Warcraft III Patch 1.22\Maps"
|
||||
Type04=Folder
|
||||
Path04="."
|
||||
Count=9
|
||||
Type00=MPQ
|
||||
Path00="D:\Games\Warcraft III Patch 1.22\war3.mpq"
|
||||
Type01=MPQ
|
||||
Path01="D:\Games\Warcraft III Patch 1.22\War3x.mpq"
|
||||
Type02=MPQ
|
||||
Path02="D:\Games\Warcraft III Patch 1.22\War3xlocal.mpq"
|
||||
Type03=MPQ
|
||||
Path03="D:\Games\Warcraft III Patch 1.22\War3Patch.mpq"
|
||||
Type04=MPQ
|
||||
Path04="D:\Games\Warcraft III Patch 1.22\Warsmash\War3Mod.mpq"
|
||||
Type05=Folder
|
||||
Path05="..\..\resources"
|
||||
Type06=Folder
|
||||
Path06="D:\Backups\Warsmash\Data"
|
||||
Type07=Folder
|
||||
Path07="D:\Games\Warcraft III Patch 1.22\Maps"
|
||||
Type08=Folder
|
||||
Path08="."
|
||||
|
@ -1,20 +0,0 @@
|
||||
[DataSources]
|
||||
Count=9
|
||||
Type00=MPQ
|
||||
Path00="D:\Games\Warcraft III Patch 1.22\war3.mpq"
|
||||
Type01=MPQ
|
||||
Path01="D:\Games\Warcraft III Patch 1.22\War3x.mpq"
|
||||
Type02=MPQ
|
||||
Path02="D:\Games\Warcraft III Patch 1.22\War3xlocal.mpq"
|
||||
Type03=MPQ
|
||||
Path03="D:\Games\Warcraft III Patch 1.22\War3Patch.mpq"
|
||||
Type04=MPQ
|
||||
Path04="D:\Games\Warcraft III Patch 1.22\Warsmash\War3Mod.mpq"
|
||||
Type05=Folder
|
||||
Path05="..\..\resources"
|
||||
Type06=Folder
|
||||
Path06="D:\Backups\Warsmash\Data"
|
||||
Type07=Folder
|
||||
Path07="D:\Games\Warcraft III Patch 1.22\Maps"
|
||||
Type08=Folder
|
||||
Path08="."
|
12
core/assets/warsmash_myHD.ini
Normal file
12
core/assets/warsmash_myHD.ini
Normal file
@ -0,0 +1,12 @@
|
||||
[DataSources]
|
||||
Count=5
|
||||
Type00=Folder
|
||||
Path00="D:\Backups\Warcraft\Data\UIMod"
|
||||
Type01=Folder
|
||||
Path01="..\..\resources"
|
||||
Type02=Folder
|
||||
Path02="D:\Backups\Warsmash\Data"
|
||||
Type03=Folder
|
||||
Path03="D:\Games\Warcraft III Patch 1.22\Maps"
|
||||
Type04=Folder
|
||||
Path04="."
|
@ -20,6 +20,7 @@ public class SequenceUtils {
|
||||
public static final EnumSet<SecondaryTag> HIT = EnumSet.of(SecondaryTag.HIT);
|
||||
public static final EnumSet<SecondaryTag> SPELL = EnumSet.of(SecondaryTag.SPELL);
|
||||
public static final EnumSet<SecondaryTag> WORK = EnumSet.of(SecondaryTag.WORK);
|
||||
public static final EnumSet<SecondaryTag> FAST = EnumSet.of(SecondaryTag.FAST);
|
||||
|
||||
private static final StandSequenceComparator STAND_SEQUENCE_COMPARATOR = new StandSequenceComparator();
|
||||
private static final SecondaryTagSequenceComparator SECONDARY_TAG_SEQUENCE_COMPARATOR = new SecondaryTagSequenceComparator(
|
||||
|
@ -1742,4 +1742,8 @@ public class CUnit extends CWidget {
|
||||
return this.updateType;
|
||||
}
|
||||
}
|
||||
|
||||
public float getAnimationRunSpeedRatio() {
|
||||
return this.unitType.getAnimationRunSpeed() / this.speed;
|
||||
}
|
||||
}
|
||||
|
@ -75,7 +75,8 @@ public class CUnitType {
|
||||
private final int properNamesCount;
|
||||
private final boolean canFlee;
|
||||
private final int priority;
|
||||
private boolean revivesHeroes;
|
||||
private final boolean revivesHeroes;
|
||||
private final float animationRunSpeed;
|
||||
|
||||
public CUnitType(final String name, final String legacyName, final War3ID typeId, final int maxLife,
|
||||
final int manaInitial, final int manaMaximum, final int speed, final int defense, final String abilityList,
|
||||
@ -93,7 +94,7 @@ public class CUnitType {
|
||||
final float strengthPerLevel, final int agility, final float agilityPerLevel, final int intelligence,
|
||||
final float intelligencePerLevel, final CPrimaryAttribute primaryAttribute,
|
||||
final List<War3ID> heroAbilityList, final List<String> heroProperNames, final int properNamesCount,
|
||||
final boolean canFlee, final int priority, boolean revivesHeroes) {
|
||||
final boolean canFlee, final int priority, final boolean revivesHeroes, final float animationRunSpeed) {
|
||||
this.name = name;
|
||||
this.legacyName = legacyName;
|
||||
this.typeId = typeId;
|
||||
@ -148,6 +149,7 @@ public class CUnitType {
|
||||
this.canFlee = canFlee;
|
||||
this.priority = priority;
|
||||
this.revivesHeroes = revivesHeroes;
|
||||
this.animationRunSpeed = animationRunSpeed;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
@ -363,6 +365,10 @@ public class CUnitType {
|
||||
}
|
||||
|
||||
public boolean isRevivesHeroes() {
|
||||
return revivesHeroes;
|
||||
return this.revivesHeroes;
|
||||
}
|
||||
|
||||
public float getAnimationRunSpeed() {
|
||||
return this.animationRunSpeed;
|
||||
}
|
||||
}
|
||||
|
@ -274,6 +274,7 @@ public class CAbilityInventory extends AbstractGenericNoIconAbility {
|
||||
for (final CAbility ability : this.itemsHeldAbilities[slotIndex]) {
|
||||
hero.remove(simulation, ability);
|
||||
}
|
||||
this.itemsHeldAbilities[slotIndex].clear();
|
||||
droppedItem.setHidden(false);
|
||||
droppedItem.setPointAndCheckUnstuck(x, y, simulation);
|
||||
}
|
||||
@ -295,6 +296,7 @@ public class CAbilityInventory extends AbstractGenericNoIconAbility {
|
||||
for (final CAbility ability : this.itemsHeldAbilities[index]) {
|
||||
hero.remove(simulation, ability);
|
||||
}
|
||||
this.itemsHeldAbilities[index].clear();
|
||||
itemToDrop.setPointAndCheckUnstuck(x, y, simulation);
|
||||
}
|
||||
}
|
||||
|
@ -325,8 +325,8 @@ public class CBehaviorMove implements CBehavior {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
this.unit.getUnitAnimationListener().playAnimation(false, PrimaryTag.WALK, SequenceUtils.EMPTY, 1.0f,
|
||||
true);
|
||||
this.unit.getUnitAnimationListener().playAnimation(false, PrimaryTag.WALK, SequenceUtils.FAST,
|
||||
this.unit.getAnimationRunSpeedRatio(), true);
|
||||
this.wasWithinPropWindow = true;
|
||||
}
|
||||
while (continueDistance > 0);
|
||||
|
@ -172,6 +172,8 @@ public class CUnitData {
|
||||
private static final War3ID CAN_FLEE = War3ID.fromString("ufle");
|
||||
private static final War3ID PRIORITY = War3ID.fromString("upri");
|
||||
|
||||
private static final War3ID ANIMATION_RUN_SPEED = War3ID.fromString("urun");
|
||||
|
||||
private final CGameplayConstants gameplayConstants;
|
||||
private final MutableObjectData unitData;
|
||||
private final Map<War3ID, CUnitType> unitIdToUnitType = new HashMap<>();
|
||||
@ -283,6 +285,8 @@ public class CUnitData {
|
||||
final int unitLevel = unitType.getFieldAsInteger(UNIT_LEVEL, 0);
|
||||
final int priority = unitType.getFieldAsInteger(PRIORITY, 0);
|
||||
|
||||
final float animationRunSpeed = unitType.getFieldAsFloat(ANIMATION_RUN_SPEED, 0);
|
||||
|
||||
final float moveHeight = unitType.getFieldAsFloat(MOVE_HEIGHT, 0);
|
||||
final String movetp = unitType.getFieldAsString(MOVE_TYPE, 0);
|
||||
final float collisionSize = unitType.getFieldAsFloat(COLLISION_SIZE, 0);
|
||||
@ -455,7 +459,7 @@ public class CUnitData {
|
||||
final int foodUsed = unitType.getFieldAsInteger(FOOD_USED, 0);
|
||||
final int foodMade = unitType.getFieldAsInteger(FOOD_MADE, 0);
|
||||
|
||||
boolean revivesHeroes = unitType.getFieldAsBoolean(REVIVES_HEROES, 0);
|
||||
final boolean revivesHeroes = unitType.getFieldAsBoolean(REVIVES_HEROES, 0);
|
||||
|
||||
final String unitsTrainedString = unitType.getFieldAsString(UNITS_TRAINED, 0);
|
||||
final String[] unitsTrainedStringItems = unitsTrainedString.trim().split(",");
|
||||
@ -545,7 +549,7 @@ public class CUnitData {
|
||||
goldCost, lumberCost, foodUsed, foodMade, buildTime, preventedPathingTypes, requiredPathingTypes,
|
||||
propWindow, turnRate, requirements, unitLevel, hero, strength, strPlus, agility, agiPlus,
|
||||
intelligence, intPlus, primaryAttribute, heroAbilityList, heroProperNames, properNamesCount,
|
||||
canFlee, priority, revivesHeroes);
|
||||
canFlee, priority, revivesHeroes, animationRunSpeed);
|
||||
this.unitIdToUnitType.put(typeId, unitTypeInstance);
|
||||
this.jassLegacyNameToUnitId.put(legacyName, typeId);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user