mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-15 00:07:39 -04:00
Merge branch 'master' of https://github.com/ProjectSWGCore/NGECore2
Conflicts: scripts/radial/vehicle.py src/main/NGECore.java src/resources/objects/creature/CreatureObject.java src/resources/objects/player/PlayerObject.java src/resources/objects/tangible/TangibleObject.java src/services/SimulationService.java src/services/combat/CombatService.java src/services/object/ObjectService.java
This commit is contained in:
@@ -88,6 +88,8 @@ import engine.resources.container.Traverser;
|
||||
import engine.resources.container.WorldCellPermissions;
|
||||
import engine.resources.container.WorldPermissions;
|
||||
import engine.resources.database.DatabaseConnection;
|
||||
import engine.resources.database.ObjectDatabase;
|
||||
import engine.resources.objects.IPersistent;
|
||||
import engine.resources.objects.SWGObject;
|
||||
import engine.resources.scene.Planet;
|
||||
import engine.resources.scene.Point3D;
|
||||
@@ -98,14 +100,17 @@ import main.NGECore;
|
||||
import resources.objects.Delta;
|
||||
import resources.objects.building.BuildingObject;
|
||||
import resources.objects.cell.CellObject;
|
||||
import resources.objects.craft.DraftSchematic;
|
||||
import resources.objects.creature.CreatureObject;
|
||||
import resources.objects.deed.Harvester_Deed;
|
||||
import resources.objects.deed.Player_House_Deed;
|
||||
import resources.objects.factorycrate.FactoryCrateObject;
|
||||
import resources.objects.group.GroupObject;
|
||||
import resources.objects.guild.GuildObject;
|
||||
import resources.objects.harvester.HarvesterObject;
|
||||
import resources.objects.installation.InstallationObject;
|
||||
import resources.objects.intangible.IntangibleObject;
|
||||
import resources.objects.manufacture.ManufactureSchematicObject;
|
||||
import resources.objects.mission.MissionObject;
|
||||
import resources.objects.player.PlayerObject;
|
||||
import resources.objects.resource.GalacticResource;
|
||||
@@ -118,6 +123,8 @@ import resources.objects.waypoint.WaypointObject;
|
||||
import resources.objects.weapon.WeaponObject;
|
||||
import services.command.BaseSWGCommand;
|
||||
import services.command.CombatCommand;
|
||||
import services.bazaar.AuctionItem;
|
||||
import services.chat.ChatRoom;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
|
||||
@@ -387,6 +394,18 @@ public class ObjectService implements INetworkDispatch {
|
||||
|
||||
object = new ResourceContainerObject(objectID, planet, Template, position, orientation);
|
||||
|
||||
} else if(Template.startsWith("object/factory/shared_factory_crate")) {
|
||||
|
||||
object = new FactoryCrateObject(objectID, planet, Template, position, orientation);
|
||||
|
||||
} else if(Template.startsWith("object/draft_schematic")) {
|
||||
|
||||
object = new DraftSchematic(objectID, planet, Template, position, orientation);
|
||||
|
||||
} else if(Template.startsWith("object/manufacture_schematic")) {
|
||||
|
||||
object = new ManufactureSchematicObject(objectID, planet, Template, position, orientation);
|
||||
|
||||
} else if(Template.startsWith("object/installation/mining_ore/construction")) {
|
||||
|
||||
float positionY = core.terrainService.getHeight(planet.getID(), position.x, position.z)-1f;
|
||||
@@ -955,6 +974,14 @@ public class ObjectService implements INetworkDispatch {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Integer roomId : ghost.getJoinedChatChannels()) {
|
||||
ChatRoom room = core.chatService.getChatRoom(roomId);
|
||||
|
||||
if (room != null) { core.chatService.joinChatRoom(objectShortName, roomId); }
|
||||
// work-around for any channels that may have been deleted, or only spawn on server startup, that were added to the joined channels
|
||||
else { ghost.removeChannel(roomId); }
|
||||
}
|
||||
}
|
||||
|
||||
if(!core.getConfig().getString("MOTD").equals(""))
|
||||
@@ -1249,4 +1276,16 @@ public class ObjectService implements INetworkDispatch {
|
||||
return count.get();
|
||||
}
|
||||
|
||||
public void persistObject(IPersistent object, Class keyClass, Class valueClass, ObjectDatabase odb) {
|
||||
object.createTransaction(odb.getEnvironment());
|
||||
core.getAuctionODB().put(object, keyClass, valueClass, object.getTransaction());
|
||||
object.getTransaction().commitSync();
|
||||
}
|
||||
|
||||
public void deletePersistentObject(IPersistent object, Class keyClass, Class valueClass, ObjectDatabase odb, Object key) {
|
||||
object.createTransaction(odb.getEnvironment());
|
||||
core.getAuctionODB().delete(key, keyClass, valueClass, object.getTransaction());
|
||||
object.getTransaction().commitSync();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user