From 57fcff30673ac6960de4cc1678dba155b45024fc Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Mon, 18 Jun 2012 21:18:26 -0700 Subject: [PATCH] Shitload of bugfixes. --- code/game/area/areas.dm | 8 +++--- code/game/objects/devices/PDA/cart.dm | 6 ++--- code/game/objects/stacks/metal.dm | 2 +- code/game/turf.dm | 28 ++++++++++++++++++++ code/modules/DetectiveWork/detective_work.dm | 18 ++++++------- code/modules/DetectiveWork/scanner.dm | 6 ++--- code/modules/admin/player_panel.dm | 4 +-- code/modules/mob/death.dm | 2 +- code/modules/mob/new_player/preferences.dm | 3 +-- 9 files changed, 52 insertions(+), 25 deletions(-) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 58aa7ebe148..6df80670be9 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -131,7 +131,7 @@ fire = 1 updateicon() mouse_opacity = 0 - for(var/obj/machinery/door/airlock/E in master.all_doors) +/* for(var/obj/machinery/door/airlock/E in master.all_doors) if(!E.air_locked) if((!E.arePowerSystemsOn()) || (E.stat & NOPOWER)) continue if(!E.density) @@ -159,7 +159,7 @@ D.nextstate = CLOSED else if(!D.density) spawn(0) - D.close() + D.close() */ var/list/cameras = list() for (var/obj/machinery/camera/C in src) cameras += C @@ -174,7 +174,7 @@ fire = 0 mouse_opacity = 0 updateicon() - for(var/obj/machinery/door/airlock/E in master.all_doors) +/* for(var/obj/machinery/door/airlock/E in master.all_doors) if((!E.arePowerSystemsOn()) || (E.stat & NOPOWER)) continue if(E.air_locked) //Don't mess with doors locked for other reasons. if(E.density) @@ -187,7 +187,7 @@ D.nextstate = OPEN else if(D.density) spawn(0) - D.open() + D.open()*/ for (var/mob/living/silicon/ai/aiPlayer in world) aiPlayer.cancelAlarm("Fire", src, src) for (var/obj/machinery/computer/station_alert/a in world) diff --git a/code/game/objects/devices/PDA/cart.dm b/code/game/objects/devices/PDA/cart.dm index 1449807e526..9804936b775 100644 --- a/code/game/objects/devices/PDA/cart.dm +++ b/code/game/objects/devices/PDA/cart.dm @@ -612,9 +612,9 @@ Code: blood[main_blood] = A.blood_DNA[blood] return 1 var/list/sum_list[4] //Pack it back up! - sum_list[1] = A.fingerprints.Copy() - sum_list[2] = A.suit_fibers.Copy() - sum_list[3] = A.blood_DNA.Copy() + sum_list[1] = A.fingerprints ? A.fingerprints.Copy() : null + sum_list[2] = A.suit_fibers ? A.suit_fibers.Copy() : null + sum_list[3] = A.blood_DNA ? A.blood_DNA.Copy() : null sum_list[4] = "\The [A] in \the [get_area(A)]" stored_data["\ref [A]"] = sum_list return 0 diff --git a/code/game/objects/stacks/metal.dm b/code/game/objects/stacks/metal.dm index ae212a1e280..43adb62632c 100644 --- a/code/game/objects/stacks/metal.dm +++ b/code/game/objects/stacks/metal.dm @@ -142,7 +142,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \ return /obj/item/stack/tile/plasteel/proc/build(turf/S as turf) - S.ReplaceWithPlating() + S.ReplaceWithAirlessPlating() // var/turf/simulated/floor/W = S.ReplaceWithFloor() // W.make_plating() return diff --git a/code/game/turf.dm b/code/game/turf.dm index 8fc7ca5b8e6..ddf20041f44 100644 --- a/code/game/turf.dm +++ b/code/game/turf.dm @@ -206,6 +206,34 @@ if(istype(west)) air_master.tiles_to_update |= west return W +/turf/proc/ReplaceWithAirlessPlating() + var/prior_icon = icon_old + var/old_dir = dir + + for(var/obj/structure/lattice/L in locate(src.x, src.y, src.z)) + del(L) + var/turf/simulated/floor/plating/airless/W = new /turf/simulated/floor/plating/airless( locate(src.x, src.y, src.z) ) + + W.RemoveLattice() + W.dir = old_dir + if(prior_icon) W.icon_state = prior_icon + else W.icon_state = "plating" + W.opacity = 1 + W.ul_SetOpacity(0) + W.levelupdate() + air_master.tiles_to_update |= W + + var/turf/simulated/north = get_step(W,NORTH) + var/turf/simulated/south = get_step(W,SOUTH) + var/turf/simulated/east = get_step(W,EAST) + var/turf/simulated/west = get_step(W,WEST) + + if(istype(north)) air_master.tiles_to_update |= north + if(istype(south)) air_master.tiles_to_update |= south + if(istype(east)) air_master.tiles_to_update |= east + if(istype(west)) air_master.tiles_to_update |= west + return W + /turf/proc/ReplaceWithEngineFloor() var/old_dir = dir diff --git a/code/modules/DetectiveWork/detective_work.dm b/code/modules/DetectiveWork/detective_work.dm index d30bf69e5b6..14e68a991da 100644 --- a/code/modules/DetectiveWork/detective_work.dm +++ b/code/modules/DetectiveWork/detective_work.dm @@ -513,10 +513,10 @@ obj/machinery/computer/forensic_scanning prints[print] = atom_fingerprints[print] else var/list/templist[4] - templist[1] = atom_suit_fibers.Copy() - templist[2] = atom_blood_DNA.Copy() + templist[1] = atom_suit_fibers ? atom_suit_fibers.Copy() : null + templist[2] = atom_blood_DNA ? atom_blood_DNA.Copy() : null templist[3] = atom_name - templist[4] = atom_fingerprints.Copy() + templist[4] = atom_fingerprints ? atom_fingerprints.Copy() : null misc[atom_reference] = templist //Store it! //Has prints. if(atom_fingerprints) @@ -560,17 +560,17 @@ obj/machinery/computer/forensic_scanning //It's not in there! We gotta add it. update_fingerprints(main_print, atom_fingerprints[main_print]) var/list/data_point[4] - data_point[1] = atom_fingerprints.Copy() - data_point[2] = atom_suit_fibers.Copy() - data_point[3] = atom_blood_DNA.Copy() + data_point[1] = atom_fingerprints ? atom_fingerprints.Copy() : null + data_point[2] = atom_suit_fibers ? atom_suit_fibers.Copy() : null + data_point[3] = atom_blood_DNA ? atom_blood_DNA.Copy() : null data_point[4] = atom_name data_entry[atom_reference] = data_point continue //No print at all! New data entry, go! var/list/data_point[4] - data_point[1] = atom_fingerprints.Copy() - data_point[2] = atom_suit_fibers.Copy() - data_point[3] = atom_blood_DNA.Copy() + data_point[1] = atom_fingerprints ? atom_fingerprints.Copy() : null + data_point[2] = atom_suit_fibers ? atom_suit_fibers.Copy() : null + data_point[3] = atom_blood_DNA ? atom_blood_DNA.Copy() : null data_point[4] = atom_name var/list/new_file[2] new_file[1] = atom_fingerprints[main_print] diff --git a/code/modules/DetectiveWork/scanner.dm b/code/modules/DetectiveWork/scanner.dm index 26f30bd9525..25a9984a330 100644 --- a/code/modules/DetectiveWork/scanner.dm +++ b/code/modules/DetectiveWork/scanner.dm @@ -164,9 +164,9 @@ blood[main_blood] = A.blood_DNA[blood] return 1 var/list/sum_list[4] //Pack it back up! - sum_list[1] = A.fingerprints.Copy() - sum_list[2] = A.suit_fibers.Copy() - sum_list[3] = A.blood_DNA.Copy() + sum_list[1] = A.fingerprints ? A.fingerprints.Copy() : null + sum_list[2] = A.suit_fibers ? A.suit_fibers.Copy() : null + sum_list[3] = A.blood_DNA ? A.blood_DNA.Copy() : null sum_list[4] = "\The [A] in \the [get_area(A)]" stored["\ref [A]"] = sum_list return 0 \ No newline at end of file diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 4fcb919ef5b..a0e9d99858f 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -200,8 +200,8 @@ else dat += "No Assigned Role" */ - dat += {"IP: [M.client.address]
- CID: [M.client.computer_id] + dat += {"IP: [M.client ? M.client.address : "Disconnected"]
+ CID: [M.client ? M.client.computer_id : "Disconnected"] "} dat += {"[player_has_info(M.ckey) ? "Info" : "N/A"] diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index 4530b9391ea..00be1771bfc 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -48,7 +48,7 @@ /mob/proc/death(gibbed) timeofdeath = world.time var/log_file = file("[time2text(world.timeofday, "statistics/DD-MM-YYYY.txt")]") - log_file << "Death | \The [get_area(src)] | [bruteloss], [oxyloss], [toxloss], [fireloss][attack_log && attack_log.len? " | attack_log[attack_log.len]" : ""]" + log_file << "Death | \The [get_area(src)] | [bruteloss], [oxyloss], [toxloss], [fireloss][attack_log && attack_log.len? " | [attack_log[attack_log.len]]" : ""]" if(client) client.onDeath() diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index 67f71f709ec..9fd3422db22 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -448,8 +448,7 @@ datum/preferences // Modify this if you added more jobs and it looks like a mess. Add the jobs in the splitJobs that you want to trigger and intitate a new table. if(splitJobs == null) - if (ticker.current_state >= GAME_STATE_PLAYING -) + if (ticker && ticker.current_state >= GAME_STATE_PLAYING) splitJobs = list() else splitJobs = list("Chief Engineer")