diff --git a/mods/anomaly/_anomaly.dme b/mods/anomaly/_anomaly.dme index ac7a64f8c8b83..2374c1784282d 100644 --- a/mods/anomaly/_anomaly.dme +++ b/mods/anomaly/_anomaly.dme @@ -74,6 +74,7 @@ #include "code\detectors_and_etc\rig_detector.dm" #include "code\detectors_and_etc\flux_detector.dm" +#include "code\anomalies\anomaly_teamplay.dm" //Помощь игрокам друг другу в аномалии //Размещение аномалий в игре #include "code\spawn_anomalies_protocol\core_spawn_protocol.dm" diff --git a/mods/anomaly/code/anomalies/anomaly_teamplay.dm b/mods/anomaly/code/anomalies/anomaly_teamplay.dm new file mode 100644 index 0000000000000..cf37d785f8746 --- /dev/null +++ b/mods/anomaly/code/anomalies/anomaly_teamplay.dm @@ -0,0 +1,15 @@ +/obj/anomaly/part/handle_human_teamplay(mob/living/carbon/human/target, mob/living/carbon/human/helper) + core.handle_human_teamplay(target, helper) + +/obj/anomaly/proc/handle_human_teamplay(mob/living/carbon/human/target, mob/living/carbon/human/helper) + visible_message(SPAN_GOOD("[helper] с силой дёргает [target] на себя!")) + target.forceMove(get_turf(helper)) + target.Weaken(5) + helper.Weaken(5) + + +/mob/living/carbon/help_shake_act(mob/living/carbon/M) + if(isanomalyhere(get_turf(src))) + var/obj/anomaly/handled_anomaly = locate() in get_turf(src) + handled_anomaly.handle_human_teamplay(src, M) + ..() diff --git a/mods/anomaly/code/anomalies/single/rvach.dm b/mods/anomaly/code/anomalies/single/rvach.dm index d640e4019d2ea..dd2ceb4ab0de4 100644 --- a/mods/anomaly/code/anomalies/single/rvach.dm +++ b/mods/anomaly/code/anomalies/single/rvach.dm @@ -151,6 +151,12 @@ Weaken(5) /mob/living/carbon/human/rvach_anomaly_pull(turf/target, current_size) + //На не лежачих не воздействуем. + if(get_turf(target) == get_turf(src)) + Weaken(5) + return + if(!lying) + return if(get_turf(target) != get_turf(src)) step_towards(src, target) Weaken(5) @@ -164,6 +170,10 @@ O.forceMove(get_turf(src)) else if(can_be_activated(O)) activate_anomaly() + step_towards(O, src) + if(isliving(O)) + var/mob/living/detected_living = O + detected_living.Weaken(5) //Человек пытается выбраться из рвача FALSE - не даём вылезти, TRUE - даём /obj/anomaly/rvach/Uncross(O) @@ -187,5 +197,19 @@ helper.Weaken(5) return TRUE +/obj/anomaly/rvach/handle_human_teamplay(mob/living/carbon/human/target, mob/living/carbon/human/helper) + visible_message(SPAN_GOOD("[helper] с силой дёргает [target] на себя!")) + var/turf/target_turf = get_ranged_target_turf(target, get_dir(target, helper), 2) + if(TurfBlocked(target_turf)) + to_chat(helper, "Чёрт, мне не куда отходить!") + target.forceMove(get_turf(helper)) + target.Weaken(5) + helper.Weaken(5) + else + target.forceMove(target_turf) + helper.forceMove(target_turf) + target.Weaken(5) + helper.Weaken(5) + /obj/anomaly/rvach/get_detection_icon() return "rvach_detection"