From 084035edd90b6bea23d515bae07e74753a84f90b Mon Sep 17 00:00:00 2001 From: whats_his_face Date: Wed, 2 Mar 2022 13:19:09 -0600 Subject: [PATCH] Add game setting for lobby spawn pos. --- changelog.txt | 3 +++ mods/lobby/init.lua | 1 + readme.txt | 2 +- settingtypes.txt | 5 +++++ 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 settingtypes.txt diff --git a/changelog.txt b/changelog.txt index d69460a..8ba91c3 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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. diff --git a/mods/lobby/init.lua b/mods/lobby/init.lua index c6d9d02..a6b5e12 100644 --- a/mods/lobby/init.lua +++ b/mods/lobby/init.lua @@ -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. diff --git a/readme.txt b/readme.txt index 8a2e583..ff4e1ce 100644 --- a/readme.txt +++ b/readme.txt @@ -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. diff --git a/settingtypes.txt b/settingtypes.txt new file mode 100644 index 0000000..7c26675 --- /dev/null +++ b/settingtypes.txt @@ -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) +