Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-23-10-2025

This commit is contained in:
Roxy
2025-10-23 17:38:23 -04:00
453 changed files with 20635 additions and 15897 deletions
+1 -1
View File
@@ -20,7 +20,7 @@
if(length(user.held_items) < 0 || iscyborg(user) || source.anchored)
return
examine_list += span_smallnotice("You could bind [source.p_they()] to your wrist with a pair of handcuffs...")
examine_list += span_smallnotice("You could bind [source.p_them()] to your wrist with a pair of handcuffs...")
///Give context to players holding a pair of handcuffs when hovering the item
/datum/element/cuffable_item/proc/on_requesting_context_from_item(datum/source, list/context, obj/item/held_item, mob/user)
+3 -2
View File
@@ -27,8 +27,9 @@
for(var/i in user_by_item)
var/mob/living/carbon/user = user_by_item[i]
var/obj/item/organ/ears/ears = user.get_organ_slot(ORGAN_SLOT_EARS)
if(!ears || !ears.damage || (ears.organ_flags & ORGAN_FAILING) || IS_ROBOTIC_ORGAN(ears))
if(!ears || (ears.organ_flags & ORGAN_FAILING) || IS_ROBOTIC_ORGAN(ears))
continue
ears.deaf = max(ears.deaf - 0.25 * seconds_per_tick, (ears.damage < ears.maxHealth ? 0 : 1)) // Do not clear deafness if our ears are too damaged
ears.adjust_temporary_deafness(-0.5 SECONDS * seconds_per_tick)
ears.apply_organ_damage(-0.025 * seconds_per_tick)
CHECK_TICK
+5 -2
View File
@@ -14,8 +14,10 @@
var/table_required
///Verb used in processing food (such as slice, flatten), defaults to process
var/screentip_verb
///Sound to play when the do_after begins
var/sound_to_play
/datum/element/processable/Attach(datum/target, tool_behaviour, result_atom_type, amount_created = 3, time_to_process = 2 SECONDS, table_required = FALSE, screentip_verb = "Process")
/datum/element/processable/Attach(datum/target, tool_behaviour, result_atom_type, amount_created = 3, time_to_process = 2 SECONDS, table_required = FALSE, screentip_verb = "Process", sound_to_play = null)
. = ..()
if(!isatom(target))
return ELEMENT_INCOMPATIBLE
@@ -26,6 +28,7 @@
src.result_atom_type = result_atom_type
src.table_required = table_required
src.screentip_verb = screentip_verb
src.sound_to_play = sound_to_play
var/atom/atom_target = target
atom_target.flags_1 |= HAS_CONTEXTUAL_SCREENTIPS_1
@@ -67,7 +70,7 @@
to_chat(user, span_notice("You cannot make [initial(result_atom_type.name)] here! You need a table or at least a tray."))
return
mutable_recipes += list(list(TOOL_PROCESSING_RESULT = result_atom_type, TOOL_PROCESSING_AMOUNT = amount_created, TOOL_PROCESSING_TIME = time_to_process))
mutable_recipes += list(list(TOOL_PROCESSING_RESULT = result_atom_type, TOOL_PROCESSING_AMOUNT = amount_created, TOOL_PROCESSING_TIME = time_to_process, TOOL_PROCESSING_SOUND = sound_to_play))
///So people know what the frick they're doing without reading from a wiki page (I mean they will inevitably but i'm trying to help, ok?)
/datum/element/processable/proc/OnExamine(atom/source, mob/user, list/examine_list)
+11 -8
View File
@@ -28,15 +28,17 @@
return NONE
var/obj/renamed_obj = interacting_with
var/obj/item/tool = source
if(!(renamed_obj.obj_flags & UNIQUE_RENAME))
if(!(renamed_obj.obj_flags & UNIQUE_RENAME) || !user.can_write(tool))
return NONE
INVOKE_ASYNC(src, PROC_REF(async_rename), user, renamed_obj)
INVOKE_ASYNC(src, PROC_REF(async_rename), user, renamed_obj, !(renamed_obj.obj_flags & RENAME_NO_DESC))
return ITEM_INTERACT_SUCCESS
/datum/element/tool_renaming/proc/async_rename(mob/living/user, obj/renamed_obj)
var/custom_choice = tgui_input_list(user, "What would you like to edit?", "Customization", list(OPTION_RENAME, OPTION_DESCRIPTION, OPTION_RESET))
/datum/element/tool_renaming/proc/async_rename(mob/living/user, obj/renamed_obj, description_option)
if(!renamed_obj.rename_checks(user))
return
var/custom_choice = tgui_input_list(user, "What would you like to edit?", "Customization", list(OPTION_RENAME, description_option? OPTION_DESCRIPTION : null, OPTION_RESET))
if(QDELETED(renamed_obj) || !user.can_perform_action(renamed_obj) || isnull(custom_choice))
return
@@ -49,7 +51,7 @@
if(input == old_name || !input)
to_chat(user, span_notice("You changed [renamed_obj] to... well... [renamed_obj]."))
return
renamed_obj.AddComponent(/datum/component/rename, input, renamed_obj.desc)
renamed_obj.AddComponent(/datum/component/rename, renamed_obj.nameformat(input, user), renamed_obj.desc)
to_chat(user, span_notice("You have successfully renamed \the [old_name] to [renamed_obj]."))
renamed_obj.update_appearance(UPDATE_NAME)
@@ -61,13 +63,14 @@
if(input == old_desc || !input)
to_chat(user, span_notice("You decide against changing [renamed_obj]'s description."))
return
renamed_obj.AddComponent(/datum/component/rename, renamed_obj.name, input)
renamed_obj.AddComponent(/datum/component/rename, renamed_obj.name, renamed_obj.descformat(input, user))
to_chat(user, span_notice("You have successfully changed [renamed_obj]'s description."))
renamed_obj.update_appearance(UPDATE_DESC)
if(OPTION_RESET)
qdel(renamed_obj.GetComponent(/datum/component/rename))
to_chat(user, span_notice("You have successfully reset [renamed_obj]'s name and description."))
to_chat(user, span_notice("You have successfully reset [renamed_obj]'s name[renamed_obj.obj_flags & RENAME_NO_DESC? "." : " and description."]"))
renamed_obj.rename_reset()
renamed_obj.update_appearance(UPDATE_NAME | UPDATE_DESC)
#undef OPTION_RENAME