From b5bc8fb612c9728bcd982eaa010e617a0473dae7 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Sun, 8 Feb 2026 17:57:20 -0700 Subject: [PATCH] [MIRROR] fix wrong table usage for admin syncs (#12401) Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> --- code/game/objects/items/blueprints_vr.dm | 6 ++--- code/game/objects/items/devices/flashlight.dm | 2 +- code/game/objects/items/weapons/explosives.dm | 2 +- code/modules/admin/DB ban/functions.dm | 8 +++---- code/modules/admin/admin_ranks.dm | 2 +- code/modules/admin/verbs/adminjump.dm | 24 +++++++++++-------- code/modules/power/singularity/emitter.dm | 6 ++--- .../power/singularity/field_generator.dm | 2 +- code/modules/power/supermatter/supermatter.dm | 4 ++-- code/modules/scripting/IDE.dm | 2 +- tools/bootstrap/python | 11 +++++++-- 11 files changed, 40 insertions(+), 29 deletions(-) diff --git a/code/game/objects/items/blueprints_vr.dm b/code/game/objects/items/blueprints_vr.dm index 05c38df0a1..a7d77f8559 100644 --- a/code/game/objects/items/blueprints_vr.dm +++ b/code/game/objects/items/blueprints_vr.dm @@ -532,7 +532,7 @@ oldA.power_check() //Simply makes the area turn the power off if you nicked an APC from it. to_chat(creator, span_notice("You have created a new area, named [newA.name]. It is now weather proof, and constructing an APC will allow it to be powered.")) if(annoy_admins) - message_admins("[key_name(creator, creator.client)] just made a new area called [newA.name] ](?) at ([creator.x],[creator.y],[creator.z] - JMP)",0,1) + message_admins("[key_name(creator, creator.client)] just made a new area called [newA.name] ](?) at ([creator.x],[creator.y],[creator.z] - JMP)") log_game("[key_name(creator, creator.client)] just made a new area called [newA.name]") if(AO && istype(AO,/obj/item/areaeditor)) if(AO.uses_charges) @@ -658,7 +658,7 @@ set_area_machinery(newA, newA.name, oldA.name) oldA.power_check() //Simply makes the area turn the power off if you nicked an APC from it. to_chat(creator, span_notice("You have created a new area, named [newA.name]. It is now weather proof, and constructing an APC will allow it to be powered.")) - message_admins("[key_name(creator, creator.client)] just made a new area called [newA.name] ](?) at ([creator.x],[creator.y],[creator.z] - JMP)",0,1) + message_admins("[key_name(creator, creator.client)] just made a new area called [newA.name] ](?) at ([creator.x],[creator.y],[creator.z] - JMP)") log_game("[key_name(creator, creator.client)] just made a new area called [newA.name]") charges -= 5 @@ -935,7 +935,7 @@ set_area_machinery(newA, newA.name, oldA.name) oldA.power_check() //Simply makes the area turn the power off if you nicked an APC from it. to_chat(creator, span_notice("You have created a new area, named [newA.name]. It is now weather proof, and constructing an APC will allow it to be powered.")) - message_admins("[key_name(creator, creator.client)] just made a new area called [newA.name] ](?) at ([creator.x],[creator.y],[creator.z] - JMP)",0,1) + message_admins("[key_name(creator, creator.client)] just made a new area called [newA.name] ](?) at ([creator.x],[creator.y],[creator.z] - JMP)") log_game("[key_name(creator, creator.client)] just made a new area called [newA.name]") var/list/zLevels = using_map.station_levels.Copy() diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 7257cbe5eb..4ec16330f0 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -284,7 +284,7 @@ /obj/item/flashlight/proc/finish_flicker(var/original_color, var/original_on, var/datum/component/overlay_lighting/OL) set_light_color(original_color) - OL.directional_atom.color = original_color + OL.directional_atom?.color = original_color on = original_on flickering = FALSE update_brightness() diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index affeea0211..856ff2158a 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -65,7 +65,7 @@ add_attack_logs(user, target, "planted [name] on with [timer] second fuse") user.visible_message(span_danger("[user.name] finished planting an explosive on [target.name]!")) else - message_admins("[key_name(user, user.client)](?) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - JMP) with [timer] second fuse",0,1) + message_admins("[key_name(user, user.client)](?) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - JMP) with [timer] second fuse") log_game("[key_name(user)] planted [src.name] on [target.name] at ([target.x],[target.y],[target.z]) with [timer] second fuse") target.add_overlay(image_overlay) diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index 21f5987fb8..5ee62875e6 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -85,7 +85,7 @@ var/datum/db_query/query_insert = SSdbcore.NewQuery(sql) query_insert.Execute() to_chat(usr, span_filter_adminlog("[span_blue("Ban saved to database.")]")) - message_admins("[key_name_admin(usr)] has added a [bantype_str] for [ckey] [(job)?"([job])":""] [(duration > 0)?"([duration] minutes)":""] with the reason: \"[reason]\" to the ban database.",1) + message_admins("[key_name_admin(usr)] has added a [bantype_str] for [ckey] [(job)?"([job])":""] [(duration > 0)?"([duration] minutes)":""] with the reason: \"[reason]\" to the ban database.") qdel(query_insert) @@ -196,7 +196,7 @@ var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE erro_ban SET reason = '[value]', edits = CONCAT(edits,'- [eckey] changed ban reason from \\\"[reason]\\\" to \\\"[value]\\\"
') WHERE id = [banid]") update_query.Execute() - message_admins("[key_name_admin(user)] has edited a ban for [pckey]'s reason from [reason] to [value]",1) + message_admins("[key_name_admin(user)] has edited a ban for [pckey]'s reason from [reason] to [value]") qdel(update_query) return if("duration") @@ -207,7 +207,7 @@ return var/datum/db_query/update_query = SSdbcore.NewQuery("UPDATE erro_ban SET duration = [value], edits = CONCAT(edits,'- [eckey] changed ban duration from [duration] to [value]
'), expiration_time = DATE_ADD(bantime, INTERVAL [value] MINUTE) WHERE id = [banid]") - message_admins("[key_name_admin(user)] has edited a ban for [pckey]'s duration from [duration] to [value]",1) + message_admins("[key_name_admin(user)] has edited a ban for [pckey]'s duration from [duration] to [value]") update_query.Execute() qdel(update_query) return @@ -252,7 +252,7 @@ var/unban_computerid = src.owner:computer_id var/unban_ip = src.owner:address var/sql_update = "UPDATE erro_ban SET unbanned = 1, unbanned_datetime = Now(), unbanned_ckey = '[unban_ckey]', unbanned_computerid = '[unban_computerid]', unbanned_ip = '[unban_ip]' WHERE id = [id]" - message_admins("[key_name_admin(usr)] has lifted [pckey]'s ban.",1) + message_admins("[key_name_admin(usr)] has lifted [pckey]'s ban.") var/datum/db_query/query_update = SSdbcore.NewQuery(sql_update) query_update.Execute() diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm index ad4a2e2137..0ef0ca49ed 100644 --- a/code/modules/admin/admin_ranks.dm +++ b/code/modules/admin/admin_ranks.dm @@ -391,7 +391,7 @@ GLOBAL_PROTECT(protected_ranks) var/datum/admins/holder = GLOB.protected_admins[holder_ckey] sql_admins += list(list("ckey" = holder.target, "rank" = holder.rank_names())) SSdbcore.MassInsert(format_table_name("admin"), sql_admins, duplicate_key = TRUE) - var/datum/db_query/query_admin_rank_update = SSdbcore.NewQuery("UPDATE [format_table_name("player")] AS p INNER JOIN [format_table_name("admin")] AS a ON p.ckey = a.ckey SET p.lastadminrank = a.rank") + var/datum/db_query/query_admin_rank_update = SSdbcore.NewQuery("UPDATE [format_table_name("erro_player")] AS p INNER JOIN [format_table_name("admin")] AS a ON p.ckey = a.ckey SET p.lastadminrank = a.rank") query_admin_rank_update.Execute() qdel(query_admin_rank_update) diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index 3794fde11c..edc2d7fe02 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -15,21 +15,25 @@ tgui_alert_async(usr, "Admin jumping disabled") return - var/area/A + var/area/target_area if(areaname) - A = return_sorted_areas()[areaname] + target_area = return_sorted_areas()[areaname] else - A = return_sorted_areas()[tgui_input_list(usr, "Pick an area:", "Jump to Area", return_sorted_areas())] + target_area = return_sorted_areas()[tgui_input_list(src, "Pick an area:", "Jump to Area", return_sorted_areas())] - if(!A) + if(!target_area) return - usr.on_mob_jump() - usr.reset_perspective(usr) - usr.forceMove(pick(get_area_turfs(A))) - log_admin("[key_name(usr)] jumped to [A]") - message_admins("[key_name_admin(usr)] jumped to [A]", 1) + mob.on_mob_jump() + mob.reset_perspective(mob) + var/turf/target = pick(get_area_turfs(target_area)) + if(!target) + to_chat(src, span_warning("Selected area [target_area] has no turfs!")) + return + mob.forceMove(target) + log_admin("[key_name(src)] jumped to [target_area]") + message_admins("[key_name_admin(src)] jumped to [target_area]") feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/jumptoturf(var/turf/T in world) @@ -39,7 +43,7 @@ return if(CONFIG_GET(flag/allow_admin_jump)) log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]") - message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1) + message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]") usr.on_mob_jump() usr.reset_perspective(usr) usr.forceMove(T) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 8d575cae75..e0634cb52f 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -36,7 +36,7 @@ AddElement(/datum/element/rotatable) /obj/machinery/power/emitter/Destroy() - message_admins("Emitter deleted at ([x],[y],[z] - JMP)",0,1) + message_admins("Emitter deleted at ([x],[y],[z] - JMP)") log_game("EMITTER([x],[y],[z]) Destroyed/deleted.") investigate_log(span_red("deleted") + " at ([x],[y],[z])","singulo") . = ..() @@ -60,7 +60,7 @@ if(src.active==1) src.active = 0 to_chat(user, "You turn off [src].") - message_admins("Emitter turned off by [key_name(user, user.client)](?) in ([x],[y],[z] - JMP)",0,1) + message_admins("Emitter turned off by [key_name(user, user.client)](?) in ([x],[y],[z] - JMP)") log_game("EMITTER([x],[y],[z]) OFF by [key_name(user)]") investigate_log("turned " + span_red("off") + " by [user.key]","singulo") else @@ -68,7 +68,7 @@ to_chat(user, "You turn on [src].") src.shot_number = 0 src.fire_delay = get_initial_fire_delay() - message_admins("Emitter turned on by [key_name(user, user.client)](?) in ([x],[y],[z] - JMP)",0,1) + message_admins("Emitter turned on by [key_name(user, user.client)](?) in ([x],[y],[z] - JMP)") log_game("EMITTER([x],[y],[z]) ON by [key_name(user)]") investigate_log("turned " + span_green("on") + " by [user.key]","singulo") update_icon() diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index 277ebd5a83..358dfc7738 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -353,7 +353,7 @@ if((world.time - O.last_warning) > 50) //to stop message-spam temp = 0 admin_chat_message(message = "SINGUL/TESLOOSE!", color = "#FF2222") //VOREStation Add - message_admins("A singulo exists and a containment field has failed.",1) + message_admins("A singulo exists and a containment field has failed.") investigate_log("has " + span_red("failed") + " whilst a singulo exists.","singulo") log_game("FIELDGEN([x],[y],[z]) Containment failed while singulo/tesla exists.") O.last_warning = world.time diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index b313a325d8..1ac33ad2ba 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -174,7 +174,7 @@ set waitfor = 0 - message_admins("Supermatter exploded at ([x],[y],[z] - JMP)",0,1) + message_admins("Supermatter exploded at ([x],[y],[z] - JMP)") log_game("SUPERMATTER([x],[y],[z]) Exploded. Power:[power], Oxygen:[oxygen], Damage:[damage], Integrity:[get_integrity()]") anchored = TRUE grav_pulling = 1 @@ -643,7 +643,7 @@ /obj/item/broken_sm/Initialize(mapload) . = ..() - message_admins("Broken SM shard created at ([x],[y],[z] - JMP)",0,1) + message_admins("Broken SM shard created at ([x],[y],[z] - JMP)") START_PROCESSING(SSobj, src) /obj/item/broken_sm/process() diff --git a/code/modules/scripting/IDE.dm b/code/modules/scripting/IDE.dm index e1da8421ba..a0e43b867a 100644 --- a/code/modules/scripting/IDE.dm +++ b/code/modules/scripting/IDE.dm @@ -12,7 +12,7 @@ var/tcscode=winget(src, "tcscode", "text") var/msg="[mob.name] is adding script to server [Server]: [tcscode]" log_world("## MISC [msg]") - message_admins("[mob.name] has uploaded a NTLS script to [Machine.SelectedServer] ([mob.x],[mob.y],[mob.z] - JMP)",0,1) + message_admins("[mob.name] has uploaded a NTLS script to [Machine.SelectedServer] ([mob.x],[mob.y],[mob.z] - JMP)") Server.setcode( tcscode ) // this actually saves the code from input to the server src << output(null, "tcserror") // clear the errors else diff --git a/tools/bootstrap/python b/tools/bootstrap/python index 0c8d702020..46b146961a 100755 --- a/tools/bootstrap/python +++ b/tools/bootstrap/python @@ -25,6 +25,12 @@ PythonDir="$Cache/python-$PythonVersion" PythonExe="$PythonDir/python.exe" Log="$Cache/last-command.log" +# function that prints an error message and exits +error_exit() { + echo "If you are seeing this message, please try to fix it by running tools/hooks/install.(bat/sh) again." + exit 1 +} + # If a portable Python for Windows is not present, search on $PATH. if [ "$(uname)" = "Linux" ] || [ ! -f "$PythonExe" ]; then # Strip the "App Execution Aliases" from $PATH. Even if the user installed @@ -55,7 +61,7 @@ if [ "$(uname)" = "Linux" ] || [ ! -f "$PythonExe" ]; then echo "Please install Python from https://www.python.org/downloads/ or using your system's package manager." fi echo - exit 1 + error_exit fi # Create a venv and activate it @@ -70,13 +76,14 @@ if [ "$(uname)" = "Linux" ] || [ ! -f "$PythonExe" ]; then PythonExe="$PythonDir/scripts/python3.exe"; else echo "bootstrap/python failed to find the python executable inside its virtualenv" - exit 1 + error_exit fi fi # Use pip to install our requirements if [ ! -f "$PythonDir/requirements.txt" ] || [ "$(b2sum < "$Sdk/requirements.txt")" != "$(b2sum < "$PythonDir/requirements.txt")" ]; then echo "Updating dependencies..." + "$PythonExe" -m ensurepip --default-pip "$PythonExe" -m pip install -U wheel "$PythonExe" -m pip install -U pip -r "$Sdk/requirements.txt" cp "$Sdk/requirements.txt" "$PythonDir/requirements.txt"