Skip to content

Commit

Permalink
тим плей
Browse files Browse the repository at this point in the history
  • Loading branch information
AmShegars committed Jan 6, 2025
1 parent ba7eaf0 commit 2ff21b7
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions mods/anomaly/_anomaly.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
15 changes: 15 additions & 0 deletions mods/anomaly/code/anomalies/anomaly_teamplay.dm
Original file line number Diff line number Diff line change
@@ -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)
..()
24 changes: 24 additions & 0 deletions mods/anomaly/code/anomalies/single/rvach.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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"

0 comments on commit 2ff21b7

Please sign in to comment.