mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 17:14:47 +01:00
[MIRROR] Fixes mecha rotate & spacemove sounds and makes stomping silence flag instead of null based (#1558)
* Fixes mecha rotate & spacemove sounds and makes stomping silence flag instead of null based (#54529) * comit * bump * Update code/modules/vehicles/mecha/_mecha.dm Co-authored-by: Couls <coul422@ gmail.com> * Update code/modules/vehicles/mecha/_mecha.dm Co-authored-by: Rohesie <rohesie@ gmail.com> Co-authored-by: Couls <coul422@ gmail.com> Co-authored-by: Rohesie <rohesie@ gmail.com> * Fixes mecha rotate & spacemove sounds and makes stomping silence flag instead of null based Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com> Co-authored-by: Couls <coul422@ gmail.com> Co-authored-by: Rohesie <rohesie@ gmail.com>
This commit is contained in:
@@ -101,13 +101,13 @@
|
||||
///Typepath for the wreckage it spawns when destroyed
|
||||
var/wreckage
|
||||
|
||||
var/list/equipment = new
|
||||
var/list/equipment = list()
|
||||
///Current active equipment
|
||||
var/obj/item/mecha_parts/mecha_equipment/selected
|
||||
///Maximum amount of equipment we can have
|
||||
var/max_equip = 3
|
||||
|
||||
///Whether our steps are silent, for example in zero-G
|
||||
///Whether our steps are silent due to no gravity
|
||||
var/step_silent = FALSE
|
||||
///Sound played when the mech moves
|
||||
var/stepsound = 'sound/mecha/mechstep.ogg'
|
||||
@@ -575,8 +575,9 @@
|
||||
///Plays the mech step sound effect. Split from movement procs so that other mechs (HONK) can override this one specific part.
|
||||
/obj/vehicle/sealed/mecha/proc/play_stepsound()
|
||||
SIGNAL_HANDLER
|
||||
if(stepsound)
|
||||
playsound(src,stepsound,40,1)
|
||||
if(mecha_flags & QUIET_STEPS)
|
||||
return
|
||||
playsound(src, stepsound, 40, TRUE)
|
||||
|
||||
/obj/vehicle/sealed/mecha/proc/disconnect_air()
|
||||
SIGNAL_HANDLER
|
||||
@@ -598,10 +599,9 @@
|
||||
to_chat(occupants, "[icon2html(src, occupants)]<span class='info'>The [src] push off [backup] to propel yourself.</span>")
|
||||
return TRUE
|
||||
|
||||
if(movedelay <= world.time && active_thrusters && movement_dir && active_thrusters.thrust(movement_dir))
|
||||
if(active_thrusters?.thrust(movement_dir))
|
||||
step_silent = TRUE
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
/obj/vehicle/sealed/mecha/vehicle_move(direction, forcerotate = FALSE)
|
||||
@@ -670,9 +670,9 @@
|
||||
|
||||
//if we're not facing the way we're going rotate us
|
||||
if(dir != direction && !strafe || forcerotate || keyheld)
|
||||
setDir(direction)
|
||||
if(turnsound && dir != direction)
|
||||
if(dir != direction && !(mecha_flags & QUIET_TURNS) && !step_silent)
|
||||
playsound(src,turnsound,40,TRUE)
|
||||
setDir(direction)
|
||||
return TRUE
|
||||
|
||||
set_glide_size(DELAY_TO_GLIDE_SIZE(movedelay))
|
||||
@@ -1113,13 +1113,6 @@
|
||||
req_access = list()
|
||||
return allowed(M)
|
||||
|
||||
////////////////////////////////
|
||||
/////// Messages and Log ///////
|
||||
////////////////////////////////
|
||||
|
||||
GLOBAL_VAR_INIT(year, time2text(world.realtime,"YYYY"))
|
||||
GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013???
|
||||
//why is this in mecha
|
||||
|
||||
///////////////////////
|
||||
///// Power stuff /////
|
||||
|
||||
@@ -11,13 +11,11 @@
|
||||
wreckage = /obj/structure/mecha_wreckage/reticence
|
||||
operation_req_access = list(ACCESS_THEATRE)
|
||||
internals_req_access = list(ACCESS_MECH_SCIENCE, ACCESS_THEATRE)
|
||||
mecha_flags = CANSTRAFE | IS_ENCLOSED | HAS_LIGHTS
|
||||
mecha_flags = CANSTRAFE | IS_ENCLOSED | HAS_LIGHTS | QUIET_STEPS | QUIET_TURNS
|
||||
internal_damage_threshold = 25
|
||||
max_equip = 2
|
||||
step_energy_drain = 3
|
||||
color = "#87878715"
|
||||
stepsound = null
|
||||
turnsound = null
|
||||
|
||||
/obj/vehicle/sealed/mecha/combat/reticence/loaded/Initialize()
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user