Adds the Ha'rron MK.IV light tank (#5567)

This pr adds a tank, reserved for a future event and adminbus. Sprites were made by kyres1.
Adds some sounds to certain mecha actions, like loading crates or using a drill.
Ports padded caps from baystation.
This commit is contained in:
Alberyk
2018-11-08 20:42:19 -02:00
committed by Werner
parent 5ec8a50f04
commit 5988ca2b51
26 changed files with 323 additions and 137 deletions

View File

@@ -666,6 +666,7 @@
#include "code\game\mecha\combat\honker.dm"
#include "code\game\mecha\combat\marauder.dm"
#include "code\game\mecha\combat\phazon.dm"
#include "code\game\mecha\combat\tank.dm"
#include "code\game\mecha\equipment\mecha_equipment.dm"
#include "code\game\mecha\equipment\tracking_beacon.dm"
#include "code\game\mecha\equipment\tools\medical_tools.dm"

View File

@@ -458,3 +458,8 @@ update_flag
. = ..()
src.air_contents.adjust_gas("phoron", MolesForPressure())
src.update_icon()
/obj/machinery/portable_atmospherics/canister/air/cold/Initialize()
. = ..()
src.air_contents.temperature = 283
src.update_icon()

View File

@@ -77,12 +77,12 @@
else
return
M.updatehealth()
src.occupant_message("You hit [target].")
src.visible_message("<font color='red'><b>[src.name] hits [target].</b></font>")
src.occupant_message("You hit \the [target].")
src.visible_message("<span class='danger'>\The [src] hits \the [target]!</span>")
else
step_away(M,src)
src.occupant_message("You push [target] out of the way.")
src.visible_message("[src] pushes [target] out of the way.")
src.occupant_message("You push \the [target] out of the way.")
src.visible_message("\The [src] pushes \the [target] out of the way.")
melee_can_hit = 0
if(do_after_mecha(melee_cooldown))
@@ -93,8 +93,8 @@
if(damtype == "brute")
for(var/target_type in src.destroyable_obj)
if(istype(target, target_type) && hascall(target, "attackby"))
src.occupant_message("You hit [target].")
src.visible_message("<font color='red'><b>[src.name] hits [target]</b></font>")
src.occupant_message("You hit \the [target].")
src.visible_message("<span class='danger'>\The [src] hits \the [target]!</span>")
if(!istype(target, /turf/simulated/wall))
target:attackby(src,src.occupant)
else if(prob(5))

View File

@@ -29,8 +29,8 @@
wreckage = /obj/effect/decal/mecha_wreckage/gygax/dark
step_energy_drain = 5
/obj/mecha/combat/gygax/dark/New()
..()
/obj/mecha/combat/gygax/dark/Initialize()
.= ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang

View File

@@ -17,8 +17,8 @@
var/squeak = 0
/obj/mecha/combat/honker/New()
..()
/obj/mecha/combat/honker/Initialize()
.= ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/honker
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar

View File

@@ -44,8 +44,8 @@
operation_req_access = list(access_syndicate)
wreckage = /obj/effect/decal/mecha_wreckage/mauler
/obj/mecha/combat/marauder/New()
..()
/obj/mecha/combat/marauder/Initialize()
.= ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive
@@ -58,8 +58,8 @@
src.smoke_system.attach(src)
return
/obj/mecha/combat/marauder/seraph/New()
..()//Let it equip whatever is needed.
/obj/mecha/combat/marauder/seraph/Initialize()
.= ..()
var/obj/item/mecha_parts/mecha_equipment/ME
if(equipment.len)//Now to remove it and equip anew.
for(ME in equipment)

View File

@@ -21,8 +21,8 @@
max_equip = 4
/obj/mecha/combat/phazon/equipped/New()
..()
/obj/mecha/combat/phazon/equipped/Initialize()
.= ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/rcd
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/gravcatapult

View File

