mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
Merge commit '179a607a90ad7ec62bdaff4e6fe72af60ee56442' of https://github.com/tgstation/tgstation into upstream-24-10b
This commit is contained in:
@@ -320,7 +320,7 @@ ADMIN_VERB(give_mob_action, R_FUN, "Give Mob Action", ADMIN_VERB_NO_DESCRIPTION,
|
||||
if(isnull(ability_melee_cooldown) || ability_melee_cooldown < 0)
|
||||
ability_melee_cooldown = 2
|
||||
add_ability.melee_cooldown_time = ability_melee_cooldown * 1 SECONDS
|
||||
add_ability.name = tgui_input_text(user, "Choose ability name", "Ability name", "Generic Ability")
|
||||
add_ability.name = tgui_input_text(user, "Choose ability name", "Ability name", "Generic Ability", max_length = MAX_NAME_LEN)
|
||||
add_ability.create_sequence_actions()
|
||||
else
|
||||
add_ability = new ability_type(ability_recipient)
|
||||
@@ -523,7 +523,7 @@ ADMIN_VERB(spawn_debug_full_crew, R_DEBUG, "Spawn Debug Full Crew", "Creates a f
|
||||
// Then, spawn a human and slap a person into it.
|
||||
var/number_made = 0
|
||||
for(var/rank in SSjob.name_occupations)
|
||||
var/datum/job/job = SSjob.GetJob(rank)
|
||||
var/datum/job/job = SSjob.get_job(rank)
|
||||
|
||||
// JOB_CREW_MEMBER is all jobs that pretty much aren't silicon
|
||||
if(!(job.job_flags & JOB_CREW_MEMBER))
|
||||
@@ -535,7 +535,7 @@ ADMIN_VERB(spawn_debug_full_crew, R_DEBUG, "Spawn Debug Full Crew", "Creates a f
|
||||
new_guy.mind.name = "[rank] Dummy"
|
||||
|
||||
// Assign the rank to the new player dummy.
|
||||
if(!SSjob.AssignRole(new_guy, job, do_eligibility_checks = FALSE))
|
||||
if(!SSjob.assign_role(new_guy, job, do_eligibility_checks = FALSE))
|
||||
qdel(new_guy)
|
||||
to_chat(user, "[rank] wasn't able to be spawned.")
|
||||
continue
|
||||
@@ -547,7 +547,7 @@ ADMIN_VERB(spawn_debug_full_crew, R_DEBUG, "Spawn Debug Full Crew", "Creates a f
|
||||
qdel(new_guy)
|
||||
|
||||
// Then equip up the human with job gear.
|
||||
SSjob.EquipRank(character, job)
|
||||
SSjob.equip_rank(character, job)
|
||||
job.after_latejoin_spawn(character)
|
||||
|
||||
// Finally, ensure the minds are tracked and in the manifest.
|
||||
|
||||
@@ -78,16 +78,16 @@ GLOBAL_VAR(antag_prototypes)
|
||||
/datum/mind/proc/get_special_statuses()
|
||||
var/list/result = LAZYCOPY(special_statuses)
|
||||
if(!current)
|
||||
result += "<span class='bad'>No body!</span>"
|
||||
result += span_bad("No body!")
|
||||
if(current && HAS_TRAIT(current, TRAIT_MINDSHIELD))
|
||||
result += "<span class='good'>Mindshielded</span>"
|
||||
result += span_good("Mindshielded")
|
||||
if(current && HAS_MIND_TRAIT(current, TRAIT_UNCONVERTABLE))
|
||||
result += "<span class='good'>Unconvertable</span>"
|
||||
result += span_good("Unconvertable")
|
||||
//Move these to mob
|
||||
if(iscyborg(current))
|
||||
var/mob/living/silicon/robot/robot = current
|
||||
if (robot.emagged)
|
||||
result += "<span class='bad'>Emagged</span>"
|
||||
result += span_bad("Emagged")
|
||||
return result.Join(" | ")
|
||||
|
||||
/datum/mind/proc/traitor_panel()
|
||||
@@ -158,7 +158,7 @@ GLOBAL_VAR(antag_prototypes)
|
||||
continue
|
||||
else //Show removal and current one
|
||||
priority_sections |= antag_category
|
||||
antag_header_parts += "<span class='bad'>[current_antag.name]</span>"
|
||||
antag_header_parts += span_bad("[current_antag.name]")
|
||||
antag_header_parts += "<a href='?src=[REF(src)];remove_antag=[REF(current_antag)]'>Remove</a>"
|
||||
antag_header_parts += "<a href='?src=[REF(src)];open_antag_vv=[REF(current_antag)]'>Open VV</a>"
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
drip.vars[slot] = null
|
||||
|
||||
if("rename")
|
||||
var/newname = tgui_input_text(owner, "What do you want to name this outfit?", OUTFIT_EDITOR_NAME)
|
||||
var/newname = tgui_input_text(owner, "What do you want to name this outfit?", OUTFIT_EDITOR_NAME, max_length = MAX_NAME_LEN)
|
||||
if(newname)
|
||||
drip.name = newname
|
||||
if("save")
|
||||
|
||||
@@ -55,7 +55,7 @@ ADMIN_VERB(painting_manager, R_ADMIN, "Paintings Manager", "View and redact pain
|
||||
if("rename")
|
||||
//Modify the metadata
|
||||
var/old_title = chosen_painting.title
|
||||
var/new_title = tgui_input_text(user, "New painting title?", "Painting Rename", chosen_painting.title)
|
||||
var/new_title = tgui_input_text(user, "New painting title?", "Painting Rename", chosen_painting.title, max_length = MAX_NAME_LEN)
|
||||
if(!new_title)
|
||||
return
|
||||
chosen_painting.title = new_title
|
||||
@@ -63,7 +63,7 @@ ADMIN_VERB(painting_manager, R_ADMIN, "Paintings Manager", "View and redact pain
|
||||
return TRUE
|
||||
if("rename_author")
|
||||
var/old_name = chosen_painting.creator_name
|
||||
var/new_name = tgui_input_text(user, "New painting author name?", "Painting Rename", chosen_painting.creator_name)
|
||||
var/new_name = tgui_input_text(user, "New painting author name?", "Painting Rename", chosen_painting.creator_name, max_length = MAX_NAME_LEN)
|
||||
if(!new_name)
|
||||
return
|
||||
chosen_painting.creator_name = new_name
|
||||
@@ -83,7 +83,7 @@ ADMIN_VERB(painting_manager, R_ADMIN, "Paintings Manager", "View and redact pain
|
||||
log_admin("[key_name(user)] has removed tag [params["tag"]] from persistent painting made by [chosen_painting.creator_ckey] with id [chosen_painting.md5].")
|
||||
return TRUE
|
||||
if("add_tag")
|
||||
var/tag_name = tgui_input_text(user, "New tag name?", "Add Tag")
|
||||
var/tag_name = tgui_input_text(user, "New tag name?", "Add Tag", max_length = MAX_NAME_LEN)
|
||||
if(!tag_name)
|
||||
return
|
||||
if(!chosen_painting.tags)
|
||||
|
||||
@@ -222,7 +222,7 @@ ADMIN_VERB(edit_admin_permissions, R_PERMISSIONS, "Permissions Panel", "Edit adm
|
||||
. = ckey(admin_key)
|
||||
if(!.)
|
||||
return FALSE
|
||||
if(!admin_ckey && (. in GLOB.admin_datums+GLOB.deadmins))
|
||||
if(!admin_ckey && (. in (GLOB.admin_datums+GLOB.deadmins)))
|
||||
to_chat(usr, span_danger("[admin_key] is already an admin."), confidential = TRUE)
|
||||
return FALSE
|
||||
if(use_db)
|
||||
|
||||
@@ -28,4 +28,4 @@
|
||||
else
|
||||
card.registered_account.account_balance = card.registered_account.account_balance - new_cost
|
||||
card.registered_account.bank_card_talk("[new_cost] credits deducted from your account based on performance review.")
|
||||
SEND_SOUND(target, 'sound/machines/buzz-sigh.ogg')
|
||||
SEND_SOUND(target, 'sound/machines/buzz/buzz-sigh.ogg')
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#define CHOICE_RANDOM_APPEARANCE "Random"
|
||||
#define CHOICE_PREFS_APPEARANCE "Look-a-like"
|
||||
#define CHOICE_PICK_PLAYER "Pick player"
|
||||
#define CHOICE_POLL_GHOSTS "Offer to ghosts"
|
||||
#define CHOICE_END_THEM "Do it!"
|
||||
#define CHOICE_CANCEL "Cancel"
|
||||
|
||||
/**
|
||||
@@ -15,10 +17,12 @@
|
||||
**/
|
||||
/datum/smite/custom_imaginary_friend
|
||||
name = "Imaginary Friend (Special)"
|
||||
/// Who are we going to add to your head today?
|
||||
var/list/friend_candidates
|
||||
/// Do we randomise friend appearances or not?
|
||||
var/random_appearance
|
||||
/// Are we polling for ghosts
|
||||
var/ghost_polling
|
||||
/// How many imaginary friends should be added when polling
|
||||
var/polled_friend_count
|
||||
|
||||
/datum/smite/custom_imaginary_friend/configure(client/user)
|
||||
var/appearance_choice = tgui_alert(user,
|
||||
@@ -29,69 +33,99 @@
|
||||
return FALSE
|
||||
random_appearance = appearance_choice == CHOICE_RANDOM_APPEARANCE
|
||||
|
||||
var/picked_client = tgui_input_list(user, "Pick the player to put in control", "New Imaginary Friend", list(CHOICE_POLL_GHOSTS) + sort_list(GLOB.clients))
|
||||
if(isnull(picked_client))
|
||||
var/client_selection_choice = tgui_alert(user,
|
||||
"Do you want to pick a specific player, or poll for ghosts?",
|
||||
"Imaginary Friend Selection?",
|
||||
list(CHOICE_PICK_PLAYER, CHOICE_POLL_GHOSTS, CHOICE_CANCEL))
|
||||
|
||||
if(isnull(client_selection_choice) || client_selection_choice == CHOICE_CANCEL)
|
||||
return FALSE
|
||||
ghost_polling = client_selection_choice == CHOICE_POLL_GHOSTS
|
||||
|
||||
if(picked_client == CHOICE_POLL_GHOSTS)
|
||||
return poll_ghosts(user)
|
||||
if(ghost_polling)
|
||||
var/how_many = tgui_input_number(user, "How many imaginary friends should be added?", "Imaginary friend count", default = 1, min_value = 1)
|
||||
if(isnull(how_many) || how_many < 1)
|
||||
return FALSE
|
||||
polled_friend_count = how_many
|
||||
|
||||
var/client/friend_candidate_client = picked_client
|
||||
if(QDELETED(friend_candidate_client))
|
||||
to_chat(user, span_warning("Selected player no longer has a client, aborting."))
|
||||
return FALSE
|
||||
|
||||
if(isliving(friend_candidate_client.mob) && (tgui_alert(user, "This player already has a living mob ([friend_candidate_client.mob]). Do you still want to turn them into an Imaginary Friend?", "Remove player from mob?", list("Do it!", "Cancel")) != "Do it!"))
|
||||
return FALSE
|
||||
|
||||
if(QDELETED(friend_candidate_client))
|
||||
to_chat(user, span_warning("Selected player no longer has a client, aborting."))
|
||||
return FALSE
|
||||
|
||||
friend_candidates = list(friend_candidate_client)
|
||||
return TRUE
|
||||
|
||||
/// Try to offer the role to ghosts
|
||||
/datum/smite/custom_imaginary_friend/proc/poll_ghosts(client/user)
|
||||
var/how_many = tgui_input_number(user, "How many imaginary friends should be added?", "Imaginary friend count", default = 1, min_value = 1)
|
||||
if (isnull(how_many) || how_many < 1)
|
||||
return FALSE
|
||||
|
||||
/// Try to offer the role to ghosts
|
||||
/datum/smite/custom_imaginary_friend/proc/poll_ghosts(client/user, mob/living/target)
|
||||
var/list/volunteers = SSpolling.poll_ghost_candidates(
|
||||
check_jobban = ROLE_PAI,
|
||||
poll_time = 10 SECONDS,
|
||||
ignore_category = POLL_IGNORE_IMAGINARYFRIEND,
|
||||
role_name_text = "imaginary friend",
|
||||
jump_target = target,
|
||||
role_name_text = "an imaginary friend for [target.real_name]",
|
||||
)
|
||||
var/volunteer_count = length(volunteers)
|
||||
if (volunteer_count == 0)
|
||||
if(volunteer_count == 0)
|
||||
to_chat(user, span_warning("No candidates volunteered, aborting."))
|
||||
return FALSE
|
||||
return
|
||||
|
||||
shuffle_inplace(volunteers)
|
||||
friend_candidates = list()
|
||||
while (how_many > 0 && length(volunteers) > 0)
|
||||
var/list/friend_candidates = list()
|
||||
while(polled_friend_count > 0 && length(volunteers) > 0)
|
||||
var/mob/dead/observer/lucky_ghost = pop(volunteers)
|
||||
if (!lucky_ghost.client)
|
||||
continue
|
||||
how_many--
|
||||
polled_friend_count--
|
||||
friend_candidates += lucky_ghost.client
|
||||
return TRUE
|
||||
return friend_candidates
|
||||
|
||||
/// Pick client manually
|
||||
/datum/smite/custom_imaginary_friend/proc/pick_client(client/user)
|
||||
var/picked_client = tgui_input_list(user, "Pick the player to put in control", "New Imaginary Friend", sort_list(GLOB.clients))
|
||||
if(isnull(picked_client))
|
||||
return
|
||||
|
||||
var/client/friend_candidate_client = picked_client
|
||||
if(QDELETED(friend_candidate_client))
|
||||
to_chat(user, span_warning("Selected player no longer has a client, aborting."))
|
||||
return
|
||||
|
||||
if(isliving(friend_candidate_client.mob))
|
||||
var/end_them_choice = tgui_alert(user,
|
||||
"This player already has a living mob ([friend_candidate_client.mob]). Do you still want to turn them into an Imaginary Friend?",
|
||||
"Remove player from mob?",
|
||||
list(CHOICE_END_THEM, CHOICE_CANCEL))
|
||||
if(end_them_choice == CHOICE_CANCEL)
|
||||
return
|
||||
|
||||
if(QDELETED(friend_candidate_client))
|
||||
to_chat(user, span_warning("Selected player no longer has a client, aborting."))
|
||||
return
|
||||
|
||||
return list(friend_candidate_client)
|
||||
|
||||
|
||||
/datum/smite/custom_imaginary_friend/effect(client/user, mob/living/target)
|
||||
. = ..()
|
||||
|
||||
// Run this check before and after polling, we don't wanna poll for something which already stopped existing
|
||||
if(QDELETED(target))
|
||||
to_chat(user, span_warning("The target mob no longer exists, aborting."))
|
||||
return
|
||||
|
||||
var/list/friend_candidates
|
||||
if(ghost_polling)
|
||||
friend_candidates = poll_ghosts(user, target)
|
||||
else
|
||||
friend_candidates = pick_client(user)
|
||||
|
||||
if(QDELETED(target))
|
||||
to_chat(user, span_warning("The target mob no longer exists, aborting."))
|
||||
return
|
||||
|
||||
if(!length(friend_candidates))
|
||||
if(isnull(friend_candidates) || !length(friend_candidates))
|
||||
to_chat(user, span_warning("No provided imaginary friend candidates, aborting."))
|
||||
return
|
||||
|
||||
var/list/final_clients = list()
|
||||
for (var/client/client as anything in friend_candidates)
|
||||
if (QDELETED(client))
|
||||
for(var/client/client as anything in friend_candidates)
|
||||
if(QDELETED(client))
|
||||
continue
|
||||
final_clients += client
|
||||
|
||||
@@ -99,7 +133,7 @@
|
||||
to_chat(user, span_warning("No provided imaginary friend candidates had clients, aborting."))
|
||||
return
|
||||
|
||||
for (var/client/friend_candidate_client as anything in final_clients)
|
||||
for(var/client/friend_candidate_client as anything in final_clients)
|
||||
var/mob/client_mob = friend_candidate_client.mob
|
||||
if(isliving(client_mob))
|
||||
client_mob.ghostize()
|
||||
@@ -114,5 +148,7 @@
|
||||
|
||||
#undef CHOICE_RANDOM_APPEARANCE
|
||||
#undef CHOICE_PREFS_APPEARANCE
|
||||
#undef CHOICE_PICK_PLAYER
|
||||
#undef CHOICE_POLL_GHOSTS
|
||||
#undef CHOICE_END_THEM
|
||||
#undef CHOICE_CANCEL
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
/datum/smite/immerse/effect(client/user, mob/living/target)
|
||||
. = ..()
|
||||
immerse_player(target)
|
||||
SEND_SOUND(target, sound('sound/voice/roleplay.ogg'))
|
||||
SEND_SOUND(target, sound('sound/misc/roleplay.ogg'))
|
||||
to_chat(target, span_boldnotice("Please roleplay appropriately, okay?"))
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/turf/lightning_source = get_step(get_step(user, NORTH), NORTH)
|
||||
lightning_source.Beam(user, icon_state="lightning[rand(1,12)]", time = 5)
|
||||
user.adjustFireLoss(LIGHTNING_BOLT_DAMAGE)
|
||||
playsound(get_turf(user), 'sound/magic/lightningbolt.ogg', 50, TRUE)
|
||||
playsound(get_turf(user), 'sound/effects/magic/lightningbolt.ogg', 50, TRUE)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/human_target = user
|
||||
human_target.electrocution_animation(LIGHTNING_BOLT_ELECTROCUTION_ANIMATION_LENGTH)
|
||||
|
||||
@@ -16,6 +16,6 @@
|
||||
if (limb.body_part == HEAD || limb.body_part == CHEST)
|
||||
continue
|
||||
addtimer(CALLBACK(limb, TYPE_PROC_REF(/obj/item/bodypart/, dismember)), timer)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(playsound), carbon_target, 'sound/effects/cartoon_pop.ogg', 70), timer)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(playsound), carbon_target, 'sound/effects/cartoon_sfx/cartoon_pop.ogg', 70), timer)
|
||||
addtimer(CALLBACK(carbon_target, TYPE_PROC_REF(/mob/living/, spin), 4, 1), timer - 0.4 SECONDS)
|
||||
timer += 2 SECONDS
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
return
|
||||
var/mob/user = usr
|
||||
if(href_list["edit_label"])
|
||||
var/new_label = tgui_input_text(user, "Choose a new label", "Sound Emitter")
|
||||
var/new_label = tgui_input_text(user, "Choose a new label", "Sound Emitter", max_length = MAX_NAME_LEN)
|
||||
if(!new_label)
|
||||
return
|
||||
maptext = MAPTEXT(new_label)
|
||||
|
||||
@@ -32,7 +32,7 @@ ADMIN_VERB(unprison, R_ADMIN, "UnPrison", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEG
|
||||
tgui_alert(user, "[prisoner.name] is not prisoned.")
|
||||
return
|
||||
|
||||
SSjob.SendToLateJoin(prisoner)
|
||||
SSjob.send_to_late_join(prisoner)
|
||||
message_admins("[key_name_admin(user)] has unprisoned [key_name_admin(prisoner)]")
|
||||
log_admin("[key_name(user)] has unprisoned [key_name(prisoner)]")
|
||||
BLACKBOX_LOG_ADMIN_VERB("Unprison")
|
||||
|
||||
@@ -234,14 +234,14 @@ ADMIN_VERB(access_news_network, R_ADMIN, "Access Newscaster Network", "Allows yo
|
||||
return TRUE
|
||||
|
||||
if("setCriminalName")
|
||||
var/temp_name = tgui_input_text(usr, "Write the Criminal's Name", "Warrent Alert Handler", "John Doe", MAX_NAME_LEN, multiline = FALSE)
|
||||
var/temp_name = tgui_input_text(usr, "Write the Criminal's Name", "Warrent Alert Handler", "John Doe", max_length = MAX_NAME_LEN, multiline = FALSE)
|
||||
if(!temp_name)
|
||||
return TRUE
|
||||
criminal_name = temp_name
|
||||
return TRUE
|
||||
|
||||
if("setCrimeData")
|
||||
var/temp_desc = tgui_input_text(usr, "Write the Criminal's Crimes", "Warrent Alert Handler", "Unknown", MAX_BROADCAST_LEN, multiline = TRUE)
|
||||
var/temp_desc = tgui_input_text(usr, "Write the Criminal's Crimes", "Warrent Alert Handler", "Unknown", max_length = MAX_BROADCAST_LEN, multiline = TRUE)
|
||||
if(!temp_desc)
|
||||
return TRUE
|
||||
crime_description = temp_desc
|
||||
@@ -339,7 +339,7 @@ ADMIN_VERB(access_news_network, R_ADMIN, "Access Newscaster Network", "Allows yo
|
||||
if(channel_name == potential_channel.channel_ID)
|
||||
current_channel = potential_channel
|
||||
break
|
||||
var/temp_message = tgui_input_text(usr, "Write your Feed story", "Network Channel Handler", feed_channel_message, multiline = TRUE)
|
||||
var/temp_message = tgui_input_text(usr, "Write your Feed story", "Network Channel Handler", feed_channel_message, max_length = MAX_BROADCAST_LEN, multiline = TRUE)
|
||||
if(length(temp_message) <= 1)
|
||||
return TRUE
|
||||
if(temp_message)
|
||||
|
||||
@@ -269,13 +269,21 @@ ADMIN_VERB(command_report_footnote, R_ADMIN, "Command Report Footnote", "Adds a
|
||||
var/datum/command_footnote/command_report_footnote = new /datum/command_footnote()
|
||||
GLOB.communications_controller.block_command_report += 1 //Add a blocking condition to the counter until the inputs are done.
|
||||
|
||||
command_report_footnote.message = tgui_input_text(user, "This message will be attached to the bottom of the roundstart threat report. Be sure to delay the roundstart report if you need extra time.", "P.S.")
|
||||
command_report_footnote.message = tgui_input_text(
|
||||
user,
|
||||
"This message will be attached to the bottom of the roundstart threat report. Be sure to delay the roundstart report if you need extra time.",
|
||||
"P.S.",
|
||||
)
|
||||
if(!command_report_footnote.message)
|
||||
GLOB.communications_controller.block_command_report -= 1
|
||||
qdel(command_report_footnote)
|
||||
return
|
||||
|
||||
command_report_footnote.signature = tgui_input_text(user, "Whose signature will appear on this footnote?", "Also sign here, here, aaand here.")
|
||||
command_report_footnote.signature = tgui_input_text(
|
||||
user,
|
||||
"Whose signature will appear on this footnote?",
|
||||
"Also sign here, here, aaand here.",
|
||||
)
|
||||
|
||||
if(!command_report_footnote.signature)
|
||||
command_report_footnote.signature = "Classified"
|
||||
|
||||
@@ -147,7 +147,7 @@ ADMIN_VERB(polymorph_all, R_ADMIN, "Polymorph All", "Applies the effects of the
|
||||
continue
|
||||
|
||||
M.audible_message(span_hear("...wabbajack...wabbajack..."))
|
||||
playsound(M.loc, 'sound/magic/staff_change.ogg', 50, TRUE, -1)
|
||||
playsound(M.loc, 'sound/effects/magic/staff_change.ogg', 50, TRUE, -1)
|
||||
|
||||
M.wabbajack()
|
||||
|
||||
@@ -187,7 +187,7 @@ ADMIN_VERB_AND_CONTEXT_MENU(admin_smite, R_ADMIN|R_FUN, "Smite", "Smite a player
|
||||
/proc/firing_squad(mob/living/carbon/target, turf/source_turf, body_zone, wound_bonus, damage)
|
||||
if(!target.get_bodypart(body_zone))
|
||||
return
|
||||
playsound(target, 'sound/weapons/gun/revolver/shot.ogg', 100)
|
||||
playsound(target, 'sound/items/weapons/gun/revolver/shot.ogg', 100)
|
||||
var/obj/projectile/bullet/smite/divine_wrath = new(source_turf)
|
||||
divine_wrath.damage = damage
|
||||
divine_wrath.wound_bonus = wound_bonus
|
||||
|
||||
@@ -173,20 +173,24 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_ADMIN, "Show Player Panel", mo
|
||||
user << browse(body, "window=adminplayeropts-[REF(player)];size=550x515")
|
||||
BLACKBOX_LOG_ADMIN_VERB("Player Panel")
|
||||
|
||||
/client/proc/cmd_admin_godmode(mob/M in GLOB.mob_list)
|
||||
/client/proc/cmd_admin_godmode(mob/mob in GLOB.mob_list)
|
||||
set category = "Admin.Game"
|
||||
set name = "Godmode"
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
M.status_flags ^= GODMODE
|
||||
to_chat(usr, span_adminnotice("Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]"), confidential = TRUE)
|
||||
var/had_trait = HAS_TRAIT_FROM(mob, TRAIT_GODMODE, ADMIN_TRAIT)
|
||||
if(had_trait)
|
||||
REMOVE_TRAIT(mob, TRAIT_GODMODE, ADMIN_TRAIT)
|
||||
else
|
||||
ADD_TRAIT(mob, TRAIT_GODMODE, ADMIN_TRAIT)
|
||||
to_chat(usr, span_adminnotice("Toggled [had_trait ? "OFF" : "ON"]"), confidential = TRUE)
|
||||
|
||||
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]")
|
||||
var/msg = "[key_name_admin(usr)] has toggled [ADMIN_LOOKUPFLW(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]"
|
||||
log_admin("[key_name(usr)] has toggled [key_name(mob)]'s nodamage to [had_trait ? "Off" : "On"]")
|
||||
var/msg = "[key_name_admin(usr)] has toggled [ADMIN_LOOKUPFLW(mob)]'s nodamage to [had_trait ? "Off" : "On"]"
|
||||
message_admins(msg)
|
||||
admin_ticket_log(M, msg)
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Godmode", "[M.status_flags & GODMODE ? "Enabled" : "Disabled"]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
|
||||
admin_ticket_log(mob, msg)
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Godmode", "[had_trait ? "Disabled" : "Enabled"]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
|
||||
|
||||
/*
|
||||
If a guy was gibbed and you want to revive him, this is a good way to do so.
|
||||
@@ -213,7 +217,7 @@ ADMIN_VERB(respawn_character, R_ADMIN, "Respawn Character", "Respawn a player th
|
||||
if(findtext(G_found.real_name,"monkey"))
|
||||
if(tgui_alert(user,"This character appears to have been a monkey. Would you like to respawn them as such?",,list("Yes","No")) == "Yes")
|
||||
var/mob/living/carbon/human/species/monkey/new_monkey = new
|
||||
SSjob.SendToLateJoin(new_monkey)
|
||||
SSjob.send_to_late_join(new_monkey)
|
||||
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
|
||||
new_monkey.key = G_found.key
|
||||
to_chat(new_monkey, "You have been fully respawned. Enjoy the game.", confidential = TRUE)
|
||||
@@ -225,7 +229,7 @@ ADMIN_VERB(respawn_character, R_ADMIN, "Respawn Character", "Respawn a player th
|
||||
|
||||
//Ok, it's not a monkey. So, spawn a human.
|
||||
var/mob/living/carbon/human/new_character = new//The mob being spawned.
|
||||
SSjob.SendToLateJoin(new_character)
|
||||
SSjob.send_to_late_join(new_character)
|
||||
|
||||
var/datum/record/locked/record_found //Referenced to later to either randomize or not randomize the character.
|
||||
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
|
||||
@@ -248,7 +252,7 @@ ADMIN_VERB(respawn_character, R_ADMIN, "Respawn Character", "Respawn a player th
|
||||
else
|
||||
new_character.mind_initialize()
|
||||
if(is_unassigned_job(new_character.mind.assigned_role))
|
||||
new_character.mind.set_assigned_role(SSjob.GetJobType(SSjob.overflow_role))
|
||||
new_character.mind.set_assigned_role(SSjob.get_job_type(SSjob.overflow_role))
|
||||
|
||||
new_character.key = G_found.key
|
||||
|
||||
@@ -265,7 +269,7 @@ ADMIN_VERB(respawn_character, R_ADMIN, "Respawn Character", "Respawn a player th
|
||||
//Now for special roles and equipment.
|
||||
var/datum/antagonist/traitor/traitordatum = new_character.mind.has_antag_datum(/datum/antagonist/traitor)
|
||||
if(traitordatum)
|
||||
SSjob.EquipRank(new_character, new_character.mind.assigned_role, new_character.client)
|
||||
SSjob.equip_rank(new_character, new_character.mind.assigned_role, new_character.client)
|
||||
new_character.mind.give_uplink(silent = TRUE, antag_datum = traitordatum)
|
||||
|
||||
switch(new_character.mind.special_role)
|
||||
@@ -294,7 +298,7 @@ ADMIN_VERB(respawn_character, R_ADMIN, "Respawn Character", "Respawn a player th
|
||||
new_character = new_character.AIize()
|
||||
else
|
||||
if(!traitordatum) // Already equipped there.
|
||||
SSjob.EquipRank(new_character, new_character.mind.assigned_role, new_character.client)//Or we simply equip them.
|
||||
SSjob.equip_rank(new_character, new_character.mind.assigned_role, new_character.client)//Or we simply equip them.
|
||||
|
||||
//Announces the character on all the systems, based on the record.
|
||||
if(!record_found && (new_character.mind.assigned_role.job_flags & JOB_CREW_MEMBER))
|
||||
|
||||
@@ -103,7 +103,7 @@ ADMIN_VERB(cmd_admin_pm_panel, R_NONE, "Admin PM", "Show a list of clients to PM
|
||||
if(length(recipient_interactions) == 1)
|
||||
if(length(opening_interactions)) // Inform the admin that they aren't the first
|
||||
var/printable_interators = english_list(opening_interactions)
|
||||
SEND_SOUND(src, sound('sound/machines/buzz-sigh.ogg', volume=30))
|
||||
SEND_SOUND(src, sound('sound/machines/buzz/buzz-sigh.ogg', volume=30))
|
||||
message_prompt += "\n\n**This ticket is already being responded to by: [printable_interators]**"
|
||||
// add the admin who is currently responding to the list of people responding
|
||||
LAZYADD(recipient_ticket.opening_responders, src)
|
||||
|
||||
@@ -36,7 +36,7 @@ GLOBAL_DATUM(triple_ai_controller, /datum/triple_ai_controller)
|
||||
to_chat(usr, "This option is currently only usable during pregame. This may change at a later date.", confidential = TRUE)
|
||||
return
|
||||
|
||||
var/datum/job/job = SSjob.GetJobType(/datum/job/ai)
|
||||
var/datum/job/job = SSjob.get_job_type(/datum/job/ai)
|
||||
if(!job)
|
||||
to_chat(usr, "Unable to locate the AI job", confidential = TRUE)
|
||||
CRASH("triple_ai() called, no /datum/job/ai to be found.")
|
||||
|
||||
@@ -268,7 +268,7 @@ GLOBAL_DATUM(current_anonymous_theme, /datum/anonymous_theme)
|
||||
set_station_name("[pick(GLOB.first_names)] [pick(GLOB.last_names)]")
|
||||
|
||||
/datum/anonymous_theme/station/announce_to_all_players()
|
||||
priority_announce("Confirmed level 9 reality error event near [station_name()]. All personnel must try their best to carry on, as to not trigger more reality events by accident.", "Central Command Higher Dimensional Affairs", 'sound/misc/notice1.ogg')
|
||||
priority_announce("Confirmed level 9 reality error event near [station_name()]. All personnel must try their best to carry on, as to not trigger more reality events by accident.", "Central Command Higher Dimensional Affairs", 'sound/announcer/notice/notice1.ogg')
|
||||
|
||||
/datum/anonymous_theme/station/anonymous_name(mob/target)
|
||||
return new_station_name()
|
||||
|
||||
@@ -27,5 +27,5 @@ ADMIN_VERB(change_shuttle_events, R_ADMIN|R_FUN, "Change Shuttle Events", "Chang
|
||||
port.event_list.Remove(active[options[result]])
|
||||
message_admins("[key_name_admin(user)] has removed '[active[result]]' from [port].")
|
||||
else
|
||||
port.event_list.Add(new typepath (port))
|
||||
message_admins("[key_name_admin(user)] has added '[typepath]' to [port].")
|
||||
port.add_shuttle_event(typepath)
|
||||
|
||||
@@ -583,8 +583,8 @@ ADMIN_VERB(jump_to_ruin, R_DEBUG, "Jump to Ruin", "Displays a list of all placed
|
||||
return
|
||||
var/datum/map_template/ruin/template = landmark.ruin_template
|
||||
user.mob.forceMove(get_turf(landmark))
|
||||
to_chat(user, span_name("[template.name]"), confidential = TRUE)
|
||||
to_chat(user, "<span class='italics'>[template.description]</span>", confidential = TRUE)
|
||||
to_chat(user, span_name(template.name), confidential = TRUE)
|
||||
to_chat(user, span_italics(template.description), confidential = TRUE)
|
||||
|
||||
ADMIN_VERB_VISIBILITY(place_ruin, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
|
||||
ADMIN_VERB(place_ruin, R_DEBUG, "Spawn Ruin", "Attempt to randomly place a specific ruin.", ADMIN_CATEGORY_MAPPING)
|
||||
@@ -625,7 +625,7 @@ ADMIN_VERB(place_ruin, R_DEBUG, "Spawn Ruin", "Attempt to randomly place a speci
|
||||
log_admin("[key_name(user)] randomly spawned ruin [ruinname] at [COORD(landmark)].")
|
||||
user.mob.forceMove(get_turf(landmark))
|
||||
to_chat(user, span_name("[template.name]"), confidential = TRUE)
|
||||
to_chat(user, "<span class='italics'>[template.description]</span>", confidential = TRUE)
|
||||
to_chat(user, span_italics("[template.description]"), confidential = TRUE)
|
||||
else
|
||||
to_chat(user, span_warning("Failed to place [template.name]."), confidential = TRUE)
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
ert_antag.random_names = ertemplate.random_names
|
||||
|
||||
ert_operative.mind.add_antag_datum(ert_antag,ert_team)
|
||||
ert_operative.mind.set_assigned_role(SSjob.GetJobType(ert_antag.ert_job_path))
|
||||
ert_operative.mind.set_assigned_role(SSjob.get_job_type(ert_antag.ert_job_path))
|
||||
|
||||
//Logging and cleanup
|
||||
ert_operative.log_message("has been selected as \a [ert_antag.name].", LOG_GAME)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
// This is necessary because list propererties are not defined until initialization
|
||||
picked_infusion = infusions[picked_infusion]
|
||||
picked_infusion = new picked_infusion
|
||||
picked_infusion = new picked_infusion()
|
||||
|
||||
if(!length(picked_infusion.output_organs))
|
||||
return FALSE
|
||||
@@ -27,7 +27,8 @@
|
||||
. = picked_infusion
|
||||
for(var/obj/item/organ/infusion_organ as anything in picked_infusion.output_organs)
|
||||
var/obj/item/organ/new_organ = new infusion_organ()
|
||||
if(!new_organ.replace_into(target))
|
||||
new_organ.replace_into(target)
|
||||
if(new_organ.owner != target)
|
||||
to_chat(usr, span_notice("[target] is unable to carry [new_organ]!"))
|
||||
qdel(new_organ)
|
||||
. = FALSE
|
||||
|
||||
@@ -24,7 +24,7 @@ ADMIN_VERB(law_panel, R_ADMIN, "Law Panel", "View the AI laws.", ADMIN_CATEGORY_
|
||||
var/lawtype = tgui_input_list(user, "Select law type", "Law type", lawtypes)
|
||||
if(isnull(lawtype))
|
||||
return FALSE
|
||||
var/lawtext = tgui_input_text(user, "Input law text", "Law text")
|
||||
var/lawtext = tgui_input_text(user, "Input law text", "Law text") // admin verb so no max length and also any user-level input is config based already so ehhhh
|
||||
if(!lawtext)
|
||||
return FALSE
|
||||
if(QDELETED(src) || QDELETED(borgo))
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
|
||||
ADMIN_VERB(force_random_rotate, R_SERVER, "Trigger 'Random' Map Rotation", "Force a map vote.", ADMIN_CATEGORY_SERVER)
|
||||
var/rotate = tgui_alert(user,"Force a random map rotation to trigger?", "Rotate map?", list("Yes", "Cancel"))
|
||||
if (rotate != "Yes")
|
||||
return
|
||||
message_admins("[key_name_admin(user)] is forcing a random map rotation.")
|
||||
log_admin("[key_name(user)] is forcing a random map rotation.")
|
||||
SSmapping.maprotate()
|
||||
|
||||
ADMIN_VERB(admin_change_map, R_SERVER, "Change Map", "Set the next map.", ADMIN_CATEGORY_SERVER)
|
||||
var/list/maprotatechoices = list()
|
||||
for (var/map in config.maplist)
|
||||
@@ -119,14 +110,14 @@ ADMIN_VERB(admin_change_map, R_SERVER, "Change Map", "Set the next map.", ADMIN_
|
||||
fdel(PATH_TO_NEXT_MAP_JSON)
|
||||
text2file(json_encode(json_value), PATH_TO_NEXT_MAP_JSON)
|
||||
|
||||
if(SSmapping.changemap(virtual_map))
|
||||
if(SSmap_vote.set_next_map(virtual_map))
|
||||
message_admins("[key_name_admin(user)] has changed the map to [virtual_map.map_name]")
|
||||
SSmapping.map_force_chosen = TRUE
|
||||
SSmap_vote.admin_override = TRUE
|
||||
fdel("data/custom_map_json/[config_file]")
|
||||
else
|
||||
var/datum/map_config/virtual_map = maprotatechoices[chosenmap]
|
||||
message_admins("[key_name_admin(user)] is changing the map to [virtual_map.map_name]")
|
||||
log_admin("[key_name(user)] is changing the map to [virtual_map.map_name]")
|
||||
if (SSmapping.changemap(virtual_map))
|
||||
if (SSmap_vote.set_next_map(virtual_map))
|
||||
message_admins("[key_name_admin(user)] has changed the map to [virtual_map.map_name]")
|
||||
SSmapping.map_force_chosen = TRUE
|
||||
SSmap_vote.admin_override = TRUE
|
||||
|
||||
@@ -84,7 +84,7 @@ ADMIN_VERB(secrets, R_NONE, "Secrets", "Abuse harder than you ever have before w
|
||||
if("infinite_sec")
|
||||
if(!is_debugger)
|
||||
return
|
||||
var/datum/job/sec_job = SSjob.GetJobType(/datum/job/security_officer)
|
||||
var/datum/job/sec_job = SSjob.get_job_type(/datum/job/security_officer)
|
||||
sec_job.total_positions = -1
|
||||
sec_job.spawn_positions = -1
|
||||
message_admins("[key_name_admin(holder)] has removed the cap on security officers.")
|
||||
@@ -648,12 +648,12 @@ ADMIN_VERB(secrets, R_NONE, "Secrets", "Abuse harder than you ever have before w
|
||||
/proc/portalAnnounce(announcement, playlightning)
|
||||
set waitfor = FALSE
|
||||
if (playlightning)
|
||||
sound_to_playing_players('sound/magic/lightning_chargeup.ogg')
|
||||
sound_to_playing_players('sound/effects/magic/lightning_chargeup.ogg')
|
||||
sleep(8 SECONDS)
|
||||
priority_announce(replacetext(announcement, "%STATION%", station_name()))
|
||||
if (playlightning)
|
||||
sleep(2 SECONDS)
|
||||
sound_to_playing_players('sound/magic/lightningbolt.ogg')
|
||||
sound_to_playing_players('sound/effects/magic/lightningbolt.ogg')
|
||||
|
||||
/// Spawns a portal storm that spawns in sentient/non sentient mobs
|
||||
/// portal_appearance is a list in the form (turf's plane offset + 1) -> appearance to use
|
||||
@@ -671,7 +671,7 @@ ADMIN_VERB(secrets, R_NONE, "Secrets", "Abuse harder than you ever have before w
|
||||
H.equipOutfit(humanoutfit)
|
||||
var/turf/T = get_step(loc, SOUTHWEST)
|
||||
T.flick_overlay_static(portal_appearance[GET_TURF_PLANE_OFFSET(T) + 1], 15)
|
||||
playsound(T, 'sound/magic/lightningbolt.ogg', rand(80, 100), TRUE)
|
||||
playsound(T, 'sound/effects/magic/lightningbolt.ogg', rand(80, 100), TRUE)
|
||||
|
||||
/datum/everyone_is_an_antag_controller
|
||||
var/chosen_antag = ""
|
||||
|
||||
@@ -98,7 +98,7 @@ ADMIN_VERB(start_now, R_SERVER, "Start Now", "Start the round RIGHT NOW.", ADMIN
|
||||
SSticker.start_immediately = FALSE
|
||||
SSticker.SetTimeLeft(3 MINUTES)
|
||||
to_chat(world, span_big(span_notice("The game will start in 3 minutes.")))
|
||||
SEND_SOUND(world, sound('sound/ai/default/attention.ogg'))
|
||||
SEND_SOUND(world, sound('sound/announcer/default/attention.ogg'))
|
||||
message_admins(span_adminnotice("[key_name_admin(user)] has cancelled immediate game start. Game will start in 3 minutes."))
|
||||
log_admin("[key_name(user)] has cancelled immediate game start.")
|
||||
return
|
||||
@@ -203,11 +203,11 @@ ADMIN_VERB(delay, R_SERVER, "Delay Pre-Game", "Delay the game start.", ADMIN_CAT
|
||||
SSticker.SetTimeLeft(newtime)
|
||||
SSticker.start_immediately = FALSE
|
||||
if(newtime < 0)
|
||||
to_chat(world, "<span class='infoplain'><b>The game start has been delayed.</b></span>", confidential = TRUE)
|
||||
to_chat(world, span_infoplain("<b>The game start has been delayed.</b>"), confidential = TRUE)
|
||||
log_admin("[key_name(user)] delayed the round start.")
|
||||
else
|
||||
to_chat(world, span_infoplain(span_bold("The game will start in [DisplayTimeText(newtime)].")), confidential = TRUE)
|
||||
SEND_SOUND(world, sound('sound/ai/default/attention.ogg'))
|
||||
SEND_SOUND(world, sound('sound/announcer/default/attention.ogg'))
|
||||
log_admin("[key_name(user)] set the pre-game delay to [DisplayTimeText(newtime)].")
|
||||
BLACKBOX_LOG_ADMIN_VERB("Delay Game Start")
|
||||
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
// can't use the name either for byond reasons
|
||||
var/_vis_flags
|
||||
|
||||
#if (MIN_COMPILER_VERSION > 515 || MIN_COMPILER_BUILD > 1643)
|
||||
#warn vis_flags should now be supported by mutable appearances so we can safely remove the weird copying in this code
|
||||
#endif
|
||||
// all alone at the end of the universe
|
||||
GLOBAL_DATUM_INIT(pluto, /atom/movable, new /atom/movable(null))
|
||||
|
||||
@@ -63,6 +66,13 @@ GLOBAL_DATUM_INIT(pluto, /atom/movable, new /atom/movable(null))
|
||||
return FALSE
|
||||
if(var_name == NAMEOF(src, realized_underlays))
|
||||
return FALSE
|
||||
|
||||
#if (MIN_COMPILER_VERSION >= 515 && MIN_COMPILER_BUILD >= 1643)
|
||||
#warn X/Y/Z and contents are now fully unviewable on our supported versions, remove the below check
|
||||
#endif
|
||||
|
||||
// lummy removed these from the the MA/image type
|
||||
#if (DM_VERSION <= 515 && DM_BUILD < 1643)
|
||||
// Filtering out the stuff I know we don't care about
|
||||
if(var_name == NAMEOF(src, x))
|
||||
return FALSE
|
||||
@@ -70,13 +80,14 @@ GLOBAL_DATUM_INIT(pluto, /atom/movable, new /atom/movable(null))
|
||||
return FALSE
|
||||
if(var_name == NAMEOF(src, z))
|
||||
return FALSE
|
||||
// Could make an argument for these but I think they will just confuse people, so yeeet
|
||||
#ifndef SPACEMAN_DMM // Spaceman doesn't believe in contents on appearances, sorry lads
|
||||
#ifndef SPACEMAN_DMM // Spaceman doesn't believe in contents on appearances, sorry lads
|
||||
if(var_name == NAMEOF(src, contents))
|
||||
return FALSE
|
||||
#endif
|
||||
#endif
|
||||
if(var_name == NAMEOF(src, loc))
|
||||
return FALSE
|
||||
#endif
|
||||
// Could make an argument for this but I think they will just confuse people, so yeeet
|
||||
if(var_name == NAMEOF(src, vis_contents))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(debug_variables, R_NONE, "View Variables", "View the variables of a datum.", ADMIN_CATEGORY_DEBUG, datum/thing in world)
|
||||
user.debug_variables(thing)
|
||||
// This is kept as a seperate proc because admins are able to show VV to non-admins
|
||||
// This is kept as a separate proc because admins are able to show VV to non-admins
|
||||
|
||||
/client/proc/debug_variables(datum/thing in world)
|
||||
set category = "Debug"
|
||||
@@ -23,7 +23,7 @@ ADMIN_VERB_AND_CONTEXT_MENU(debug_variables, R_NONE, "View Variables", "View the
|
||||
|
||||
if(isappearance(thing))
|
||||
thing = get_vv_appearance(thing) // this is /mutable_appearance/our_bs_subtype
|
||||
var/islist = islist(thing) || (!isdatum(thing) && hascall(thing, "Cut")) // Some special lists dont count as lists, but can be detected by if they have list procs
|
||||
var/islist = islist(thing) || (!isdatum(thing) && hascall(thing, "Cut")) // Some special lists don't count as lists, but can be detected by if they have list procs
|
||||
if(!islist && !isdatum(thing))
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user