MCPcopy
hub / github.com/4ian/GDevelop / getFakeSceneData

Function getFakeSceneData

Extensions/SaveState/tests/SaveState.spec.js:36–86  ·  view source on GitHub ↗
({ name, objects, instances })

Source from the content-addressed store, hash-verified

34 * @returns {LayoutData}
35 */
36 const getFakeSceneData = ({ name, objects, instances }) => ({
37 layers: [
38 {
39 name: '',
40 visibility: true,
41 effects: [],
42 cameras: [],
43 ambientLightColorR: 0,
44 ambientLightColorG: 0,
45 ambientLightColorB: 0,
46 isLightingLayer: false,
47 followBaseLayerCamera: true,
48 },
49 ],
50 r: 0,
51 v: 0,
52 b: 0,
53 mangledName: name,
54 name: name,
55 stopSoundsOnStartup: false,
56 title: '',
57 behaviorsSharedData: [],
58 objects: objects || [
59 // @ts-ignore - This is a gdjs.SpriteObjectData.
60 {
61 type: 'Sprite',
62 name: 'MySpriteObject',
63 behaviors: [],
64 effects: [],
65 variables: [],
66
67 animations: [],
68 updateIfNotVisible: false,
69 },
70 ],
71 objectsGroups: [],
72 instances: instances || [],
73 variables: [],
74 usedResources: [],
75 uiSettings: {
76 grid: false,
77 gridType: 'rectangular',
78 gridWidth: 0,
79 gridHeight: 0,
80 gridOffsetX: 0,
81 gridOffsetY: 0,
82 gridColor: 0,
83 gridAlpha: 0,
84 snap: false,
85 },
86 });
87
88 describe('Save State Basics', () => {
89 it('saves and restores a game with objects at specific positions (without SaveConfiguration behavior)', async () => {

Callers 2

SaveState.spec.jsFile · 0.85
makeGameAndSceneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected