fix: destroy infinity stone entities if picked up

This commit is contained in:
punchready 2021-06-01 19:16:57 +02:00
parent 850c46c6e1
commit 4d467d6d95

View File

@ -13,8 +13,6 @@ import uulm.teamname.marvelous.gamelibrary.requests.RequestType;
import java.awt.*; import java.awt.*;
import java.awt.geom.Line2D; import java.awt.geom.Line2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.sql.ResultSetMetaData;
import java.time.OffsetDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
@ -73,7 +71,13 @@ class GameLogic {
.withOriginField(data.targetField) .withOriginField(data.targetField)
.withTargetField(data.originField) .withTargetField(data.originField)
.buildCharacterEvent()); .buildCharacterEvent());
break; //we should only have one character per field anyways break; //we should only have one entity per field anyways
}else if(entity instanceof InfinityStone) {
result.add(new EventBuilder(EventType.DestroyedEntityEvent)
.withTargetField(data.targetField)
.withTargetEntity(entity.id)
.buildEntityEvent());
break; //we should only have one entity per field anyways
} }
} }
} }