Added Glitch Room Source code to Gitty
This commit is contained in:
commit
1ac9eb5644
505 files changed
+28504
No files matched your search
@@ -0,0 +1,50 @@
|
||||
@tool
|
||||
class_name ProjectDatabase
|
||||
extends Resource
|
||||
|
||||
|
||||
@export var scenarios: Array[ScenarioDefinition] = []
|
||||
@export var cabinets: Array[CabinetProfile] = []
|
||||
@export var games: Array[GameDefinition] = []
|
||||
|
||||
|
||||
func get_scenario(
|
||||
scenario_id: StringName
|
||||
) -> ScenarioDefinition:
|
||||
|
||||
for scenario in scenarios:
|
||||
if scenario == null:
|
||||
continue
|
||||
|
||||
if scenario.scenario_id == scenario_id:
|
||||
return scenario
|
||||
|
||||
return null
|
||||
|
||||
|
||||
func get_cabinet(
|
||||
cabinet_id: StringName
|
||||
) -> CabinetProfile:
|
||||
|
||||
for cabinet in cabinets:
|
||||
if cabinet == null:
|
||||
continue
|
||||
|
||||
if cabinet.cabinet_id == cabinet_id:
|
||||
return cabinet
|
||||
|
||||
return null
|
||||
|
||||
|
||||
func get_game(
|
||||
game_id: StringName
|
||||
) -> GameDefinition:
|
||||
|
||||
for game in games:
|
||||
if game == null:
|
||||
continue
|
||||
|
||||
if game.game_id == game_id:
|
||||
return game
|
||||
|
||||
return null
|
||||
Reference in new issue
Block a user