mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
TG: Updates handheld-flashes so that they cannot break on their first use. Their
chance of breaking is directly proportional to their frequency of use (ranges from 0% to 5%, used to be a blanket 2%). Their capacitor recharges one charge every 60 seconds. Once their 6 charges are used up, they temporarily stop working whilst their capacitor recharges. This should mean that flashes will last a long time with light use (defence/rev), but not for spamming (shitcurity). Can now job-ban people from entire departments through the jobban panel. Can now job-ban people even if they log out. Job-ban panel now informs you why people were banned from each job. Runtime fixes for some old jobban code that was preventing the above stuff. Committing some fixes Nodrak pointed out. Credits go to Nodrak for a lot of this. Revision: r3285 Author: elly1...@rocketmail.com
This commit is contained in:
@@ -3,7 +3,7 @@ var
|
||||
jobban_keylist[0] //to store the keys & ranks
|
||||
|
||||
/proc/jobban_fullban(mob/M, rank, reason)
|
||||
if (!M || !M.key || !M.client) return
|
||||
if (!M || !M.key) return
|
||||
jobban_keylist.Add(text("[M.ckey] - [rank] ## [reason]"))
|
||||
jobban_savebanfile()
|
||||
|
||||
@@ -12,19 +12,25 @@ var
|
||||
jobban_keylist.Add(text("[ckey] - [rank]"))
|
||||
jobban_savebanfile()
|
||||
|
||||
//returns a reason if M is banned from rank, returns 0 otherwise
|
||||
/proc/jobban_isbanned(mob/M, rank)
|
||||
if(_jobban_isbanned(M, rank)) return 1//for old jobban
|
||||
if(M)
|
||||
if(M && rank)
|
||||
if(_jobban_isbanned(M, rank)) return "Reason Unspecified" //for old jobban
|
||||
if (guest_jobbans(rank))
|
||||
if(config.guest_jobban && IsGuestKey(M.key))
|
||||
return 1
|
||||
return "Guest Job-ban"
|
||||
if(config.usewhitelist && !check_whitelist(M))
|
||||
return 1
|
||||
return "Whitelisted Job"
|
||||
|
||||
for (var/s in jobban_keylist)
|
||||
if( findtext(s,"[M.ckey] - [rank]") )
|
||||
return 1
|
||||
return 0
|
||||
var/startpos = findtext(s, "## ")+3
|
||||
if(startpos && startpos<length(s))
|
||||
var/text = copytext(s, startpos, 0)
|
||||
if(text)
|
||||
return text
|
||||
return "Reason Unspecified"
|
||||
return 0
|
||||
|
||||
/*
|
||||
DEBUG
|
||||
@@ -88,4 +94,4 @@ DEBUG
|
||||
jobban_keylist.Remove(jobban_keylist[i])
|
||||
jobban_savebanfile()
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user