Add game setting for lobby spawn pos.

master
whats_his_face 2022-03-02 13:19:09 -06:00
parent 46be8e59ed
commit 084035edd9
4 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,7 @@
!!!Important bits and bobs you need to know!!!
3-2-22:
You can now set the spawn pos for the lobby by a game setting (technical name: traitor_lobby_spawn). By default, the game uses the same position as the popular "In our midst" server.
2-12-22:
Also Important!!! Uncomment line 7 in lobby/functions.lua the first run after updating your code. This will create another new table that is required for the stats stuff to work.

View File

@ -9,6 +9,7 @@ lobby.traitors = {} --
lobby.corpses = {}
lobby.vote_timer = {}
lobby.spawn_pos = {x=29996, y=-4.5, z=30041.5}
lobby.spawn_pos = minetest.setting_get_pos('traitor_lobby_spawn') or lobby.spawn_pos
lobby.stat = {}
--Yes I know these table names are not very clear.

View File

@ -1,5 +1,5 @@
Traitor aims to be a game similar to Among Us. I've never actually played Among Us though, so your mileage may vary. :)
The game provides nodes and mechanics for building and playing 'levels', but has no mapgen, relying entirely on user generated content for the map. A spawn hub should be built at some location, and that location should be updated in mods/lobby/init.lua line 11. I should make this a configurarable setting at some point so that the a code change isn't required.
The game provides nodes and mechanics for building and playing 'levels', but has no mapgen, relying entirely on user generated content for the map. A spawn hub should be built at some location, and that location should be set as the lobby spawn point via the "Lobby spawn point" (traitor_lobby_spawn) game setting.
To create a new world/server grant youself free and fly, teleport to your spawn location. and use world edit to create a platform for new players to spawn onto. You may want to build walls around the platform so people can't walk off the edge and fall forever. Some invisible nodes are provided, and nodes that aren't available in creative inventory for server building. You can easily find them by searching the source code for nodes that are not_in_creative_inventory.

5
settingtypes.txt Normal file
View File

@ -0,0 +1,5 @@
# Determines where players are initially placed when entering a new world.
# You should build your lobby around this position.
# After having finished a map, a party is teleported to this point.
traitor_lobby_spawn (Lobby spawn point) v3f (29996, -4.5, 30041.5)