[s]Exploit whack-a-mole
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
diff a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm (rejected hunks)
|
||||
@@ -72,7 +72,7 @@
|
||||
return .
|
||||
|
||||
//Splits the text of a file at seperator and returns them in a list.
|
||||
-/proc/file2list(filename, seperator="\n")
|
||||
+/world/proc/file2list(filename, seperator="\n")
|
||||
return splittext(return_file_text(filename),seperator)
|
||||
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
GLOBAL_LIST_INIT(ai_names, file2list("config/names/ai.txt"))
|
||||
GLOBAL_LIST_INIT(wizard_first, file2list("config/names/wizardfirst.txt"))
|
||||
GLOBAL_LIST_INIT(wizard_second, file2list("config/names/wizardsecond.txt"))
|
||||
GLOBAL_LIST_INIT(ninja_titles, file2list("config/names/ninjatitle.txt"))
|
||||
GLOBAL_LIST_INIT(ninja_names, file2list("config/names/ninjaname.txt"))
|
||||
GLOBAL_LIST_INIT(commando_names, file2list("config/names/death_commando.txt"))
|
||||
GLOBAL_LIST_INIT(first_names_male, file2list("config/names/first_male.txt"))
|
||||
GLOBAL_LIST_INIT(first_names_female, file2list("config/names/first_female.txt"))
|
||||
GLOBAL_LIST_INIT(last_names, file2list("config/names/last.txt"))
|
||||
GLOBAL_LIST_INIT(lizard_names_male, file2list("config/names/lizard_male.txt"))
|
||||
GLOBAL_LIST_INIT(lizard_names_female, file2list("config/names/lizard_female.txt"))
|
||||
GLOBAL_LIST_INIT(clown_names, file2list("config/names/clown.txt"))
|
||||
GLOBAL_LIST_INIT(mime_names, file2list("config/names/mime.txt"))
|
||||
GLOBAL_LIST_INIT(carp_names, file2list("config/names/carp.txt"))
|
||||
GLOBAL_LIST_INIT(golem_names, file2list("config/names/golem.txt"))
|
||||
GLOBAL_LIST_INIT(plasmaman_names, file2list("config/names/plasmaman.txt"))
|
||||
GLOBAL_LIST_INIT(ai_names, world.file2list("config/names/ai.txt"))
|
||||
GLOBAL_LIST_INIT(wizard_first, world.file2list("config/names/wizardfirst.txt"))
|
||||
GLOBAL_LIST_INIT(wizard_second, world.file2list("config/names/wizardsecond.txt"))
|
||||
GLOBAL_LIST_INIT(ninja_titles, world.file2list("config/names/ninjatitle.txt"))
|
||||
GLOBAL_LIST_INIT(ninja_names, world.file2list("config/names/ninjaname.txt"))
|
||||
GLOBAL_LIST_INIT(commando_names, world.file2list("config/names/death_commando.txt"))
|
||||
GLOBAL_LIST_INIT(first_names_male, world.file2list("config/names/first_male.txt"))
|
||||
GLOBAL_LIST_INIT(first_names_female, world.file2list("config/names/first_female.txt"))
|
||||
GLOBAL_LIST_INIT(last_names, world.file2list("config/names/last.txt"))
|
||||
GLOBAL_LIST_INIT(lizard_names_male, world.file2list("config/names/lizard_male.txt"))
|
||||
GLOBAL_LIST_INIT(lizard_names_female, world.file2list("config/names/lizard_female.txt"))
|
||||
GLOBAL_LIST_INIT(clown_names, world.file2list("config/names/clown.txt"))
|
||||
GLOBAL_LIST_INIT(mime_names, world.file2list("config/names/mime.txt"))
|
||||
GLOBAL_LIST_INIT(carp_names, world.file2list("config/names/carp.txt"))
|
||||
GLOBAL_LIST_INIT(golem_names, world.file2list("config/names/golem.txt"))
|
||||
GLOBAL_LIST_INIT(plasmaman_names, world.file2list("config/names/plasmaman.txt"))
|
||||
GLOBAL_LIST_INIT(posibrain_names, list("PBU","HIU","SINA","ARMA","OSI","HBL","MSO","RR","CHRI","CDB","HG","XSI","ORNG","GUN","KOR","MET","FRE","XIS","SLI","PKP","HOG","RZH","GOOF","MRPR","JJR","FIRC","INC","PHL","BGB","ANTR","MIW","WJ","JRD","CHOC","ANCL","JLLO","JNLG","KOS","TKRG","XAL","STLP","CBOS","DUNC","FXMC","DRSD","COI"))
|
||||
|
||||
|
||||
GLOBAL_LIST_INIT(verbs, file2list("config/names/verbs.txt"))
|
||||
GLOBAL_LIST_INIT(adjectives, file2list("config/names/adjectives.txt"))
|
||||
GLOBAL_LIST_INIT(verbs, world.file2list("config/names/verbs.txt"))
|
||||
GLOBAL_LIST_INIT(adjectives, world.file2list("config/names/adjectives.txt"))
|
||||
//loaded on startup because of "
|
||||
//would include in rsc if ' was used
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
GLOB.abandon_allowed = respawn
|
||||
|
||||
/datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist
|
||||
var/list/Lines = file2list(filename)
|
||||
var/list/Lines = world.file2list(filename)
|
||||
|
||||
for(var/t in Lines)
|
||||
if(!t)
|
||||
@@ -785,7 +785,7 @@
|
||||
|
||||
|
||||
/datum/configuration/proc/loadmaplist(filename)
|
||||
var/list/Lines = file2list(filename)
|
||||
var/list/Lines = world.file2list(filename)
|
||||
|
||||
var/datum/map_config/currentmap = null
|
||||
for(var/t in Lines)
|
||||
@@ -835,7 +835,7 @@
|
||||
|
||||
|
||||
/datum/configuration/proc/loadsql(filename)
|
||||
var/list/Lines = file2list(filename)
|
||||
var/list/Lines = world.file2list(filename)
|
||||
for(var/t in Lines)
|
||||
if(!t)
|
||||
continue
|
||||
|
||||
@@ -625,8 +625,8 @@ SUBSYSTEM_DEF(ticker)
|
||||
if(selected_tip)
|
||||
m = selected_tip
|
||||
else
|
||||
var/list/randomtips = file2list("config/tips.txt")
|
||||
var/list/memetips = file2list("config/sillytips.txt")
|
||||
var/list/randomtips = world.file2list("config/tips.txt")
|
||||
var/list/memetips = world.file2list("config/sillytips.txt")
|
||||
if(randomtips.len && prob(95))
|
||||
m = pick(randomtips)
|
||||
else if(memetips.len)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm (rejected hunks)
|
||||
@@ -60,7 +60,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
var/list/round_start_events
|
||||
|
||||
/datum/controller/subsystem/ticker/Initialize(timeofday)
|
||||
- var/list/music = file2list(ROUND_START_MUSIC_LIST, "\n")
|
||||
+ var/list/music = world.file2list(ROUND_START_MUSIC_LIST, "\n")
|
||||
login_music = pick(music)
|
||||
|
||||
if(!GLOB.syndicate_code_phrase)
|
||||
@@ -190,7 +190,7 @@
|
||||
|
||||
/datum/ai_laws/custom/New() //This reads silicon_laws.txt and allows server hosts to set custom AI starting laws.
|
||||
..()
|
||||
for(var/line in file2list("config/silicon_laws.txt"))
|
||||
for(var/line in world.file2list("config/silicon_laws.txt"))
|
||||
if(!line)
|
||||
continue
|
||||
if(findtextEx(line,"#",1,2))
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm (rejected hunks)
|
||||
@@ -8,7 +8,7 @@
|
||||
/datum/getrev/New()
|
||||
var/head_file = return_file_text(".git/logs/HEAD")
|
||||
if(SERVERTOOLS && fexists("..\\prtestjob.lk"))
|
||||
- var/list/tmp = file2list("..\\prtestjob.lk")
|
||||
+ var/list/tmp = world.file2list("..\\prtestjob.lk")
|
||||
for(var/I in tmp)
|
||||
if(I)
|
||||
testmerge |= I
|
||||
@@ -409,7 +409,7 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/core/full/custom/New()
|
||||
..()
|
||||
for(var/line in file2list("config/silicon_laws.txt"))
|
||||
for(var/line in world.file2list("config/silicon_laws.txt"))
|
||||
if(!line)
|
||||
continue
|
||||
if(findtextEx(line,"#",1,2))
|
||||
|
||||
@@ -105,7 +105,7 @@ GLOBAL_PROTECT(admin_ranks)
|
||||
if(config.admin_legacy_system)
|
||||
var/previous_rights = 0
|
||||
//load text from file and process each line seperately
|
||||
for(var/line in file2list("config/admin_ranks.txt"))
|
||||
for(var/line in world.file2list("config/admin_ranks.txt"))
|
||||
if(!line)
|
||||
continue
|
||||
if(findtextEx(line,"#",1,2))
|
||||
@@ -175,7 +175,7 @@ GLOBAL_PROTECT(admin_ranks)
|
||||
|
||||
if(config.admin_legacy_system)
|
||||
//load text from file
|
||||
var/list/lines = file2list("config/admins.txt")
|
||||
var/list/lines = world.file2list("config/admins.txt")
|
||||
|
||||
//process each line seperately
|
||||
for(var/line in lines)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
var/nicknames = file2list("config/admin_nicknames.txt")
|
||||
var/nicknames = world.file2list("config/admin_nicknames.txt")
|
||||
|
||||
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>ADMIN([src.holder.fakekey ? pick(nicknames) : src.key])</span> says, <span class='message'>\"[msg]\"</span></span>"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ GLOBAL_PROTECT(whitelist)
|
||||
|
||||
/proc/load_whitelist()
|
||||
GLOB.whitelist = list()
|
||||
for(var/line in file2list(WHITELISTFILE))
|
||||
for(var/line in world.file2list(WHITELISTFILE))
|
||||
if(!line)
|
||||
continue
|
||||
if(findtextEx(line,"#",1,2))
|
||||
|
||||
@@ -32,7 +32,7 @@ GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "config/away
|
||||
|
||||
/proc/generateMapList(filename)
|
||||
var/list/potentialMaps = list()
|
||||
var/list/Lines = file2list(filename)
|
||||
var/list/Lines = world.file2list(filename)
|
||||
|
||||
if(!Lines.len)
|
||||
return
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
card_text_file = "strings/cas_black.txt"
|
||||
|
||||
/obj/item/toy/cards/deck/cas/New()
|
||||
var/static/list/cards_against_space = list("cas_white" = file2list("strings/cas_white.txt"),"cas_black" = file2list("strings/cas_black.txt"))
|
||||
var/static/list/cards_against_space = list("cas_white" = world.file2list("strings/cas_white.txt"),"cas_black" = world.file2list("strings/cas_black.txt"))
|
||||
allcards = cards_against_space[card_face]
|
||||
var/list/possiblecards = allcards.Copy()
|
||||
if(possiblecards.len < decksize) // sanity check
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@
|
||||
log_world("World loaded at [time_stamp()]")
|
||||
|
||||
#if (PRELOAD_RSC == 0)
|
||||
external_rsc_urls = file2list("config/external_rsc_urls.txt","\n")
|
||||
external_rsc_urls = world.file2list("config/external_rsc_urls.txt","\n")
|
||||
var/i=1
|
||||
while(i<=external_rsc_urls.len)
|
||||
if(external_rsc_urls[i])
|
||||
@@ -253,7 +253,7 @@
|
||||
world << sound(round_end_sound)
|
||||
|
||||
/world/proc/load_mode()
|
||||
var/list/Lines = file2list("data/mode.txt")
|
||||
var/list/Lines = world.file2list("data/mode.txt")
|
||||
if(Lines.len)
|
||||
if(Lines[1])
|
||||
GLOB.master_mode = Lines[1]
|
||||
|
||||
Reference in New Issue
Block a user