diff --git a/code/modules/mechs/components/body.dm b/code/modules/mechs/components/body.dm index c47ad09453..6ad2657fc3 100644 --- a/code/modules/mechs/components/body.dm +++ b/code/modules/mechs/components/body.dm @@ -190,8 +190,7 @@ obj/item/mech_component/chassis/MouseDrop(atom/over) if(!usr || !over) return if(!Adjacent(usr) || !over.Adjacent(usr)) return - - if(storage_compartment && LAZYLEN(owner.passenger_compartment.back_passengers) <= 0) //Багажник не откроется, пока на спине есть пассажир. + if(storage_compartment) return storage_compartment.MouseDrop(over) /obj/item/mech_component/chassis/return_diagnostics(mob/user) diff --git a/code/modules/mechs/components/head.dm b/code/modules/mechs/components/head.dm index 85375d4462..829c305d6c 100644 --- a/code/modules/mechs/components/head.dm +++ b/code/modules/mechs/components/head.dm @@ -38,16 +38,19 @@ /obj/item/mech_component/sensors/proc/get_sight(powered) var/flags = 0 - if(total_damage >= 0.8 * max_damage || !powered) - flags |= BLIND - else if(active_sensors && powered) - flags |= vision_flags + if(!powered) //Камера не работает/Ничего не запитано? + flags |= BLIND //включается слепота + if(!camera && powered) //Энергия есть но камера подбита + flags |= BLIND //включается слепота + if(powered && camera) + if(active_sensors) //SENSORS active? (Button) + flags |= vision_flags //Мех получает спец зрение от сенсоров return flags /obj/item/mech_component/sensors/proc/get_invisible(powered) var/invisible = 0 - if((total_damage <= 0.8 * max_damage) && active_sensors && powered) + if(active_sensors && powered) invisible = see_invisible return invisible @@ -130,7 +133,7 @@ if(user) to_chat(user, SPAN_NOTICE("You load \the [software] into \the [src]'s memory.")) - + software.forceMove(src) update_software() diff --git a/code/modules/mechs/interface/screen_objects.dm b/code/modules/mechs/interface/screen_objects.dm index 7ff7da7f95..1f59d90ffd 100644 --- a/code/modules/mechs/interface/screen_objects.dm +++ b/code/modules/mechs/interface/screen_objects.dm @@ -325,6 +325,9 @@ if(!owner.get_cell()) to_chat(usr, SPAN_WARNING("The augmented vision systems are offline.")) return + if(!owner.head.camera) + to_chat(usr,SPAN_WARNING("ERROR, main camera damaged.")) + return owner.head.active_sensors = ..() to_chat(usr, SPAN_NOTICE("[owner.head.name] advanced sensor mode is [owner.head.active_sensors ? "now" : "no longer" ] active.")) diff --git a/code/modules/mechs/mech_damage.dm b/code/modules/mechs/mech_damage.dm index 45dddffd97..a8a5974ce5 100644 --- a/code/modules/mechs/mech_damage.dm +++ b/code/modules/mechs/mech_damage.dm @@ -51,13 +51,23 @@ . = ..() /mob/living/exosuit/bullet_act(obj/item/projectile/P, def_zone, used_weapon) + //Проверяем, с какого направления прилетает атака! + var/local_dir = get_dir(src, get_turf(P)) // <- Узнаём направление от меха до пули + if(local_dir == turn(dir, -90) || local_dir == turn(dir, -135) || local_dir == turn(dir, 180) || local_dir == turn(dir, 90) || local_dir == turn(dir, 135)) + // U U U + // U M U ↓ (Mech dir, look on SOUTH) + // D D D + // M - mech, U - unload passengers if was hit from this side, D - defense passengers(Dont unload) if was hit from this side + if(passengers_ammount > 0) + forced_leave_passenger(null,MECH_DROP_ALL_PASSENGER,"attack") + if(local_dir == turn(dir,-135) || local_dir == turn(dir,135) || local_dir == turn(dir,180)) + P.damage = P.damage * 1.3 switch(def_zone) if(BP_HEAD , BP_CHEST, BP_MOUTH, BP_EYES) if(LAZYLEN(pilots) && (!hatch_closed || !prob(body.pilot_coverage))) var/mob/living/pilot = pick(pilots) return pilot.bullet_act(P, def_zone, used_weapon) - if(passengers_ammount > 0) // <- Если в меха выстрелили и были пассажиры,пассажирку меха опустошит - forced_leave_passenger(null , MECH_DROP_ALL_PASSENGER , "attack") + ..() @@ -126,24 +136,23 @@ var/obj/item/mech_component/target = zoneToComponent(def_zone) if(target.total_damage >= target.max_damage) - if(target == head) + if(target == head && !head.camera && !head.radio) body.take_brute_damage(damage/3) arms.take_brute_damage(damage/3) legs.take_brute_damage(damage/3) - else if(target == body) + else if(target == body && !body.m_armour && !body.diagnostics ) head.take_brute_damage(damage/1.5) legs.take_brute_damage(damage/1.5) arms.take_brute_damage(damage/1.5) - else if(target == arms) + else if(target == arms && !arms.motivator) body.take_brute_damage(damage/3) head.take_brute_damage(damage/3) legs.take_brute_damage(damage/3) - else if(target == legs) + else if(target == legs && !legs.motivator) body.take_brute_damage(damage/2) head.take_brute_damage(damage/2) arms.take_brute_damage(damage/2) updatehealth() - return //Only 3 types of damage concern mechs and vehicles switch(damagetype) diff --git a/code/modules/mechs/mech_icon.dm b/code/modules/mechs/mech_icon.dm index 6bad63a93a..6c426d63e3 100644 --- a/code/modules/mechs/mech_icon.dm +++ b/code/modules/mechs/mech_icon.dm @@ -51,15 +51,15 @@ proc/get_mech_images(var/list/components = list(), var/overlay_layer = FLOAT_LAY var/obj/item/mech_equipment/hardpoint_object = hardpoints[hardpoint] if(hardpoint_object) // - if(hardpoint == "left hand") - if(dir == WEST || dir == SOUTHWEST || dir == NORTHWEST) + if(hardpoint == "left hand" || hardpoint == "left shoulder") + if(dir == WEST || dir == SOUTHWEST || dir == NORTHWEST || dir == SOUTH) hardpoint_object.mech_layer = MECH_GEAR_LAYER else if(dir == EAST || dir == SOUTHEAST || dir == NORTHEAST) hardpoint_object.mech_layer = MECH_BACK_LAYER - if(hardpoint == "right hand") + if(hardpoint == "right hand" || hardpoint == "right shoulder") if(dir == WEST || dir == SOUTHWEST || dir == NORTHWEST) hardpoint_object.mech_layer = MECH_BACK_LAYER - else if(dir == EAST || dir == SOUTHEAST || dir == NORTHEAST) + else if(dir == EAST || dir == SOUTHEAST || dir == NORTHEAST || dir == SOUTH) hardpoint_object.mech_layer = MECH_GEAR_LAYER // var/use_icon_state = "[hardpoint_object.icon_state]_[hardpoint]" diff --git a/code/modules/mechs/mech_interaction.dm b/code/modules/mechs/mech_interaction.dm index 45d124468c..38b6560ecd 100644 --- a/code/modules/mechs/mech_interaction.dm +++ b/code/modules/mechs/mech_interaction.dm @@ -305,7 +305,16 @@ if(LAZYLEN(pilots) >= LAZYLEN(body.pilot_positions)) to_chat(user, SPAN_WARNING("\The [src] is occupied to capacity.")) return FALSE - return TRUE + var/local_dir = get_dir(src, user) // <- Узнаём направление от меха до пули + if(local_dir == turn(dir, 0) || local_dir == turn(dir, 45) || local_dir == turn(dir, -45) || local_dir == turn(dir, 90) || local_dir == turn(dir, -90)) + // B B B + // G M G ↓ (Mech dir, look on SOUTH) + // G G G + // M - mech, B - cant climb IN mech from this side, G - can climb in mech from this side + return TRUE + else + to_chat(user, SPAN_WARNING("You cant climb in [src ] from this side.")) + return FALSE /mob/living/exosuit/proc/enter(var/mob/user) if(!check_enter(user)) @@ -329,6 +338,14 @@ return 1 /mob/living/exosuit/proc/check_passenger(var/mob/user) // Выбираем желаемое место, проверяем можно ли его занять, стартуем прок занятия + var/local_dir = get_dir(src, user) + if(local_dir != turn(dir, 90) && local_dir != turn(dir, -90) && local_dir != turn(dir, -135) && local_dir != turn(dir, 135) && local_dir != turn(dir, 180)) + // G G G + // G M G ↓ (Mech dir, look on SOUTH) + // B B B + // M - mech, B - cant climb ON mech from this side, G - can climb ON mech from this side + to_chat(user, SPAN_WARNING("You cant climb in passenger place of [src ] from this side.")) + return FALSE var/choose var/choosed_place = input(usr, "Choose passenger place which you want to take.", name, choose) as null|anything in passenger_places if(!user.Adjacent(src)) // <- Мех рядом? diff --git a/code/modules/mechs/mech_movement.dm b/code/modules/mechs/mech_movement.dm index 4819d76523..1ba1d529f6 100644 --- a/code/modules/mechs/mech_movement.dm +++ b/code/modules/mechs/mech_movement.dm @@ -145,7 +145,7 @@ if(exosuit.passengers_ammount > 0) exosuit.update_passengers() for(var/hardpoint in exosuit.hardpoints) - if(hardpoint == "left hand" || hardpoint == "right hand") + if(hardpoint == "left hand" || hardpoint == "right hand" || hardpoint == "left shoulder" || hardpoint == "right shoulder") exosuit.update_icon() exosuit.SetMoveCooldown(exosuit.legs.turn_delay) //TURN diff --git a/code/modules/mechs/premade/light.dm b/code/modules/mechs/premade/light.dm index 9d19124ddd..ab1ed3335c 100644 --- a/code/modules/mechs/premade/light.dm +++ b/code/modules/mechs/premade/light.dm @@ -30,7 +30,7 @@ icon_state = "light_arms" melee_damage = 25 action_delay = 15 - max_damage = 120 + max_damage = 90 power_use = 10 allow_passengers = FALSE // Лёгкие слишком маленькие и лёгкие desc = "As flexible as they are fragile, these Vey-Med manipulators can follow a pilot's movements in close to real time." @@ -41,7 +41,7 @@ icon_state = "light_legs" move_delay = 2 turn_delay = 3 - max_damage = 120 + max_damage = 90 power_use = 5 desc = "These Odysseus series legs are built from lightweight flexible polymers, making them capable of handling falls from up to 120 meters in 1g environments. Provided that the exosuit lands on its feet." max_fall_damage = 0 @@ -55,7 +55,7 @@ gender = PLURAL exosuit_desc_string = "advanced sensor array" icon_state = "light_head" - max_damage = 120 + max_damage = 90 vision_flags = SEE_TURFS see_invisible = SEE_INVISIBLE_NOLIGHTING power_use = 50 @@ -74,7 +74,7 @@ transparent_cabin = TRUE exosuit_desc_string = "an open and light chassis" icon_state = "light_body" - max_damage = 150 + max_damage = 120 power_use = 5 has_hardpoints = list(HARDPOINT_BACK, HARDPOINT_LEFT_SHOULDER) desc = "The Veymed Odysseus series cockpits combine ultralight materials and clear aluminum laminates to provide an optimized cockpit experience."