Merge pull request #5829 from kevinz000/tg_vv

Ports TGstation view variables + admin proccall guards, and all the baggage that comes with it
This commit is contained in:
Neerti
2019-01-15 22:18:50 -05:00
committed by GitHub
81 changed files with 2264 additions and 1687 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
if(dist <= round(max_range + world.view - 2, 1))
M.playsound_local(epicenter, get_sfx("explosion"), 100, 1, frequency, falloff = 5) // get_sfx() is so that everyone gets the same sound
else if(dist <= far_dist)
var/far_volume = Clamp(far_dist, 30, 50) // Volume is based on explosion size and dist
var/far_volume = CLAMP(far_dist, 30, 50) // Volume is based on explosion size and dist
far_volume += (dist <= far_dist * 0.5 ? 50 : 0) // add 50 volume if the mob is pretty close to the explosion
M.playsound_local(epicenter, 'sound/effects/explosionfar.ogg', far_volume, 1, frequency, falloff = 5)
+1 -1
View File
@@ -503,7 +503,7 @@
var/obj/item/organ/internal/brain/brain = H.internal_organs_by_name[O_BRAIN]
if(!brain) return //no brain
var/brain_damage = Clamp((deadtime - DEFIB_TIME_LOSS)/(DEFIB_TIME_LIMIT - DEFIB_TIME_LOSS)*brain.max_damage, H.getBrainLoss(), brain.max_damage)
var/brain_damage = CLAMP((deadtime - DEFIB_TIME_LOSS)/(DEFIB_TIME_LIMIT - DEFIB_TIME_LOSS)*brain.max_damage, H.getBrainLoss(), brain.max_damage)
H.setBrainLoss(brain_damage)
/obj/item/weapon/shockpaddles/proc/make_announcement(var/message, var/msg_class)
@@ -37,7 +37,7 @@
/obj/item/weapon/plastique/attack_self(mob/user as mob)
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
if(user.get_active_hand() == src)
newtime = Clamp(newtime, 10, 60000)
newtime = CLAMP(newtime, 10, 60000)
timer = newtime
user << "Timer set for [timer] seconds."
@@ -503,7 +503,7 @@ var/list/global/tank_gauge_cache = list()
var/release_ratio = 0.002
if(tank_pressure)
release_ratio = Clamp(0.002, sqrt(max(tank_pressure-env_pressure,0)/tank_pressure),1)
release_ratio = CLAMP(0.002, sqrt(max(tank_pressure-env_pressure,0)/tank_pressure),1)
var/datum/gas_mixture/leaked_gas = air_contents.remove_ratio(release_ratio)
//dynamic air release based on ambient pressure
+1 -1
View File
@@ -54,7 +54,7 @@
color = girder_material.icon_colour
if(girder_material.products_need_process()) //Am I radioactive or some other? Process me!
START_PROCESSING(SSobj, src)
else if(is_processing) //If I happened to be radioactive or s.o. previously, and am not now, stop processing.
else if(datum_flags & DF_ISPROCESSING) //If I happened to be radioactive or s.o. previously, and am not now, stop processing.
STOP_PROCESSING(SSobj, src)
/obj/structure/girder/get_material()