@@ -0,0 +1,135 @@
#define NOMINAL 0
#define FIRSTRUN 1
#define POWER 2
#define DAMAGE 3
#define IMAGE 4
#define WEAPONDOWN 5
/obj/mecha/combat/tank
name = "light adhomian tank"
desc = "The Ha'rron MK.IV light tank is an armored vehicle commonly used by tajaran military forces."
icon = 'icons/mecha/mecha_large.dmi'
icon_state = "tank"
initial_icon = "tank"
pixel_x = -16
step_in = 5
dir_in = 1
health = 800
deflect_chance = 20
damage_absorption = list("brute"=0.4,"fire"=1.1,"bullet"=0.5,"laser"=0.8,"energy"=0.8,"bomb"=0.7)
max_temperature = 30000
force = 40
w_class = 35
infra_luminosity = 4
wreckage = /obj/effect/decal/mecha_wreckage/tank
stepsound = 'sound/mecha/tanktread.ogg'
turnsound = 'sound/mecha/tanktread.ogg'
/obj/mecha/combat/tank/Initialize()
.= ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/cannon
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/tool/passenger
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/armor_booster/antiproj_armor_booster
ME.attach(src)
return
/obj/mecha/combat/tank/add_airtank()
internal_tank = new /obj/machinery/portable_atmospherics/canister/air/cold(src)
return internal_tank
/obj/mecha/combat/tank/Collide(var/atom/movable/AM)
. = ..()
if(!occupant)
return
if(isliving(AM))
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
H.attack_log += "\[[time_stamp()]\]<font color='orange'> Was rammed by [src]</font>"
occupant.attack_log += text("\[[time_stamp()]\] <font color='red'>rammed[occupant.name] ([occupant.ckey]) rammed [H.name] ([H.ckey]) with the [src].</font>")
msg_admin_attack("[src] crashed into [key_name(H)] at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[H.x];Y=[H.y];Z=[H.z]'>JMP</a>)" )
src.visible_message("<span class='danger'>\The [src] smashes into \the [H]!</span>")
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
H.apply_damage(30, BRUTE)
H.throw_at(get_edge_target_turf(loc, loc.dir), 5, 1)
H.apply_effect(4, WEAKEN)
return TRUE
if(isanimal(AM))
var/mob/living/simple_animal/C = AM
if(issmall(C))
src.visible_message("<span class='danger'>\The [src] runs over \the [C]!</span>")
C.gib()
return TRUE
else
src.visible_message("<span class='danger'>\The [src] smashes into \the [C]!</span>")
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
C.apply_damage(40, BRUTE)
return TRUE
else
var/mob/living/L = AM
src.visible_message("<span class='danger'>\The [src] smashes into \the [L]!</span>")
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
L.throw_at(get_edge_target_turf(loc, loc.dir), 5, 1)
L.apply_damage(30, BRUTE)
return TRUE
else
AM.ex_act(2)
/obj/mecha/combat/tank/trample(var/mob/living/H)
if(!occupant)
return
if(isliving(H))
if(ishuman(H))
var/mob/living/carbon/human/D = H
if(D.lying)
D.attack_log += "\[[time_stamp()]\]<font color='orange'> Was trampled by [src]</font>"
occupant.attack_log += text("\[[time_stamp()]\] <font color='red'>rammed[occupant.name] ([occupant.ckey]) trampled [D.name] ([D.ckey]) with the [src].</font>")
msg_admin_attack("[src] trampled [key_name(D)] at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[D.x];Y=[D.y];Z=[D.z]'>JMP</a>)" )
src.visible_message("<span class='danger'>\The [src] runs over \the [D]!</span>")
D.apply_effect(8, WEAKEN)
D.apply_damage(60, BRUTE)
return TRUE
if(isanimal(H))
var/mob/living/simple_animal/C = H
if(issmall(C) || (C.stat == DEAD))
src.visible_message("<span class='danger'>\The [src] runs over \the [C]!</span>")
C.gib()
return TRUE
else
var/mob/living/L = H
src.visible_message("<span class='danger'>\The [src] runs over \the [L]!</span>")
L.apply_damage(60, BRUTE)
return TRUE
/obj/mecha/combat/tank/narrator_message(var/state)
var/file
switch(state)
if(NOMINAL)
file = 'sound/mecha/hatch-door-close.ogg'
if(FIRSTRUN)
file = 'sound/mecha/hatch-door-close.ogg'
if(POWER)
file = 'sound/mecha/lowpower.ogg'
if(DAMAGE)
file = 'sound/mecha/critdestr.ogg'
if(WEAPONDOWN)
file = 'sound/mecha/weapdestr.ogg'
else
playsound(src.loc, file, 100, 0, -6.6, environment=1)
#undef NOMINAL
#undef FIRSTRUN
#undef POWER
#undef DAMAGE
#undef IMAGE
#undef WEAPONDOWN

