mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-26 06:40:08 +01:00
Merge branch 'master' into upstream-merge-9632
This commit is contained in:
@@ -407,7 +407,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
dat+="<B><FONT COLOR='maroon'>ERROR: Could not submit Feed story to Network.</B></FONT><HR><BR>"
|
||||
if(src.admincaster_feed_channel.channel_name=="")
|
||||
dat+="<FONT COLOR='maroon'>Invalid receiving channel name.</FONT><BR>"
|
||||
if(src.admincaster_feed_message.body == "" || src.admincaster_feed_message.body == "\[REDACTED\]")
|
||||
if(src.admincaster_feed_message.body == "" || src.admincaster_feed_message.body == "\[REDACTED\]" || admincaster_feed_message.title == "")
|
||||
dat+="<FONT COLOR='maroon'>Invalid message body.</FONT><BR>"
|
||||
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[3]'>Return</A><BR>"
|
||||
if(7)
|
||||
@@ -436,11 +436,14 @@ proc/admin_notice(var/message, var/rights)
|
||||
var/i = 0
|
||||
for(var/datum/feed_message/MESSAGE in src.admincaster_feed_channel.messages)
|
||||
i++
|
||||
dat+="-[MESSAGE.body] <BR>"
|
||||
//dat+="-[MESSAGE.body] <BR>"
|
||||
var/pic_data
|
||||
if(MESSAGE.img)
|
||||
usr << browse_rsc(MESSAGE.img, "tmp_photo[i].png")
|
||||
dat+="<img src='tmp_photo[i].png' width = '180'><BR><BR>"
|
||||
dat+="<FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"
|
||||
pic_data+="<img src='tmp_photo[i].png' width = '180'><BR>"
|
||||
dat+= get_newspaper_content(MESSAGE.title, MESSAGE.body, MESSAGE.author,"#d4cec1", pic_data)
|
||||
dat+="<BR>"
|
||||
dat+="<FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[MESSAGE.author] - [MESSAGE.time_stamp]</FONT>\]</FONT><BR>"
|
||||
dat+={"
|
||||
<BR><HR><A href='?src=\ref[src];ac_refresh=1'>Refresh</A>
|
||||
<BR><A href='?src=\ref[src];ac_setScreen=[1]'>Back</A>
|
||||
@@ -948,7 +951,7 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
log_admin("[key_name(usr)] toggled persistence to [config.persistence_disabled ? "Off" : "On"].")
|
||||
world.update_status()
|
||||
feedback_add_details("admin_verb","TPD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/datum/admins/proc/togglemaploadpersistence()
|
||||
set category = "Server"
|
||||
set desc="Whether mapload persistent data will be saved from now on."
|
||||
@@ -1426,6 +1429,11 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
return 1
|
||||
if(tomob.client) //No need to ghostize if there is no client
|
||||
tomob.ghostize(0)
|
||||
if(frommob.mind && frommob.mind.current) //Preserve teleop for original body when adminghosting.
|
||||
var/mob/body = frommob.mind.current
|
||||
if(body)
|
||||
if(body.teleop)
|
||||
body.teleop = tomob
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has put [frommob.ckey] in control of [tomob.name].</span>")
|
||||
log_admin("[key_name(usr)] stuffed [frommob.ckey] into [tomob.name].")
|
||||
feedback_add_details("admin_verb","CGD")
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
if(!message) return
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F) return
|
||||
to_chat(F, "<span class='filter_adminlog'><small>[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br></span>")
|
||||
to_file(F, "<span class='filter_adminlog'><small>[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br></span>")
|
||||
|
||||
//ADMINVERBS
|
||||
/client/proc/investigate_show( subject in list("hrefs","notes","singulo","telesci") )
|
||||
|
||||
@@ -76,9 +76,4 @@
|
||||
onclose(usr, "admin_dialogue_log")
|
||||
|
||||
|
||||
feedback_add_details("admin_verb","PDL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
// Used to get `atom/O as obj|mob|turf in view()` to match against strings containing apostrophes immediately after substrings that match to other objects. Somehow. - Ater
|
||||
/proc/admin_atom_validate(atom/A)
|
||||
return view()
|
||||
feedback_add_details("admin_verb","PDL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -60,6 +60,7 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/check_ai_laws, //shows AI and borg laws,
|
||||
/client/proc/rename_silicon, //properly renames silicons,
|
||||
/client/proc/manage_silicon_laws, // Allows viewing and editing silicon laws. ,
|
||||
/client/proc/shuttle_panel, // Allows controlling all shuttles remotely.
|
||||
/client/proc/check_antagonists,
|
||||
/client/proc/admin_memo, //admin memo system. show/delete/write. +SERVER needed to delete admin memos of others,
|
||||
/client/proc/dsay, //talk in deadchat using our ckey/fakekey,
|
||||
@@ -105,7 +106,6 @@ var/list/admin_verbs_admin = list(
|
||||
/datum/admins/proc/paralyze_mob,
|
||||
/client/proc/fixatmos,
|
||||
/datum/admins/proc/quick_nif, //VOREStation Add,
|
||||
/datum/admins/proc/quick_authentic_nif, //CHOMPStation add
|
||||
/datum/admins/proc/sendFax,
|
||||
/client/proc/despawn_player,
|
||||
/datum/admins/proc/view_feedback,
|
||||
@@ -360,7 +360,6 @@ var/list/admin_verbs_mod = list(
|
||||
/datum/admins/proc/view_persistent_data,
|
||||
/datum/admins/proc/view_txt_log, //shows the server log (diary) for today,
|
||||
/datum/admins/proc/quick_nif, //CHOMPEdit
|
||||
/datum/admins/proc/quick_authentic_nif, //CHOMPEdit
|
||||
/client/proc/admin_teleport, //CHOMPEdit
|
||||
/datum/admins/proc/view_atk_log //shows the server combat-log, doesn't do anything presently,
|
||||
)
|
||||
@@ -452,6 +451,7 @@ var/list/admin_verbs_event_manager = list(
|
||||
/client/proc/check_ai_laws, //shows AI and borg laws,
|
||||
/client/proc/rename_silicon, //properly renames silicons,
|
||||
/client/proc/manage_silicon_laws, // Allows viewing and editing silicon laws. ,
|
||||
/client/proc/shuttle_panel, // Allows controlling all shuttles remotely.
|
||||
/client/proc/check_antagonists,
|
||||
/client/proc/admin_memo, //admin memo system. show/delete/write. +SERVER needed to delete admin memos of others,
|
||||
/client/proc/dsay, //talk in deadchat using our ckey/fakekey,
|
||||
|
||||
@@ -437,6 +437,17 @@
|
||||
set_security_level(sec_level)
|
||||
log_admin("[key_name(usr)] changed the security level to code [sec_level].")
|
||||
|
||||
/client/proc/shuttle_panel()
|
||||
set name = "Shuttle Control Panel"
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_ADMIN | R_EVENT))
|
||||
return
|
||||
|
||||
var/datum/tgui_module/admin_shuttle_controller/A = new(src)
|
||||
A.tgui_interact(usr)
|
||||
log_and_message_admins("has opened the shuttle panel.")
|
||||
feedback_add_details("admin_verb","SHCP")
|
||||
|
||||
//---- bs12 verbs ----
|
||||
|
||||
@@ -525,4 +536,4 @@
|
||||
T.spell_list += new S
|
||||
feedback_add_details("admin_verb","GS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] gave [key_name(T)] the spell [S].")
|
||||
message_admins("<font color='blue'>[key_name_admin(usr)] gave [key_name(T)] the spell [S].</font>", 1)
|
||||
message_admins("<font color='blue'>[key_name_admin(usr)] gave [key_name(T)] the spell [S].</font>", 1)
|
||||
@@ -1742,16 +1742,20 @@
|
||||
src.admincaster_feed_channel.channel_name = sanitizeSafe(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels )
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_new_title"])
|
||||
src.admincaster_feed_message.title = sanitize(input(usr, "Enter the Feed title", "Network Channel Handler", ""))
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_new_message"])
|
||||
src.admincaster_feed_message.body = sanitize(input(usr, "Write your Feed story", "Network Channel Handler", ""))
|
||||
src.admincaster_feed_message.body = sanitize(input(usr, "Write your Feed story", "Network Channel Handler", "") as message)
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_submit_new_message"])
|
||||
if(src.admincaster_feed_message.body =="" || src.admincaster_feed_message.body =="\[REDACTED\]" || src.admincaster_feed_channel.channel_name == "" )
|
||||
if(src.admincaster_feed_message.body =="" || admincaster_feed_message.title == "" || admincaster_feed_message.body =="\[REDACTED\]" || admincaster_feed_channel.channel_name == "" )
|
||||
src.admincaster_screen = 6
|
||||
else
|
||||
feedback_inc("newscaster_stories",1)
|
||||
news_network.SubmitArticle(src.admincaster_feed_message.body, src.admincaster_signature, src.admincaster_feed_channel.channel_name, null, 1)
|
||||
news_network.SubmitArticle(admincaster_feed_message.body, admincaster_signature, admincaster_feed_channel.channel_name, null, 1, "", admincaster_feed_message.title)
|
||||
src.admincaster_screen=4
|
||||
|
||||
log_admin("[key_name_admin(usr)] submitted a feed story to channel: [src.admincaster_feed_channel.channel_name]!")
|
||||
|
||||
@@ -1,6 +1,25 @@
|
||||
/client/var/datum/admin_help/current_ticket //the current ticket the (usually) not-admin client is dealing with
|
||||
|
||||
//
|
||||
//CHOMPEdit Begin
|
||||
/proc/get_ahelp_channel()
|
||||
var/datum/tgs_api/v5/api = TGS_READ_GLOBAL(tgs)
|
||||
if(istype(api) && config.ahelp_channel_tag)
|
||||
for(var/datum/tgs_chat_channel/channel in api.chat_channels)
|
||||
if(channel.custom_tag == config.ahelp_channel_tag)
|
||||
return list(channel)
|
||||
return 0
|
||||
|
||||
/proc/ahelp_discord_message(var/message)
|
||||
if(!message)
|
||||
return
|
||||
if(config.discord_ahelps_disabled)
|
||||
return
|
||||
var/datum/tgs_chat_channel/ahelp_channel = get_ahelp_channel()
|
||||
if(ahelp_channel)
|
||||
world.TgsChatBroadcast(message,ahelp_channel)
|
||||
else
|
||||
world.TgsTargetedChatBroadcast(message,TRUE)
|
||||
//CHOMPEdit End
|
||||
//TICKET MANAGER
|
||||
//
|
||||
|
||||
@@ -190,9 +209,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
var/list/activemins = adm["present"]
|
||||
var activeMins = activemins.len
|
||||
if(is_bwoink)
|
||||
world.TgsTargetedChatBroadcast("ADMINHELP: FROM: [key_name_admin(usr)] TO [initiator_ckey]/[initiator_key_name] - MSG: **[msg]** - Heard by [activeMins] NON-AFK staff members.", TRUE)
|
||||
ahelp_discord_message("ADMINHELP: FROM: [key_name_admin(usr)] TO [initiator_ckey]/[initiator_key_name] - MSG: **[msg]** - Heard by [activeMins] NON-AFK staff members.") //CHOMPEdit
|
||||
else
|
||||
world.TgsTargetedChatBroadcast("ADMINHELP: FROM: [initiator_ckey]/[initiator_key_name] - MSG: **[msg]** - Heard by [activeMins] NON-AFK staff members.", TRUE)
|
||||
ahelp_discord_message("ADMINHELP: FROM: [initiator_ckey]/[initiator_key_name] - MSG: **[msg]** - Heard by [activeMins] NON-AFK staff members.") //CHOMPEdit
|
||||
//YW EDIT END
|
||||
GLOB.ahelp_tickets.active_tickets += src
|
||||
|
||||
@@ -203,7 +222,10 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
return ..()
|
||||
|
||||
/datum/admin_help/proc/AddInteraction(formatted_message)
|
||||
_interactions += "[gameTimestamp()]: [formatted_message]"
|
||||
var/curinteraction = "[gameTimestamp()]: [formatted_message]"
|
||||
if(config.discord_ahelps_all) //CHOMPEdit
|
||||
ahelp_discord_message("ADMINHELP: TICKETID:[id] [strip_html_properly(curinteraction)]") //CHOMPEdit
|
||||
_interactions += curinteraction
|
||||
|
||||
//private
|
||||
/datum/admin_help/proc/FullMonty(ref_src)
|
||||
|
||||
@@ -92,15 +92,7 @@
|
||||
|
||||
var/new_gender = alert(usr, "Please select gender.", "Character Generation", "Male", "Female", "Neuter")
|
||||
if (new_gender)
|
||||
if(new_gender == "Male")
|
||||
M.gender = MALE
|
||||
M.dna.SetUIState(DNA_UI_GENDER, FALSE)
|
||||
else if (new_gender == "Female")
|
||||
M.gender = FEMALE
|
||||
M.dna.SetUIState(DNA_UI_GENDER, TRUE)
|
||||
else
|
||||
M.gender = NEUTER
|
||||
M.dna.SetUIState(DNA_UI_GENDER, FALSE)
|
||||
M.set_gender(new_gender)
|
||||
|
||||
M.update_dna(M)
|
||||
M.update_hair(FALSE)
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
/datum/admins/proc/quick_authentic_nif()
|
||||
set category = "Fun"
|
||||
set name = "Quick Auth NIF"
|
||||
set desc = "Spawns an authentic NIF into someone in quick-implant mode."
|
||||
|
||||
if(!check_rights(R_ADMIN|R_EVENT|R_DEBUG)) //CHOMPStation Edit TFF 24/4/19: Allow Devs to use Quick-NIF verb.
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = input("Pick a mob with a player","Quick Authentic NIF") as null|anything in player_list
|
||||
|
||||
if(!H)
|
||||
return
|
||||
|
||||
if(!istype(H))
|
||||
to_chat(usr,"<span class='warning'>That mob type ([H.type]) doesn't support NIFs, sorry.</span>")
|
||||
return
|
||||
|
||||
if(!H.get_organ(BP_HEAD))
|
||||
to_chat(usr,"<span class='warning'>Target is unsuitable.</span>")
|
||||
return
|
||||
|
||||
if(H.nif)
|
||||
to_chat(usr,"<span class='warning'>Target already has a NIF.</span>")
|
||||
return
|
||||
|
||||
if(H.species.flags & NO_SCAN)
|
||||
new /obj/item/device/nif/authenticbio(H)
|
||||
else
|
||||
new /obj/item/device/nif/authentic(H)
|
||||
|
||||
log_and_message_admins("[key_name(src)] Quick Authentic NIF'd [H.real_name].")
|
||||
feedback_add_details("admin_verb","QANIF") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -523,6 +523,12 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
new_character.add_language(lang)
|
||||
//VOREStation Add End
|
||||
|
||||
for(var/lang in picked_client.prefs.alternate_languages)
|
||||
var/datum/language/chosen_language = GLOB.all_languages[lang]
|
||||
if(chosen_language)
|
||||
if(is_lang_whitelisted(src,chosen_language) || (new_character.species && (chosen_language.name in new_character.species.secondary_langs)))
|
||||
new_character.add_language(lang)
|
||||
|
||||
//If desired, apply equipment.
|
||||
if(equipment)
|
||||
if(charjob)
|
||||
@@ -629,7 +635,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
message_admins("[key_name_admin(src)] has created a command report", 1)
|
||||
feedback_add_details("admin_verb","CCR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in admin_atom_validate(O)) // I don't understand precisely how this fixes the string matching against a substring, but it does - Ater
|
||||
/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in _validate_atom(O)) // I don't understand precisely how this fixes the string matching against a substring, but it does - Ater
|
||||
set category = "Admin"
|
||||
set name = "Delete"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user