mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 20:37:34 +01:00
Moved several globals into the config controller, updated eample config appropriately.
This commit is contained in:
@@ -5,7 +5,7 @@ world/IsBanned(key,address,computer_id)
|
||||
return ..()
|
||||
|
||||
//Guest Checking
|
||||
if(!guests_allowed && IsGuestKey(key))
|
||||
if(!config.guests_allowed && IsGuestKey(key))
|
||||
log_access("Failed Login: [key] - Guests not allowed")
|
||||
message_admins("\blue Failed Login: [key] - Guests not allowed")
|
||||
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
|
||||
|
||||
+32
-33
@@ -735,8 +735,8 @@ var/global/floorIsLava = 0
|
||||
set category = "Server"
|
||||
set desc="Globally Toggles OOC"
|
||||
set name="Toggle OOC"
|
||||
ooc_allowed = !( ooc_allowed )
|
||||
if (ooc_allowed)
|
||||
config.ooc_allowed = !(config.ooc_allowed)
|
||||
if (config.ooc_allowed)
|
||||
world << "<B>The OOC channel has been globally enabled!</B>"
|
||||
else
|
||||
world << "<B>The OOC channel has been globally disabled!</B>"
|
||||
@@ -749,8 +749,8 @@ var/global/floorIsLava = 0
|
||||
set category = "Server"
|
||||
set desc="Globally Toggles DSAY"
|
||||
set name="Toggle DSAY"
|
||||
dsay_allowed = !( dsay_allowed )
|
||||
if (dsay_allowed)
|
||||
config.dsay_allowed = !(config.dsay_allowed)
|
||||
if (config.dsay_allowed)
|
||||
world << "<B>Deadchat has been globally enabled!</B>"
|
||||
else
|
||||
world << "<B>Deadchat has been globally disabled!</B>"
|
||||
@@ -760,11 +760,10 @@ var/global/floorIsLava = 0
|
||||
|
||||
/datum/admins/proc/toggleoocdead()
|
||||
set category = "Server"
|
||||
set desc="Toggle dis bitch"
|
||||
set desc="Toggle Dead OOC."
|
||||
set name="Toggle Dead OOC"
|
||||
dooc_allowed = !( dooc_allowed )
|
||||
|
||||
log_admin("[key_name(usr)] toggled OOC.")
|
||||
config.dooc_allowed = !( config.dooc_allowed )
|
||||
log_admin("[key_name(usr)] toggled Dead OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1)
|
||||
feedback_add_details("admin_verb","TDOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -772,9 +771,9 @@ var/global/floorIsLava = 0
|
||||
set category = "Server"
|
||||
set desc="Toggle traitor scaling"
|
||||
set name="Toggle Traitor Scaling"
|
||||
traitor_scaling = !traitor_scaling
|
||||
log_admin("[key_name(usr)] toggled Traitor Scaling to [traitor_scaling].")
|
||||
message_admins("[key_name_admin(usr)] toggled Traitor Scaling [traitor_scaling ? "on" : "off"].", 1)
|
||||
config.traitor_scaling = !config.traitor_scaling
|
||||
log_admin("[key_name(usr)] toggled Traitor Scaling to [config.traitor_scaling].")
|
||||
message_admins("[key_name_admin(usr)] toggled Traitor Scaling [config.traitor_scaling ? "on" : "off"].", 1)
|
||||
feedback_add_details("admin_verb","TTS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/startnow()
|
||||
@@ -798,8 +797,8 @@ var/global/floorIsLava = 0
|
||||
set category = "Server"
|
||||
set desc="People can't enter"
|
||||
set name="Toggle Entering"
|
||||
enter_allowed = !( enter_allowed )
|
||||
if (!( enter_allowed ))
|
||||
config.enter_allowed = !(config.enter_allowed)
|
||||
if (!(config.enter_allowed))
|
||||
world << "<B>New players may no longer enter the game.</B>"
|
||||
else
|
||||
world << "<B>New players may now enter the game.</B>"
|
||||
@@ -825,13 +824,13 @@ var/global/floorIsLava = 0
|
||||
set category = "Server"
|
||||
set desc="Respawn basically"
|
||||
set name="Toggle Respawn"
|
||||
abandon_allowed = !( abandon_allowed )
|
||||
if (abandon_allowed)
|
||||
config.abandon_allowed = !(config.abandon_allowed)
|
||||
if(config.abandon_allowed)
|
||||
world << "<B>You may now respawn.</B>"
|
||||
else
|
||||
world << "<B>You may no longer respawn :(</B>"
|
||||
message_admins("\blue [key_name_admin(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].", 1)
|
||||
log_admin("[key_name(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].")
|
||||
message_admins("\blue [key_name_admin(usr)] toggled respawn to [config.abandon_allowed ? "On" : "Off"].", 1)
|
||||
log_admin("[key_name(usr)] toggled respawn to [config.abandon_allowed ? "On" : "Off"].")
|
||||
world.update_status()
|
||||
feedback_add_details("admin_verb","TR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -839,18 +838,18 @@ var/global/floorIsLava = 0
|
||||
set category = "Server"
|
||||
set desc="Toggle alien mobs"
|
||||
set name="Toggle Aliens"
|
||||
aliens_allowed = !aliens_allowed
|
||||
log_admin("[key_name(usr)] toggled Aliens to [aliens_allowed].")
|
||||
message_admins("[key_name_admin(usr)] toggled Aliens [aliens_allowed ? "on" : "off"].", 1)
|
||||
config.aliens_allowed = !config.aliens_allowed
|
||||
log_admin("[key_name(usr)] toggled Aliens to [config.aliens_allowed].")
|
||||
message_admins("[key_name_admin(usr)] toggled Aliens [config.aliens_allowed ? "on" : "off"].", 1)
|
||||
feedback_add_details("admin_verb","TA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/toggle_space_ninja()
|
||||
set category = "Server"
|
||||
set desc="Toggle space ninjas spawning."
|
||||
set name="Toggle Space Ninjas"
|
||||
toggle_space_ninja = !toggle_space_ninja
|
||||
log_admin("[key_name(usr)] toggled Space Ninjas to [toggle_space_ninja].")
|
||||
message_admins("[key_name_admin(usr)] toggled Space Ninjas [toggle_space_ninja ? "on" : "off"].", 1)
|
||||
config.ninjas_allowed = !config.ninjas_allowed
|
||||
log_admin("[key_name(usr)] toggled Space Ninjas to [config.ninjas_allowed].")
|
||||
message_admins("[key_name_admin(usr)] toggled Space Ninjas [config.ninjas_allowed ? "on" : "off"].", 1)
|
||||
feedback_add_details("admin_verb","TSN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/delay()
|
||||
@@ -1048,26 +1047,26 @@ var/global/floorIsLava = 0
|
||||
set category = "Debug"
|
||||
set desc="Reduces view range when wearing welding helmets"
|
||||
set name="Toggle tinted welding helmes"
|
||||
tinted_weldhelh = !( tinted_weldhelh )
|
||||
if (tinted_weldhelh)
|
||||
world << "<B>The tinted_weldhelh has been enabled!</B>"
|
||||
config.welder_vision = !( config.welder_vision )
|
||||
if (config.welder_vision)
|
||||
world << "<B>Reduced welder vision has been enabled!</B>"
|
||||
else
|
||||
world << "<B>The tinted_weldhelh has been disabled!</B>"
|
||||
log_admin("[key_name(usr)] toggled tinted_weldhelh.")
|
||||
message_admins("[key_name_admin(usr)] toggled tinted_weldhelh.", 1)
|
||||
world << "<B>Reduced welder vision has been disabled!</B>"
|
||||
log_admin("[key_name(usr)] toggled welder vision.")
|
||||
message_admins("[key_name_admin(usr)] toggled welder vision.", 1)
|
||||
feedback_add_details("admin_verb","TTWH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/toggleguests()
|
||||
set category = "Server"
|
||||
set desc="Guests can't enter"
|
||||
set name="Toggle guests"
|
||||
guests_allowed = !( guests_allowed )
|
||||
if (!( guests_allowed ))
|
||||
config.guests_allowed = !(config.guests_allowed)
|
||||
if (!(config.guests_allowed))
|
||||
world << "<B>Guests may no longer enter the game.</B>"
|
||||
else
|
||||
world << "<B>Guests may now enter the game.</B>"
|
||||
log_admin("[key_name(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.")
|
||||
message_admins("\blue [key_name_admin(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.", 1)
|
||||
log_admin("[key_name(usr)] toggled guests game entering [config.guests_allowed?"":"dis"]allowed.")
|
||||
message_admins("\blue [key_name_admin(usr)] toggled guests game entering [config.guests_allowed?"":"dis"]allowed.", 1)
|
||||
feedback_add_details("admin_verb","TGU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/output_ai_laws()
|
||||
|
||||
@@ -2228,7 +2228,7 @@
|
||||
if("aliens")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","AL")
|
||||
if(aliens_allowed)
|
||||
if(config.aliens_allowed)
|
||||
new /datum/event/alien_infestation
|
||||
message_admins("[key_name_admin(usr)] has spawned aliens", 1)
|
||||
if("spiders")
|
||||
@@ -2248,7 +2248,7 @@
|
||||
if("spaceninja")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","SN")
|
||||
if(toggle_space_ninja)
|
||||
if(config.ninjas_allowed)
|
||||
if(space_ninja_arrival())//If the ninja is actually spawned. They may not be depending on a few factors.
|
||||
message_admins("[key_name_admin(usr)] has sent in a space ninja", 1)
|
||||
if("carp")
|
||||
|
||||
@@ -367,9 +367,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
set category = "Server"
|
||||
set name = "Toggle Aliens"
|
||||
|
||||
aliens_allowed = !aliens_allowed
|
||||
log_admin("[key_name(src)] has turned aliens [aliens_allowed ? "on" : "off"].")
|
||||
message_admins("[key_name_admin(src)] has turned aliens [aliens_allowed ? "on" : "off"].", 0)
|
||||
config.aliens_allowed = !config.aliens_allowed
|
||||
log_admin("[key_name(src)] has turned aliens [config.aliens_allowed ? "on" : "off"].")
|
||||
message_admins("[key_name_admin(src)] has turned aliens [config.aliens_allowed ? "on" : "off"].", 0)
|
||||
feedback_add_details("admin_verb","TAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_grantfullaccess(var/mob/M in mob_list)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
if(byond_version < MIN_CLIENT_VERSION) //Out of date client.
|
||||
return null
|
||||
|
||||
if(!guests_allowed && IsGuestKey(key))
|
||||
if(!config.guests_allowed && IsGuestKey(key))
|
||||
alert(src,"This server doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest","OK")
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -38,12 +38,12 @@
|
||||
return total_weight
|
||||
|
||||
/datum/event_meta/alien/get_weight(var/list/active_with_role)
|
||||
if(aliens_allowed)
|
||||
if(config.aliens_allowed)
|
||||
return ..(active_with_role)
|
||||
return 0
|
||||
|
||||
/datum/event_meta/ninja/get_weight(var/list/active_with_role)
|
||||
if(toggle_space_ninja)
|
||||
if(config.ninjas_allowed)
|
||||
return ..(active_with_role)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -89,9 +89,9 @@ var/list/event_last_fired = list()
|
||||
if(active_with_role["Security"] > 0)
|
||||
if(!sent_spiders_to_station)
|
||||
possibleEvents[/datum/event/spider_infestation] = max(active_with_role["Security"], 5) + 5
|
||||
if(aliens_allowed && !sent_aliens_to_station)
|
||||
if(config.aliens_allowed && !sent_aliens_to_station)
|
||||
possibleEvents[/datum/event/alien_infestation] = max(active_with_role["Security"], 5) + 2.5
|
||||
if(!sent_ninja_to_station && toggle_space_ninja)
|
||||
if(!sent_ninja_to_station && config.ninjas_allowed)
|
||||
possibleEvents[/datum/event/space_ninja] = max(active_with_role["Security"], 5)
|
||||
|
||||
for(var/event_type in event_last_fired) if(possibleEvents[event_type])
|
||||
|
||||
@@ -93,16 +93,16 @@
|
||||
/mob/proc/emote_dead(var/message)
|
||||
|
||||
if(client.prefs.muted & MUTE_DEADCHAT)
|
||||
src << "\red You cannot send deadchat emotes (muted)."
|
||||
src << "<span class='danger'>You cannot send deadchat emotes (muted).</span>"
|
||||
return
|
||||
|
||||
if(!(client.prefs.toggles & CHAT_DEAD))
|
||||
src << "\red You have deadchat muted."
|
||||
src << "<span class='danger'>You have deadchat muted.</span>"
|
||||
return
|
||||
|
||||
if(!src.client.holder)
|
||||
if(!dsay_allowed)
|
||||
src << "\red Deadchat is globally muted"
|
||||
if(!config.dsay_allowed)
|
||||
src << "<span class='danger'>Deadchat is globally muted.</span>"
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -1379,7 +1379,7 @@
|
||||
if(eye_blurry) client.screen += global_hud.blurry
|
||||
if(druggy) client.screen += global_hud.druggy
|
||||
|
||||
if(tinted_weldhelh)
|
||||
if(config.welder_vision)
|
||||
var/found_welder
|
||||
if(istype(glasses, /obj/item/clothing/glasses/welding))
|
||||
var/obj/item/clothing/glasses/welding/O = glasses
|
||||
|
||||
@@ -38,7 +38,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
Attach(M)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/New()
|
||||
if(aliens_allowed)
|
||||
if(config.aliens_allowed)
|
||||
..()
|
||||
else
|
||||
del(src)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
set desc = "Lay an egg to produce huggers to impregnate prey with."
|
||||
set category = "Abilities"
|
||||
|
||||
if(!aliens_allowed)
|
||||
if(!config.aliens_allowed)
|
||||
src << "You begin to lay an egg, but hesitate. You suspect it isn't allowed."
|
||||
verbs -= /mob/living/carbon/human/proc/lay_egg
|
||||
return
|
||||
|
||||
@@ -392,14 +392,14 @@ var/list/slot_equipment_priority = list( \
|
||||
set name = "Respawn"
|
||||
set category = "OOC"
|
||||
|
||||
if (!( abandon_allowed ))
|
||||
usr << "\blue Respawn is disabled."
|
||||
if (!( config.abandon_allowed ))
|
||||
usr << "<span class='notice'>Respawn is disabled.</span>"
|
||||
return
|
||||
if ((stat != 2 || !( ticker )))
|
||||
usr << "\blue <B>You must be dead to use this!</B>"
|
||||
usr << "<span class='notice'><B>You must be dead to use this!</B></span>"
|
||||
return
|
||||
if (ticker.mode.name == "meteor" || ticker.mode.name == "epidemic") //BS12 EDIT
|
||||
usr << "\blue Respawn is disabled for this roundtype."
|
||||
usr << "<span class='notice'>Respawn is disabled for this roundtype.</span>"
|
||||
return
|
||||
else
|
||||
var/deathtime = world.time - src.timeofdeath
|
||||
|
||||
@@ -162,8 +162,11 @@
|
||||
|
||||
if(href_list["SelectedJob"])
|
||||
|
||||
if(!enter_allowed)
|
||||
usr << "\blue There is an administrative lock on entering the game!"
|
||||
if(!config.enter_allowed)
|
||||
usr << "<span class='notice'>There is an administrative lock on entering the game!</span>"
|
||||
return
|
||||
else if(ticker && ticker.mode && ticker.mode.explosion_in_progress)
|
||||
usr << "<span class='danger'>The station is currently exploding. Joining would go poorly.</span>"
|
||||
return
|
||||
|
||||
if(client.prefs.species != "Human")
|
||||
@@ -293,8 +296,8 @@
|
||||
if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
|
||||
usr << "\red The round is either not ready, or has already finished..."
|
||||
return 0
|
||||
if(!enter_allowed)
|
||||
usr << "\blue There is an administrative lock on entering the game!"
|
||||
if(!config.enter_allowed)
|
||||
usr << "<span class='notice'>There is an administrative lock on entering the game!</span>"
|
||||
return 0
|
||||
if(!IsJobAvailable(rank))
|
||||
src << alert("[rank] is not available. Please try another.")
|
||||
|
||||
@@ -44,16 +44,16 @@
|
||||
|
||||
/mob/proc/say_dead(var/message)
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
usr << "<span class='danger'>Speech is currently admin-disabled.</span>"
|
||||
return
|
||||
|
||||
if(!src.client.holder)
|
||||
if(!dsay_allowed)
|
||||
src << "\red Deadchat is globally muted"
|
||||
if(!config.dsay_allowed)
|
||||
src << "<span class='danger'>Deadchat is globally muted.</span>"
|
||||
return
|
||||
|
||||
if(client && !(client.prefs.toggles & CHAT_DEAD))
|
||||
usr << "\red You have deadchat muted."
|
||||
usr << "<span class='danger'>You have deadchat muted.</span>"
|
||||
return
|
||||
|
||||
say_dead_direct("[pick("complains","moans","whines","laments","blubbers")], <span class='message'>\"[message]\"</span>", src)
|
||||
|
||||
Reference in New Issue
Block a user