View File

@@ -34,6 +34,7 @@
occupant_message("You lift [target] and start to load it into cargo compartment.")
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
playsound(src.loc, 'sound/mecha/hydraulic.ogg', 50, 1, -1)
set_ready_state(0)
chassis.use_power(energy_drain)
O.anchored = 1
@@ -87,6 +88,7 @@
chassis.use_power(energy_drain)
chassis.visible_message("<span class='danger'>\The [chassis] starts to drill \the [target]</span>", "<span class='warning'>You hear a large drill.</span>")
occupant_message("<span class='danger'>You start to drill \the [target]</span>")
playsound(src.loc, 'sound/mecha/mechdrill.ogg', 50, 1, -1)
var/T = chassis.loc
var/C = target.loc //why are these backwards? we may never know -Pete
if(do_after_cooldown(target))
@@ -141,6 +143,7 @@
chassis.use_power(energy_drain)
chassis.visible_message("<span class='danger'>\The [chassis] starts to drill \the [target]</span>", "<span class='warning'>You hear a large drill.</span>")
occupant_message("<span class='danger'>You start to drill \the [target]</span>")
playsound(src.loc, 'sound/mecha/mechdrill.ogg', 50, 1, -1)
var/T = chassis.loc
var/C = target.loc //why are these backwards? we may never know -Pete
if(do_after_cooldown(target))

View File

@@ -84,6 +84,7 @@
return
if(M.cell)
M.occupant_message("<span class='notice'>Now charging...</span>")
playsound(M, 'sound/mecha/powerup.ogg', 50, 1)
charging = M
return

View File

@@ -108,6 +108,9 @@
// Process() iterator count.
var/process_ticks = 0
var/stepsound = 'sound/mecha/mechstep.ogg'
var/turnsound = 'sound/mecha/mechturn.ogg'
/obj/mecha/drain_power(var/drain_check)
if(drain_check)
@@ -118,8 +121,11 @@
return cell.drain_power(drain_check)
/obj/mecha/New()
..()
/obj/mecha/Initialize()
.= ..()
START_PROCESSING(SSfast_process, src)
events = new
icon_state += "-open"
@@ -135,10 +141,6 @@
spark_system = bind_spark(src, 2)
/obj/mecha/Initialize()
. = ..()
START_PROCESSING(SSfast_process, src)
/obj/mecha/Destroy()
STOP_PROCESSING(SSfast_process, src)
@@ -446,20 +448,21 @@
/obj/mecha/proc/mechturn(direction)
set_dir(direction)
playsound(src,'sound/mecha/mechturn.ogg',40,1)
if(turnsound)
playsound(src,turnsound,40,1)
return 1
/obj/mecha/proc/mechstep(direction)
var/result = step(src,direction)
if(result)
playsound(src,'sound/mecha/mechstep.ogg',40,1)
if(result && stepsound)
playsound(src,stepsound,40,1)
return result
/obj/mecha/proc/mechsteprand()
var/result = step_rand(src)
if(result)
playsound(src,'sound/mecha/mechstep.ogg',40,1)
if(result && stepsound)
playsound(src,stepsound,40,1)
return result
/obj/mecha/Collide(var/atom/obstacle)
@@ -999,7 +1002,7 @@
mechstep(dir)
sleep(2)
mechstep(dir)
src.visible_message("<span class='danger'>[src.name] lunges forward clumsily!</span>")
src.visible_message("<span class='danger'>\The [src] lunges forward clumsily!</span>")
done = 1
return
@@ -2108,7 +2111,8 @@
return
/obj/mecha/proc/trample(var/mob/living/H)
return
/////////////

