mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-27 17:57:22 -04:00
Merge remote-tracking branch 'origin/master' into PlayerCities
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import sys
|
||||
from services.housing import HouseTemplate
|
||||
from engine.resources.scene import Point3D
|
||||
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/city_deed/shared_cityhall_corellia_deed.iff", "object/building/player/city/shared_cityhall_corellia.iff", 0)
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("talus")
|
||||
houseTemplate.setDefaultItemLimit(400)
|
||||
|
||||
core.housingService.addHousingTemplate(houseTemplate)
|
||||
return
|
||||
@@ -0,0 +1,15 @@
|
||||
import sys
|
||||
from services.housing import HouseTemplate
|
||||
from engine.resources.scene import Point3D
|
||||
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/city_deed/shared_cityhall_naboo_deed.iff", "object/building/player/city/shared_cityhall_naboo.iff", 0)
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
houseTemplate.addPlaceablePlanet("rori")
|
||||
houseTemplate.addPlaceablePlanet("dantooine")
|
||||
houseTemplate.setDefaultItemLimit(400)
|
||||
|
||||
core.housingService.addHousingTemplate(houseTemplate)
|
||||
return
|
||||
@@ -4,7 +4,11 @@ from engine.resources.scene import Point3D
|
||||
|
||||
|
||||
def setup(core):
|
||||
<<<<<<< HEAD
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/city_deed/shared_cityhall_tatooine_deed.iff", "object/building/player/city/shared_cityhall_tatooine.iff", 5)
|
||||
=======
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/city_deed/shared_cityhall_tatooine_deed.iff", "object/building/player/city/shared_cityhall_tatooine.iff", 0)
|
||||
>>>>>>> upstream/master
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
|
||||
@@ -5,7 +5,11 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/guild_deed/shared_corellia_guild_deed.iff", "object/building/player/shared_player_guildhall_corellia_style_01.iff", 5)
|
||||
|
||||
<<<<<<< HEAD
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
=======
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(6), float(3), float(18.4)))
|
||||
>>>>>>> upstream/master
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("talus")
|
||||
houseTemplate.setDefaultItemLimit(400)
|
||||
|
||||
@@ -5,7 +5,11 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/guild_deed/shared_generic_guild_deed.iff", "object/building/player/shared_player_guildhall_generic_style_01.iff", 2)
|
||||
|
||||
<<<<<<< HEAD
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
=======
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(6), float(3), float(18.4)))
|
||||
>>>>>>> upstream/master
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
|
||||
@@ -5,7 +5,11 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/guild_deed/shared_naboo_guild_deed.iff", "object/building/player/shared_player_guildhall_naboo_style_01.iff", 5)
|
||||
|
||||
<<<<<<< HEAD
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
=======
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(6), float(3), float(18.4)))
|
||||
>>>>>>> upstream/master
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
houseTemplate.addPlaceablePlanet("rori")
|
||||
houseTemplate.addPlaceablePlanet("dantooine")
|
||||
|
||||
@@ -5,7 +5,11 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/guild_deed/shared_tatooine_guild_deed.iff", "object/building/player/shared_player_guildhall_tatooine_style_01.iff", 5)
|
||||
|
||||
<<<<<<< HEAD
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
=======
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(6), float(3), float(18.4)))
|
||||
>>>>>>> upstream/master
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("dantooine")
|
||||
houseTemplate.addPlaceablePlanet("lok")
|
||||
|
||||
@@ -5,7 +5,11 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/guild_deed/shared_tatooine_guild_style_02_deed.iff", "object/building/player/shared_player_guildhall_tatooine_style_02.iff", 5)
|
||||
|
||||
<<<<<<< HEAD
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
=======
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(5.5), float(4), float(12.7)))
|
||||
>>>>>>> upstream/master
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("dantooine")
|
||||
houseTemplate.addPlaceablePlanet("lok")
|
||||
|
||||
@@ -5,7 +5,11 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_large_deed.iff", "object/building/player/shared_player_house_corellia_large_style_01.iff", 2)
|
||||
|
||||
<<<<<<< HEAD
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
=======
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(6), float(3), float(13.4)))
|
||||
>>>>>>> upstream/master
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("talus")
|
||||
houseTemplate.setDefaultItemLimit(500)
|
||||
|
||||
@@ -5,7 +5,11 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_large_style_02_deed.iff", "object/building/player/shared_player_house_generic_large_style_02.iff", 2)
|
||||
|
||||
<<<<<<< HEAD
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
=======
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-13.4), float(3), float(9.1)))
|
||||
>>>>>>> upstream/master
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("talus")
|
||||
houseTemplate.setDefaultItemLimit(500)
|
||||
|
||||
@@ -5,8 +5,12 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_medium_deed.iff", "object/building/player/shared_player_house_corellia_medium_style_01.iff", 2)
|
||||
|
||||
<<<<<<< HEAD
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
=======
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(5.3),float(2.26),float(7.7)))
|
||||
>>>>>>> upstream/master
|
||||
houseTemplate.addPlaceablePlanet("talus")
|
||||
houseTemplate.setDefaultItemLimit(200)
|
||||
core.housingService.addHousingTemplate(houseTemplate)
|
||||
|
||||
@@ -5,7 +5,11 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_medium_style_02_deed.iff", "object/building/player/shared_player_house_corellia_medium_style_02.iff", 2)
|
||||
|
||||
<<<<<<< HEAD
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
=======
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(5.3), float(2.26), float(7.7)))
|
||||
>>>>>>> upstream/master
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("talus")
|
||||
houseTemplate.setDefaultItemLimit(200)
|
||||
|
||||
@@ -5,7 +5,7 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_small_deed.iff", "object/building/player/shared_player_house_corellia_small_style_01.iff", 2)
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-7.39), float(2.36), float(2)))
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("talus")
|
||||
houseTemplate.setDefaultItemLimit(200)
|
||||
|
||||
@@ -5,7 +5,7 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_small_floor_02_deed.iff", "object/building/player/shared_player_house_corellia_small_style_01_floorplan_02.iff", 2)
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-7.39), float(2.36), float(2)))
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("talus")
|
||||
houseTemplate.setDefaultItemLimit(200)
|
||||
|
||||
@@ -5,7 +5,7 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_small_style_02_deed.iff", "object/building/player/shared_player_house_corellia_small_style_02.iff", 2)
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-1.9), float(2.86), float(8.35)))
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("talus")
|
||||
houseTemplate.setDefaultItemLimit(200)
|
||||
|
||||
@@ -5,7 +5,7 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_small_style_02_floor_02_deed.iff", "object/building/player/shared_player_house_corellia_small_style_02_floorplan_02.iff", 2)
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-1.9), float(2.86), float(8.35)))
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("talus")
|
||||
houseTemplate.setDefaultItemLimit(200)
|
||||
|
||||
@@ -5,7 +5,11 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_large_style_02_deed.iff", "object/building/player/shared_player_house_generic_large_style_02.iff", 2)
|
||||
|
||||
<<<<<<< HEAD
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
=======
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(6), float(3), float(13.4)))
|
||||
>>>>>>> upstream/master
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
|
||||
@@ -5,7 +5,11 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_large_deed.iff", "object/building/player/shared_player_house_generic_large_style_01.iff", 2)
|
||||
|
||||
<<<<<<< HEAD
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
=======
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-13.4), float(3), float(9.1)))
|
||||
>>>>>>> upstream/master
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
|
||||
@@ -5,7 +5,11 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_large_window_s01_deed.iff", "object/building/player/shared_player_house_generic_large_window_s01.iff", 2)
|
||||
|
||||
<<<<<<< HEAD
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
=======
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-13.7), float(3), float(9.1)))
|
||||
>>>>>>> upstream/master
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
|
||||
@@ -5,7 +5,11 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_large_window_s02_deed.iff", "object/building/player/shared_player_house_generic_large_window_s02.iff", 2)
|
||||
|
||||
<<<<<<< HEAD
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
=======
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(10.4), float(3), float(-11)))
|
||||
>>>>>>> upstream/master
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
|
||||
@@ -5,7 +5,7 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_medium_deed.iff", "object/building/player/shared_player_house_generic_medium_style_01.iff", 2)
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(5.3),float(2.26),float(7.7)))
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
|
||||
@@ -5,7 +5,7 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_medium_style_02_deed.iff", "object/building/player/shared_player_house_generic_medium_style_02.iff", 2)
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(5.3), float(2.26), float(7.7)))
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
|
||||
@@ -5,7 +5,7 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_medium_windowed_deed.iff", "object/building/player/shared_player_house_generic_medium_windowed.iff", 2)
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(5.5), float(2.26), float(7.8)))
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
|
||||
@@ -5,7 +5,7 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_medium_windowed_s02_deed.iff", "object/building/player/shared_player_house_generic_medium_windowed_s02.iff", 2)
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(5.5), float(2.26), float(7.8)))
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
|
||||
@@ -5,7 +5,7 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_small_deed.iff", "object/building/player/shared_player_house_generic_small_style_01.iff", 2)
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-7.39), float(2.36), float(2)))
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
|
||||
@@ -5,7 +5,7 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_small_floor_02_deed.iff", "object/building/player/shared_player_house_generic_small_style_01_floorplan_02.iff", 2)
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-7.39), float(2.36), float(2)))
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
|
||||
@@ -5,7 +5,7 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_small_style_02_deed.iff", "object/building/player/shared_player_house_generic_small_style_02.iff", 2)
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-1.9), float(2.86), float(8.35)))
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
|
||||
@@ -5,7 +5,7 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_small_style_02_floor_02_deed.iff", "object/building/player/shared_player_house_generic_small_style_02_floorplan_02.iff", 2)
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-1.9), float(2.86), float(8.35)))
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
|
||||
@@ -5,7 +5,7 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_small_window_style_03_deed.iff", "object/building/player/shared_player_house_generic_small_window_style_03.iff", 2)
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-6.6), float(2.36), float(6.3)))
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
|
||||
@@ -5,7 +5,7 @@ from engine.resources.scene import Point3D
|
||||
def setup(core):
|
||||
houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_small_window_deed.iff", "object/building/player/shared_player_house_generic_small_windowed.iff", 2)
|
||||
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3))
|
||||
houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-7.39), float(2.36), float(2)))
|
||||
houseTemplate.addPlaceablePlanet("tatooine")
|
||||
houseTemplate.addPlaceablePlanet("corellia")
|
||||
houseTemplate.addPlaceablePlanet("naboo")
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import sys
|
||||
from services.spawn import MobileTemplate
|
||||
from java.util import Vector
|
||||
|
||||
def addTemplate(core):
|
||||
mobileTemplate = MobileTemplate()
|
||||
templates = Vector()
|
||||
templates.add('object/mobile/shared_durni.iff')
|
||||
mobileTemplate.setCreatureName('durni')
|
||||
mobileTemplate.setTemplates(templates)
|
||||
mobileTemplate.setLevel(4)
|
||||
attacks = Vector()
|
||||
mobileTemplate.setDefaultAttack('creatureMeleeAttack')
|
||||
mobileTemplate.setAttacks(attacks)
|
||||
core.spawnService.addMobileTemplate('durni', mobileTemplate)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import sys
|
||||
from services.spawn import MobileTemplate
|
||||
from java.util import Vector
|
||||
|
||||
def addTemplate(core):
|
||||
mobileTemplate = MobileTemplate()
|
||||
templates = Vector()
|
||||
templates.add('object/mobile/shared_fambaa.iff')
|
||||
mobileTemplate.setCreatureName('fambaa')
|
||||
mobileTemplate.setTemplates(templates)
|
||||
mobileTemplate.setLevel(23)
|
||||
attacks = Vector()
|
||||
mobileTemplate.setDefaultAttack('creatureMeleeAttack')
|
||||
mobileTemplate.setAttacks(attacks)
|
||||
core.spawnService.addMobileTemplate('fambaa', mobileTemplate)
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import sys
|
||||
from services.spawn import MobileTemplate
|
||||
from java.util import Vector
|
||||
|
||||
def addTemplate(core):
|
||||
mobileTemplate = MobileTemplate()
|
||||
templates = Vector()
|
||||
templates.add('object/mobile/shared_bantha_hue.iff')
|
||||
mobileTemplate.setCreatureName('bantha')
|
||||
mobileTemplate.setTemplates(templates)
|
||||
mobileTemplate.setLevel(14)
|
||||
attacks = Vector()
|
||||
mobileTemplate.setDefaultAttack('creatureMeleeAttack')
|
||||
mobileTemplate.setAttacks(attacks)
|
||||
core.spawnService.addMobileTemplate('bantha', mobileTemplate)
|
||||
@@ -0,0 +1,16 @@
|
||||
import sys
|
||||
from services.spawn import MobileTemplate
|
||||
from java.util import Vector
|
||||
|
||||
def addTemplate(core):
|
||||
mobileTemplate = MobileTemplate()
|
||||
templates = Vector()
|
||||
templates.add('object/mobile/shared_dewback.iff')
|
||||
mobileTemplate.setCreatureName('dewback')
|
||||
mobileTemplate.setTemplates(templates)
|
||||
mobileTemplate.setLevel(17)
|
||||
attacks = Vector()
|
||||
mobileTemplate.setDefaultAttack('creatureMeleeAttack')
|
||||
mobileTemplate.setAttacks(attacks)
|
||||
core.spawnService.addMobileTemplate('dewback', mobileTemplate)
|
||||
|
||||
@@ -8,6 +8,8 @@ def addTemplate(core):
|
||||
templates.add('object/mobile/shared_kreetle.iff')
|
||||
mobileTemplate.setCreatureName('kreetle')
|
||||
mobileTemplate.setTemplates(templates)
|
||||
mobileTemplate.setAttackRange(5)
|
||||
mobileTemplate.setAttackSpeed(5)
|
||||
mobileTemplate.setLevel(5)
|
||||
attacks = Vector()
|
||||
mobileTemplate.setDefaultAttack('creatureMeleeAttack')
|
||||
|
||||
@@ -8,6 +8,8 @@ def addTemplate(core):
|
||||
templates.add('object/mobile/shared_womp_rat.iff')
|
||||
mobileTemplate.setCreatureName('womprat')
|
||||
mobileTemplate.setTemplates(templates)
|
||||
mobileTemplate.setAttackRange(5)
|
||||
mobileTemplate.setAttackSpeed(5)
|
||||
mobileTemplate.setLevel(5)
|
||||
attacks = Vector()
|
||||
mobileTemplate.setDefaultAttack('creatureMeleeAttack')
|
||||
|
||||
@@ -1,4 +1,20 @@
|
||||
import sys
|
||||
from engine.resources.scene import Point3D
|
||||
from engine.resources.scene import Quaternion
|
||||
|
||||
def setup(core, object):
|
||||
sign = core.objectService.createChildObject(object, 'object/tangible/sign/player/shared_house_address.iff', -13.7, 3, 9.1, -1, 0, -1)
|
||||
print(sign)
|
||||
object.setAttachment("structureSign", sign)
|
||||
|
||||
structureterminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_player_structure.iff', Point3D(float(-12.2), float(1.5), float(-4.2)), Quaternion(float(0), float(0), float(0), float(0)),4)
|
||||
#structureterminal.setAttachment('radial_filename', 'structure_management_terminal')
|
||||
structureterminal.setAttachment('housing_parentstruct', object)
|
||||
|
||||
cityterminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_city.iff', Point3D(float(16), float(2), float(-9)), Quaternion(float(1), float(1), float(1), float(0)),5)
|
||||
#cityterminal.setAttachment('housing_parentstruct', object)
|
||||
|
||||
city_vote_terminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_city_vote.iff', Point3D(float(0), float(1.85), float(-8.5)), Quaternion(float(1), float(1), float(1), float(0)),3)
|
||||
#cityterminal.setAttachment('housing_parentstruct', object)
|
||||
|
||||
return
|
||||
@@ -1,4 +1,20 @@
|
||||
import sys
|
||||
from engine.resources.scene import Point3D
|
||||
from engine.resources.scene import Quaternion
|
||||
|
||||
def setup(core, object):
|
||||
sign = core.objectService.createChildObject(object, 'object/tangible/sign/player/shared_house_address.iff', -13.7, 3, 9.1, -1, 0, -1)
|
||||
print(sign)
|
||||
object.setAttachment("structureSign", sign)
|
||||
|
||||
structureterminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_player_structure.iff', Point3D(float(-12.2), float(1.5), float(-4.2)), Quaternion(float(0), float(0), float(0), float(0)),4)
|
||||
#structureterminal.setAttachment('radial_filename', 'structure_management_terminal')
|
||||
structureterminal.setAttachment('housing_parentstruct', object)
|
||||
|
||||
cityterminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_city.iff', Point3D(float(16), float(2), float(-9)), Quaternion(float(1), float(1), float(1), float(0)),5)
|
||||
#cityterminal.setAttachment('housing_parentstruct', object)
|
||||
|
||||
city_vote_terminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_city_vote.iff', Point3D(float(0), float(1.85), float(-8.5)), Quaternion(float(1), float(1), float(1), float(0)),3)
|
||||
#cityterminal.setAttachment('housing_parentstruct', object)
|
||||
|
||||
return
|
||||
@@ -3,12 +3,27 @@ from engine.resources.scene import Point3D
|
||||
from engine.resources.scene import Quaternion
|
||||
|
||||
def setup(core, object):
|
||||
<<<<<<< HEAD
|
||||
|
||||
structureterminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_player_structure.iff', Point3D(float(18.9), float(1.5), float(10)), Quaternion(float(1), float(1), float(1), float(0)),7)
|
||||
#structureterminal.setAttachment('radial_filename', 'structure_management_terminal')
|
||||
structureterminal.setAttachment('housing_parentstruct', object)
|
||||
|
||||
cityterminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_city.iff', Point3D(float(0), float(2.6), float(0)), Quaternion(float(1), float(1), float(1), float(0)),3)
|
||||
=======
|
||||
sign = core.objectService.createChildObject(object, 'object/tangible/sign/player/shared_house_address.iff', -13.7, 3, 9.1, -1, 0, -1)
|
||||
print(sign)
|
||||
object.setAttachment("structureSign", sign)
|
||||
|
||||
structureterminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_player_structure.iff', Point3D(float(-12.2), float(1.5), float(-4.2)), Quaternion(float(0), float(0), float(0), float(0)),4)
|
||||
#structureterminal.setAttachment('radial_filename', 'structure_management_terminal')
|
||||
structureterminal.setAttachment('housing_parentstruct', object)
|
||||
|
||||
cityterminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_city.iff', Point3D(float(16), float(2), float(-9)), Quaternion(float(1), float(1), float(1), float(0)),5)
|
||||
#cityterminal.setAttachment('housing_parentstruct', object)
|
||||
|
||||
city_vote_terminal = core.objectService.createChildObject(object, 'object/tangible/terminal/shared_terminal_city_vote.iff', Point3D(float(0), float(1.85), float(-8.5)), Quaternion(float(1), float(1), float(1), float(0)),3)
|
||||
>>>>>>> upstream/master
|
||||
#cityterminal.setAttachment('housing_parentstruct', object)
|
||||
cityterminal.setAttachment('radial_filename', 'terminal/city_maintenance_terminal')
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import sys
|
||||
|
||||
def setup(core, object):
|
||||
object.setAttachment('radial_filename', 'creature/vehicle')
|
||||
object.setAttachment('passengers', 0)
|
||||
return
|
||||
@@ -1,4 +1,12 @@
|
||||
import sys
|
||||
|
||||
def setup(core, object):
|
||||
object.setAttachment('radial_filename', 'deeds/structureDeed')
|
||||
object.setConstructorTemplate('object/building/player/shared_construction_structure.iff')
|
||||
object.setStructureTemplate('object/tangible/deed/city_deed/shared_cityhall_corellia_deed.iff')
|
||||
#object.setLotRequirement(5)
|
||||
object.setBMR(308)
|
||||
return
|
||||
|
||||
def use(core, actor, object):
|
||||
return
|
||||
@@ -1,4 +1,12 @@
|
||||
import sys
|
||||
|
||||
def setup(core, object):
|
||||
object.setAttachment('radial_filename', 'deeds/structureDeed')
|
||||
object.setConstructorTemplate('object/building/player/shared_construction_structure.iff')
|
||||
object.setStructureTemplate('object/tangible/deed/city_deed/shared_cityhall_naboo_deed.iff')
|
||||
#object.setLotRequirement(5)
|
||||
object.setBMR(308)
|
||||
return
|
||||
|
||||
def use(core, actor, object):
|
||||
return
|
||||
@@ -5,7 +5,11 @@ def setup(core, object):
|
||||
object.setConstructorTemplate('object/building/player/shared_construction_structure.iff')
|
||||
object.setStructureTemplate('object/tangible/deed/city_deed/shared_cityhall_tatooine_deed.iff')
|
||||
#object.setLotRequirement(5)
|
||||
<<<<<<< HEAD
|
||||
#object.setBMR(100)
|
||||
=======
|
||||
object.setBMR(308)
|
||||
>>>>>>> upstream/master
|
||||
return
|
||||
|
||||
def use(core, actor, object):
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import sys
|
||||
|
||||
def setup(core, object):
|
||||
object.setAttachment('radial_filename', 'deeds/vehicleDeed')
|
||||
return
|
||||
|
||||
def use(core, actor, object):
|
||||
core.mountService.generateVehicle(actor, object, 'object/mobile/vehicle/shared_landspeeder_av21.iff', 'object/intangible/vehicle/shared_landspeeder_av21_pcd.iff')
|
||||
return
|
||||
@@ -6,8 +6,7 @@ def createRadial(core, owner, target, radials):
|
||||
|
||||
radials.add(RadialOptions(0, 7, 1, ''))
|
||||
if core.mountService.canMount(owner, target):
|
||||
radials.add(RadialOptions(1, 40, 3, '@pet/pet_menu:menu_enter_exit'))
|
||||
radials.add(RadialOptions(0, 21, 1, ''))
|
||||
radials.add(RadialOptions(0, 40, 3, '@pet/pet_menu:menu_enter_exit'))
|
||||
if target.getOwnerId() == owner.getObjectID():
|
||||
radials.add(RadialOptions(0, 60, 3, '@pet/pet_menu:menu_store'))
|
||||
if core.mountService.canRepair(owner, target):
|
||||
@@ -18,11 +17,11 @@ def handleSelection(core, owner, target, option):
|
||||
mntSvc = core.mountService
|
||||
|
||||
if target:
|
||||
if option == 21:
|
||||
if option == 40:
|
||||
if mntSvc.isMounted(owner):
|
||||
mntSvc.mount(owner, target)
|
||||
mntSvc.dismount(owner, target)
|
||||
else:
|
||||
mntSvc.unmount(owner, target)
|
||||
mntSvc.mount(owner, target)
|
||||
elif option == 60:
|
||||
mntSvc.store(owner, target)
|
||||
elif option == 114:
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.nio.ByteOrder;
|
||||
import org.apache.mina.core.buffer.IoBuffer;
|
||||
|
||||
import protocol.swg.ObjControllerMessage;
|
||||
import services.combat.CombatService.HitType;
|
||||
import resources.datatables.HitType;
|
||||
|
||||
public class CombatSpam extends ObjControllerObject{
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2013 <Project SWG>
|
||||
*
|
||||
* This File is part of NGECore2.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Using NGEngine to work with NGECore2 is making a combined work based on NGEngine.
|
||||
* Therefore all terms and conditions of the GNU Lesser General Public License cover the combination.
|
||||
******************************************************************************/
|
||||
package resources.datatables;
|
||||
|
||||
public class HitType {
|
||||
public static final byte MISS = 0;
|
||||
public static final byte DODGE = 1;
|
||||
public static final byte PARRY = 2;
|
||||
public static final byte STRIKETHROUGH = 3;
|
||||
public static final byte CRITICAL = 4;
|
||||
public static final byte PUNISHING = 5;
|
||||
public static final byte HIT = 6;
|
||||
public static final byte BLOCK = 7;
|
||||
public static final byte EVASION = 8;
|
||||
public static final byte GLANCE = 9;
|
||||
}
|
||||
@@ -1,3 +1,24 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2013 <Project SWG>
|
||||
*
|
||||
* This File is part of NGECore2.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Using NGEngine to work with NGECore2 is making a combined work based on NGEngine.
|
||||
* Therefore all terms and conditions of the GNU Lesser General Public License cover the combination.
|
||||
******************************************************************************/
|
||||
package resources.datatables;
|
||||
|
||||
public class Posture {
|
||||
|
||||
@@ -1211,11 +1211,10 @@ public class DevService implements INetworkDispatch {
|
||||
deed1.setBER(15);
|
||||
deed1.setAttributes();
|
||||
inventory.add(deed1);
|
||||
|
||||
break;
|
||||
return;
|
||||
case 112:
|
||||
core.resourceService.spawnSpecificResourceContainer("Radioactive", player, 100000);
|
||||
break;
|
||||
return;
|
||||
case 120:
|
||||
// SWGObject houseDeed = core.objectService.createObject("object/tangible/deed/player_house_deed/shared_generic_house_small_deed.iff", planet);
|
||||
// inventory.add(houseDeed);
|
||||
@@ -1224,6 +1223,7 @@ public class DevService implements INetworkDispatch {
|
||||
Player_House_Deed deed = (Player_House_Deed)core.objectService.createObject(templateString, planet);
|
||||
deed.setBMR(15);
|
||||
deed.setAttributes();
|
||||
<<<<<<< HEAD
|
||||
inventory.add(deed);
|
||||
|
||||
templateString="object/tangible/deed/city_deed/shared_cityhall_tatooine_deed.iff";
|
||||
@@ -1233,6 +1233,10 @@ public class DevService implements INetworkDispatch {
|
||||
inventory.add(deed);
|
||||
|
||||
break;
|
||||
=======
|
||||
inventory.add(deed);
|
||||
return;
|
||||
>>>>>>> upstream/master
|
||||
case 125:
|
||||
TangibleObject genericCraftingTool = (TangibleObject) core.objectService.createObject("object/tangible/crafting/station/shared_generic_tool.iff", planet);
|
||||
genericCraftingTool.setCustomName("Generic Crafting Tool");
|
||||
@@ -1240,7 +1244,9 @@ public class DevService implements INetworkDispatch {
|
||||
return;
|
||||
case 130:
|
||||
TangibleObject swoopDeed = (TangibleObject) core.objectService.createObject("object/tangible/deed/vehicle_deed/shared_speederbike_swoop_deed.iff", planet);
|
||||
TangibleObject av21deed = (TangibleObject) core.objectService.createObject("object/tangible/deed/vehicle_deed/shared_landspeeder_av21_deed.iff", planet);
|
||||
inventory.add(swoopDeed);
|
||||
inventory.add(av21deed);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,8 +82,19 @@ public class EquipmentService implements INetworkDispatch {
|
||||
}
|
||||
|
||||
if (item.getStringAttribute("class_required") != null) {
|
||||
String classRequired = item.getStringAttribute("class_required");
|
||||
String profession = ((PlayerObject) actor.getSlottedObject("ghost")).getProfession();
|
||||
if (item.getStringAttribute("class_required").contentEquals(core.playerService.getFormalProfessionName(profession)) || item.getStringAttribute("class_required").contentEquals("None"))
|
||||
|
||||
if (classRequired.contains(",")) {
|
||||
String[] classes = classRequired.split(",");
|
||||
|
||||
for (int i = 0; i < classes.length; i++) {
|
||||
if (classes[i].contains(core.playerService.getFormalProfessionName(profession))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (classRequired.contentEquals(core.playerService.getFormalProfessionName(profession)) || classRequired.contentEquals("None"))
|
||||
result = true;
|
||||
else
|
||||
return false;
|
||||
|
||||
@@ -65,6 +65,7 @@ import engine.resources.objects.SWGObject;
|
||||
import engine.resources.scene.Point3D;
|
||||
import engine.resources.service.INetworkDispatch;
|
||||
import engine.resources.service.INetworkRemoteEvent;
|
||||
import resources.datatables.HitType;
|
||||
|
||||
public class CombatService implements INetworkDispatch {
|
||||
|
||||
@@ -750,6 +751,12 @@ public class CombatService implements INetworkDispatch {
|
||||
|
||||
float glanceChance = (float) target.getSkillModBase("display_only_glancing_blow") / 10000;
|
||||
|
||||
if(weapon.isRanged())
|
||||
glanceChance += target.getSkillModBase("expertise_glancing_blow_ranged");
|
||||
|
||||
if(weapon.isMelee())
|
||||
glanceChance += target.getSkillModBase("expertise_glancing_blow_melee");
|
||||
|
||||
r = random.nextFloat();
|
||||
if(r <= glanceChance)
|
||||
return HitType.GLANCE;
|
||||
@@ -1359,33 +1366,5 @@ public class CombatService implements INetworkDispatch {
|
||||
defenderList.stream().forEach(attacker -> defender.removeDefender(attacker));
|
||||
}
|
||||
}
|
||||
|
||||
public enum HitType{;
|
||||
|
||||
public static final byte MISS = 0;
|
||||
public static final byte DODGE = 1;
|
||||
public static final byte PARRY = 2;
|
||||
public static final byte STRIKETHROUGH = 3;
|
||||
public static final byte CRITICAL = 4;
|
||||
public static final byte PUNISHING = 5;
|
||||
public static final byte HIT = 6;
|
||||
public static final byte BLOCK = 7;
|
||||
public static final byte EVASION = 8;
|
||||
public static final byte GLANCE = 9;
|
||||
|
||||
}
|
||||
|
||||
public enum ElementalType {;
|
||||
|
||||
public static final int KINETIC = 1;
|
||||
public static final int ENERGY = 2;
|
||||
public static final int BLAST = 4;
|
||||
public static final int STUN = 8;
|
||||
public static final int HEAT = 32;
|
||||
public static final int COLD = 64;
|
||||
public static final int ACID = 128;
|
||||
public static final int ELECTRICITY = 256;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,10 +32,13 @@ import resources.common.OutOfBand;
|
||||
import resources.datatables.DisplayType;
|
||||
import resources.datatables.Options;
|
||||
import resources.datatables.Posture;
|
||||
import resources.datatables.State;
|
||||
import resources.datatables.StateStatus;
|
||||
import resources.objects.building.BuildingObject;
|
||||
import resources.objects.creature.CreatureObject;
|
||||
import resources.objects.player.PlayerObject;
|
||||
import engine.clientdata.ClientFileManager;
|
||||
import engine.clientdata.visitors.DatatableVisitor;
|
||||
import engine.resources.container.Traverser;
|
||||
import engine.resources.objects.SWGObject;
|
||||
import engine.resources.service.INetworkDispatch;
|
||||
@@ -177,6 +180,8 @@ public class MountService implements INetworkDispatch {
|
||||
return;
|
||||
}
|
||||
|
||||
mount.setAttachment("pcdAppearanceFilename", pcd.getTemplateData().getAttribute("appearanceFilename"));
|
||||
|
||||
mount.setFaction(actor.getFaction());
|
||||
mount.setFactionStatus(actor.getFactionStatus());
|
||||
|
||||
@@ -388,50 +393,55 @@ public class MountService implements INetworkDispatch {
|
||||
}
|
||||
|
||||
public void mount(CreatureObject rider, CreatureObject mount) {
|
||||
if (rider == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mount == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME like above, movement skillmod should be used instead of creo4 vars and never be 0, otherwise it thinks we are always rooted
|
||||
//if (rider.getSkillModBase("movement") == 0) {
|
||||
//rider.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cant_mount_rooted"), DisplayType.Broadcast);
|
||||
//return;
|
||||
//rider.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cant_mount_rooted"), DisplayType.Broadcast);
|
||||
//return;
|
||||
//}
|
||||
|
||||
if (mount.getOption(Options.DISABLED)) {
|
||||
// Check if mount may be mounted
|
||||
if (rider == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (mount == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!mount.getOption(Options.MOUNT))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (mount.getOption(Options.DISABLED))
|
||||
{
|
||||
rider.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cant_mount_veh_disabled"), DisplayType.Broadcast);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mount.getOption(Options.MOUNT)) {
|
||||
if (rider.isInStealth())
|
||||
{
|
||||
rider.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:no_mount_stealth"), DisplayType.Broadcast);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!canMount(rider, mount)) {
|
||||
if (!canMount(rider, mount))
|
||||
{
|
||||
rider.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:cant_mount"), DisplayType.Broadcast);
|
||||
return;
|
||||
}
|
||||
|
||||
if (rider.isInStealth()) {
|
||||
rider.sendSystemMessage(OutOfBand.ProsePackage("@pet_menu:no_mount_stealth"), DisplayType.Broadcast);
|
||||
return;
|
||||
}
|
||||
// Put rider into mount
|
||||
mount._add(rider);
|
||||
|
||||
rider.setStateBitmask(rider.getStateBitmask() | 0x8000000);
|
||||
rider.setPosture((mount.getTemplate().contains("vehicle")) ? Posture.DrivingVehicle : Posture.RidingCreature);
|
||||
// Set mount states and stuff
|
||||
mount.setStateBitmask(mount.getStateBitmask() | State.MountedCreature);
|
||||
mount.setState(State.MountedCreature, true);
|
||||
mount.setPosture(Posture.DrivingVehicle);
|
||||
|
||||
synchronized(mount.getMutex()) {
|
||||
mount._add(rider);
|
||||
}
|
||||
|
||||
mount.setStateBitmask(mount.getStateBitmask() | 0x10000000);
|
||||
//mount.setState(State.MountedCreature, true);
|
||||
// Set rider states and stuff
|
||||
rider.setStateBitmask(rider.getStateBitmask() | State.RidingMount);
|
||||
rider.setState(StateStatus.RidingMount, true);
|
||||
|
||||
// Notify observers and update quadtree
|
||||
mount.notifyObservers(new UpdateContainmentMessage(rider.getObjectID(), mount.getObjectID(), 4), true);
|
||||
//rider.setState(State.RidingMount, true);
|
||||
core.simulationService.remove(rider, rider.getWorldPosition().x, rider.getWorldPosition().z, false);
|
||||
}
|
||||
|
||||
@@ -514,24 +524,44 @@ public class MountService implements INetworkDispatch {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mount.getSlottedObject("rider") != rider) {
|
||||
return false;
|
||||
if(mount.getSlottedObject("rider") == rider) return true;
|
||||
|
||||
if(mount.getAttachment("passenger") == null) return false;
|
||||
|
||||
for(int i = 1; i < (int) mount.getAttachment("passenger"); i++)
|
||||
{
|
||||
if (mount.getSlottedObject("rider" + i) != rider) return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isMounted(SWGObject actor, CreatureObject mount) {
|
||||
return actor.getContainer() == mount;
|
||||
}
|
||||
|
||||
public int getPassengerCount(CreatureObject mount)
|
||||
{
|
||||
mount.setAttachment("passengers", 0);
|
||||
|
||||
mount.viewChildren(mount, false, false, new Traverser()
|
||||
{
|
||||
public void process(SWGObject passenger)
|
||||
{
|
||||
if (passenger instanceof CreatureObject) mount.setAttachment("passengers", (int) mount.getAttachment("passengers") + 1);
|
||||
}
|
||||
});
|
||||
|
||||
return (int)mount.getAttachment("passengers");
|
||||
}
|
||||
|
||||
public boolean canMount(CreatureObject rider, CreatureObject mount) {
|
||||
if (mount == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!mount.getOption(Options.MOUNT)) {
|
||||
return false;
|
||||
// return false;
|
||||
}
|
||||
|
||||
if (isMounted(rider)) {
|
||||
@@ -552,7 +582,7 @@ public class MountService implements INetworkDispatch {
|
||||
int passengers = 0;
|
||||
|
||||
if (mount.getAttachment("passengers") != null){
|
||||
passengers = (Integer) mount.getAttachment("passengers");
|
||||
passengers = getPassengerCount(mount);
|
||||
}
|
||||
|
||||
int passengerSlot = 0;
|
||||
@@ -565,7 +595,7 @@ public class MountService implements INetworkDispatch {
|
||||
}
|
||||
|
||||
if (passengerSlot == 0) {
|
||||
return false;
|
||||
// return false;
|
||||
}
|
||||
|
||||
CreatureObject owner = (CreatureObject) NGECore.getInstance().objectService.getObject(mount.getOwnerId());
|
||||
@@ -582,56 +612,79 @@ public class MountService implements INetworkDispatch {
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
DatatableVisitor visitor = ClientFileManager.loadFile("datatables/mount/saddle_appearance_map.iff", DatatableVisitor.class);
|
||||
for(int i = 0; i < visitor.getRowCount(); i++)
|
||||
{
|
||||
if(visitor.getObject(i, 2).equals(mount.getAttachment("pcdAppearanceFilename"))) // saddle_appearance_name
|
||||
{
|
||||
if(passengers < (int) visitor.getObject(i, 1)) return true; // saddle_capacity
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e) { e.printStackTrace(); }
|
||||
|
||||
if(passengers > 0) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void dismount(CreatureObject rider, CreatureObject mount) {
|
||||
if (rider == null || mount == null) {
|
||||
|
||||
// Check if mount is currently mounted
|
||||
if (rider == null || mount == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!isMounted(rider))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!mount.getOption(Options.MOUNT))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isMounted(rider)) {
|
||||
return;
|
||||
}
|
||||
// Dismount all passengers
|
||||
|
||||
if (!mount.getOption(Options.MOUNT)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (rider.getObjectID() == mount.getOwnerId()) {
|
||||
if (rider.getObjectID() == mount.getOwnerId())
|
||||
{
|
||||
CreatureObject owner = rider;
|
||||
|
||||
mount.viewChildren(owner, false, false, new Traverser() {
|
||||
|
||||
public void process(SWGObject passenger) {
|
||||
if (passenger != owner) {
|
||||
mount._remove(passenger);
|
||||
mount.notifyObservers(new UpdateContainmentMessage(passenger.getObjectID(), 0, -1), false);
|
||||
|
||||
if (passenger instanceof CreatureObject) {
|
||||
((CreatureObject) passenger).setState(StateStatus.RidingMount, false);
|
||||
((CreatureObject) passenger).setPosture(Posture.Upright);
|
||||
}
|
||||
|
||||
core.simulationService.add(passenger, mount.getWorldPosition().x, mount.getWorldPosition().z, false);
|
||||
core.simulationService.teleport(passenger, mount.getWorldPosition(), mount.getOrientation(), 0);
|
||||
}
|
||||
mount.viewChildren(owner, false, false, new Traverser()
|
||||
{
|
||||
public void process(SWGObject passenger)
|
||||
{
|
||||
if (passenger != owner) dismount(rider, mount);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// Remove rider from mount
|
||||
mount._remove(rider);
|
||||
mount.notifyObservers(new UpdateContainmentMessage(rider.getObjectID(), 0, -1), false);
|
||||
|
||||
if (rider.getObjectID() == mount.getOwnerId()) {
|
||||
mount.setState(StateStatus.MountedCreature, false);
|
||||
|
||||
// Set mount states and stuff
|
||||
if (rider.getObjectID() == mount.getOwnerId())
|
||||
{
|
||||
mount.setStateBitmask(0);
|
||||
mount.setState(State.MountedCreature, false);
|
||||
}
|
||||
|
||||
core.simulationService.add(rider, mount.getWorldPosition().x, mount.getWorldPosition().z, false);
|
||||
// Set rider states and stuff
|
||||
rider.setStateBitmask(0);
|
||||
rider.setState(StateStatus.RidingMount, false);
|
||||
rider.setPosture((byte) 0);
|
||||
|
||||
// Update observers and quadtree
|
||||
mount.notifyObservers(new UpdateContainmentMessage(rider.getObjectID(), 0, -1), true);
|
||||
core.simulationService.teleport(rider, mount.getWorldPosition(), mount.getOrientation(), 0);
|
||||
core.simulationService.add(rider, mount.getWorldPosition().x, mount.getWorldPosition().z, false);
|
||||
|
||||
if (!mount.getTemplate().contains("vehicle") && rider.getObjectID() == mount.getOwnerId()) {
|
||||
// Store mount if it's a creature
|
||||
if (!mount.getTemplate().contains("vehicle") && rider.getObjectID() == mount.getOwnerId())
|
||||
{
|
||||
store(rider, mount);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user