mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
minor fixes (#8209)
This commit is contained in:
@@ -14,13 +14,13 @@
|
|||||||
var/maximum_pressure = 90 * ONE_ATMOSPHERE
|
var/maximum_pressure = 90 * ONE_ATMOSPHERE
|
||||||
|
|
||||||
/obj/machinery/portable_atmospherics/New()
|
/obj/machinery/portable_atmospherics/New()
|
||||||
..()
|
//..() CHOMP Removal, moved to bottom
|
||||||
//VOREStation Edit - Fix runtime
|
//VOREStation Edit - Fix runtime
|
||||||
if(air_contents)
|
if(air_contents)
|
||||||
air_contents.volume = volume
|
air_contents.volume = volume
|
||||||
air_contents.temperature = T20C
|
air_contents.temperature = T20C
|
||||||
//VOREStation Edit End
|
//VOREStation Edit End
|
||||||
|
..() //CHOMPEdit. Please for the love of god, do not put ..() at the top of New(), like ever
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/machinery/portable_atmospherics/Initialize()
|
/obj/machinery/portable_atmospherics/Initialize()
|
||||||
|
|||||||
@@ -14,11 +14,11 @@
|
|||||||
var/sound/S = sound(get_sfx(soundin))
|
var/sound/S = sound(get_sfx(soundin))
|
||||||
var/maxdistance = (world.view + extrarange) * 2 //VOREStation Edit - 3 to 2
|
var/maxdistance = (world.view + extrarange) * 2 //VOREStation Edit - 3 to 2
|
||||||
var/list/listeners = player_list.Copy()
|
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.
|
/*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)))
|
if(!(get_turf(listen) in hear(maxdistance,source)))
|
||||||
listeners -= listen*/
|
listeners -= listen*/
|
||||||
listeners = listeners & hearers(maxdistance,turf_source)
|
listeners = listeners & hearers(maxdistance,turf_source)*/
|
||||||
for(var/mob/M as anything in listeners)
|
for(var/mob/M as anything in listeners)
|
||||||
if(!M || !M.client)
|
if(!M || !M.client)
|
||||||
continue
|
continue
|
||||||
@@ -28,10 +28,17 @@
|
|||||||
var/area/A = T.loc
|
var/area/A = T.loc
|
||||||
if((A.soundproofed || area_source.soundproofed) && (A != area_source))
|
if((A.soundproofed || area_source.soundproofed) && (A != area_source))
|
||||||
continue
|
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
|
||||||
|
|
||||||
|
//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
|
||||||
|
|
||||||
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)
|
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)
|
/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)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
var/random_start_ammo = FALSE //if TRUE, the weapon will spawn with randomly-determined ammo
|
var/random_start_ammo = FALSE //if TRUE, the weapon will spawn with randomly-determined ammo
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/New()
|
/obj/item/weapon/gun/energy/New()
|
||||||
..()
|
//..() CHOMPEdit moved to bottom
|
||||||
var/static/list/gun_icons = icon_states('icons/obj/gun_ch.dmi')
|
var/static/list/gun_icons = icon_states('icons/obj/gun_ch.dmi')
|
||||||
if (icon == 'icons/obj/gun_ch.dmi' && !(icon_state in gun_icons))
|
if (icon == 'icons/obj/gun_ch.dmi' && !(icon_state in gun_icons))
|
||||||
icon = 'icons/obj/gun.dmi'
|
icon = 'icons/obj/gun.dmi'
|
||||||
@@ -46,6 +46,7 @@
|
|||||||
if(random_start_ammo && cell_type)
|
if(random_start_ammo && cell_type)
|
||||||
power_supply.charge = charge_cost*rand(0,power_supply.maxcharge/charge_cost)
|
power_supply.charge = charge_cost*rand(0,power_supply.maxcharge/charge_cost)
|
||||||
update_icon()
|
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()
|
/obj/item/weapon/gun/energy/Destroy()
|
||||||
if(self_recharge)
|
if(self_recharge)
|
||||||
|
|||||||
Reference in New Issue
Block a user