mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Merge pull request #123 from MisterFox/master
Automatic guest kicking/admin commands
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
var/ooccolor = "#b82e00"
|
||||
var/muted = null //Can't talk in OOC, say, whisper, emote... anything except for adminhelp and admin-pm. An admin punishment
|
||||
var/muted_complete = null //Can't talk in any way shape or form (muted + can't adminhelp or respond to admin pm-s). An admin punishment
|
||||
|
||||
var/admin_invis = 0
|
||||
|
||||
//END Admin Things
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ var
|
||||
dna_ident = 1
|
||||
abandon_allowed = 1
|
||||
enter_allowed = 1
|
||||
guests_allowed = 1
|
||||
// guests_allowed = 1
|
||||
shuttle_frozen = 0
|
||||
shuttle_left = 0
|
||||
tinted_weldhelh = 1
|
||||
|
||||
@@ -2588,6 +2588,7 @@
|
||||
log_admin("[key_name(usr)] toggled tinted_weldhelh.")
|
||||
message_admins("[key_name_admin(usr)] toggled tinted_weldhelh.", 1)
|
||||
|
||||
/*
|
||||
/obj/admins/proc/toggleguests()
|
||||
set category = "Server"
|
||||
set desc="Guests can't enter"
|
||||
@@ -2599,6 +2600,7 @@
|
||||
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)
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -134,6 +134,8 @@
|
||||
verbs += /client/proc/enable_mapping_debug
|
||||
verbs += /client/proc/everyone_random
|
||||
verbs += /client/proc/only_one // Fateweaver suggested I do this - Doohl
|
||||
verbs += /client/proc/callprocgen
|
||||
verbs += /client/proc/callprocobj
|
||||
|
||||
if (holder.level >= 5)//Game Admin********************************************************************
|
||||
verbs += /obj/admins/proc/view_txt_log
|
||||
@@ -168,6 +170,8 @@
|
||||
verbs += /client/proc/triple_ai
|
||||
verbs += /client/proc/object_talk
|
||||
verbs += /client/proc/strike_team
|
||||
verbs += /client/proc/admin_invis
|
||||
verbs += /client/proc/cmd_admin_godmode
|
||||
|
||||
if (holder.level >= 4)//Badmin********************************************************************
|
||||
verbs += /obj/admins/proc/adrev //toggle admin revives
|
||||
@@ -231,7 +235,7 @@
|
||||
if (holder.level >= 0)//Mod********************************************************************
|
||||
verbs += /obj/admins/proc/toggleAI //Toggle the AI
|
||||
verbs += /obj/admins/proc/toggleenter //Toggle enterting
|
||||
verbs += /obj/admins/proc/toggleguests //Toggle guests entering
|
||||
// verbs += /obj/admins/proc/toggleguests //Toggle guests entering
|
||||
verbs += /obj/admins/proc/toggleooc //toggle ooc
|
||||
verbs += /obj/admins/proc/toggleoocdead //toggle ooc for dead/unc
|
||||
verbs += /obj/admins/proc/voteres //toggle votes
|
||||
@@ -352,7 +356,7 @@
|
||||
verbs -= /client/proc/cmd_admin_create_centcom_report
|
||||
verbs -= /obj/admins/proc/toggleAI //Toggle the AI
|
||||
verbs -= /obj/admins/proc/toggleenter //Toggle enterting
|
||||
verbs -= /obj/admins/proc/toggleguests //Toggle guests entering
|
||||
// verbs -= /obj/admins/proc/toggleguests //Toggle guests entering
|
||||
verbs -= /obj/admins/proc/toggleooc //toggle ooc
|
||||
verbs -= /obj/admins/proc/toggleoocdead //toggle ooc for dead/unc
|
||||
verbs -= /obj/admins/proc/voteres //toggle votes
|
||||
@@ -395,6 +399,11 @@
|
||||
verbs -= /client/proc/toggle_hear_radio
|
||||
verbs -= /client/proc/tension_report
|
||||
verbs -= /client/proc/cmd_admin_change_custom_event
|
||||
verbs -= /client/proc/admin_invis
|
||||
verbs -= /client/proc/callprocgen
|
||||
verbs -= /client/proc/callprocobj
|
||||
verbs -= /client/proc/cmd_admin_godmode
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -693,6 +702,7 @@
|
||||
verbs += /client/proc/cmd_admin_subtle_message
|
||||
verbs += /client/proc/cmd_admin_pm
|
||||
verbs += /client/proc/cmd_admin_gib_self
|
||||
verbs += /client/proc/admin_invis
|
||||
|
||||
verbs += /client/proc/deadchat //toggles deadchat
|
||||
verbs += /obj/admins/proc/toggleooc //toggle ooc
|
||||
@@ -717,3 +727,32 @@
|
||||
verbs += /obj/admins/proc/toggleooc //toggle ooc
|
||||
verbs += /client/proc/cmd_admin_say//asay
|
||||
return
|
||||
|
||||
/client/proc/admin_invis()
|
||||
set category = "Admin"
|
||||
set name = "Invisibility"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
src.admin_invis =! src.admin_invis
|
||||
if(src.mob)
|
||||
var/mob/m = src.mob//probably don't need this cast, but I'm too lazy to check if /client.mob is of type /mob or not
|
||||
m.update_clothing()
|
||||
log_admin("[key_name(usr)] has turned their invisibility [src.admin_invis ? "ON" : "OFF"]")
|
||||
message_admins("[key_name_admin(usr)] has turned their invisibility [src.admin_invis ? "ON" : "OFF"]", 1)
|
||||
|
||||
/client/proc/cmd_admin_godmode(mob/M as mob in world)
|
||||
set category = "Admin"
|
||||
set name = "Toggle Godmode"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if (M.nodamage == 1)
|
||||
M.nodamage = 0
|
||||
usr << "\blue Toggled OFF"
|
||||
else
|
||||
M.nodamage = 1
|
||||
usr << "\blue Toggled ON"
|
||||
|
||||
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.nodamage ? "On" : "Off")]")
|
||||
message_admins("[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.nodamage ? "On" : "Off")]", 1)
|
||||
|
||||
@@ -31,7 +31,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
/client/proc/callproc()
|
||||
set category = "Debug"
|
||||
set name = "Advanced ProcCall"
|
||||
set name = "Advanced ProcCall (TG Version)"
|
||||
if(!authenticated || !holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
@@ -117,6 +117,96 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
returnval = call(procname)(arglist(lst)) // Pass the lst as an argument list to the proc
|
||||
usr << "\blue Proc returned: [returnval ? returnval : "null"]"
|
||||
|
||||
/client/proc/callprocgen()
|
||||
set category = "Debug"
|
||||
set name = "ProcCall (BS12 Version)"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
var/class = null
|
||||
var/returnval = null
|
||||
var/procname = input("Procpath (in full)","path", null)
|
||||
|
||||
var/argNum = input("Number of arguments:","Number",null) as num //input("Arguments","Arguments:", null)
|
||||
var/list/argL = new/list()
|
||||
|
||||
var/i
|
||||
for(i=0; i<argNum; i++)
|
||||
class = input("Type of Argument #[i]","Variable Type", "text") in list("text","num","type","reference","icon","file","cancel")
|
||||
switch(class)
|
||||
if("cancel")
|
||||
return
|
||||
|
||||
if("text")
|
||||
argL.Add( input("Enter new text:","Text",null) as text )
|
||||
|
||||
if("num")
|
||||
argL.Add( input("Enter new number:","Num",null) as num )
|
||||
|
||||
if("type")
|
||||
argL.Add( input("Enter type:","Type",null) in typesof(/obj,/mob,/area,/turf) )
|
||||
|
||||
if("reference")
|
||||
argL.Add( input("Select reference:","Reference",null) as mob|obj|turf|area in world )
|
||||
|
||||
if("icon")
|
||||
argL.Add( input("Pick icon:","Icon",null) as icon )
|
||||
|
||||
if("file")
|
||||
argL.Add( input("Pick file:","File",null) as file )
|
||||
|
||||
usr << "\blue Calling '[procname]'"
|
||||
returnval = call(procname)(arglist(argL))
|
||||
|
||||
usr << "\blue Proc returned: [returnval ? returnval : "null"]"
|
||||
|
||||
|
||||
/client/proc/callprocobj(var/target as obj|mob|area|turf in world)
|
||||
set category = "Debug"
|
||||
set name = "Object ProcCall (BS12 Version)"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
var/class = null
|
||||
var/returnval = null
|
||||
var/procname = input("Procpath (e.g. just \"update\" for lights)","path:", null)
|
||||
|
||||
var/argNum = input("Number of arguments:","Number",null) as num //input("Arguments","Arguments:", null)
|
||||
var/list/argL = new/list()
|
||||
|
||||
var/i
|
||||
for(i=0; i<argNum; i++)
|
||||
class = input("Type of Argument #[i]","Variable Type", "text") in list("text","num","type","reference","icon","file","cancel")
|
||||
switch(class)
|
||||
if("cancel")
|
||||
return
|
||||
|
||||
if("text")
|
||||
argL.Add( input("Enter new text:","Text",null) as text )
|
||||
|
||||
if("num")
|
||||
argL.Add( input("Enter new number:","Num",null) as num )
|
||||
|
||||
if("type")
|
||||
argL.Add( input("Enter type:","Type",null) in typesof(/obj,/mob,/area,/turf) )
|
||||
|
||||
if("reference")
|
||||
argL.Add( input("Select reference:","Reference",null) as mob|obj|turf|area in world )
|
||||
|
||||
if("icon")
|
||||
argL.Add( input("Pick icon:","Icon",null) as icon )
|
||||
|
||||
if("file")
|
||||
argL.Add( input("Pick file:","File",null) as file )
|
||||
|
||||
usr << "\blue Calling '[procname]' on '[target]'"
|
||||
returnval = call(target,procname)(arglist(argL))
|
||||
|
||||
usr << "\blue Proc returned: [returnval ? returnval : "null"]"
|
||||
|
||||
|
||||
/client/proc/Cell()
|
||||
set category = "Debug"
|
||||
set name = "Air Status in Location"
|
||||
|
||||
@@ -118,22 +118,6 @@
|
||||
if(K && K.client && K.client.holder && K.key != usr.key && K.key != M.key)
|
||||
K << "<B><font color='blue'>PM: [key_name(usr, K)]->[key_name(M, K)]:</B> \blue [t]</font>"
|
||||
|
||||
/client/proc/cmd_admin_godmode(mob/M as mob in world)
|
||||
set category = "Special Verbs"
|
||||
set name = "Godmode"
|
||||
if(!authenticated || !holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if (M.nodamage == 1)
|
||||
M.nodamage = 0
|
||||
usr << "\blue Toggled OFF"
|
||||
else
|
||||
M.nodamage = 1
|
||||
usr << "\blue Toggled ON"
|
||||
|
||||
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.nodamage ? "On" : "Off")]")
|
||||
message_admins("[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.nodamage ? "On" : "Off")]", 1)
|
||||
|
||||
/client/proc/cmd_admin_mute(mob/M as mob in world)
|
||||
set category = "Special Verbs"
|
||||
set name = "Admin Mute"
|
||||
|
||||
@@ -435,8 +435,9 @@
|
||||
if (S.active)
|
||||
shielded = 2
|
||||
break
|
||||
|
||||
if (shielded == 2 || alien_invis)
|
||||
if(client && client.admin_invis)
|
||||
invisibility = 100
|
||||
else if (shielded == 2 || alien_invis)
|
||||
invisibility = 2
|
||||
//New stealth. Hopefully doesn't lag too much. /N
|
||||
if(istype(loc, /turf))//If they are standing on a turf.
|
||||
|
||||
@@ -249,7 +249,9 @@
|
||||
else
|
||||
m_select.screen_loc = null
|
||||
|
||||
if (alien_invis)
|
||||
if(client && client.admin_invis)
|
||||
invisibility = 100
|
||||
else if (alien_invis)
|
||||
invisibility = 2
|
||||
if(istype(loc, /turf))//If they are standing on a turf.
|
||||
AddCamoOverlay(loc)//Overlay camo.
|
||||
|
||||
@@ -1112,6 +1112,14 @@
|
||||
NinjaStealthMalf()
|
||||
else
|
||||
invisibility = 0
|
||||
|
||||
if(client && client.admin_invis)
|
||||
invisibility = 100
|
||||
else if (shielded == 2)
|
||||
invisibility = 2
|
||||
else
|
||||
invisibility = 0
|
||||
|
||||
/*
|
||||
for (var/mob/M in viewers(1, src))//For the love of god DO NOT REFRESH EVERY SECOND - Mport
|
||||
if ((M.client && M.machine == src))
|
||||
|
||||
@@ -406,6 +406,11 @@
|
||||
else
|
||||
icon_state = "monkey0"
|
||||
|
||||
if(client && client.admin_invis)
|
||||
invisibility = 100
|
||||
else
|
||||
invisibility = 0
|
||||
|
||||
if (wear_mask)
|
||||
if (istype(wear_mask, /obj/item/clothing/mask))
|
||||
var/t1 = wear_mask.icon_state
|
||||
|
||||
@@ -700,11 +700,17 @@
|
||||
alert(src,"You have been banned.\nReason : [isbanned]","Ban","Ok")
|
||||
del(src)
|
||||
|
||||
/*
|
||||
if (!guests_allowed && IsGuestKey(key))
|
||||
log_access("Failed Login: [src] - Guests not allowed")
|
||||
message_admins("\blue Failed Login: [src] - Guests not allowed")
|
||||
alert(src,"You cannot play here.\nReason : Guests not allowed","Guests not allowed","Ok")
|
||||
del(src)
|
||||
*/
|
||||
|
||||
if(IsGuestKey(src.key))
|
||||
alert(src,"Baystation12 doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest","OK")
|
||||
del(src)
|
||||
|
||||
if (((world.address == address || !(address)) && !(host)))
|
||||
host = key
|
||||
|
||||
Reference in New Issue
Block a user