aduermael commited on
Commit
6df67ec
1 Parent(s): 9b2276e

script DEBUG

Browse files
Files changed (1) hide show
  1. cubzh.lua +7 -15
cubzh.lua CHANGED
@@ -1,5 +1,5 @@
1
  Modules = {
2
- gigax = "github.com/GigaxGames/integrations/cubzh:cdfd9a2",
3
  pathfinding = "github.com/caillef/cubzh-library/pathfinding:f8c4315",
4
  floating_island_generator = "github.com/caillef/cubzh-library/floating_island_generator:82d22a5",
5
  }
@@ -312,27 +312,19 @@ Client.OnWorldObjectLoad = function(obj)
312
  gigaxWorldConfig.locations[1].position = pos
313
  gigaxWorldConfig.NPCs[1].position = pos
314
  gigaxWorldConfig.NPCs[1].rotation = obj.Rotation:Copy()
315
-
316
- -- DEBUG: this works, but not avatar loaded with gigax module
317
- local test = require("avatar"):get("aduermael")
318
- test:SetParent(World)
319
- test.Position:Set(obj.Position)
320
- test.Rotation:Set(obj.Rotation)
321
- test.Scale:Set(obj.Scale)
322
-
323
  obj:RemoveFromParent()
324
  elseif obj.Name == "NPC_baker" then
325
  local pos = obj.Position:Copy()
326
  gigaxWorldConfig.locations[2].position = pos
327
  gigaxWorldConfig.NPCs[2].position = pos
328
  gigaxWorldConfig.NPCs[2].rotation = obj.Rotation:Copy()
329
- -- obj:RemoveFromParent()
330
  elseif obj.Name == "NPC_pirate" then
331
  local pos = obj.Position:Copy()
332
  gigaxWorldConfig.locations[3].position = pos
333
  gigaxWorldConfig.NPCs[3].position = pos
334
  gigaxWorldConfig.NPCs[3].rotation = obj.Rotation:Copy()
335
- -- obj:RemoveFromParent()
336
  end
337
  end
338
 
@@ -371,11 +363,11 @@ Client.OnStart = function()
371
 
372
  pathfinding:createPathfindingMap()
373
 
374
- -- gigax:setConfig(gigaxWorldConfig)
375
- end
 
376
 
377
- Client.OnPlayerJoin = function()
378
- gigax:setConfig(gigaxWorldConfig)
379
  end
380
 
381
  Client.Action1 = function()
 
1
  Modules = {
2
+ gigax = "github.com/GigaxGames/integrations/cubzh:5025b99",
3
  pathfinding = "github.com/caillef/cubzh-library/pathfinding:f8c4315",
4
  floating_island_generator = "github.com/caillef/cubzh-library/floating_island_generator:82d22a5",
5
  }
 
312
  gigaxWorldConfig.locations[1].position = pos
313
  gigaxWorldConfig.NPCs[1].position = pos
314
  gigaxWorldConfig.NPCs[1].rotation = obj.Rotation:Copy()
 
 
 
 
 
 
 
 
315
  obj:RemoveFromParent()
316
  elseif obj.Name == "NPC_baker" then
317
  local pos = obj.Position:Copy()
318
  gigaxWorldConfig.locations[2].position = pos
319
  gigaxWorldConfig.NPCs[2].position = pos
320
  gigaxWorldConfig.NPCs[2].rotation = obj.Rotation:Copy()
321
+ obj:RemoveFromParent()
322
  elseif obj.Name == "NPC_pirate" then
323
  local pos = obj.Position:Copy()
324
  gigaxWorldConfig.locations[3].position = pos
325
  gigaxWorldConfig.NPCs[3].position = pos
326
  gigaxWorldConfig.NPCs[3].rotation = obj.Rotation:Copy()
327
+ obj:RemoveFromParent()
328
  end
329
  end
330
 
 
363
 
364
  pathfinding:createPathfindingMap()
365
 
366
+ Timer(2, function()
367
+ gigax:setConfig(gigaxWorldConfig)
368
+ end)
369
 
370
+ Player.Avatar:load({ usernameOrId = "aduermael" })
 
371
  end
372
 
373
  Client.Action1 = function()