Merge pull request #5643 from lbnesquik/Kates-Mech-Tweaks

Mech noises update.
This commit is contained in:
Atermonera
2018-11-30 21:35:10 -08:00
committed by VirgoBot
parent 15017e893e
commit 5a6ae50b14
11 changed files with 54 additions and 7 deletions

View File

@@ -48,6 +48,7 @@
set popup_menu = 0
if(usr!=src.occupant)
return
playsound(src, 'sound/mecha/duranddefencemode.ogg', 50, 1)
defence = !defence
if(defence)
deflect_chance = defence_deflect

View File

@@ -37,6 +37,7 @@
wreckage = /obj/effect/decal/mecha_wreckage/gygax/dark
max_equip = 4
step_energy_drain = 5
mech_faction = MECH_FACTION_SYNDI
max_hull_equip = 1
max_weapon_equip = 2
@@ -84,6 +85,7 @@
step_energy_drain = step_energy_drain*overload_coeff
src.occupant_message("<font color='red'>You enable leg actuators overload.</font>")
src.log_message("Toggled leg actuators overload.")
playsound(src, 'sound/mecha/mechanical_toggle.ogg', 50, 1)
return
/obj/mecha/combat/gygax/dyndomove(direction)

View File

@@ -22,6 +22,7 @@
internal_damage_threshold = 25
force = 45
max_equip = 4
mech_faction = MECH_FACTION_NT
max_hull_equip = 3
max_weapon_equip = 3
@@ -42,6 +43,7 @@
force = 55
max_equip = 5
/obj/mecha/combat/marauder/mauler
desc = "Heavy-duty, combat exosuit, developed off of the existing Marauder model."
name = "Mauler"
@@ -49,6 +51,7 @@
initial_icon = "mauler"
operation_req_access = list(access_syndicate)
wreckage = /obj/effect/decal/mecha_wreckage/mauler
mech_faction = MECH_FACTION_SYNDI
/obj/mecha/combat/marauder/New()
..()

View File

@@ -20,10 +20,13 @@
var/required_type = /obj/mecha //may be either a type or a list of allowed types
var/equip_type = null //mechaequip2
var/allow_duplicate = FALSE
var/ready_sound = 'sound/mecha/mech_reload_default.ogg' //Sound to play once the fire delay passed.
/obj/item/mecha_parts/mecha_equipment/proc/do_after_cooldown(target=1)
sleep(equip_cooldown)
set_ready_state(1)
if(ready_sound) //Kind of like the kinetic accelerator.
playsound(loc, ready_sound, 50, 1, -1)
if(target && chassis)
return 1
return 0
@@ -69,10 +72,22 @@
src.update_chassis_page()
chassis.occupant_message("<font color='red'>The [src] is destroyed!</font>")
chassis.log_append_to_last("[src] is destroyed.",1)
if(istype(src, /obj/item/mecha_parts/mecha_equipment/weapon))
chassis.occupant << sound('sound/mecha/weapdestr.ogg',volume=50)
else
chassis.occupant << sound('sound/mecha/critdestr.ogg',volume=50)
if(istype(src, /obj/item/mecha_parts/mecha_equipment/weapon))//Gun
switch(chassis.mech_faction)
if(MECH_FACTION_NT)
src.chassis.occupant << sound('sound/mecha/weapdestrnano.ogg',volume=70)
if(MECH_FACTION_SYNDI)
src.chassis.occupant << sound('sound/mecha/weapdestrsyndi.ogg',volume=60)
else
src.chassis.occupant << sound('sound/mecha/weapdestr.ogg',volume=50)
else //Not a gun
switch(chassis.mech_faction)
if(MECH_FACTION_NT)
src.chassis.occupant << sound('sound/mecha/critdestrnano.ogg',volume=70)
if(MECH_FACTION_SYNDI)
src.chassis.occupant << sound('sound/mecha/critdestrsyndi.ogg',volume=70)
else
src.chassis.occupant << sound('sound/mecha/critdestr.ogg',volume=50)
spawn
qdel(src)
return

View File

@@ -7,6 +7,11 @@
#define MELEE 1
#define RANGED 2
#define MECH_FACTION_NT "nano"
#define MECH_FACTION_SYNDI "syndi"
#define MECH_FACTION_NONE "none"
/obj/mecha
name = "Mecha"
desc = "Exosuit"
@@ -41,6 +46,10 @@
var/lights_power = 6
var/force = 0
var/mech_faction = null
var/firstactivation = 0 //It's simple. If it's 0, no one entered it yet. Otherwise someone entered it at least once.
//inner atmos
var/use_internal_tank = 0
var/internal_tank_valve = ONE_ATMOSPHERE
@@ -500,7 +509,7 @@
internal_damage |= int_dam_flag
pr_internal_damage.start()
log_append_to_last("Internal damage of type [int_dam_flag].",1)
occupant << sound('sound/machines/warning-buzzer.ogg',wait=0)
occupant << sound('sound/mecha/internaldmgalarm.ogg',volume=50) //Better sounding.
return
/obj/mecha/proc/clearInternalDamage(int_dam_flag)
@@ -1008,6 +1017,7 @@
if(network && !(internal_tank.return_air() in network.gases))
network.gases += internal_tank.return_air()
network.update = 1
playsound(src, 'sound/mecha/gasconnected.ogg', 50, 1)
log_message("Connected to gas port.")
return 1
@@ -1021,6 +1031,7 @@
connected_port.connected_device = null
connected_port = null
playsound(src, 'sound/mecha/gasdisconnected.ogg', 50, 1)
src.log_message("Disconnected from gas port.")
return 1
@@ -1078,6 +1089,7 @@
else set_light(light_range - lights_power)
src.occupant_message("Toggled lights [lights?"on":"off"].")
log_message("Toggled lights [lights?"on":"off"].")
playsound(src, 'sound/mecha/heavylightswitch.ogg', 50, 1)
return
@@ -1176,8 +1188,22 @@
src.icon_state = src.reset_icon()
set_dir(dir_in)
playsound(src, 'sound/machines/windowdoor.ogg', 50, 1)
if(!hasInternalDamage())
src.occupant << sound('sound/mecha/nominal.ogg',volume=50)
if(!hasInternalDamage()) //Otherwise it's not nominal!
switch(mech_faction)
if(MECH_FACTION_NT)//The good guys category
if(firstactivation)//First time = long activation sound
firstactivation = 1
src.occupant << sound('sound/mecha/LongNanoActivation.ogg',volume=50)
else
src.occupant << sound('sound/mecha/nominalnano.ogg',volume=50)
if(MECH_FACTION_SYNDI)//Bad guys
if(firstactivation)
firstactivation = 1
src.occupant << sound('sound/mecha/LongSyndiActivation.ogg',volume=50)
else
src.occupant << sound('sound/mecha/nominalsyndi.ogg',volume=50)
else//Everyone else gets the normal noise
src.occupant << sound('sound/mecha/nominal.ogg',volume=50)
return 1
else
return 0

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.