Rename and clean up MapleReactor

This commit is contained in:
P0nk
2021-09-09 22:38:03 +02:00
parent d7851ef40e
commit dc4d710d12
11 changed files with 89 additions and 94 deletions

View File

@@ -293,7 +293,7 @@ public class MapFactory {
for (Data reactor : mapData.getChildByPath("reactor")) {
String id = DataTool.getString(reactor.getChildByPath("id"));
if (id != null) {
MapleReactor newReactor = loadReactor(reactor, id, (byte) DataTool.getInt(reactor.getChildByPath("f"), 0));
Reactor newReactor = loadReactor(reactor, id, (byte) DataTool.getInt(reactor.getChildByPath("f"), 0));
map.spawnReactor(newReactor);
}
}
@@ -351,8 +351,8 @@ public class MapFactory {
return myLife;
}
private static MapleReactor loadReactor(Data reactor, String id, final byte FacingDirection) {
MapleReactor myReactor = new MapleReactor(MapleReactorFactory.getReactor(Integer.parseInt(id)), Integer.parseInt(id));
private static Reactor loadReactor(Data reactor, String id, final byte FacingDirection) {
Reactor myReactor = new Reactor(MapleReactorFactory.getReactor(Integer.parseInt(id)), Integer.parseInt(id));
int x = DataTool.getInt(reactor.getChildByPath("x"));
int y = DataTool.getInt(reactor.getChildByPath("y"));
myReactor.setFacingDirection(FacingDirection);