1 | ///////////////////////////////////////////////////////////////////////////////
|
---|
2 | //
|
---|
3 | // ## ######
|
---|
4 | // ###### ###
|
---|
5 | // ## ############### Shark 3D Engine (www.shark3d.com)
|
---|
6 | // ########## # # #
|
---|
7 | // ######## Copyright (c) 1996-2006 Spinor GmbH.
|
---|
8 | // ######### # # # All rights reserved.
|
---|
9 | // ## ##########
|
---|
10 | // ##
|
---|
11 | //
|
---|
12 | ///////////////////////////////////////////////////////////////////////////////
|
---|
13 |
|
---|
14 | // Universe definition.
|
---|
15 | // The universe contains the game state.
|
---|
16 |
|
---|
17 | actor_ident "kit_base.capsule"
|
---|
18 | actor_param
|
---|
19 | {
|
---|
20 | active 1
|
---|
21 | scope "universe"
|
---|
22 | local_name "capsule"
|
---|
23 | deleg_target "dispatch_export"
|
---|
24 | child_ident "kit_base.group"
|
---|
25 | child_param
|
---|
26 | {
|
---|
27 | // Delegate action calls to the children.
|
---|
28 | active 1
|
---|
29 | child_array
|
---|
30 | {
|
---|
31 | ident "kit_base.dispatch"
|
---|
32 | param
|
---|
33 | {
|
---|
34 | name "dispatch_export"
|
---|
35 | entry_array
|
---|
36 | {
|
---|
37 | cmds "produce_player"
|
---|
38 | targets "player_producer"
|
---|
39 | newcmd "produce"
|
---|
40 | }
|
---|
41 | {
|
---|
42 | cmds "net_traverse"
|
---|
43 | targets
|
---|
44 | "player_producer"
|
---|
45 | newcmd "traverse"
|
---|
46 | }
|
---|
47 | {
|
---|
48 | cmds "net_traverse"
|
---|
49 | targets
|
---|
50 | "setting_serroot"
|
---|
51 | }
|
---|
52 | }
|
---|
53 | }
|
---|
54 | {
|
---|
55 | // Dispatcher handling messages from the universe,
|
---|
56 | // which contains the game state.
|
---|
57 | ident "kit_base.dispatch"
|
---|
58 | param
|
---|
59 | {
|
---|
60 | name "dispatch_serialize"
|
---|
61 | entry_array
|
---|
62 | {
|
---|
63 | cmds "store_pre" "store_post" "load_post"
|
---|
64 | targets "player_set"
|
---|
65 | }
|
---|
66 | {
|
---|
67 | // Handle every command to avoid error:
|
---|
68 | cmds "delete_pre" "delete_post"
|
---|
69 | "store_pre" "store_post"
|
---|
70 | "load_pre" "load_post"
|
---|
71 | targets
|
---|
72 | }
|
---|
73 | }
|
---|
74 | }
|
---|
75 | {
|
---|
76 | ident "kit_base.dispatch"
|
---|
77 | param
|
---|
78 | {
|
---|
79 | name "dispatch_setting"
|
---|
80 | entry_array
|
---|
81 | {
|
---|
82 | cmds
|
---|
83 | "get_basesuppl"
|
---|
84 | "ignore_frmtime"
|
---|
85 | "cfg_access_int_info"
|
---|
86 | "cfg_access_float_info"
|
---|
87 | "cfg_access_str_info"
|
---|
88 | "cfg_access_chunk_info"
|
---|
89 | "universe_cfg_access_int_info"
|
---|
90 | "universe_cfg_access_float_info"
|
---|
91 | "universe_cfg_access_str_info"
|
---|
92 | "universe_cfg_access_chunk_info"
|
---|
93 | targets "^dispatch_universe"
|
---|
94 | }
|
---|
95 | {
|
---|
96 | cmds
|
---|
97 | "notice_level_load_pre"
|
---|
98 | "notice_level_load_post"
|
---|
99 | targets "player_set"
|
---|
100 | }
|
---|
101 | }
|
---|
102 | }
|
---|
103 | {
|
---|
104 | // Define a serialization actor.
|
---|
105 | // This actor can store and load its child into and from a file.
|
---|
106 | // Important! This actor defines a local namespace.
|
---|
107 | // It is not possible to access actors outside this namespace.
|
---|
108 | // Instead, you can send commands to the "outside" actor.
|
---|
109 | ident "kit_base.serroot"
|
---|
110 | param
|
---|
111 | {
|
---|
112 | // Delegate action calls to the child.
|
---|
113 | active 1
|
---|
114 | // Scope of the local namespace.
|
---|
115 | scope "setting"
|
---|
116 | // Actor name from outside.
|
---|
117 | export_name "setting"
|
---|
118 | // Name to delegate commands inside the universe to.
|
---|
119 | export_deleg_name "setting_serroot"
|
---|
120 | // Name to send commands for outside the universe to.
|
---|
121 | deleg_target "dispatch_export"
|
---|
122 | // Target to send commands outside the universe to.
|
---|
123 | local_outside_name "outside"
|
---|
124 | //
|
---|
125 | outside_target "dispatch_setting"
|
---|
126 | // Objects outside the universe referenced from inside,
|
---|
127 | // fetched from the outside actor:
|
---|
128 | known_cmds "get_basesuppl"
|
---|
129 | // Header identifier for the state files.
|
---|
130 | ident "std"
|
---|
131 | // Notification commands about loading and saving.
|
---|
132 | notify_target "dispatch_serialize"
|
---|
133 | notify_pre_delete_cmd "delete_pre"
|
---|
134 | notify_post_delete_cmd "delete_post"
|
---|
135 | notify_pre_store_cmd "store_pre"
|
---|
136 | notify_post_store_cmd "store_post"
|
---|
137 | notify_pre_load_cmd "load_pre"
|
---|
138 | notify_post_load_cmd "load_post"
|
---|
139 | // The level root has an own namespace:
|
---|
140 | child_ident "kit_base.extern"
|
---|
141 | child_param
|
---|
142 | {
|
---|
143 | // Delegate action calls to the child:
|
---|
144 | active 1
|
---|
145 | res "universe/actor/setting.s3d_actor_run"
|
---|
146 | }
|
---|
147 | }
|
---|
148 | }
|
---|
149 | {
|
---|
150 | ident "kit_snk.childif"
|
---|
151 | param
|
---|
152 | {
|
---|
153 | extcfg_actor "^universe_cfg"
|
---|
154 | extcfg_entry_switch "server"
|
---|
155 | then_child_ident "kit_base.onaction"
|
---|
156 | then_child_param
|
---|
157 | {
|
---|
158 | active 1
|
---|
159 | target "player_set"
|
---|
160 | cmd "check_setting"
|
---|
161 | }
|
---|
162 | else_child_ident ""
|
---|
163 | else_child_param
|
---|
164 | {
|
---|
165 | }
|
---|
166 | }
|
---|
167 | }
|
---|
168 | {
|
---|
169 | // External file describing the structure of each player:
|
---|
170 | ident "kit_base.extern"
|
---|
171 | param
|
---|
172 | {
|
---|
173 | // Delegate action calls to the child:
|
---|
174 | active 1
|
---|
175 | res "universe/actor/universeplayer.s3d_actor_run"
|
---|
176 | }
|
---|
177 | }
|
---|
178 | {
|
---|
179 | ident "kit_engbase.netproducer"
|
---|
180 | param
|
---|
181 | {
|
---|
182 | name "player_producer"
|
---|
183 | produce_target "player_rawproducer"
|
---|
184 | produce_cmd "produce"
|
---|
185 | net_traverse_cmd "net_traverse"
|
---|
186 | }
|
---|
187 | }
|
---|
188 | {
|
---|
189 | ident "kit_engbase.netappear"
|
---|
190 | param
|
---|
191 | {
|
---|
192 | name "player_appear"
|
---|
193 | appear_target "player_set"
|
---|
194 | appear_cmd "net_appear"
|
---|
195 | }
|
---|
196 | }
|
---|
197 | }
|
---|
198 | } |
---|