Skip to content

Commit

Permalink
Adds config option for hub, removes hub.dm, adds toggle hub admin verb
Browse files Browse the repository at this point in the history
  • Loading branch information
MrStonedOne committed Oct 9, 2016
1 parent fcdbf37 commit 44f5632
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 48 deletions.
2 changes: 2 additions & 0 deletions code/controllers/configuration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@

if(type == "config")
switch(name)
if("hub")
world.visibility = 1
if("admin_legacy_system")
config.admin_legacy_system = 1
if("ban_legacy_system")
Expand Down
20 changes: 0 additions & 20 deletions code/hub.dm

This file was deleted.

3 changes: 2 additions & 1 deletion code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ var/list/admin_verbs_server = list(
/client/proc/forcerandomrotate,
/client/proc/adminchangemap,
#endif
/client/proc/panicbunker
/client/proc/panicbunker,
/client/proc/toggle_hub

)
var/list/admin_verbs_debug = list(
Expand Down
11 changes: 11 additions & 0 deletions code/modules/admin/verbs/randomverbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1153,3 +1153,14 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
dat += "[S.name] - <a href='?src=\ref[S];announce=1'>Announce</a> | <a href='?src=\ref[S];remove=1'>Remove</a><br>"
dat += "<br><a href='?src=\ref[src];add_station_goal=1'>Add New Goal</a>"
usr << browse(dat, "window=goals;size=400x400")


/client/proc/toggle_hub()
set category = "Server"
set name = "Toggle Hub"

world.visibility = (!world.visibility)

log_admin("[key_name(usr)] has toggled the server's hub status for the round, it is now [(world.visibility?"on":"off")] the hub.")
message_admins("[key_name_admin(usr)] has toggled the server's hub status for the round, it is now [(world.visibility?"on":"off")] the hub.")
feedback_add_details("admin_verb","HUB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
7 changes: 5 additions & 2 deletions code/world.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
area = /area/space
view = "15x15"
cache_lifespan = 7
hub = "Exadv1.spacestation13"
hub_password = "kMZy3U5jJHSiBQjr"
name = "/tg/ Station 13"
fps = 20

var/global/list/map_transition_config = MAP_TRANSITION_CONFIG
var/list/map_transition_config = MAP_TRANSITION_CONFIG

/world/New()
check_for_cleanbot_bug()
Expand All @@ -32,7 +35,7 @@ var/global/list/map_transition_config = MAP_TRANSITION_CONFIG
changelog_hash = md5('html/changelog.html') //used for telling if the changelog has changed recently

make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once)

visibility = 0
load_configuration()
load_mode()
load_motd()
Expand Down
3 changes: 3 additions & 0 deletions config/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
## Station name: The name of the station as it is referred to in-game. If commented out, the game will generate a random name instead.
STATIONNAME Space Station 13

## Put on byond hub: uncomment this to put your server on the byond hub.
#HUB

# Lobby time: This is the amount of time between rounds that players have to setup their characters and be ready.
LOBBY_COUNTDOWN 120

Expand Down
1 change: 0 additions & 1 deletion tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "_maps\__MAP_DEFINES.dm"
#include "_maps\tgstation2.dm"
#include "code\_compile_options.dm"
#include "code\hub.dm"
#include "code\world.dm"
#include "code\__DATASTRUCTURES\heap.dm"
#include "code\__DATASTRUCTURES\linked_lists.dm"
Expand Down
48 changes: 24 additions & 24 deletions tools/tgstation-server/Start Server.bat
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
@echo off
@title SERVER WATCHDOG
call config.bat
call bin\findbyond.bat

echo Welcome to the start server watch dog script, This will start the server and make sure it stays running. To continue, press any key or wait 60 seconds.
timeout 60

if not exist gamedata\data\logs\runtimes mkdir gamedata\data\logs\runtimes\
@python bot\nudge.py "WATCHDOG" "Watch Dog online. Starting server" >nul 2>nul

:START
call bin\getcurdate.bat
cls
echo Watch Dog.
echo Server Running. Watching for server exits.
start /WAIT /ABOVENORMAL "" dreamdaemon.exe gamefolder\%PROJECTNAME%.dmb -port %PORT% -trusted -close -log "data\logs\runtimes\runtime-%CUR_DATE%.log"
cls
echo Watch Dog.
echo Server exit detected. Restarting in 60 seconds.
@python bot\nudge.py "WATCHDOG" "Server exit detected. Restarting server in 60 seconds." >nul 2>nul
timeout 60

goto :START
@echo off
@title SERVER WATCHDOG
call config.bat
call bin\findbyond.bat

echo Welcome to the start server watch dog script, This will start the server and make sure it stays running. To continue, press any key or wait 60 seconds.
timeout 60

if not exist gamedata\data\logs\runtimes mkdir gamedata\data\logs\runtimes\
@python bot\nudge.py "WATCHDOG" "Watch Dog online. Starting server" >nul 2>nul

:START
call bin\getcurdate.bat
cls
echo Watch Dog.
echo Server Running. Watching for server exits.
start /WAIT /ABOVENORMAL "" dreamdaemon.exe gamefolder\%PROJECTNAME%.dmb -port %PORT% -trusted -public -close -log "data\logs\runtimes\runtime-%CUR_DATE%.log"
cls
echo Watch Dog.
echo Server exit detected. Restarting in 60 seconds.
@python bot\nudge.py "WATCHDOG" "Server exit detected. Restarting server in 60 seconds." >nul 2>nul
timeout 60

goto :START

0 comments on commit 44f5632

Please sign in to comment.