ID:177073
![]() Nov 10 2002, 5:26 pm
|
|
In the case of a single player game(like my new Teen Issues project), is there any way to actually prevent the user from hosting so as to keep only one user in the game?
|
You can perpetually set the game to invisible, and boot anyone who enters if there is more than one game, but there isn't any way to prevent them from hosting it.
Hopefully, there will be in the next version. |
They seem to have added in that capability already. There is a world proc called OpenPort(). You can send it a value of 0 to have it randomly assign an open port or send it the text string "none" to have it close any open port.
Whenever client/New() is called (after the first) just use world.OpenPort("none") and send the host a message. I suppose that still doesn't actually prevent the user from clicking host and making it appear on the hub but it's fairly close. You could check the port every few seconds and close it if it's open. |
..()
for(var/mob/M in world)
if(M.client)
if(usr != M)
usr << "Sorry, but this game is being hosted, which is a no-no."
del(usr)