Fixed up a couple things, first steps towards a location manager

This commit is contained in:
2026-03-27 16:32:52 -07:00
parent 7ba95c5949
commit f9de58d9f7
9 changed files with 111 additions and 48 deletions

View File

@@ -1,7 +1,7 @@
class_name cCamera
var cam: Dictionary
var camID: String
var camID: int
var camGraph = Global.loadJSON("res://Data/cameras.json")
@@ -9,25 +9,23 @@ var name: String
var disabled: bool
var rendersChart: Dictionary
var renders: Dictionary
var locationID: String
var locationID: int
var location: cLocation
# Called when the node enters the scene tree for the first time.
func _init(id: String) -> void:
func _init(id: int) -> void:
camID = id
cam = camGraph[camID]
print("Setting up camera " + camID)
if not camGraph.has(str(camID)):
camID = 0
cam = camGraph[str(camID)]
name = cam.get("name")
disabled = cam.get("disabled")
rendersChart = cam.get("renders")
locationID = str( int( cam.get("location") ) )
location = cLocation.new(locationID)
print(name)
print(disabled)
print(rendersChart)
print(location)
locationID = int( cam.get("location") )
location = Global.locationManager.getLocation(id)
_loadRenders()