Merge pull request #4477 from Ccomp5950/runtimefixes

Runtimefixes
This commit is contained in:
Chinsky
2014-02-25 06:01:59 +04:00
7 changed files with 28 additions and 24 deletions
+2 -1
View File
@@ -1267,6 +1267,7 @@ proc/is_hot(obj/item/W as obj)
//Is this even used for anything besides balloons? Yes I took out the W:lit stuff because : really shouldnt be used.
/proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT?
if(!W) return 0
if(W.sharp) return 1
return ( \
W.sharp || \
@@ -1374,4 +1375,4 @@ var/list/WALLITEMS = list(
return 0
/proc/format_text(text)
return replacetext(replacetext(text,"\proper ",""),"\improper ","")
return replacetext(replacetext(text,"\proper ",""),"\improper ","")
+16 -15
View File
@@ -183,24 +183,25 @@
var/datum/gas_mixture/gas
gas = location.remove_air(0.25*environment.total_moles)
var/heat_capacity = gas.heat_capacity()
var/energy_used = min( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE)
if(gas)
var/heat_capacity = gas.heat_capacity()
var/energy_used = min( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE)
//Use power. Assuming that each power unit represents 1000 watts....
use_power(energy_used/1000, ENVIRON)
//Use power. Assuming that each power unit represents 1000 watts....
use_power(energy_used/1000, ENVIRON)
//We need to cool ourselves.
if(environment.temperature > target_temperature)
gas.temperature -= energy_used/heat_capacity
else
gas.temperature += energy_used/heat_capacity
//We need to cool ourselves.
if(environment.temperature > target_temperature)
gas.temperature -= energy_used/heat_capacity
else
gas.temperature += energy_used/heat_capacity
environment.merge(gas)
environment.merge(gas)
if(abs(environment.temperature - target_temperature) <= 0.5)
regulating_temperature = 0
visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\
"You hear a click as a faint electronic humming stops.")
if(abs(environment.temperature - target_temperature) <= 0.5)
regulating_temperature = 0
visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\
"You hear a click as a faint electronic humming stops.")
var/old_level = danger_level
danger_level = overall_danger_level()
@@ -1683,4 +1684,4 @@ Code shamelessly copied from apc_frame
else
usr << browse(null, "window=partyalarm")
return
return
return
+2 -1
View File
@@ -482,7 +482,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
return 0
if(!can_use()) //Why reinvent the wheel? There's a proc that does exactly that.
U.unset_machine()
ui.close()
if(ui)
ui.close()
return 0
add_fingerprint(U)
@@ -153,7 +153,7 @@
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
add_fingerprint(user)
if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any
if(blood_overlay && blood_DNA && (blood_DNA.len >= 1)) //updates blood overlay, if any
overlays.Cut()//this might delete other item overlays as well but eeeeeeeh
var/icon/I = new /icon(src.icon, src.icon_state)
@@ -265,4 +265,4 @@
H.update_inv_r_hand()
add_fingerprint(user)
return
return
+1 -1
View File
@@ -325,7 +325,7 @@
breath = loc.remove_air(breath_moles)
if(istype(wear_mask, /obj/item/clothing/mask/gas))
if(istype(wear_mask, /obj/item/clothing/mask/gas) && breath)
var/obj/item/clothing/mask/gas/G = wear_mask
var/datum/gas_mixture/filtered = new
+1 -1
View File
@@ -269,7 +269,7 @@ client/proc/add_gun_icons()
screen += usr.gun_run_icon
client/proc/remove_gun_icons()
if(isnull(usr)) return 1 // Runtime prevention on N00k agents spawning with SMG
if(!usr) return 1 // Runtime prevention on N00k agents spawning with SMG
screen -= usr.item_use_icon
screen -= usr.gun_move_icon
if (target_can_move)
+4 -3
View File
@@ -935,8 +935,9 @@ datum
for(var/mob/living/carbon/slime/M in T)
M.adjustToxLoss(rand(5,10))
reaction_turf(var/turf/simulated/S, var/volume)
if(volume >= 1)
S.dirt = 0
if(istype(S))
if(volume >= 1)
S.dirt = 0
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
if(iscarbon(M))
@@ -3699,4 +3700,4 @@ datum
return
// Undefine the alias for REAGENTS_EFFECT_MULTIPLER
#undef REM
#undef REM