From 3869aad2d4c9c81b768f34d70dd9c73cfeccfb92 Mon Sep 17 00:00:00 2001 From: skull132 Date: Thu, 19 Jan 2017 13:07:38 +0200 Subject: [PATCH] Runtime fixes + Travis macro count - 19JAN2017 (#1608) Fixes #609 Fixes #1599 Fixes #1563 Fixes #1581 Fixes #1600 Fixes #1598 Bumps Travis macro count --- .travis.yml | 2 +- code/game/antagonist/antagonist_helpers.dm | 2 ++ code/game/base_turf.dm | 7 ++++++- code/game/dna/dna_modifier.dm | 4 +++- code/game/machinery/camera/tracking.dm | 2 ++ code/game/machinery/doors/airlock.dm | 2 ++ code/modules/events/vent_clog.dm | 2 +- 7 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 399b67e07d1..1d0a39687b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ sudo: false env: BYOND_MAJOR="510" BYOND_MINOR="1346" - MACRO_COUNT=1178 + MACRO_COUNT=1156 cache: directories: diff --git a/code/game/antagonist/antagonist_helpers.dm b/code/game/antagonist/antagonist_helpers.dm index 24a94bf6d7e..dd836aee026 100644 --- a/code/game/antagonist/antagonist_helpers.dm +++ b/code/game/antagonist/antagonist_helpers.dm @@ -1,4 +1,6 @@ /datum/antagonist/proc/can_become_antag(var/datum/mind/player, var/ignore_role) + if (!player.current) + return 0 if(player.current && jobban_isbanned(player.current, bantype)) return 0 if(!ignore_role) diff --git a/code/game/base_turf.dm b/code/game/base_turf.dm index 91b6c4cc582..96e9af94517 100644 --- a/code/game/base_turf.dm +++ b/code/game/base_turf.dm @@ -10,6 +10,11 @@ proc/get_base_turf(var/z) //An area can override the z-level base turf, so our solar array areas etc. can be space-based. proc/get_base_turf_by_area(var/turf/T) + if (!istype(T)) + T = get_turf(T) + if (!T) + return null + var/area/A = T.loc if(A.base_turf) return A.base_turf @@ -31,4 +36,4 @@ proc/get_base_turf_by_area(var/turf/T) new_base_path = /turf/space base_turf_by_z["[choice]"] = new_base_path message_admins("[key_name_admin(usr)] has set the base turf for z-level [choice] to [get_base_turf(choice)].") - log_admin("[key_name(usr)] has set the base turf for z-level [choice] to [get_base_turf(choice)].") \ No newline at end of file + log_admin("[key_name(usr)] has set the base turf for z-level [choice] to [get_base_turf(choice)].") diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index c4180f55a28..06f6dd0d7a7 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -320,6 +320,8 @@ * @return nothing */ /obj/machinery/computer/scan_consolenew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + if (!connected) + return if(user == connected.occupant || user.stat) return @@ -402,7 +404,7 @@ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm ui = new(user, src, ui_key, "dna_modifier.tmpl", "DNA Modifier Console", 660, 700) // when the ui is first opened this is the data it will use ui.set_initial_data(data) diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index 739583ede88..cce88f74cd0 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -138,6 +138,8 @@ return if(!target_name) src.cameraFollow = null + if (!track) + trackable_mobs() var/mob/target = (isnull(track.humans[target_name]) ? track.others[target_name] : track.humans[target_name]) src.track = null diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index c71dba9ee98..b9eef9c16ce 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -556,6 +556,8 @@ About the new airlock wires panel: return 0 /obj/machinery/door/airlock/update_icon() + if (!isnull(gcDestroyed)) + return set_light(0) if(overlays) overlays.Cut() if(density) diff --git a/code/modules/events/vent_clog.dm b/code/modules/events/vent_clog.dm index ed38a5875e0..99882df034a 100644 --- a/code/modules/events/vent_clog.dm +++ b/code/modules/events/vent_clog.dm @@ -17,7 +17,7 @@ if(!temp_vent) continue if(temp_vent.z in config.station_levels)//STATION ZLEVEL - if(temp_vent.network.normal_members.len > 20) + if(temp_vent.network && temp_vent.network.normal_members.len > 20) vents += temp_vent if(!vents.len) return kill()