Skip to content

Commit

Permalink
Merge pull request Civ13#2606 from Bierkraan/working-branch
Browse files Browse the repository at this point in the history
Trench hotfix
  • Loading branch information
Bierkraan authored Feb 1, 2024
2 parents d6cc922 + 9ff4d5a commit 5c95c3e
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 112 deletions.
4 changes: 2 additions & 2 deletions code/game/objects/map_metadata/ardennes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
ordinal_age = 6
faction_distribution_coeffs = list(GERMAN = 0.6, AMERICAN = 0.4)
battle_name = "Ardennes Offensive"
mission_start_message = "<font size=4>All factions have <b>5 minutes</b> to prepare before the ceasefire ends!<br>The Americans will win if they hold out for <b>45 minutes</b>. The Germans will win if they manage to reach the <b>HQ</b> in the middle of the city.</font>"
mission_start_message = "<font size=4>All factions have <b>6 minutes</b> to prepare before the ceasefire ends!<br>The Americans will win if they hold out for <b>45 minutes</b>. The Germans will win if they manage to reach the <b>HQ</b> in the middle of the city.</font>"
faction1 = AMERICAN
faction2 = GERMAN
grace_wall_timer = 3000
grace_wall_timer = 3600
valid_weather_types = list(WEATHER_NONE, WEATHER_WET)
songs = list(
"Woody Guthrine - Tear the Fascists Down:1" = "sound/music/tearthefascists.ogg",)
Expand Down
3 changes: 3 additions & 0 deletions code/modules/1713/machinery/modular_vehicles/axis.dm
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ var/global/list/tank_names_usa = list("Charlie", "Alpha", "Foxtrot", "Tango", "E
if (istype(M, /mob/living))
var/mob/living/ML = M
ML.forceMove(get_step(ML.loc, m_dir))
if(ML.using_object && istype(ML.using_object, /obj/item/weapon/gun/projectile/automatic/stationary))
var/obj/item/weapon/gun/projectile/automatic/stationary/HMG = ML.using_object
HMG.update_pixels(ML)
for (var/obj/F in components)
F.dir = dir
F.forceMove(get_step(F.loc, m_dir))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -639,19 +639,19 @@
axis = /obj/structure/vehicleparts/axis/heavy/m4
tocreate = list(
"1,1" = list(/obj/structure/vehicleparts/movement/tracks,/obj/structure/vehicleparts/frame/m4/rf,/obj/item/ammo_magazine/browning,/obj/item/ammo_magazine/browning,/obj/item/ammo_magazine/browning,/obj/item/ammo_magazine/browning,/obj/item/weapon/gun/projectile/automatic/stationary/browning),
"2,1" = list(/obj/structure/vehicleparts/frame/m4/front,/obj/item/weapon/storage/toolbox/emergency),
"2,1" = list(/obj/structure/vehicleparts/frame/m4/front),
"3,1" = list(/obj/structure/vehicleparts/movement/tracks,/obj/structure/vehicleparts/frame/m4/lf, /obj/structure/bed/chair/drivers/tank),

"1,2" = list(/obj/structure/vehicleparts/frame/m4/right, /obj/structure/bed/chair/commander),
"2,2" = list(/obj/structure/vehicleparts/frame/m4,/obj/structure/shellrack/full75/american),
"2,2" = list(/obj/structure/vehicleparts/frame/m4, /obj/structure/cannon/modern/tank/american75),
"3,2" = list(/obj/structure/vehicleparts/frame/m4/left, /obj/structure/bed/chair/gunner),

"1,3" = list(/obj/structure/vehicleparts/frame/m4/right/door),
"2,3" = list(/obj/structure/vehicleparts/frame/m4, /obj/structure/bed/chair/loader),
"3,3" = list(/obj/structure/vehicleparts/frame/m4/left/door,),

"1,4" = list(/obj/structure/vehicleparts/movement/tracks/reversed,/obj/structure/vehicleparts/frame/m4/rb, /obj/structure/engine/internal/diesel/premade/chiha),
"2,4" = list(/obj/structure/vehicleparts/frame/m4/back, /obj/structure/shellrack/full76),
"2,4" = list(/obj/structure/vehicleparts/frame/m4/back, /obj/structure/shellrack/full75/american),
"3,4" = list(/obj/structure/vehicleparts/movement/tracks/reversed,/obj/structure/vehicleparts/frame/m4/lb,/obj/item/weapon/reagent_containers/glass/barrel/fueltank/tank/fueleddiesel)
)

Expand Down
1 change: 1 addition & 0 deletions code/modules/1713/weapons/guns/mg/stationary/mg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@
base_icon = "type92hmg"
caliber = "a65x52"
fire_sound = 'sound/weapons/guns/fire/Type92.ogg'
reload_sound = 'sound/weapons/guns/interact/breda30_clip.ogg'
magazine_type = /obj/item/ammo_magazine/breda30
good_mags = list(/obj/item/ammo_magazine/breda30)
firemodes = list(
Expand Down
14 changes: 8 additions & 6 deletions code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -488,14 +488,16 @@

if (ismob(firer) && (istype(get_turf(firer), /turf/floor/trench) && firer.prone)) // If the firer is inside a trench and prone
if (!istype(T, /turf/floor/trench) && get_dist(T, firer) >= 3) // If the target is 3 tiles or more away block the shot
T.visible_message(SPAN_WARNING("The [name] hits the trench wall!"))
qdel(src)
return
if (!istype(src, /obj/item/cannon_ball))
T.visible_message(SPAN_WARNING("The [name] hits the trench wall!"))
qdel(src)
return
if (ismob(firer) && !(istype(get_turf(firer), /turf/floor/trench))) // If the firer is inside a trench
if (istype(T, /turf/floor/trench) && get_dist(T, firer) > 10) // If the shooter is more than 10 tiles away block the shot
T.visible_message(SPAN_WARNING("The [name] hits the trench wall!"))
qdel(src)
return
if (!istype(src, /obj/item/cannon_ball))
T.visible_message(SPAN_WARNING("The [name] hits the trench wall!"))
qdel(src)
return

if (can_hit_in_trench)
if (kill_count < (initial(kill_count) - 1))
Expand Down
Loading

0 comments on commit 5c95c3e

Please sign in to comment.