mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
[MIRROR] Afterattack is dead, long live Afterattack (#28128)
* Afterattack is dead, long live Afterattack * wew * fixes --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
co-authored by
MrMelbert
Gandalf
parent
dd14cc7644
commit
b540aaf8ab
@@ -320,21 +320,23 @@
|
||||
icon = 'icons/obj/mining_zones/artefacts.dmi'
|
||||
icon_state = "prison_cube"
|
||||
|
||||
/obj/item/prisoncube/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
. = ..()
|
||||
if(!proximity_flag || !isliving(target))
|
||||
return
|
||||
var/mob/living/victim = target
|
||||
var/mob/living/carbon/carbon_victim = victim
|
||||
/obj/item/prisoncube/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
if(!isliving(interacting_with))
|
||||
return NONE
|
||||
|
||||
var/mob/living/carbon/carbon_victim = interacting_with
|
||||
//Handcuffed or unconscious
|
||||
if(istype(carbon_victim) && carbon_victim.handcuffed || victim.stat != CONSCIOUS)
|
||||
if(!puzzle_imprison(target))
|
||||
to_chat(user,span_warning("[src] does nothing."))
|
||||
return
|
||||
to_chat(user,span_warning("You trap [victim] in the prison cube!"))
|
||||
if(istype(carbon_victim) && (carbon_victim.handcuffed || carbon_victim.stat != CONSCIOUS))
|
||||
user.do_attack_animation(carbon_victim)
|
||||
if(!puzzle_imprison(carbon_victim))
|
||||
to_chat(user, span_warning("[src] does nothing."))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
to_chat(user, span_warning("You trap [carbon_victim] in the prison cube!"))
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user,span_notice("[src] only accepts restrained or unconscious prisoners."))
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
to_chat(user, span_notice("[src] only accepts restrained or unconscious prisoners."))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
/proc/puzzle_imprison(mob/living/prisoner)
|
||||
var/turf/T = get_turf(prisoner)
|
||||
|
||||
@@ -36,18 +36,17 @@
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
|
||||
/obj/item/knife/envy/afterattack(atom/movable/AM, mob/living/carbon/human/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
/obj/item/knife/envy/afterattack(atom/target, mob/living/carbon/human/user, click_parameters)
|
||||
if(!istype(user) || !ishuman(target))
|
||||
return
|
||||
if(!istype(user))
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(user.real_name == H.dna.real_name)
|
||||
return
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if(user.real_name != H.dna.real_name)
|
||||
user.real_name = H.dna.real_name
|
||||
H.dna.transfer_identity(user, transfer_SE=1)
|
||||
user.updateappearance(mutcolor_update=1)
|
||||
user.domutcheck()
|
||||
user.visible_message(span_warning("[user]'s appearance shifts into [H]'s!"), \
|
||||
span_boldannounce("[H.p_They()] think[H.p_s()] [H.p_theyre()] <i>sooo</i> much better than you. Not anymore, [H.p_they()] won't."))
|
||||
|
||||
user.real_name = H.dna.real_name
|
||||
H.dna.transfer_identity(user, transfer_SE=1)
|
||||
user.updateappearance(mutcolor_update=1)
|
||||
user.domutcheck()
|
||||
user.visible_message(span_warning("[user]'s appearance shifts into [H]'s!"), \
|
||||
span_boldannounce("[H.p_They()] think[H.p_s()] [H.p_theyre()] <i>sooo</i> much better than you. Not anymore, [H.p_they()] won't."))
|
||||
|
||||
@@ -545,14 +545,12 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999))
|
||||
icon_state = "hilbertsanalyzer"
|
||||
worn_icon_state = "analyzer"
|
||||
|
||||
/obj/item/analyzer/hilbertsanalyzer/afterattack(atom/target, mob/user, proximity)
|
||||
. = ..()
|
||||
if(istype(target, /obj/item/hilbertshotel))
|
||||
. |= AFTERATTACK_PROCESSED_ITEM
|
||||
if(!proximity)
|
||||
/obj/item/analyzer/hilbertsanalyzer/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
if(istype(interacting_with, /obj/item/hilbertshotel))
|
||||
if(!Adjacent(interacting_with))
|
||||
to_chat(user, span_warning("It's to far away to scan!"))
|
||||
return .
|
||||
var/obj/item/hilbertshotel/sphere = target
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
var/obj/item/hilbertshotel/sphere = interacting_with
|
||||
if(sphere.activeRooms.len)
|
||||
to_chat(user, "Currently Occupied Rooms:")
|
||||
for(var/roomnumber in sphere.activeRooms)
|
||||
@@ -565,7 +563,8 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999))
|
||||
to_chat(user, roomnumber)
|
||||
else
|
||||
to_chat(user, "No vacated rooms.")
|
||||
return .
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/transport/transport_id/hilbert
|
||||
specific_transport_id = HILBERT_LINE_1
|
||||
|
||||
Reference in New Issue
Block a user