refactors admin narrate (#7319)

This commit is contained in:
silicons
2025-10-08 23:51:38 +02:00
committed by GitHub
parent 8fedefc9d3
commit f76aeb8f33
35 changed files with 1207 additions and 224 deletions
-13
View File
@@ -836,19 +836,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
if(isturf(loc) && I.obj_storage?.allow_mass_gather && I.obj_storage.allow_mass_gather_via_click)
I.obj_storage.auto_handle_interacted_mass_pickup(new /datum/event_args/actor(user), src)
return CLICKCHAIN_DO_NOT_PROPAGATE | CLICKCHAIN_DID_SOMETHING
if(istype(I, /obj/item/cell) && !isnull(obj_cell_slot) && isnull(obj_cell_slot.cell) && obj_cell_slot.interaction_active(user))
if(!user.transfer_item_to_loc(I, src))
user.action_feedback(SPAN_WARNING("[I] is stuck to your hand!"), src)
return CLICKCHAIN_DO_NOT_PROPAGATE
user.visible_action_feedback(
target = src,
hard_range = obj_cell_slot.remove_is_discrete? 0 : MESSAGE_RANGE_CONSTRUCTION,
visible_hard = SPAN_NOTICE("[user] inserts [I] into [src]."),
audible_hard = SPAN_NOTICE("You hear something being slotted in."),
visible_self = SPAN_NOTICE("You insert [I] into [src]."),
)
obj_cell_slot.insert_cell(I)
return CLICKCHAIN_DO_NOT_PROPAGATE | CLICKCHAIN_DID_SOMETHING
return ..()
/**
+6
View File
@@ -404,6 +404,12 @@
if(!user.transfer_item_to_loc(I, src))
user.action_feedback(SPAN_WARNING("[I] is stuck to your hand!"), src)
return CLICKCHAIN_DO_NOT_PROPAGATE
if(!obj_cell_slot.accepts_cell(I))
user.action_feedback(
SPAN_WARNING("[src] do,es not accept [I]."),
target = src,
)
return CLICKCHAIN_DO_NOT_PROPAGATE
user.visible_action_feedback(
target = src,
hard_range = obj_cell_slot.remove_is_discrete? 0 : MESSAGE_RANGE_CONSTRUCTION,
@@ -0,0 +1,7 @@
//* This file is explicitly licensed under the MIT license. *//
//* Copyright (c) 2025 Citadel Station Developers *//
/obj/structure/closet/admin_resolve_narrate()
. = list()
for(var/mob/target in .)
. += target
+3
View File
@@ -48,6 +48,9 @@
/datum/object_system/cell_slot/proc/accepts_cell(obj/item/cell/cell)
return legacy_use_device_cells? istype(cell, /obj/item/cell/device) : TRUE
// TODO: user_remove_cell && user_insert_cell
// TODO: play sound please & visible message
/**
* removes cell from the system and drops it at new_loc
*/