Fixes some runtimes (#3727)

This commit is contained in:
Ron
2017-10-22 02:37:44 +03:00
committed by Erki
parent 42e843d20d
commit 0d0117dcff
13 changed files with 41 additions and 17 deletions
+8 -1
View File
@@ -235,7 +235,14 @@
update_connection_data(C)
return
var/list/data_object = json_decode(data)
var/list/data_object
try
data_object = json_decode(data)
catch(var/exception/E)
data_object = list()
log_debug("CONN DATA: [E] encountered when loading data for [C.ckey].")
if (!data_object || !data_object.len)
log_debug("CONN DATA: [C.ckey] has no connection data to showcase.")
+1 -1
View File
@@ -1046,7 +1046,7 @@ var/list/admin_verbs_cciaa = list(
var/mob/living/silicon/ai/target = input("Choose the AI to force-wipe:", "AI Termination") as null|anything in ai_list
if (alert("Are you sure you want to wipe [target.name]? They will be ghosted and their job slot freed.", "Confirm AI Termination", "No", "No", "Yes") != "Yes")
if (!target || alert("Are you sure you want to wipe [target.name]? They will be ghosted and their job slot freed.", "Confirm AI Termination", "No", "No", "Yes") != "Yes")
return
log_and_message_admins("admin-wiped [key_name_admin(target)]'s core.")
@@ -110,7 +110,8 @@ Content adjustment
continue
else
path = contents[metadata[i]]
new path(I)
if(path)
new path(I)
/*
Reagents adjustment
@@ -45,6 +45,9 @@
if (!(src.loc == usr))
return
if(!over_object)
return
if (( usr.restrained() ) || ( usr.stat ))
return
+1 -1
View File
@@ -591,7 +591,7 @@
/obj/item/weapon/rig/proc/toggle_piece(var/piece, var/mob/initiator, var/deploy_mode)
if(sealing || !cell || !cell.charge)
if(!usr || sealing || !cell || !cell.charge)
return
if(!istype(wearer) || !wearer.back == src)
@@ -169,6 +169,8 @@
last_biolum = null
/obj/effect/plant/proc/refresh_icon()
if(!growth_threshold)
growth_threshold = max_health/seed.growth_stages
var/growth = min(max_growth,round(health/growth_threshold))
var/at_fringe = get_dist(src,parent)
if(spread_distance > 5)
@@ -17,7 +17,7 @@
if((locate(/obj/effect/plant) in floor.contents) || (locate(/obj/effect/dead_plant) in floor.contents) )
continue
if(floor.density)
if(seed.chems["pacid"])
if(seed && seed.chems["pacid"])
addtimer(CALLBACK(floor, /atom/.proc/ex_act, 3), rand(5, 25))
continue
if(!Adjacent(floor) || !floor.Enter(src))
+1 -1
View File
@@ -127,7 +127,7 @@
if(user.stat || user.stunned)
return
var/obj/item/weapon/rig/rig = src.get_rig()
if(rig)
if(istype(rig))
rig.forced_move(direction, user)
/obj/item/device/mmi/Destroy()
+1 -1
View File
@@ -91,7 +91,7 @@
return
/obj/item/weapon/gun/energy/update_icon()
if(charge_meter)
if(charge_meter && power_supply)
var/ratio = power_supply.charge / power_supply.maxcharge
//make sure that rounding down will not give us the empty state even if we have charge for a shot left.
@@ -93,7 +93,7 @@
if(standard_pour_into(user, target))
return
if(reagents.total_volume)
if(reagents && reagents.total_volume)
user << "<span class='notice'>You splash the solution onto [target].</span>"
reagents.splash(target, reagents.total_volume)
return