From 819123404608ccc3bd463a62d58f6ae45cee2fbb Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sat, 15 Feb 2020 18:00:02 -0700 Subject: [PATCH] compile --- code/controllers/subsystems/time_track.dm | 7 +- code/datums/world_topic.dm | 2 +- .../newmalf_ability_trees/HELPERS.dm | 412 +++++++++--------- code/modules/admin/IsBanned.dm | 2 +- code/modules/admin/banjob.dm | 2 +- code/modules/client/client_procs.dm | 2 +- code/modules/mob/mob.dm | 131 +++--- code/modules/mob/new_player/login.dm | 2 +- code/modules/spells/spell_code.dm | 2 +- interface/interface.dm | 4 +- 10 files changed, 288 insertions(+), 278 deletions(-) diff --git a/code/controllers/subsystems/time_track.dm b/code/controllers/subsystems/time_track.dm index 097e21c975b..99e6005055d 100644 --- a/code/controllers/subsystems/time_track.dm +++ b/code/controllers/subsystems/time_track.dm @@ -23,8 +23,6 @@ SUBSYSTEM_DEF(time_track) var/time_dilation_text /datum/controller/subsystem/time_track/fire() - stat_time_text = "Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]\n\nRound Time: [WORLDTIME2TEXT("hh:mm:ss")]\n\nStation Time: [STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)]\n\n[time_dilation_text]" - if(++last_measurement == measurement_delay) last_measurement = 0 var/current_realtime = REALTIMEOFDAY @@ -45,4 +43,7 @@ SUBSYSTEM_DEF(time_track) last_tick_byond_time = current_byondtime last_tick_tickcount = current_tickcount //SSblackbox.record_feedback("associative", "time_dilation_current", 1, list("[SQLtime()]" = list("current" = "[time_dilation_current]", "avg_fast" = "[time_dilation_avg_fast]", "avg" = "[time_dilation_avg]", "avg_slow" = "[time_dilation_avg_slow]"))) - time_dilation_text = "Time Dilation: [round(time_dilation_current,1)]% AVG:([round(time_dilation_avg_fast,1)]%, [round(time_dilation_avg,1)]%, [round(time_dilation_avg_slow,1)]%)" + time_dilation_text = "[round(time_dilation_current,1)]% AVG:([round(time_dilation_avg_fast,1)]%, [round(time_dilation_avg,1)]%, [round(time_dilation_avg_slow,1)]%)" + + //stat_time_text = "Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]\n\nRound Time: [WORLDTIME2TEXT("hh:mm:ss")]\n\nStation Time: [STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)]\n\n[time_dilation_text]" + stat_time_text = time_dilation_text diff --git a/code/datums/world_topic.dm b/code/datums/world_topic.dm index d44833f1071..6326a31e305 100644 --- a/code/datums/world_topic.dm +++ b/code/datums/world_topic.dm @@ -167,7 +167,7 @@ //.["map_name"] = SSmapping.config?.map_name || "Loading..." - if(key_valid) + //if(key_valid) //.["active_players"] = get_active_player_count() /* if(SSticker.HasRoundStarted()) diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm index 0d9519504f1..28045a90ad7 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm @@ -1,206 +1,206 @@ -// Verb: ai_select_hardware() -// Parameters: None -// Description: Allows AI to select it's hardware module. -/datum/game_mode/malfunction/verb/ai_select_hardware() - set category = "Hardware" - set name = "Select Hardware" - set desc = "Allows you to select hardware piece to install" - var/mob/living/silicon/ai/user = usr - - if(!ability_prechecks(user, 0, 1)) - return - - if(user.hardware) - user << "You have already selected your hardware." - return - - var/hardware_list = list() - for(var/H in typesof(/datum/malf_hardware)) - var/datum/malf_hardware/HW = new H - hardware_list += HW - - var/possible_choices = list() - for(var/datum/malf_hardware/H in hardware_list) - possible_choices += H.name - - possible_choices += "CANCEL" - var/choice = input("Select desired hardware. You may only choose one hardware piece!: ") in possible_choices - if(choice == "CANCEL") - return - var/note = null - - var/datum/malf_hardware/C - - for (var/datum/malf_hardware/H in hardware_list) - if(H.name == choice) - C = H - break - - if(C) - note = C.desc - else - user << "This hardware does not exist! Probably a bug in game. Please report this." - return - - - if(!note) - error("Hardware without description: [C]") - return - - var/confirmation = alert("[note] - Is this what you want?", "Hardware selection", "Yes", "No") - if(confirmation != "Yes") - user << "Selection cancelled. Use command again to select" - return - - if(C) - C.owner = user - C.install() - -// Verb: ai_help() -// Parameters: None -// Descriptions: Opens help file and displays it to the AI. -/datum/game_mode/malfunction/verb/ai_help() - set category = "Hardware" - set name = "Display Help" - set desc = "Opens help window with overview of available hardware, software and other important information." - var/mob/living/silicon/ai/user = usr - - var/help = file2text('ingame_manuals/malf_ai.html') - if(!help) - help = "Error loading help (file /ingame_manuals/malf_ai.html is probably missing). Please report this to server administration staff." - - user << browse(help, "window=malf_ai_help;size=600x500") - - -// Verb: ai_select_research() -// Parameters: None -// Description: Allows AI to select it's next research priority. -/datum/game_mode/malfunction/verb/ai_select_research() - set category = "Hardware" - set name = "Select Research" - set desc = "Allows you to select your next research target." - var/mob/living/silicon/ai/user = usr - - if(!ability_prechecks(user, 0, 1)) - return - - var/datum/malf_research/res = user.research - var/datum/malf_research_ability/tar = input("Select your next research target") in res.available_abilities - if(!tar) - return - res.focus = tar - user << "Research set: [tar.name]" - -// HELPER PROCS -// Proc: ability_prechecks() -// Parameters 2 - (user - User which used this ability check_price - If different than 0 checks for ability CPU price too. Does NOT use the CPU time!) -// Description: This is pre-check proc used to determine if the AI can use the ability. -/proc/ability_prechecks(var/mob/living/silicon/ai/user = null, var/check_price = 0, var/override = 0) - if(!user) - return 0 - if(!istype(user)) - user << "GAME ERROR: You tried to use ability that is only available for malfunctioning AIs, but you are not AI! Please report this." - return 0 - if(!user.malfunctioning) - user << "GAME ERROR: You tried to use ability that is only available for malfunctioning AIs, but you are not malfunctioning. Please report this." - return 0 - if(!user.research) - user << "GAME ERROR: No research datum detected. Please report this." - return 0 - if(user.research.max_cpu < check_price) - user << "Your CPU storage is not large enough to use this ability. Hack more APCs to continue." - return 0 - if(user.research.stored_cpu < check_price) - user << "You do not have enough CPU power stored. Please wait a moment." - return 0 - if(user.hacking && !override) - user << "Your system is busy processing another task. Please wait until completion." - return 0 - if(user.APU_power && !override) - user << "Low power. Unable to proceed." - return 0 - return 1 - -// Proc: ability_pay() -// Parameters 2 - (user - User from which we deduct CPU from, price - Amount of CPU power to use) -// Description: Uses up certain amount of CPU power. Returns 1 on success, 0 on failure. -/proc/ability_pay(var/mob/living/silicon/ai/user = null, var/price = 0) - if(!user) - return 0 - if(user.APU_power) - user << "Low power. Unable to proceed." - return 0 - if(!user.research) - user << "GAME ERROR: No research datum detected. Please report this." - return 0 - if(user.research.max_cpu < price) - user << "Your CPU storage is not large enough to use this ability. Hack more APCs to continue." - return 0 - if(user.research.stored_cpu < price) - user << "You do not have enough CPU power stored. Please wait a moment." - return 0 - user.research.stored_cpu -= price - return 1 - -// Proc: announce_hack_failure() -// Parameters 2 - (user - hacking user, text - Used in alert text creation) -// Description: Uses up certain amount of CPU power. Returns 1 on success, 0 on failure. -/proc/announce_hack_failure(var/mob/living/silicon/ai/user = null, var/text) - if(!user || !text) - return 0 - var/fulltext = "" - switch(user.hack_fails) - if(1) - fulltext = "We have detected a hack attempt into your [text]. The intruder failed to access anything of importance, but disconnected before we could complete our traces." - if(2) - fulltext = "We have detected another hack attempt. It was targeting [text]. The intruder almost gained control of the system, so we had to disconnect them. We partially finished our trace and it seems to be originating either from the station, or its immediate vicinity." - if(3) - fulltext = "Another hack attempt has been detected, this time targeting [text]. We are certain the intruder entered the network via a terminal located somewhere on the station." - if(4) - fulltext = "We have finished our traces and it seems the recent hack attempts are originating from your AI system. We recommend investigation." - else - fulltext = "Another hack attempt has been detected, targeting [text]. The source still seems to be your AI system." - - command_announcement.Announce(fulltext) - -// Proc: get_unhacked_apcs() -// Parameters: None -// Description: Returns a list of all unhacked APCs -/proc/get_unhacked_apcs(var/mob/living/silicon/ai/user) - var/list/H = list() - for(var/obj/machinery/power/apc/A in machines) - if(A.hacker && A.hacker == user) - continue - H.Add(A) - return H - - -// Helper procs which return lists of relevant mobs. -/proc/get_unlinked_cyborgs(var/mob/living/silicon/ai/A) - if(!A || !istype(A)) - return - - var/list/L = list() - for(var/mob/living/silicon/robot/RB in mob_list) - if(istype(RB, /mob/living/silicon/robot/drone)) - continue - if(RB.connected_ai == A) - continue - L.Add(RB) - return L - -/proc/get_linked_cyborgs(var/mob/living/silicon/ai/A) - if(!A || !istype(A)) - return - return A.connected_robots - -/proc/get_other_ais(var/mob/living/silicon/ai/A) - if(!A || !istype(A)) - return - - var/list/L = list() - for(var/mob/living/silicon/ai/AT in mob_list) - if(L == A) - continue - L.Add(AT) - return L +// Verb: ai_select_hardware() +// Parameters: None +// Description: Allows AI to select it's hardware module. +/datum/game_mode/malfunction/verb/ai_select_hardware() + set category = "Hardware" + set name = "Select Hardware" + set desc = "Allows you to select hardware piece to install" + var/mob/living/silicon/ai/user = usr + + if(!ability_prechecks(user, 0, 1)) + return + + if(user.hardware) + user << "You have already selected your hardware." + return + + var/hardware_list = list() + for(var/H in typesof(/datum/malf_hardware)) + var/datum/malf_hardware/HW = new H + hardware_list += HW + + var/possible_choices = list() + for(var/datum/malf_hardware/H in hardware_list) + possible_choices += H.name + + possible_choices += "CANCEL" + var/choice = input("Select desired hardware. You may only choose one hardware piece!: ") in possible_choices + if(choice == "CANCEL") + return + var/note = null + + var/datum/malf_hardware/C + + for (var/datum/malf_hardware/H in hardware_list) + if(H.name == choice) + C = H + break + + if(C) + note = C.desc + else + user << "This hardware does not exist! Probably a bug in game. Please report this." + return + + + if(!note) + log_world("Hardware without description: [C]") + return + + var/confirmation = alert("[note] - Is this what you want?", "Hardware selection", "Yes", "No") + if(confirmation != "Yes") + user << "Selection cancelled. Use command again to select" + return + + if(C) + C.owner = user + C.install() + +// Verb: ai_help() +// Parameters: None +// Descriptions: Opens help file and displays it to the AI. +/datum/game_mode/malfunction/verb/ai_help() + set category = "Hardware" + set name = "Display Help" + set desc = "Opens help window with overview of available hardware, software and other important information." + var/mob/living/silicon/ai/user = usr + + var/help = file2text('ingame_manuals/malf_ai.html') + if(!help) + help = "Error loading help (file /ingame_manuals/malf_ai.html is probably missing). Please report this to server administration staff." + + user << browse(help, "window=malf_ai_help;size=600x500") + + +// Verb: ai_select_research() +// Parameters: None +// Description: Allows AI to select it's next research priority. +/datum/game_mode/malfunction/verb/ai_select_research() + set category = "Hardware" + set name = "Select Research" + set desc = "Allows you to select your next research target." + var/mob/living/silicon/ai/user = usr + + if(!ability_prechecks(user, 0, 1)) + return + + var/datum/malf_research/res = user.research + var/datum/malf_research_ability/tar = input("Select your next research target") in res.available_abilities + if(!tar) + return + res.focus = tar + user << "Research set: [tar.name]" + +// HELPER PROCS +// Proc: ability_prechecks() +// Parameters 2 - (user - User which used this ability check_price - If different than 0 checks for ability CPU price too. Does NOT use the CPU time!) +// Description: This is pre-check proc used to determine if the AI can use the ability. +/proc/ability_prechecks(var/mob/living/silicon/ai/user = null, var/check_price = 0, var/override = 0) + if(!user) + return 0 + if(!istype(user)) + user << "GAME ERROR: You tried to use ability that is only available for malfunctioning AIs, but you are not AI! Please report this." + return 0 + if(!user.malfunctioning) + user << "GAME ERROR: You tried to use ability that is only available for malfunctioning AIs, but you are not malfunctioning. Please report this." + return 0 + if(!user.research) + user << "GAME ERROR: No research datum detected. Please report this." + return 0 + if(user.research.max_cpu < check_price) + user << "Your CPU storage is not large enough to use this ability. Hack more APCs to continue." + return 0 + if(user.research.stored_cpu < check_price) + user << "You do not have enough CPU power stored. Please wait a moment." + return 0 + if(user.hacking && !override) + user << "Your system is busy processing another task. Please wait until completion." + return 0 + if(user.APU_power && !override) + user << "Low power. Unable to proceed." + return 0 + return 1 + +// Proc: ability_pay() +// Parameters 2 - (user - User from which we deduct CPU from, price - Amount of CPU power to use) +// Description: Uses up certain amount of CPU power. Returns 1 on success, 0 on failure. +/proc/ability_pay(var/mob/living/silicon/ai/user = null, var/price = 0) + if(!user) + return 0 + if(user.APU_power) + user << "Low power. Unable to proceed." + return 0 + if(!user.research) + user << "GAME ERROR: No research datum detected. Please report this." + return 0 + if(user.research.max_cpu < price) + user << "Your CPU storage is not large enough to use this ability. Hack more APCs to continue." + return 0 + if(user.research.stored_cpu < price) + user << "You do not have enough CPU power stored. Please wait a moment." + return 0 + user.research.stored_cpu -= price + return 1 + +// Proc: announce_hack_failure() +// Parameters 2 - (user - hacking user, text - Used in alert text creation) +// Description: Uses up certain amount of CPU power. Returns 1 on success, 0 on failure. +/proc/announce_hack_failure(var/mob/living/silicon/ai/user = null, var/text) + if(!user || !text) + return 0 + var/fulltext = "" + switch(user.hack_fails) + if(1) + fulltext = "We have detected a hack attempt into your [text]. The intruder failed to access anything of importance, but disconnected before we could complete our traces." + if(2) + fulltext = "We have detected another hack attempt. It was targeting [text]. The intruder almost gained control of the system, so we had to disconnect them. We partially finished our trace and it seems to be originating either from the station, or its immediate vicinity." + if(3) + fulltext = "Another hack attempt has been detected, this time targeting [text]. We are certain the intruder entered the network via a terminal located somewhere on the station." + if(4) + fulltext = "We have finished our traces and it seems the recent hack attempts are originating from your AI system. We recommend investigation." + else + fulltext = "Another hack attempt has been detected, targeting [text]. The source still seems to be your AI system." + + command_announcement.Announce(fulltext) + +// Proc: get_unhacked_apcs() +// Parameters: None +// Description: Returns a list of all unhacked APCs +/proc/get_unhacked_apcs(var/mob/living/silicon/ai/user) + var/list/H = list() + for(var/obj/machinery/power/apc/A in machines) + if(A.hacker && A.hacker == user) + continue + H.Add(A) + return H + + +// Helper procs which return lists of relevant mobs. +/proc/get_unlinked_cyborgs(var/mob/living/silicon/ai/A) + if(!A || !istype(A)) + return + + var/list/L = list() + for(var/mob/living/silicon/robot/RB in mob_list) + if(istype(RB, /mob/living/silicon/robot/drone)) + continue + if(RB.connected_ai == A) + continue + L.Add(RB) + return L + +/proc/get_linked_cyborgs(var/mob/living/silicon/ai/A) + if(!A || !istype(A)) + return + return A.connected_robots + +/proc/get_other_ais(var/mob/living/silicon/ai/A) + if(!A || !istype(A)) + return + + var/list/L = list() + for(var/mob/living/silicon/ai/AT in mob_list) + if(L == A) + continue + L.Add(AT) + return L diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index 3eda6360a16..44a3727663f 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -69,7 +69,7 @@ world/IsBanned(key,address,computer_id,type,real_bans_only=FALSE) var/ckeytext = ckey if(!establish_db_connection()) - error("Ban database connection failure. Key [ckeytext] not checked") + log_world("Ban database connection failure. Key [ckeytext] not checked") log_misc("Ban database connection failure. Key [ckeytext] not checked") key_cache[key] = 0 return diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm index cd064a64abd..434fe486b58 100644 --- a/code/modules/admin/banjob.dm +++ b/code/modules/admin/banjob.dm @@ -66,7 +66,7 @@ DEBUG log_admin("jobban_keylist was empty") else if(!establish_db_connection()) - error("Database connection failed. Reverting to the legacy ban system.") + log_world("Database connection failed. Reverting to the legacy ban system.") log_misc("Database connection failed. Reverting to the legacy ban system.") config_legacy.ban_legacy_system = 1 jobban_loadbanfile() diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 84204d5a9ff..1241fcd7054 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -110,7 +110,7 @@ void.MakeGreed() screen += void - if(prefs.lastchangelog != changelog_hash) //bolds the changelog button on the interface so we know there are updates. + if(prefs.lastchangelog != GLOB.changelog_hash) //bolds the changelog button on the interface so we know there are updates. src << "You have unread updates in the changelog." winset(src, "rpane.changelog", "background-color=#eaeaea;font-style=bold") if(config_legacy.aggressive_changelog) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index a8c38049f3e..9662f15f6df 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -696,72 +696,81 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0) /mob/Stat() ..() - . = (is_client_active(10 MINUTES)) - if(.) - if(statpanel("Status") && ticker && ticker.current_state != GAME_STATE_PREGAME) - stat("Station Time", stationtime2text()) - stat("Station Date", stationdate2text()) - stat("Round Duration", roundduration2text()) + //This is only called from client/Stat(), let's assume client exists. - if(client.holder) - if(statpanel("Status")) - stat("Location:", "([x], [y], [z]) [loc]") - stat("CPU:","[world.cpu]") - stat("Instances:","[world.contents.len]") + if(statpanel("Status")) + var/list/L = list() + stat("Ping", "[round(client.lastping,1)]ms (Avg: [round(client.avgping,1)]ms)") + //L += SSmapping.stat_map_name + //L += "Round ID: [GLOB.round_id || "NULL"]" + // VIRGO START + stat("Station Time", stationtime2text()) + stat("Station Date", stationdate2text()) + stat("Round Duration", roundduration2text()) + // VIRGO END + stat("Time dilation", SStime_track.stat_time_text) + //L += SSshuttle.emergency_shuttle_stat_text + //stat(null, "[L.Join("\n\n")]") - if(statpanel("Processes")) - if(processScheduler) - processScheduler.statProcesses() - - if(statpanel("MC")) - stat("CPU:","[world.cpu]") - stat("Instances:","[world.contents.len]") - stat(null) - if(Master) - Master.stat_entry() - else - stat("Master Controller:", "ERROR") - if(Failsafe) - Failsafe.stat_entry() - else - stat("Failsafe Controller:", "ERROR") - if(GLOB) - GLOB.stat_entry() - else - stat("Globals:", "ERROR") - if(Master) - stat(null) - for(var/datum/controller/subsystem/SS in Master.subsystems) - SS.stat_entry() - - if(statpanel("Tickets")) - GLOB.ahelp_tickets.stat_entry() - - if(length(GLOB.sdql2_queries)) - if(statpanel("SDQL2")) - stat("Access Global SDQL2 List", GLOB.sdql2_vv_statobj) - for(var/i in GLOB.sdql2_queries) - var/datum/SDQL2_query/Q = i - Q.generate_stat() - - if(listed_turf && client) - if(!TurfAdjacent(listed_turf)) - listed_turf = null + if(client.holder) + if(statpanel("MC")) + var/turf/T = get_turf(client.eye) + stat("Location:", COORD(T)) + stat("CPU:", "[world.cpu]") + stat("Instances:", "[num2text(world.contents.len, 10)]") + stat("World Time:", "[world.time]") + GLOB.stat_entry() + config.stat_entry() + stat(null) + if(Master) + Master.stat_entry() else - if(statpanel("Turf")) - stat("\icon[listed_turf]", listed_turf.name) - for(var/atom/A in listed_turf) - if(!A.mouse_opacity) - continue - if(A.invisibility > see_invisible) - continue - if(is_type_in_list(A, shouldnt_see)) - continue - if(A.plane > plane) - continue - stat(A) + stat("Master Controller:", "ERROR") + if(Failsafe) + Failsafe.stat_entry() + else + stat("Failsafe Controller:", "ERROR") + if(Master) + stat(null) + for(var/datum/controller/subsystem/SS in Master.subsystems) + SS.stat_entry() + GLOB.cameranet.stat_entry() + if(statpanel("Tickets")) + GLOB.ahelp_tickets.stat_entry() + if(length(GLOB.sdql2_queries)) + if(statpanel("SDQL2")) + stat("Access Global SDQL2 List", GLOB.sdql2_vv_statobj) + for(var/i in GLOB.sdql2_queries) + var/datum/SDQL2_query/Q = i + Q.generate_stat() + if(statpanel("Processes")) + if(processScheduler) + processScheduler.statProcesses() + if(listed_turf && client) + if(!TurfAdjacent(listed_turf)) + listed_turf = null + else if(statpanel(listed_turf.name)) + statnull, listed_turf) + var/list/overrides = list() + for(var/image/I in client.images) + if(I.loc && I.loc.loc == listed_turf && I.override) + overrides += I.loc + for(var/atom/A in listed_turf) + if(!A.mouse_opacity) + continue + if(A.invisibility > see_invisible) + continue + if(overrides.len && (A in overrides)) + continue + /* + if(A.IsObscured()) + continue + */ + if(A.plane > plane) + continue + stat(null, A) // facing verbs /mob/proc/canface() diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index 521496facc0..b16e415f3a0 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -12,7 +12,7 @@ var/obj/effect/lobby_image = new /obj/effect/lobby_image var/known_icon_states = icon_states(icon) for(var/lobby_screen in using_map.lobby_screens) if(!(lobby_screen in known_icon_states)) - error("Lobby screen '[lobby_screen]' did not exist in the icon set [icon].") + log_world("Lobby screen '[lobby_screen]' did not exist in the icon set [icon].") using_map.lobby_screens -= lobby_screen if(using_map.lobby_screens.len) diff --git a/code/modules/spells/spell_code.dm b/code/modules/spells/spell_code.dm index 4aa0aa1918f..35e364c1e97 100644 --- a/code/modules/spells/spell_code.dm +++ b/code/modules/spells/spell_code.dm @@ -179,7 +179,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now /spell/proc/cast_check(skipcharge = 0,mob/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell if(!(src in user.spell_list) && holder == user) - error("[user] utilized the spell '[src]' without having it.") + log_world("[user] utilized the spell '[src]' without having it.") user << "You shouldn't have this spell! Something's wrong." return 0 diff --git a/interface/interface.dm b/interface/interface.dm index b117897d59e..d5a623aaf4d 100644 --- a/interface/interface.dm +++ b/interface/interface.dm @@ -59,10 +59,10 @@ set desc = "Visit the GitHub" set hidden = 1 - if(config_legacy.githuburl) + if(CONFIG_GET(string/githuburl)) if(alert("This will open the GitHub in your browser. Are you sure?",,"Yes","No")=="No") return - src << link(config_legacy.githuburl) + src << link(CONFIG_GET(string/githuburl)) else src << "The GitHub URL is not set in the server configuration." return