SteamWar/FightSystem
Archiviert
13
1

Merge pull request 'Resettable percent' (#252) from resettablePercent into master

Reviewed-on: #252
Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Lixfel 2021-04-05 16:17:06 +02:00
Commit 0d9764b5d5

Datei anzeigen

@ -42,7 +42,16 @@ public class WinconditionPercentSystem extends Wincondition implements Listener,
teamMap.put(Fight.getBlueTeam(), new TeamPercent(Fight.getBlueTeam())); teamMap.put(Fight.getBlueTeam(), new TeamPercent(Fight.getBlueTeam()));
teamMap.put(Fight.getRedTeam(), new TeamPercent(Fight.getRedTeam())); teamMap.put(Fight.getRedTeam(), new TeamPercent(Fight.getRedTeam()));
new StateDependentListener(Winconditions.PERCENT_SYSTEM, FightState.Running, this); new StateDependentListener(Winconditions.PERCENT_SYSTEM, FightState.Running, this){
@Override
public void enable() {
super.enable();
teamMap.forEach((team, percent) -> {
percent.destroyedBlocks = 0;
percent.percent = 0;
});
}
};
if(Config.ActiveWinconditions.contains(Winconditions.PERCENT_SYSTEM)){ if(Config.ActiveWinconditions.contains(Winconditions.PERCENT_SYSTEM)){
printableWinconditions.add(this); printableWinconditions.add(this);
percentWincondition = this; percentWincondition = this;