Skip to content

Commit

Permalink
Merge pull request Civ13#2507 from SepuIka/master
Browse files Browse the repository at this point in the history
ARTILLERY_REWORK_ATTEMP2
  • Loading branch information
KanohaShinobi authored Nov 30, 2023
2 parents fb9ed88 + cbcd51d commit 45c1d66
Show file tree
Hide file tree
Showing 14 changed files with 227 additions and 471 deletions.
2 changes: 1 addition & 1 deletion code/modules/1713/machinery/modular_vehicles/axis.dm
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ var/global/list/tank_names_usa = list("Charlie", "Alpha", "Foxtrot", "Tango", "E

for(var/mob/living/MB in transporting)
MB.dir = dir

return TRUE

/obj/effect/pseudovehicle
Expand Down
3 changes: 0 additions & 3 deletions code/modules/1713/machinery/modular_vehicles/carparts/cars.dm
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,6 @@
reg_number = ""
color = "#3d5931"
turret_type = "none"
vehicle_size = "2x3"
New()
..()
var/pickedname = pick(tank_names_soviet)
Expand All @@ -585,7 +584,6 @@
reg_number = ""
color = "#3d5931"
turret_type = "none"
vehicle_size = "2x4"
New()
..()
var/pickedname = pick(tank_names_soviet)
Expand All @@ -604,7 +602,6 @@
reg_number = ""
color = "#ffffff"
turret_type = "none"
vehicle_size = "2x4"
New()
..()
var/pickedname = pick(tank_names_soviet)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
reg_number = tempnum
license_plate_numbers += tempnum
return tempnum

//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//ASNO
Expand Down Expand Up @@ -150,7 +150,7 @@

"1,2" = list(/obj/structure/bed/chair/carseat/right,/obj/structure/vehicleparts/frame/car/quattroporte/rc),
"2,2" = list(/obj/structure/bed/chair/drivers/car,/obj/structure/vehicleparts/frame/car/quattroporte/lc),

"1,3" = list(/obj/structure/bed/chair/carseat/right,/obj/structure/vehicleparts/frame/car/quattroporte/rb,/obj/structure/vehicleparts/movement/reversed),
"2,3" = list(/obj/structure/bed/chair/carseat/left,/obj/structure/vehicleparts/frame/car/quattroporte/lb,/obj/structure/vehicleparts/license_plate/eu/centered,/obj/structure/vehicleparts/movement/reversed),
)
Expand Down Expand Up @@ -285,7 +285,7 @@
"1,2" = list(/obj/structure/bed/chair/carseat/right,/obj/structure/vehicleparts/frame/car/kazoku/rc),
"2,2" = list(/obj/structure/bed/chair/drivers/car,/obj/structure/vehicleparts/frame/car/kazoku/lc),


