mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
minor fixes (#8209)
This commit is contained in:
@@ -14,13 +14,13 @@
|
||||
var/maximum_pressure = 90 * ONE_ATMOSPHERE
|
||||
|
||||
/obj/machinery/portable_atmospherics/New()
|
||||
..()
|
||||
//..() CHOMP Removal, moved to bottom
|
||||
//VOREStation Edit - Fix runtime
|
||||
if(air_contents)
|
||||
air_contents.volume = volume
|
||||
air_contents.temperature = T20C
|
||||
//VOREStation Edit End
|
||||
|
||||
..() //CHOMPEdit. Please for the love of god, do not put ..() at the top of New(), like ever
|
||||
return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/Initialize()
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
var/sound/S = sound(get_sfx(soundin))
|
||||
var/maxdistance = (world.view + extrarange) * 2 //VOREStation Edit - 3 to 2
|
||||
var/list/listeners = player_list.Copy()
|
||||
if(!ignore_walls) //these sounds don't carry through walls
|
||||
/*if(!ignore_walls) //these sounds don't carry through walls CHOMP Removal, ripping this logic up because it's unreliable and unnecessary.
|
||||
/*for(var/mob/listen in listeners) //This is beyond fucking horrible. Please do not repeatedly call hear.
|
||||
if(!(get_turf(listen) in hear(maxdistance,source)))
|
||||
listeners -= listen*/
|
||||
listeners = listeners & hearers(maxdistance,turf_source)
|
||||
listeners = listeners & hearers(maxdistance,turf_source)*/
|
||||
for(var/mob/M as anything in listeners)
|
||||
if(!M || !M.client)
|
||||
continue
|
||||
@@ -28,11 +28,18 @@
|
||||
var/area/A = T.loc
|
||||
if((A.soundproofed || area_source.soundproofed) && (A != area_source))
|
||||
continue
|
||||
var/distance = get_dist(T, turf_source)
|
||||
//var/distance = get_dist(T, turf_source) Save get_dist for later because it's more expensive
|
||||
|
||||
if(distance <= maxdistance)
|
||||
if(T && T.z == turf_source.z)
|
||||
M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, is_global, channel, pressure_affected, S, preference, volume_channel)
|
||||
//CHOMPEdit Begin
|
||||
|
||||
if(!T || T.z != turf_source.z) //^ +1
|
||||
continue
|
||||
if(get_dist(T, turf_source) > maxdistance)
|
||||
continue
|
||||
if(!ignore_walls && !can_see(turf_source, T, length = maxdistance * 2))
|
||||
continue
|
||||
|
||||
M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, is_global, channel, pressure_affected, S, preference, volume_channel)
|
||||
|
||||
/mob/proc/playsound_local(turf/turf_source, soundin, vol as num, vary, frequency, falloff, is_global, channel = 0, pressure_affected = TRUE, sound/S, preference, volume_channel = null)
|
||||
if(!client || ear_deaf > 0)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
var/random_start_ammo = FALSE //if TRUE, the weapon will spawn with randomly-determined ammo
|
||||
|
||||
/obj/item/weapon/gun/energy/New()
|
||||
..()
|
||||
//..() CHOMPEdit moved to bottom
|
||||
var/static/list/gun_icons = icon_states('icons/obj/gun_ch.dmi')
|
||||
if (icon == 'icons/obj/gun_ch.dmi' && !(icon_state in gun_icons))
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
@@ -46,6 +46,7 @@
|
||||
if(random_start_ammo && cell_type)
|
||||
power_supply.charge = charge_cost*rand(0,power_supply.maxcharge/charge_cost)
|
||||
update_icon()
|
||||
..() //CHOMPEdit if you see this, it is a cry for help. Please tell people to stop putting ..() at the top of New() :(
|
||||
|
||||
/obj/item/weapon/gun/energy/Destroy()
|
||||
if(self_recharge)
|
||||
|
||||
Reference in New Issue
Block a user