Skip to content

Commit

Permalink
Fix pure fiction score counter
Browse files Browse the repository at this point in the history
  • Loading branch information
Melledy committed Jan 8, 2024
1 parent 6b52f06 commit b9613ca
Show file tree
Hide file tree
Showing 15 changed files with 2,136 additions and 131 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Mail system
- Friend system (Assists are not working yet)
- Forgotten hall
- Pure Fiction
- ~~Simulated universe (Runs can be finished, but many features are missing)~~

# Running the server and client
Expand Down
132 changes: 132 additions & 0 deletions src/generated/main/emu/lunarcore/proto/BattleEndReasonOuterClass.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;

import us.hebi.quickbuf.ProtoEnum;
import us.hebi.quickbuf.ProtoUtil;

public final class BattleEndReasonOuterClass {
/**
* Protobuf enum {@code BattleEndReason}
*/
public enum BattleEndReason implements ProtoEnum<BattleEndReason> {
/**
* <code>BATTLE_END_REASON_NONE = 0;</code>
*/
BATTLE_END_REASON_NONE("BATTLE_END_REASON_NONE", 0),

/**
* <code>BATTLE_END_REASON_ALL_DIE = 1;</code>
*/
BATTLE_END_REASON_ALL_DIE("BATTLE_END_REASON_ALL_DIE", 1),

/**
* <code>BATTLE_END_REASON_TURN_LIMIT = 2;</code>
*/
BATTLE_END_REASON_TURN_LIMIT("BATTLE_END_REASON_TURN_LIMIT", 2);

/**
* <code>BATTLE_END_REASON_NONE = 0;</code>
*/
public static final int BATTLE_END_REASON_NONE_VALUE = 0;

/**
* <code>BATTLE_END_REASON_ALL_DIE = 1;</code>
*/
public static final int BATTLE_END_REASON_ALL_DIE_VALUE = 1;

/**
* <code>BATTLE_END_REASON_TURN_LIMIT = 2;</code>
*/
public static final int BATTLE_END_REASON_TURN_LIMIT_VALUE = 2;

private final String name;

private final int number;

private BattleEndReason(String name, int number) {
this.name = name;
this.number = number;
}

/**
* @return the string representation of enum entry
*/
@Override
public String getName() {
return name;
}

/**
* @return the numeric wire value of this enum entry
*/
@Override
public int getNumber() {
return number;
}

/**
* @return a converter that maps between this enum's numeric and text representations
*/
public static ProtoEnum.EnumConverter<BattleEndReason> converter() {
return BattleEndReasonConverter.INSTANCE;
}

/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value, or null if unknown.
*/
public static BattleEndReason forNumber(int value) {
return BattleEndReasonConverter.INSTANCE.forNumber(value);
}

/**
* @param value The numeric wire value of the corresponding enum entry.
* @param other Fallback value in case the value is not known.
* @return The enum associated with the given numeric wire value, or the fallback value if unknown.
*/
public static BattleEndReason forNumberOr(int number, BattleEndReason other) {
BattleEndReason value = forNumber(number);
return value == null ? other : value;
}

enum BattleEndReasonConverter implements ProtoEnum.EnumConverter<BattleEndReason> {
INSTANCE;

private static final BattleEndReason[] lookup = new BattleEndReason[3];

static {
lookup[0] = BATTLE_END_REASON_NONE;
lookup[1] = BATTLE_END_REASON_ALL_DIE;
lookup[2] = BATTLE_END_REASON_TURN_LIMIT;
}

@Override
public final BattleEndReason forNumber(final int value) {
if (value >= 0 && value < lookup.length) {
return lookup[value];
}
return null;
}

@Override
public final BattleEndReason forName(final CharSequence value) {
if (value.length() == 22) {
if (ProtoUtil.isEqual("BATTLE_END_REASON_NONE", value)) {
return BATTLE_END_REASON_NONE;
}
}
if (value.length() == 25) {
if (ProtoUtil.isEqual("BATTLE_END_REASON_ALL_DIE", value)) {
return BATTLE_END_REASON_ALL_DIE;
}
}
if (value.length() == 28) {
if (ProtoUtil.isEqual("BATTLE_END_REASON_TURN_LIMIT", value)) {
return BATTLE_END_REASON_TURN_LIMIT;
}
}
return null;
}
}
}
}
Loading

0 comments on commit b9613ca

Please sign in to comment.