ubc-minetest-classroom / minetest_classroom

Repo for Mintest Classroom game
GNU General Public License v3.0
10 stars 6 forks source link

Instanced classrooms using "empty world" option are not walled #230

Closed pauldpickell closed 1 year ago

pauldpickell commented 1 year ago

Describe the bug When an instanced classroom is created with the "empty world" option selected, it does not have walls.

To Reproduce Steps to reproduce the behavior:

  1. Open the teacher controller.
  2. Navigate to the classrooms tab.
  3. Create a new classroom, set the type to instanced, and the generation to "empty world". Use any decorators, seed, and sea level.
  4. Observe a classroom without walls.

Expected behavior All classrooms should have walls. This does not seem to occur with the "schematic" option.

pauldpickell commented 1 year ago

@Lowie375 Is it possible that the voxel manipulator in Realm:GenerateTerrain() is overwriting the barriers generated in mc_worldManager.GetCreateInstancedRealm()?

Stack Trace:

lukasgolson commented 1 year ago

I haven't looked at this code since last year so I might be mistaken, but I just wanted to pop in and see if realm:CreateBarriers() is being called when creating empty worlds.

E.g., see how schematics are being spawned:

https://github.com/ubc-minetest-classroom/minetest_classroom/blob/main/mods/mc_worldmanager/realm/realmSchematicSaveLoad.lua#L209

I'll look at this issue further later this week if this hasn't been resolved by then.

pauldpickell commented 1 year ago

Yes, realm:CreateBarriers() is called during mc_worldManager.GetCreateInstancedRealm.

Just as a simple test, the chat commands seem to create the realm, barriers, and terrain as expected on the server: \realm new \realm gen [realmid] v1 v1 1234 30

Now I am just realizing the the barriers are created again at the end of the "gen" command.

pauldpickell commented 1 year ago

Fixed by 5537976.