"1,3" = list(/obj/structure/bed/chair/carseat/right,/obj/structure/vehicleparts/frame/car/kazoku/rb,/obj/structure/vehicleparts/movement/reversed),
"2,3" = list(/obj/structure/bed/chair/carseat/left,/obj/structure/vehicleparts/frame/car/kazoku/lb,/obj/structure/vehicleparts/license_plate/eu/centered,/obj/structure/vehicleparts/movement/reversed),
)
Expand Down Expand Up @@ -544,7 +544,7 @@
name = "T3485"
icon_state = "4x4"
custom_color = "#4a5243"
axis = /obj/structure/vehicleparts/axis/heavy/t3485
axis = /obj/structure/vehicleparts/axis/heavy/t34/t3485
tocreate = list(
"1,1" = list(/obj/structure/vehicleparts/movement/tracks/t34/right_front,/obj/structure/vehicleparts/frame/t34/rf,/obj/item/ammo_magazine/maxim,/obj/item/ammo_magazine/maxim,/obj/item/ammo_magazine/maxim,/obj/item/ammo_magazine/maxim,/obj/item/weapon/gun/projectile/automatic/stationary/maxim/ww2),
"2,1" = list(/obj/structure/vehicleparts/frame/t34/front,/obj/item/weapon/storage/toolbox/emergency),
Expand Down
313 changes: 46 additions & 267 deletions code/modules/1713/machinery/modular_vehicles/frame_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,281 +136,60 @@
roof.overlays.Cut()
var/turf/T = get_turf(src)
if (!noroof)
if (axis && (axis.vehicle_size == "3x4"))
for(var/obj/structure/cannon/modern/tank/C in T)
var/ic = 'icons/obj/vehicles/vehicles256x256.dmi'
if (axis)
roof_turret = image(icon=ic,loc=src, icon_state="[axis.turret_type][broken]", layer=11.1, dir=C.dir)
else
roof_turret = image(icon=ic,loc=src, icon_state="", layer=11.1, dir=C.dir)
if (roof_turret && axis && axis.color)
roof_turret.color = axis.color
roof_turret.pixel_x = -112
roof_turret.pixel_y = -112
roof.overlays += roof_turret
else if (axis && (axis.vehicle_size == "3x5"))
if (axis)
var/ic = 'icons/obj/vehicles/vehicles256x256.dmi'
var/roof_turret_x = 0
var/roof_turret_y = 0
if (axis.tile_size == "32x32")
roof_turret_x = -112
roof_turret_y = -112
else if (axis.tile_size == "96x96")
roof_turret_x = -80
roof_turret_y = -80
for(var/obj/structure/cannon/modern/tank/C in T)
var/ic = 'icons/obj/vehicles/vehicles256x256.dmi'
if (axis)
roof_turret = image(icon=ic,loc=src, icon_state="[axis.turret_type][broken]", layer=11.1, dir=C.dir)
else
roof_turret = image(icon=ic,loc=src, icon_state="", layer=11.1, dir=C.dir)
if (roof_turret && axis && axis.color)
roof_turret.color = axis.color
roof_turret.pixel_x = -80
roof_turret.pixel_y = -80
roof.overlays += roof_turret
else if (axis && (axis.vehicle_size == "2x4"))
for(var/obj/item/weapon/gun/projectile/automatic/stationary/autocannon/C in T)
var/ic = 'icons/obj/vehicles/vehicles256x256.dmi'
roof_turret = image(icon=ic,loc=src, icon_state="[axis.turret_type][broken]", layer=11.1, dir=C.dir)

if (axis)
roof_turret = image(icon=ic,loc=src, icon_state="[axis.turret_type]", layer=11.1, dir=C.dir)
else
roof_turret = image(icon=ic,loc=src, icon_state="", layer=11.1, dir=C.dir)
if (roof_turret && axis && axis.color)
if (roof_turret && axis.color)
roof_turret.color = axis.color
if (C.dir == NORTH)
if (dir == NORTH)
roof_turret.pixel_x = -96
roof_turret.pixel_y = -80
else if (dir == SOUTH)
roof_turret.pixel_x = -96
roof_turret.pixel_y = -80
else if (dir == WEST)
roof_turret.pixel_x = -96
roof_turret.pixel_y = -80
else if (dir == EAST)
roof_turret.pixel_x = -96
roof_turret.pixel_y = -80
else if (C.dir == SOUTH)
if (dir == NORTH)
roof_turret.pixel_x = -64
roof_turret.pixel_y = -80
else if (dir == SOUTH)
roof_turret.pixel_x = -64
roof_turret.pixel_y = -80
else if (dir == WEST)
roof_turret.pixel_x = -64
roof_turret.pixel_y = -80
else if (dir == EAST)
roof_turret.pixel_x = -64
roof_turret.pixel_y = -80
else if (C.dir == WEST)
if (dir == NORTH)
roof_turret.pixel_x = -80
roof_turret.pixel_y = -96
else if (dir == SOUTH)
roof_turret.pixel_x = -80
roof_turret.pixel_y = -96
else if (dir == WEST)
roof_turret.pixel_x = -80
roof_turret.pixel_y = -96
else if (dir == EAST)
roof_turret.pixel_x = -80
roof_turret.pixel_y = -96
else if (C.dir == EAST)
if (dir == NORTH)
roof_turret.pixel_x = -80
roof_turret.pixel_y = -64
else if (dir == SOUTH)
roof_turret.pixel_x = -80
roof_turret.pixel_y = -64
else if (dir == WEST)
roof_turret.pixel_x = -80
roof_turret.pixel_y = -64
else if (dir == EAST)
roof_turret.pixel_x = -80
roof_turret.pixel_y = -64
roof.overlays += roof_turret
else if (axis && (axis.vehicle_size == "2x4_non96x96"))
for(var/obj/item/weapon/gun/projectile/automatic/stationary/autocannon/C in T)
var/ic = 'icons/obj/vehicles/vehicles256x256.dmi'

if (axis)
roof_turret = image(icon=ic,loc=src, icon_state="[axis.turret_type]", layer=11.1, dir=C.dir)
else
roof_turret = image(icon=ic,loc=src, icon_state="", layer=11.1, dir=C.dir)
if (roof_turret && axis && axis.color)
roof_turret.color = axis.color
if (C.dir == NORTH)
if (dir == NORTH)
roof_turret.pixel_x = -128
roof_turret.pixel_y = -112
else if (dir == SOUTH)
roof_turret.pixel_x = -128
roof_turret.pixel_y = -112
else if (dir == WEST)
roof_turret.pixel_x = -128
roof_turret.pixel_y = -112
else if (dir == EAST)
roof_turret.pixel_x = -128
roof_turret.pixel_y = -112
else if (C.dir == SOUTH)
if (dir == NORTH)
roof_turret.pixel_x = -96
roof_turret.pixel_y = -96
else if (dir == SOUTH)
roof_turret.pixel_x = -96
roof_turret.pixel_y = -96
else if (dir == WEST)
roof_turret.pixel_x = -96
roof_turret.pixel_y = -80
else if (dir == EAST)
roof_turret.pixel_x = -96
roof_turret.pixel_y = -96
else if (C.dir == WEST)
if (dir == NORTH)
roof_turret.pixel_x = -112
roof_turret.pixel_y = -128
else if (dir == SOUTH)
roof_turret.pixel_x = -112
roof_turret.pixel_y = -128
else if (dir == WEST)
roof_turret.pixel_x = -112
roof_turret.pixel_y = -128
else if (dir == EAST)
roof_turret.pixel_x = -112
roof_turret.pixel_y = -128
else if (C.dir == EAST)
if (dir == NORTH)
roof_turret.pixel_x = -112
roof_turret.pixel_y = -96
else if (dir == SOUTH)
roof_turret.pixel_x = -112
roof_turret.pixel_y = -96
else if (dir == WEST)
roof_turret.pixel_x = -112
roof_turret.pixel_y = -96
else if (dir == EAST)
roof_turret.pixel_x = -112
roof_turret.pixel_y = -96
roof.overlays += roof_turret
else if (axis && (axis.vehicle_size == "2x3"))
if (dir == NORTH)
roof_turret_x -= axis.turret_x
roof_turret_y -= axis.turret_y
else if (dir == SOUTH)
roof_turret_x += axis.turret_x
roof_turret_y += axis.turret_y
else if (dir == WEST)
roof_turret_x += axis.turret_y
roof_turret_y -= axis.turret_x
else if (dir == EAST)
roof_turret_x -= axis.turret_y
roof_turret_y += axis.turret_x

roof_turret.pixel_x = roof_turret_x
roof_turret.pixel_y = roof_turret_y

for(var/obj/item/weapon/gun/projectile/automatic/stationary/autocannon/C in T)
var/ic = 'icons/obj/vehicles/vehicles256x256.dmi'
roof_turret = image(icon=ic,loc=src, icon_state="[axis.turret_type][broken]", layer=11.1, dir=C.dir)

if (axis)
roof_turret = image(icon=ic,loc=src, icon_state="[axis.turret_type]", layer=11.1, dir=C.dir)
else
roof_turret = image(icon=ic,loc=src, icon_state="", layer=11.1, dir=C.dir)
if (roof_turret && axis && axis.color)
roof_turret.color = axis.color
if (C.dir == NORTH)
if (dir == NORTH)
roof_turret.pixel_x = -96
roof_turret.pixel_y = -96
else if (dir == SOUTH)
roof_turret.pixel_x = -96
roof_turret.pixel_y = -96
else if (dir == WEST)
roof_turret.pixel_x = -96
roof_turret.pixel_y = -96
else if (dir == EAST)
roof_turret.pixel_x = -96
roof_turret.pixel_y = -96
else if (C.dir == SOUTH)
if (dir == NORTH)
roof_turret.pixel_x = -64
roof_turret.pixel_y = -64
else if (dir == SOUTH)
roof_turret.pixel_x = -64
roof_turret.pixel_y = -64
else if (dir == WEST)
roof_turret.pixel_x = -64
roof_turret.pixel_y = -64
else if (dir == EAST)
roof_turret.pixel_x = -64
roof_turret.pixel_y = -64
else if (C.dir == WEST)
if (dir == NORTH)
roof_turret.pixel_x = -64
roof_turret.pixel_y = -96
else if (dir == SOUTH)
roof_turret.pixel_x = -64
roof_turret.pixel_y = -96
else if (dir == WEST)
roof_turret.pixel_x = -64
roof_turret.pixel_y = -96
else if (dir == EAST)
roof_turret.pixel_x = -64
roof_turret.pixel_y = -96
else if (C.dir == EAST)
if (dir == NORTH)
roof_turret.pixel_x = -96
roof_turret.pixel_y = -64
else if (dir == SOUTH)
roof_turret.pixel_x = -96
roof_turret.pixel_y = -64
else if (dir == WEST)
roof_turret.pixel_x = -96
roof_turret.pixel_y = -64
else if (dir == EAST)
roof_turret.pixel_x = -96
roof_turret.pixel_y = -64
roof.overlays += roof_turret
else if (axis)
for(var/obj/structure/cannon/modern/tank/C in T)
var/ic = 'icons/obj/vehicles/vehicles96x96.dmi'
if (axis)
roof_turret = image(icon=ic,loc=src, icon_state="[axis.turret_type][broken]", layer=11.1, dir=C.dir)
else
roof_turret = image(icon=ic,loc=src, icon_state="", layer=11.1, dir=C.dir)
if (roof_turret && axis && axis.color)
roof_turret.color = axis.color
if (C.dir == NORTH)
if (dir == NORTH)
roof_turret.pixel_x = -32
roof_turret.pixel_y = 0
else if (dir == SOUTH)
roof_turret.pixel_x = -32
roof_turret.pixel_y = -16
else if (dir == EAST)
roof_turret.pixel_x = -32
roof_turret.pixel_y = 0
else if (dir == WEST)
roof_turret.pixel_x = -48
roof_turret.pixel_y = -48
else if (C.dir == SOUTH)
if (dir == NORTH)
roof_turret.pixel_x = -32
roof_turret.pixel_y = -32
else if (dir == SOUTH)
roof_turret.pixel_x = -32
roof_turret.pixel_y = -56
else if (dir == EAST)
roof_turret.pixel_x = -32
roof_turret.pixel_y = -48
else if (dir == WEST)
roof_turret.pixel_x = -48
roof_turret.pixel_y = -48
else if (C.dir == EAST)
if (dir == NORTH)
roof_turret.pixel_x = 0
roof_turret.pixel_y = -16
else if (dir == SOUTH)
roof_turret.pixel_x = 0
roof_turret.pixel_y = -32
else if (dir == EAST)
roof_turret.pixel_x = -16
roof_turret.pixel_y = -16
else if (dir == WEST)
roof_turret.pixel_x = 0
roof_turret.pixel_y = -16
else if (C.dir == WEST)
if (dir == NORTH)
roof_turret.pixel_x = -64
roof_turret.pixel_y = -16
else if (dir == SOUTH)
roof_turret.pixel_x = -64
roof_turret.pixel_y = -32
else if (dir == EAST)
roof_turret.pixel_x = -64
roof_turret.pixel_y = -16
else if (dir == WEST)
roof_turret.pixel_x = -32
roof_turret.pixel_y = -32
roof.overlays += roof_turret

if (dir == NORTH)
roof_turret_x -= axis.turret_x
roof_turret_y -= axis.turret_y
else if (dir == SOUTH)
roof_turret_x += axis.turret_x
roof_turret_y += axis.turret_y
else if (dir == WEST)
roof_turret_x += axis.turret_y
roof_turret_y -= axis.turret_x
else if (dir == EAST)
roof_turret_x -= axis.turret_y
roof_turret_y += axis.turret_x

roof_turret.pixel_x = roof_turret_x
roof_turret.pixel_y = roof_turret_y

for (var/obj/CC in T)
if (istype(CC, /obj/structure/bed/chair/drivers) && istype(axis, /obj/structure/vehicleparts/axis/heavy))
roof.icon_state = "roof_steel_hatch_driver"
Expand Down
Loading

0 comments on commit 45c1d66

Please sign in to comment.