Clean server start.

Server start messages concerning initialization, object generation, etc. is now only propagated to users with R_DEBUG access.
This commit is contained in:
PsiOmega
2015-04-18 15:32:25 +02:00
parent bc9d1ba38b
commit eca7569077
7 changed files with 26 additions and 22 deletions
+1 -2
View File
@@ -55,8 +55,7 @@ proc/admin_proc()
if(!check_rights(R_ADMIN)) return
world << "you have enough rights!"
NOTE: it checks usr! not src! So if you're checking somebody's rank in a proc which they did not call
you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
NOTE: It checks usr by default. Supply the "user" argument if you wish to check for a specific mob.
*/
/proc/check_rights(rights_required, show_msg=1, var/mob/user = usr)
if(user && user.client)
+4 -4
View File
@@ -3,7 +3,7 @@ proc/createRandomZlevel()
return
var/list/potentialRandomZlevels = list()
world << "\red \b Searching for away missions..."
admin_notice("\red \b Searching for away missions...", R_DEBUG)
var/list/Lines = file2list("maps/RandomZLevels/fileList.txt")
if(!Lines.len) return
for (var/t in Lines)
@@ -35,7 +35,7 @@ proc/createRandomZlevel()
if(potentialRandomZlevels.len)
world << "\red \b Loading away mission..."
admin_notice("\red \b Loading away mission...", R_DEBUG)
var/map = pick(potentialRandomZlevels)
var/file = file(map)
@@ -48,8 +48,8 @@ proc/createRandomZlevel()
continue
awaydestinations.Add(L)
world << "\red \b Away mission loaded."
admin_notice("\red \b Away mission loaded.", R_DEBUG)
else
world << "\red \b No away missions found."
admin_notice("\red \b No away missions found.", R_DEBUG)
return
@@ -62,13 +62,13 @@ Deep minerals:
deep_count++
// Sanity check.
if(surface_count < MIN_SURFACE_COUNT)
world << "<span class='danger'>Insufficient surface minerals. Rerolling...</span>"
admin_notice("<span class='danger'>Insufficient surface minerals. Rerolling...</span>", R_DEBUG)
return 0
else if(rare_count < MIN_RARE_COUNT)
world << "<span class='danger'>Insufficient rare minerals. Rerolling...</span>"
admin_notice("<span class='danger'>Insufficient rare minerals. Rerolling...</span>", R_DEBUG)
return 0
else if(deep_count < MIN_DEEP_COUNT)
world << "<span class='danger'>Insufficient deep minerals. Rerolling...</span>"
admin_notice("<span class='danger'>Insufficient deep minerals. Rerolling...</span>", R_DEBUG)
return 0
else
return 1
@@ -112,7 +112,7 @@ Deep minerals:
// Infinite loop check!
if(iteration>=iterate_before_fail)
world << "<span class='danger'>Iteration count exceeded, aborting.</span>"
admin_notice("<span class='danger'>Iteration count exceeded, aborting.</span>", R_DEBUG)
return
var/isize = input_size
+4 -4
View File
@@ -58,12 +58,12 @@ var/global/list/random_maps = list()
if(seed) rand_seed(seed)
var/start_time = world.timeofday
world << "<span class='danger'>Generating [descriptor].</span>"
admin_notice("<span class='danger'>Generating [descriptor].</span>", R_DEBUG)
for(var/i = 0;i<max_attempts;i++)
if(generate())
world << "<span class='danger'>[capitalize(descriptor)] generation completed in [round(0.1*(world.timeofday-start_time),0.1)] seconds.</span>"
admin_notice("<span class='danger'>[capitalize(descriptor)] generation completed in [round(0.1*(world.timeofday-start_time),0.1)] seconds.</span>", R_DEBUG)
return
world << "<span class='danger'>[capitalize(descriptor)] generation failed in [round(0.1*(world.timeofday-start_time),0.1)] seconds: could not produce sane map.</span>"
admin_notice("<span class='danger'>[capitalize(descriptor)] generation failed in [round(0.1*(world.timeofday-start_time),0.1)] seconds: could not produce sane map.</span>", R_DEBUG)
/datum/random_map/proc/within_bounds(var/val)
return (val>0) && (val<=raw_map_size)
@@ -169,5 +169,5 @@ var/global/list/random_maps = list()
for(var/i = 0, i < max_secret_rooms, i++)
if(make_mining_asteroid_secret())
rooms_placed++
world << "<span class='danger'>Placed [rooms_placed] secrets.</span>"
admin_notice("<span class='danger'>Placed [rooms_placed] secrets.</span>", R_DEBUG)
return 1