mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 10:01:40 +00:00
[MDB IGNORE] "Holy shit we need the halloween fixes" TGU (#395)
* tgu * idk this seems to work * rad collector stuff, the pubby update * pubby update * Helio and finishing Pubby * map stuff * drone dispensers * tgu
This commit is contained in:
@@ -32,6 +32,15 @@
|
||||
|
||||
/// A regex that matches words blocked IC, but not in PDAs
|
||||
var/static/regex/ic_outside_pda_filter_regex
|
||||
|
||||
/// A regex that matches words soft blocked IC
|
||||
var/static/regex/soft_ic_filter_regex
|
||||
|
||||
/// A regex that matches words soft blocked OOC
|
||||
var/static/regex/soft_ooc_filter_regex
|
||||
|
||||
/// A regex that matches words soft blocked IC, but not in PDAs
|
||||
var/static/regex/soft_ic_outside_pda_filter_regex
|
||||
|
||||
/// An assoc list of blocked IC words to their reasons
|
||||
var/static/list/ic_filter_reasons
|
||||
@@ -42,6 +51,15 @@
|
||||
/// An assoc list of words that are blocked both IC and OOC to their reasons
|
||||
var/static/list/shared_filter_reasons
|
||||
|
||||
/// An assoc list of soft blocked IC words to their reasons
|
||||
var/static/list/soft_ic_filter_reasons
|
||||
|
||||
/// An assoc list of words that are soft blocked IC, but not in PDAs, to their reasons
|
||||
var/static/list/soft_ic_outside_pda_filter_reasons
|
||||
|
||||
/// An assoc list of words that are soft blocked both IC and OOC to their reasons
|
||||
var/static/list/soft_shared_filter_reasons
|
||||
|
||||
/datum/controller/configuration/proc/admin_reload()
|
||||
if(IsAdminAdvancedProcCall())
|
||||
return
|
||||
@@ -370,6 +388,9 @@ Example config:
|
||||
ic_filter_reasons = try_extract_from_word_filter(word_filter, "ic")
|
||||
ic_outside_pda_filter_reasons = try_extract_from_word_filter(word_filter, "ic_outside_pda")
|
||||
shared_filter_reasons = try_extract_from_word_filter(word_filter, "shared")
|
||||
soft_ic_filter_reasons = try_extract_from_word_filter(word_filter, "soft_ic")
|
||||
soft_ic_outside_pda_filter_reasons = try_extract_from_word_filter(word_filter, "soft_ic_outside_pda")
|
||||
soft_shared_filter_reasons = try_extract_from_word_filter(word_filter, "soft_shared")
|
||||
|
||||
update_chat_filter_regexes()
|
||||
|
||||
@@ -382,6 +403,9 @@ Example config:
|
||||
ic_filter_reasons = list()
|
||||
ic_outside_pda_filter_reasons = list()
|
||||
shared_filter_reasons = list()
|
||||
soft_ic_filter_reasons = list()
|
||||
soft_ic_outside_pda_filter_reasons = list()
|
||||
soft_shared_filter_reasons = list()
|
||||
|
||||
for (var/line in world.file2list("[directory]/in_character_filter.txt"))
|
||||
if (!line)
|
||||
@@ -398,6 +422,9 @@ Example config:
|
||||
ic_filter_regex = compile_filter_regex(ic_filter_reasons + ic_outside_pda_filter_reasons + shared_filter_reasons)
|
||||
ic_outside_pda_filter_regex = compile_filter_regex(ic_filter_reasons + shared_filter_reasons)
|
||||
ooc_filter_regex = compile_filter_regex(shared_filter_reasons)
|
||||
soft_ic_filter_regex = compile_filter_regex(soft_ic_filter_reasons + soft_ic_outside_pda_filter_reasons + soft_shared_filter_reasons)
|
||||
soft_ic_outside_pda_filter_regex = compile_filter_regex(soft_ic_filter_reasons + soft_shared_filter_reasons)
|
||||
soft_ooc_filter_regex = compile_filter_regex(soft_shared_filter_reasons)
|
||||
|
||||
/datum/controller/configuration/proc/try_extract_from_word_filter(list/word_filter, key)
|
||||
var/list/banned_words = word_filter[key]
|
||||
@@ -410,7 +437,11 @@ Example config:
|
||||
DelayedMessageAdmins(message)
|
||||
return list()
|
||||
|
||||
return banned_words
|
||||
var/list/formatted_banned_words = list()
|
||||
|
||||
for (var/banned_word in banned_words)
|
||||
formatted_banned_words[lowertext(banned_word)] = banned_words[banned_word]
|
||||
return formatted_banned_words
|
||||
|
||||
/datum/controller/configuration/proc/compile_filter_regex(list/banned_words)
|
||||
if (isnull(banned_words) || banned_words.len == 0)
|
||||
|
||||
@@ -127,7 +127,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
/datum/controller/master/Shutdown()
|
||||
processing = FALSE
|
||||
sortTim(subsystems, /proc/cmp_subsystem_init)
|
||||
reverseRange(subsystems)
|
||||
reverse_range(subsystems)
|
||||
for(var/datum/controller/subsystem/ss in subsystems)
|
||||
log_world("Shutting down [ss.name] subsystem...")
|
||||
ss.Shutdown()
|
||||
|
||||
@@ -28,7 +28,7 @@ SUBSYSTEM_DEF(adjacent_air)
|
||||
var/goal = queue[currT]
|
||||
queue.Cut(1,2)
|
||||
|
||||
currT.ImmediateCalculateAdjacentTurfs()
|
||||
currT.immediate_calculate_adjacent_turfs()
|
||||
if(goal == MAKE_ACTIVE)
|
||||
SSair.add_to_active(currT)
|
||||
else if(goal == KILL_EXCITED)
|
||||
|
||||
@@ -386,8 +386,8 @@ SUBSYSTEM_DEF(air)
|
||||
continue
|
||||
for(var/obj/machinery/atmospherics/considered_device in result)
|
||||
if(!istype(considered_device, /obj/machinery/atmospherics/pipe))
|
||||
considered_device.setPipenet(net, borderline)
|
||||
net.addMachineryMember(considered_device)
|
||||
considered_device.set_pipenet(net, borderline)
|
||||
net.add_machinery_member(considered_device)
|
||||
continue
|
||||
var/obj/machinery/atmospherics/pipe/item = considered_device
|
||||
if(net.members.Find(item))
|
||||
@@ -555,7 +555,7 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
/datum/controller/subsystem/air/proc/setup_atmos_machinery()
|
||||
for (var/obj/machinery/atmospherics/AM in atmos_machinery)
|
||||
AM.atmosinit()
|
||||
AM.atmos_init()
|
||||
CHECK_TICK
|
||||
|
||||
//this can't be done with setup_atmos_machinery() because
|
||||
@@ -583,7 +583,7 @@ GLOBAL_LIST_EMPTY(colored_images)
|
||||
var/obj/machinery/atmospherics/AM
|
||||
for(var/A in 1 to atmos_machines.len)
|
||||
AM = atmos_machines[A]
|
||||
AM.atmosinit()
|
||||
AM.atmos_init()
|
||||
CHECK_TICK
|
||||
|
||||
for(var/A in 1 to atmos_machines.len)
|
||||
@@ -604,7 +604,7 @@ GLOBAL_LIST_EMPTY(colored_images)
|
||||
|
||||
if(!pipe_init_dirs_cache[type]["[init_dir]"]["[dir]"])
|
||||
var/obj/machinery/atmospherics/temp = new type(null, FALSE, dir, init_dir)
|
||||
pipe_init_dirs_cache[type]["[init_dir]"]["[dir]"] = temp.GetInitDirections()
|
||||
pipe_init_dirs_cache[type]["[init_dir]"]["[dir]"] = temp.get_init_directions()
|
||||
qdel(temp)
|
||||
|
||||
return pipe_init_dirs_cache[type]["[init_dir]"]["[dir]"]
|
||||
|
||||
@@ -63,7 +63,7 @@ SUBSYSTEM_DEF(blackbox)
|
||||
//no touchie
|
||||
/datum/controller/subsystem/blackbox/vv_get_var(var_name)
|
||||
if(var_name == "feedback")
|
||||
return debug_variable(var_name, deepCopyList(feedback), 0, src)
|
||||
return debug_variable(var_name, deep_copy_list(feedback), 0, src)
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/blackbox/vv_edit_var(var_name, var_value)
|
||||
|
||||
@@ -49,6 +49,6 @@ PROCESSING_SUBSYSTEM_DEF(dcs)
|
||||
fullid += "[key]"
|
||||
|
||||
if(length(named_arguments))
|
||||
named_arguments = sortList(named_arguments)
|
||||
named_arguments = sort_list(named_arguments)
|
||||
fullid += named_arguments
|
||||
return list2params(fullid)
|
||||
|
||||
@@ -71,10 +71,9 @@ SUBSYSTEM_DEF(economy)
|
||||
station_target_buffer += STATION_TARGET_BUFFER
|
||||
for(var/account in bank_accounts_by_id)
|
||||
var/datum/bank_account/bank_account = bank_accounts_by_id[account]
|
||||
if(bank_account?.account_job)
|
||||
if(bank_account?.account_job && !ispath(bank_account.account_job))
|
||||
temporary_total += (bank_account.account_job.paycheck * STARTING_PAYCHECKS)
|
||||
if(!istype(bank_account, /datum/bank_account/department))
|
||||
station_total += bank_account.account_balance
|
||||
station_total += bank_account.account_balance
|
||||
station_target = max(round(temporary_total / max(bank_accounts_by_id.len * 2, 1)) + station_target_buffer, 1)
|
||||
if(!market_crashing)
|
||||
price_update()
|
||||
|
||||
@@ -366,7 +366,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
if(pmv)
|
||||
mapvotes[map] = mapvotes[map]*VM.voteweight
|
||||
|
||||
var/pickedmap = pickweight(mapvotes)
|
||||
var/pickedmap = pick_weight(mapvotes)
|
||||
if (!pickedmap)
|
||||
return
|
||||
var/datum/map_config/VM = global.config.maplist[pickedmap]
|
||||
@@ -408,7 +408,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
banned += generateMapList("[global.config.directory]/spaceruinblacklist.txt")
|
||||
banned += generateMapList("[global.config.directory]/iceruinblacklist.txt")
|
||||
|
||||
for(var/item in sortList(subtypesof(/datum/map_template/ruin), /proc/cmp_ruincost_priority))
|
||||
for(var/item in sort_list(subtypesof(/datum/map_template/ruin), /proc/cmp_ruincost_priority))
|
||||
var/datum/map_template/ruin/ruin_type = item
|
||||
// screen out the abstract subtypes
|
||||
if(!initial(ruin_type.id))
|
||||
|
||||
@@ -138,7 +138,7 @@ SUBSYSTEM_DEF(materials)
|
||||
fullid += "[key]"
|
||||
|
||||
if(length(named_arguments))
|
||||
named_arguments = sortList(named_arguments)
|
||||
named_arguments = sort_list(named_arguments)
|
||||
fullid += named_arguments
|
||||
return list2params(fullid)
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
|
||||
|
||||
/datum/controller/subsystem/processing/quirks/proc/SetupQuirks()
|
||||
// Sort by Positive, Negative, Neutral; and then by name
|
||||
var/list/quirk_list = sortList(subtypesof(/datum/quirk), /proc/cmp_quirk_asc)
|
||||
var/list/quirk_list = sort_list(subtypesof(/datum/quirk), /proc/cmp_quirk_asc)
|
||||
|
||||
for(var/type in quirk_list)
|
||||
var/datum/quirk/quirk_type = type
|
||||
|
||||
@@ -69,7 +69,7 @@ PROCESSING_SUBSYSTEM_DEF(station)
|
||||
if(!amount)
|
||||
return
|
||||
for(var/iterator in 1 to amount)
|
||||
var/datum/station_trait/trait_type = pickweight(selectable_traits_by_types[trait_sign]) //Rolls from the table for the specific trait type
|
||||
var/datum/station_trait/trait_type = pick_weight(selectable_traits_by_types[trait_sign]) //Rolls from the table for the specific trait type
|
||||
setup_trait(trait_type)
|
||||
|
||||
///Creates a given trait of a specific type, while also removing any blacklisted ones from the future pool.
|
||||
|
||||
@@ -34,7 +34,7 @@ SUBSYSTEM_DEF(server_maint)
|
||||
|
||||
/datum/controller/subsystem/server_maint/fire(resumed = FALSE)
|
||||
if(!resumed)
|
||||
if(listclearnulls(GLOB.clients))
|
||||
if(list_clear_nulls(GLOB.clients))
|
||||
log_world("Found a null in clients list!")
|
||||
src.currentrun = GLOB.clients.Copy()
|
||||
|
||||
@@ -42,7 +42,7 @@ SUBSYSTEM_DEF(server_maint)
|
||||
|
||||
if(!(position_in_loop % 1)) //If it's a whole number
|
||||
var/listname = lists_to_clear[position_in_loop]
|
||||
if(listclearnulls(lists_to_clear[listname]))
|
||||
if(list_clear_nulls(lists_to_clear[listname]))
|
||||
log_world("Found a null in [listname]!")
|
||||
|
||||
cleanup_ticker++
|
||||
|
||||
@@ -834,7 +834,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
|
||||
templates[S.port_id]["templates"] += list(L)
|
||||
|
||||
data["templates_tabs"] = sortList(data["templates_tabs"])
|
||||
data["templates_tabs"] = sort_list(data["templates_tabs"])
|
||||
|
||||
data["existing_shuttle"] = null
|
||||
|
||||
|
||||
@@ -188,6 +188,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
start_at = world.time + (CONFIG_GET(number/lobby_countdown) * 10)
|
||||
timeLeft = null
|
||||
Master.SetRunLevel(RUNLEVEL_LOBBY)
|
||||
SEND_SIGNAL(src, COMSIG_TICKER_ERROR_SETTING_UP)
|
||||
|
||||
if(GAME_STATE_PLAYING)
|
||||
mode.process(wait * 0.1)
|
||||
@@ -466,7 +467,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
return
|
||||
var/hpc = CONFIG_GET(number/hard_popcap)
|
||||
if(!hpc)
|
||||
listclearnulls(queued_players)
|
||||
list_clear_nulls(queued_players)
|
||||
for (var/mob/dead/new_player/NP in queued_players)
|
||||
to_chat(NP, span_userdanger("The alive players limit has been released!<br><a href='?src=[REF(NP)];late_join=override'>[html_encode(">>Join Game<<")]</a>"))
|
||||
SEND_SOUND(NP, sound('sound/misc/notice1.ogg'))
|
||||
@@ -480,7 +481,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
|
||||
switch(queue_delay)
|
||||
if(5) //every 5 ticks check if there is a slot available
|
||||
listclearnulls(queued_players)
|
||||
list_clear_nulls(queued_players)
|
||||
if(living_player_count() < hpc)
|
||||
if(next_in_line?.client)
|
||||
to_chat(next_in_line, span_userdanger("A slot has opened! You have approximately 20 seconds to join. <a href='?src=[REF(next_in_line)];late_join=override'>\>\>Join Game\<\<</a>"))
|
||||
|
||||
@@ -488,7 +488,7 @@ SUBSYSTEM_DEF(timer)
|
||||
/datum/timedevent/proc/bucketJoin()
|
||||
// Generate debug-friendly name for timer
|
||||
var/static/list/bitfield_flags = list("TIMER_UNIQUE", "TIMER_OVERRIDE", "TIMER_CLIENT_TIME", "TIMER_STOPPABLE", "TIMER_NO_HASH_WAIT", "TIMER_LOOP")
|
||||
name = "Timer: [id] (\ref[src]), TTR: [timeToRun], wait:[wait] Flags: [jointext(bitfield2list(flags, bitfield_flags), ", ")], \
|
||||
name = "Timer: [id] (\ref[src]), TTR: [timeToRun], wait:[wait] Flags: [jointext(bitfield_to_list(flags, bitfield_flags), ", ")], \
|
||||
callBack: \ref[callBack], callBack.object: [callBack.object]\ref[callBack.object]([getcallingtype()]), \
|
||||
callBack.delegate:[callBack.delegate]([callBack.arguments ? callBack.arguments.Join(", ") : ""]), source: [source]"
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ SUBSYSTEM_DEF(title)
|
||||
|
||||
if(splash_turf)
|
||||
splash_turf.icon = icon
|
||||
splash_turf.handle_generic_titlescreen_sizes()
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ SUBSYSTEM_DEF(weather)
|
||||
// start random weather on relevant levels
|
||||
for(var/z in eligible_zlevels)
|
||||
var/possible_weather = eligible_zlevels[z]
|
||||
var/datum/weather/our_event = pickweight(possible_weather)
|
||||
var/datum/weather/our_event = pick_weight(possible_weather)
|
||||
run_weather(our_event, list(text2num(z)))
|
||||
eligible_zlevels -= z
|
||||
var/randTime = rand(3000, 6000)
|
||||
@@ -45,6 +45,15 @@ SUBSYSTEM_DEF(weather)
|
||||
eligible_zlevels["[z]"][W] = probability
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/weather/proc/update_z_level(datum/space_level/level)
|
||||
var/z = level.z_value
|
||||
for(var/datum/weather/weather as anything in subtypesof(/datum/weather))
|
||||
var/probability = initial(weather.probability)
|
||||
var/target_trait = initial(weather.target_trait)
|
||||
if(probability && level.traits[target_trait])
|
||||
LAZYINITLIST(eligible_zlevels["[z]"])
|
||||
eligible_zlevels["[z]"][weather] = probability
|
||||
|
||||
/datum/controller/subsystem/weather/proc/run_weather(datum/weather/weather_datum_type, z_levels)
|
||||
if (istext(weather_datum_type))
|
||||
for (var/V in subtypesof(/datum/weather))
|
||||
|
||||
Reference in New Issue
Block a user