Files
f825c9af6b adds persistent sheet silos to mining (#6353)
65% multiplier - 10 per sheet constant loss

requested by @TheObserver-sys and signed off by me

mining rework will make this more balanced but vorestation has it; i
think it's fine to throw mining/science a bone.

---------

Co-authored-by: silicons <no@you.cat>
Co-authored-by: BlueWildrose <57083662+BlueWildrose@users.noreply.github.com>
2024-03-23 11:47:03 +01:00

38 lines
1.9 KiB
Plaintext

/client/proc/reestablish_db_connection()
set category = "Special Verbs"
set name = "Reestablish DB Connection"
if (!CONFIG_GET(flag/sql_enabled))
to_chat(usr, "<span class='adminnotice'>The Database is not enabled!</span>")
return
if (SSdbcore.IsConnected())
if (!check_rights(R_DEBUG,0))
alert("The database is already connected! (Only those with +debug can force a reconnection)", "The database is already connected!")
return
var/reconnect = alert("The database is already connected! If you *KNOW* that this is incorrect, you can force a reconnection", "The database is already connected!", "Force Reconnect", "Cancel")
if (reconnect != "Force Reconnect")
return
SSdbcore.Disconnect()
log_admin("[key_name(usr)] has forced the database to disconnect")
message_admins("[key_name_admin(usr)] has <b>forced</b> the database to disconnect!")
// SSblackbox.record_feedback("tally", "admin_verb", 1, "Force Reestablished Database Connection") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] is attempting to re-established the DB Connection")
message_admins("[key_name_admin(usr)] is attempting to re-established the DB Connection")
// SSblackbox.record_feedback("tally", "admin_verb", 1, "Reestablished Database Connection") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
SSdbcore.failed_connections = 0
if(!SSdbcore.Connect())
message_admins("Database connection failed: " + SSdbcore.ErrorMsg())
else
message_admins("Database connection re-established")
message_admins("Reloading client database data...")
for(var/client/C in GLOB.clients)
C.player?.load()
message_admins("Asserting round ID set...")
if(!isnum(text2num(GLOB.round_id)))
SSdbcore.SetRoundID()
message_admins("Round ID was not set and has now been re-set. Things might be weird this round.")