View File

@@ -15,7 +15,7 @@
var/list/crowbar_salvage
var/salvage_num = 5
New()
/obj/effect/decal/mecha_wreckage/New()
..()
crowbar_salvage = new
return
@@ -80,7 +80,7 @@
name = "Gygax wreckage"
icon_state = "gygax-broken"
New()
/obj/effect/decal/mecha_wreckage/gygax/New()
..()
var/list/parts = list(/obj/item/mecha_parts/part/gygax_torso,
/obj/item/mecha_parts/part/gygax_head,
@@ -116,7 +116,7 @@
name = "Ripley wreckage"
icon_state = "ripley-broken"
New()
/obj/effect/decal/mecha_wreckage/ripley/New()
..()
var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
/obj/item/mecha_parts/part/ripley_left_arm,
@@ -134,7 +134,7 @@
name = "Firefighter wreckage"
icon_state = "firefighter-broken"
New()
/obj/effect/decal/mecha_wreckage/ripley/firefighter/New()
..()
var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
/obj/item/mecha_parts/part/ripley_left_arm,
@@ -157,7 +157,7 @@
name = "Durand wreckage"
icon_state = "durand-broken"
New()
/obj/effect/decal/mecha_wreckage/durand/New()
..()
var/list/parts = list(
/obj/item/mecha_parts/part/durand_torso,
@@ -182,7 +182,7 @@
name = "Odysseus wreckage"
icon_state = "odysseus-broken"
New()
/obj/effect/decal/mecha_wreckage/odysseus/New()
..()
var/list/parts = list(
/obj/item/mecha_parts/part/odysseus_torso,
@@ -201,3 +201,12 @@
/obj/effect/decal/mecha_wreckage/hoverpod
name = "Hover pod wreckage"
icon_state = "engineering_pod-broken"
/obj/effect/decal/mecha_wreckage/tank
name = "adhomian light tank wreckage"
desc = "Remains of some unfortunate armored vehicle. Completely unrepairable."
icon = 'icons/mecha/mecha_large.dmi'
icon_state = "tank-broken"
anchored = TRUE
pixel_x = -16
layer = ABOVE_MOB_LAYER

View File

@@ -13,12 +13,12 @@
step_energy_drain = 6
var/obj/item/clothing/glasses/hud/health/mech/hud
New()
..()
/obj/mecha/medical/odysseus/Initialize()
.= ..()
hud = new /obj/item/clothing/glasses/hud/health/mech(src)
return
moved_inside(var/mob/living/carbon/human/H as mob)
/obj/mecha/medical/odysseus/moved_inside(var/mob/living/carbon/human/H as mob)
if(..())
if(H.glasses)
occupant_message("<font color='red'>[H.glasses] prevent you from using [src] [hud]</font>")
@@ -28,7 +28,7 @@
else
return 0
go_out()
/obj/mecha/medical/odysseus/go_out()
if(ishuman(occupant))
var/mob/living/carbon/human/H = occupant
if(H.glasses == hud)
@@ -120,8 +120,8 @@
C.images += holder
/obj/mecha/medical/odysseus/loaded/New()
..()
/obj/mecha/medical/odysseus/loaded/Initialize()
.= ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/sleeper
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/tool/sleeper

View File

@@ -81,8 +81,8 @@
cargo_capacity = 2
max_equip = 2
/obj/mecha/working/hoverpod/combatpod/New()
..()
/obj/mecha/working/hoverpod/combatpod/Initialize()
.= ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive
@@ -92,8 +92,8 @@
/obj/mecha/working/hoverpod/shuttlepod
desc = "Who knew a tiny ball could fit three people?"
/obj/mecha/working/hoverpod/shuttlepod/New()
..()
/obj/mecha/working/hoverpod/shuttlepod/Initialize()
.= ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/passenger
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/tool/passenger

View File

@@ -44,8 +44,8 @@
wreckage = /obj/effect/decal/mecha_wreckage/ripley/deathripley
step_energy_drain = 0
/obj/mecha/working/ripley/deathripley/New()
..()
/obj/mecha/working/ripley/deathripley/Initialize()
.= ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/safety_clamp
ME.attach(src)
return
@@ -54,8 +54,8 @@
desc = "An old, dusty mining ripley."
name = "APLU \"Miner\""
/obj/mecha/working/ripley/mining/New()
..()
/obj/mecha/working/ripley/mining/Initialize()
.= ..()
//Attach drill
if(prob(25)) //Possible diamond drill... Feeling lucky?
var/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill/D = new /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill

View File

@@ -24,7 +24,8 @@ STOCK_ITEM_LARGE(exosuit, 1.2)//A randomly generated exosuit in a very variable
/obj/mecha/combat/marauder/seraph = 0.3,
/obj/mecha/combat/marauder/mauler = 0.4,
/obj/mecha/combat/phazon = 0.1,
/obj/mecha/combat/honker = 0.01
/obj/mecha/combat/honker = 0.01,
/obj/mecha/combat/tank = 0.01
)
var/type = pickweight(randsuits)
var/obj/mecha/exosuit = new type(get_turf(L))

View File

@@ -193,6 +193,20 @@
species_restricted = list("Unathi")
armor = list(melee = 65, bullet = 30, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
/obj/item/clothing/head/helmet/tank
name = "padded cap"
desc = "A padded skullcup for those prone to bumping their heads against hard surfaces."
icon_state = "tank"
flags_inv = BLOCKHEADHAIR
color = "#5f5f5f"
armor = list(melee = 25, bullet = 5, laser = 5, energy = 10, bomb = 5, bio = 0, rad = 0)
/obj/item/clothing/head/helmet/tank/olive
color = "#727c58"
/obj/item/clothing/head/helmet/tank/tan
color = "#ae9f79"
//Non-hardsuit ERT helmets.
/obj/item/clothing/head/helmet/ert
name = "emergency response team helmet"

View File

@@ -312,6 +312,7 @@
// called when something steps onto a human
// this handles mulebots and vehicles
/mob/living/carbon/human/Crossed(var/atom/movable/AM)
..()
if(istype(AM, /obj/machinery/bot/mulebot))
var/obj/machinery/bot/mulebot/MB = AM
MB.RunOver(src)

View File

@@ -20,6 +20,11 @@
src.visible_message("<b>[src]</b> points to [A]")
return 1
/mob/living/Crossed(var/atom/movable/AM)
if(istype(AM, /obj/mecha))
var/obj/mecha/MB = AM
MB.trample(src)
/*one proc, four uses
swapping: if it's 1, the mobs are trying to switch, if 0, non-passive is pushing passive
default behaviour is:

View File

@@ -188,7 +188,7 @@
penetrating = 1
/obj/item/projectile/bullet/cannon/on_impact(var/atom/A)
explosion(A, 2, 3, 4, 4)
explosion(A, 1, 2, 3, 3)
..()
//magic

View File

@@ -0,0 +1,7 @@
author: Alberyk, Kyres1
delete-after: True
changes:
- rscadd: "Added the Ha'rron MK.IV light tank."
- soundadd: "Added some sounds to certain mecha actions."

BIN
icons/mecha/mecha_large.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

BIN
sound/mecha/tanktread.ogg Normal file

Binary file not shown.