mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 15:37:36 +01:00
Migrate /obj/item/assembly to the new attack chain. (#31987)
* Migrate /obj/item/assembly to the new attack chain. * Migrate more procs. * Add parent calls to activate_self(). * Add parent call to activate_self() in noise sensor. * Apply CRUNCH's style suggestions. Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> Signed-off-by: Alan <alfalfascout@users.noreply.github.com> * Change igniter attack to interact_with_atom(). * Restore assembly UIs. * Ensure assembly interact procs fire, ensure fingerprints. --------- Signed-off-by: Alan <alfalfascout@users.noreply.github.com> Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
usesound = 'sound/items/deconstruct.ogg'
|
||||
drop_sound = 'sound/items/handling/component_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/component_pickup.ogg'
|
||||
new_attack_chain = TRUE
|
||||
|
||||
var/bomb_name = "bomb" // used for naming bombs / mines
|
||||
|
||||
@@ -34,8 +35,9 @@
|
||||
/obj/item/assembly/proc/holder_movement()
|
||||
return
|
||||
|
||||
/// Called when attack_self is called
|
||||
/// Called when activate_self is called
|
||||
/obj/item/assembly/interact(mob/user)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/assembly/proc/on_atom_entered(datum/source, atom/movable/entered)
|
||||
@@ -130,14 +132,13 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/assembly/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(isassembly(W))
|
||||
var/obj/item/assembly/A = W
|
||||
if(!A.secured && !secured)
|
||||
attach_assembly(A, user)
|
||||
return
|
||||
|
||||
return ..()
|
||||
/obj/item/assembly/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!isassembly(used))
|
||||
return ..()
|
||||
var/obj/item/assembly/A = used
|
||||
if(!A.secured && !secured)
|
||||
attach_assembly(A, user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/assembly/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
@@ -159,9 +160,9 @@
|
||||
else
|
||||
. += "[src] can be attached!"
|
||||
|
||||
/obj/item/assembly/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/assembly/activate_self(mob/user)
|
||||
if(!user)
|
||||
return
|
||||
return ..()
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
return TRUE
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
Reference in New Issue
Block a user