MCPcopy
hub / github.com/SFTtech/openage / _create_objects

Function _create_objects

openage/convert/service/read/nyan_api_loader.py:38–2512  ·  view source on GitHub ↗

Creates the API objects.

(api_objects: dict[str, NyanObject])

Source from the content-addressed store, hash-verified

36
37
38def _create_objects(api_objects: dict[str, NyanObject]) -> None:
39 """
40 Creates the API objects.
41 """
42 # engine.root
43 # engine.root.Object
44 nyan_object = NyanObject("Object")
45 fqon = "engine.root.Object"
46 nyan_object.set_fqon(fqon)
47
48 api_objects.update({fqon: nyan_object})
49
50 # engine.ability
51 # engine.ability.Ability
52 parents = [api_objects["engine.root.Object"]]
53 nyan_object = NyanObject("Ability", parents)
54 fqon = "engine.ability.Ability"
55 nyan_object.set_fqon(fqon)
56 api_objects.update({fqon: nyan_object})
57
58 # engine.ability.property.AbilityProperty
59 parents = [api_objects["engine.root.Object"]]
60 nyan_object = NyanObject("AbilityProperty", parents)
61 fqon = "engine.ability.property.AbilityProperty"
62 nyan_object.set_fqon(fqon)
63 api_objects.update({fqon: nyan_object})
64
65 # engine.ability.property.type.Animated
66 parents = [api_objects["engine.ability.property.AbilityProperty"]]
67 nyan_object = NyanObject("Animated", parents)
68 fqon = "engine.ability.property.type.Animated"
69 nyan_object.set_fqon(fqon)
70 api_objects.update({fqon: nyan_object})
71
72 # engine.ability.property.type.AnimationOverride
73 parents = [api_objects["engine.ability.property.AbilityProperty"]]
74 nyan_object = NyanObject("AnimationOverride", parents)
75 fqon = "engine.ability.property.type.AnimationOverride"
76 nyan_object.set_fqon(fqon)
77 api_objects.update({fqon: nyan_object})
78
79 # engine.ability.property.type.CommandSound
80 parents = [api_objects["engine.ability.property.AbilityProperty"]]
81 nyan_object = NyanObject("CommandSound", parents)
82 fqon = "engine.ability.property.type.CommandSound"
83 nyan_object.set_fqon(fqon)
84 api_objects.update({fqon: nyan_object})
85
86 # engine.ability.property.type.Diplomatic
87 parents = [api_objects["engine.ability.property.AbilityProperty"]]
88 nyan_object = NyanObject("Diplomatic", parents)
89 fqon = "engine.ability.property.type.Diplomatic"
90 nyan_object.set_fqon(fqon)
91 api_objects.update({fqon: nyan_object})
92
93 # engine.ability.property.type.ExecutionSound
94 parents = [api_objects["engine.ability.property.AbilityProperty"]]
95 nyan_object = NyanObject("ExecutionSound", parents)

Callers 1

load_apiFunction · 0.85

Calls 3

set_fqonMethod · 0.95
NyanObjectClass · 0.85
updateMethod · 0.45

Tested by

no test coverage detected