TG Signal Port (#18741)

* click code start

* snake_span

* Update click.dm

* Update click.dm

* Update click.dm

* WIP signal organization

* Moooore signals

* cuffs

* decon

* whoops

* revert this

* Proper name

* movable moved

* These

* Theeese

* Sort these

* Update cyborg.dm
This commit is contained in:
Cameron Lennox
2025-12-09 17:50:52 -05:00
committed by GitHub
parent b73ce78164
commit 7ff489ec36
185 changed files with 4359 additions and 1299 deletions
+1 -1
View File
@@ -450,7 +450,7 @@
// called just as an item is picked up (loc is not yet changed)
/obj/item/proc/pickup(mob/user)
SEND_SIGNAL(src, COMSIG_ITEM_PICKUP, user)
SEND_SIGNAL(user, COMSIG_PICKED_UP_ITEM, src)
SEND_SIGNAL(user, COMSIG_ITEM_PICKUP, src)
pixel_x = 0
pixel_y = 0
return
@@ -349,7 +349,7 @@
video_source = comm.camera
comm.visible_message(span_danger("[icon2html(src,viewers(src))] New video connection from [comm]."))
update_active_camera_screen()
RegisterSignal(video_source, COMSIG_OBSERVER_MOVED, PROC_REF(update_active_camera_screen))
RegisterSignal(video_source, COMSIG_MOVABLE_ATTEMPTED_MOVE, PROC_REF(update_active_camera_screen))
video_source.AddComponent(/datum/component/recursive_move)
update_icon()
@@ -357,7 +357,7 @@
// Parameters: reason - the text reason to print for why it ended
// Description: Ends the video call by clearing video_source
/obj/item/communicator/proc/end_video(var/reason)
UnregisterSignal(video_source, COMSIG_OBSERVER_MOVED)
UnregisterSignal(video_source, COMSIG_MOVABLE_ATTEMPTED_MOVE)
show_static()
video_source = null
+1 -1
View File
@@ -64,7 +64,7 @@
/obj/item/defib_kit/attack_hand(mob/living/user)
// See important note in tethered_item.dm
if(SEND_SIGNAL(src,COMSIG_ITEM_ATTACK_SELF,user) & COMPONENT_NO_INTERACT)
if(SEND_SIGNAL(src,COMSIG_ITEM_ATTACK_SELF,user) & COMPONENT_CANCEL_ATTACK_CHAIN)
return TRUE
. = ..()
+2 -2
View File
@@ -40,14 +40,14 @@ GLOBAL_LIST_EMPTY(GPS_list)
/obj/item/gps/proc/update_holder()
if(holder && loc != holder)
UnregisterSignal(holder, COMSIG_OBSERVER_MOVED)
UnregisterSignal(holder, COMSIG_MOVABLE_ATTEMPTED_MOVE)
//GLOB.dir_set_event.unregister(holder, src)
holder.client?.screen -= compass
holder = null
if(istype(loc, /mob))
holder = loc
RegisterSignal(holder, COMSIG_OBSERVER_MOVED, PROC_REF(update_compass), override = TRUE)
RegisterSignal(holder, COMSIG_MOVABLE_ATTEMPTED_MOVE, PROC_REF(update_compass), override = TRUE)
holder.AddComponent(/datum/component/recursive_move)
//GLOB.dir_set_event.register(holder, src, PROC_REF(update_compass))
@@ -18,7 +18,7 @@
/obj/item/bluespaceradio/attack_hand(mob/living/user)
// See important note in tethered_item.dm
if(SEND_SIGNAL(src,COMSIG_ITEM_ATTACK_SELF,user) & COMPONENT_NO_INTERACT)
if(SEND_SIGNAL(src,COMSIG_ITEM_ATTACK_SELF,user) & COMPONENT_CANCEL_ATTACK_CHAIN)
return TRUE
. = ..()
+1 -1
View File
@@ -154,7 +154,7 @@
/obj/item/tvcamera/proc/update_feed()
if(camera.status)
SEND_SIGNAL(camera, COMSIG_OBSERVER_MOVED) // Forward the movement signal
SEND_SIGNAL(camera, COMSIG_MOVABLE_ATTEMPTED_MOVE) // Forward the movement signal
//Assembly by roboticist
+25 -22
View File
@@ -36,17 +36,17 @@
if ((CLUMSY in user.mutations) && prob(50))
to_chat(user, span_warning("Uh ... how do those things work?!"))
place_handcuffs(user, user)
attempt_to_cuff(user, user)
return
if(!C.handcuffed)
if (C == user)
place_handcuffs(user, user)
attempt_to_cuff(user, user)
return
//check for an aggressive grab (or robutts)
if(can_place(C, user))
place_handcuffs(C, user)
attempt_to_cuff(C, user)
else
to_chat(user, span_danger("You need to have a firm grip on [C] before you can put \the [src] on!"))
@@ -62,36 +62,39 @@
return 1
return 0
/obj/item/handcuffs/proc/place_handcuffs(var/mob/living/carbon/target, var/mob/user)
/obj/item/handcuffs/proc/attempt_to_cuff(var/mob/living/carbon/victim, var/mob/user)
if(SEND_SIGNAL(victim, COMSIG_CARBON_CUFF_ATTEMPTED, user) & COMSIG_CARBON_CUFF_PREVENT)
victim.balloon_alert(user, "can't be handcuffed!")
return
playsound(src, cuff_sound, 30, 1, -2)
var/mob/living/carbon/human/H = target
if(!istype(H))
var/mob/living/carbon/human/human_victim = victim
if(!istype(human_victim))
return 0
if (!H.has_organ_for_slot(slot_handcuffed))
to_chat(user, span_danger("\The [H] needs at least two wrists before you can cuff them together!"))
if (!human_victim.has_organ_for_slot(slot_handcuffed))
to_chat(user, span_danger("\The [victim] needs at least two wrists before you can cuff them together!"))
return 0
if(istype(H.gloves,/obj/item/clothing/gloves/gauntlets/rig) && !elastic) // Can't cuff someone who's in a deployed hardsuit.
to_chat(user, span_danger("\The [src] won't fit around \the [H.gloves]!"))
if(istype(human_victim.gloves,/obj/item/clothing/gloves/gauntlets/rig) && !elastic) // Can't cuff someone who's in a deployed hardsuit.
to_chat(user, span_danger("\The [src] won't fit around \the [human_victim.gloves]!"))
return 0
user.visible_message(span_danger("\The [user] is attempting to put [cuff_type] on \the [H]!"))
user.visible_message(span_danger("\The [user] is attempting to put [cuff_type] on \the [victim]!"))
if(!do_after(user, use_time, target = src))
return 0
if(!can_place(target, user)) //victim may have resisted out of the grab in the meantime
if(!can_place(victim, user)) //victim may have resisted out of the grab in the meantime
return 0
add_attack_logs(user,H,"Handcuffed (attempt)")
feedback_add_details("handcuffs","H")
add_attack_logs(user,victim,"Handcuffed (attempt)")
feedback_add_details("handcuffs","victim")
user.setClickCooldown(user.get_attack_speed(src))
user.do_attack_animation(H)
user.do_attack_animation(victim)
user.visible_message(span_danger("\The [user] has put [cuff_type] on \the [H]!"))
user.visible_message(span_danger("\The [user] has put [cuff_type] on \the [victim]!"))
// Apply cuffs.
var/obj/item/handcuffs/cuffs = src
@@ -99,12 +102,12 @@
cuffs = new(get_turf(user))
else
user.drop_from_inventory(cuffs)
cuffs.loc = target
target.handcuffed = cuffs
target.update_handcuffed()
target.drop_r_hand()
target.drop_l_hand()
target.stop_pulling()
cuffs.loc = victim
victim.handcuffed = cuffs
victim.update_handcuffed()
victim.drop_r_hand()
victim.drop_l_hand()
victim.stop_pulling()
return 1
/obj/item/handcuffs/equipped(var/mob/living/user,var/slot)
@@ -280,7 +280,7 @@
if(isrobot(loc?.loc))
R = loc.loc
registered_name = R.braintype
RegisterSignal(src, COMSIG_OBSERVER_MOVED, PROC_REF(check_loc))
RegisterSignal(src, COMSIG_MOVABLE_ATTEMPTED_MOVE, PROC_REF(check_loc))
/obj/item/card/id/cargo/miner/borg/proc/check_loc(atom/movable/mover, atom/old_loc, atom/new_loc)
SIGNAL_HANDLER
@@ -297,7 +297,7 @@
/obj/item/card/id/cargo/miner/borg/Destroy()
if(R)
UnregisterSignal(src, COMSIG_OBSERVER_MOVED)
UnregisterSignal(src, COMSIG_MOVABLE_ATTEMPTED_MOVE)
R = null
last_robot_loc = null
. = ..()
@@ -306,7 +306,7 @@
if(isrobot(loc?.loc))
R = loc.loc
registered_name = R.braintype
RegisterSignal(src, COMSIG_OBSERVER_MOVED, PROC_REF(check_loc))
RegisterSignal(src, COMSIG_MOVABLE_ATTEMPTED_MOVE, PROC_REF(check_loc))
/obj/item/card/id/exploration/borg/proc/check_loc(atom/movable/mover, atom/old_loc, atom/new_loc)
SIGNAL_HANDLER
@@ -323,7 +323,7 @@
/obj/item/card/id/exploration/borg/Destroy()
if(R)
UnregisterSignal(src, COMSIG_OBSERVER_MOVED)
UnregisterSignal(src, COMSIG_MOVABLE_ATTEMPTED_MOVE)
R = null
last_robot_loc = null
. = ..()
@@ -209,11 +209,11 @@
/obj/item/storage/bag/ore/equipped(mob/user)
..()
user.AddComponent(/datum/component/recursive_move)
RegisterSignal(user, COMSIG_OBSERVER_MOVED, /obj/item/storage/bag/ore/proc/autoload, user)
RegisterSignal(user, COMSIG_MOVABLE_MOVED, /obj/item/storage/bag/ore/proc/autoload, user)
/obj/item/storage/bag/ore/dropped(mob/user)
..()
UnregisterSignal(user, COMSIG_OBSERVER_MOVED)
UnregisterSignal(user, COMSIG_MOVABLE_MOVED)
/obj/item/storage/bag/ore/proc/autoload(mob/user)
SIGNAL_HANDLER
+1 -1
View File
@@ -94,7 +94,7 @@
var/obj/item/handcuffs/cable/tape/T = new(user)
playsound(src, 'sound/effects/tape.ogg',25)
if(!T.place_handcuffs(H, user))
if(!T.attempt_to_cuff(H, user))
user.unEquip(T)
qdel(T)
else