From 6b03a2ebbbb4bc9c116d6ee51febf4b99eabac76 Mon Sep 17 00:00:00 2001 From: "giacomand@gmail.com" Date: Wed, 20 Feb 2013 22:10:14 +0000 Subject: [PATCH] - The move_contents_to proc (which is used by shuttles and pods) will now move the air of the tile moving, instead of just replenishing the air. - Added a new area proc, mob_activate, which is called by a living mob's Life(). You can use it to have mobs react differently to different areas.dm - Used the above change to make transit areas push mobs backwards. - Fixed the server room air alarm from freaking out. - Reverted my change to singularities, they will now pull correctly. - Made the wire interface screen bigger to accommodate for different fonts. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5749 316c924e-a436-60f5-8080-3fe189b3f50e --- code/FEA/FEA_turf_tile.dm | 8 ++++++++ code/__HELPERS/unsorted.dm | 6 ++++++ code/controllers/shuttle_controller.dm | 4 ++++ code/datums/wires/airlock.dm | 2 +- code/datums/wires/wires.dm | 4 ++-- code/game/area/Space Station 13 areas.dm | 19 +++++++++++++++++++ code/game/area/areas.dm | 3 +++ code/game/machinery/alarm.dm | 10 +++++----- code/modules/mob/living/living.dm | 6 ++++++ code/modules/power/singularity/singularity.dm | 2 +- 10 files changed, 55 insertions(+), 9 deletions(-) diff --git a/code/FEA/FEA_turf_tile.dm b/code/FEA/FEA_turf_tile.dm index 981d0b023c5..013cd7f6d8f 100644 --- a/code/FEA/FEA_turf_tile.dm +++ b/code/FEA/FEA_turf_tile.dm @@ -199,6 +199,14 @@ turf/simulated proc/mimic_air_with_tile(turf/T) return air.mimic(T) + proc/copy_air_with_tile(turf/simulated/T) + if(istype(T) && T.air && air) + air.copy_from(T.air) + + proc/copy_air(datum/gas_mixture/copy) + if(air && copy) + air.copy_from(copy) + return_air() if(air) if(parent&&parent.group_processing) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 09b8ccc8325..4bdfb3d332e 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -900,6 +900,12 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl X.icon_state = old_icon_state1 X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi + + // Give the new turf our air, if simulated + if(istype(X, /turf/simulated) && istype(T, /turf/simulated)) + var/turf/simulated/sim = X + sim.copy_air_with_tile(T) + /* Quick visual fix for some weird shuttle corner artefacts when on transit space tiles */ if(direction && findtext(X.icon_state, "swall_s")) diff --git a/code/controllers/shuttle_controller.dm b/code/controllers/shuttle_controller.dm index 32784007196..8619dc85b9d 100644 --- a/code/controllers/shuttle_controller.dm +++ b/code/controllers/shuttle_controller.dm @@ -439,3 +439,7 @@ datum/shuttle_controller S.startmove() +/proc/push_mob_back(var/mob/living/L, var/dir) + if(iscarbon(L)) + if(prob(88)) + step(L, dir) \ No newline at end of file diff --git a/code/datums/wires/airlock.dm b/code/datums/wires/airlock.dm index 88e7ba1c65e..5a9ffd81ac5 100644 --- a/code/datums/wires/airlock.dm +++ b/code/datums/wires/airlock.dm @@ -3,7 +3,7 @@ /datum/wires/airlock holder_type = /obj/machinery/door/airlock wire_count = 12 - window_y = 540 + window_y = 570 var/const/AIRLOCK_WIRE_IDSCAN = 1 var/const/AIRLOCK_WIRE_MAIN_POWER1 = 2 diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index cce892e8705..c5679cda5ff 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -23,8 +23,8 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown", var/table_options = " align='center'" var/row_options1 = " width='90px'" var/row_options2 = " width='200px'" - var/window_x = 350 - var/window_y = 450 + var/window_x = 370 + var/window_y = 470 /datum/wires/New(var/atom/holder) ..() diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 5d7510dcf61..d98d680ebb5 100644 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -126,6 +126,7 @@ proc/process_ghost_teleport_locs() requires_power = 0 luminosity = 1 lighting_use_dynamic = 0 + var/push_dir = SOUTH /area/shuttle/arrival name = "\improper Arrival Shuttle" @@ -152,6 +153,10 @@ proc/process_ghost_teleport_locs() name = "\improper Emergency Shuttle Transit" icon_state = "shuttle" + mob_activate(var/mob/living/L) + push_mob_back(L, push_dir) + + /area/shuttle/escape_pod1 name = "\improper Escape Pod One" music = "music/escape.ogg" @@ -165,6 +170,9 @@ proc/process_ghost_teleport_locs() /area/shuttle/escape_pod1/transit icon_state = "shuttle" + mob_activate(var/mob/living/L) + push_mob_back(L, push_dir) + /area/shuttle/escape_pod2 name = "\improper Escape Pod Two" music = "music/escape.ogg" @@ -178,9 +186,13 @@ proc/process_ghost_teleport_locs() /area/shuttle/escape_pod2/transit icon_state = "shuttle" + mob_activate(var/mob/living/L) + push_mob_back(L, push_dir) + /area/shuttle/escape_pod3 name = "\improper Escape Pod Three" music = "music/escape.ogg" + push_dir = WEST /area/shuttle/escape_pod3/station icon_state = "shuttle2" @@ -191,9 +203,13 @@ proc/process_ghost_teleport_locs() /area/shuttle/escape_pod3/transit icon_state = "shuttle" + mob_activate(var/mob/living/L) + push_mob_back(L, push_dir) + /area/shuttle/escape_pod5 //Pod 4 was lost to meteors name = "\improper Escape Pod Five" music = "music/escape.ogg" + push_dir = WEST /area/shuttle/escape_pod5/station icon_state = "shuttle2" @@ -204,6 +220,9 @@ proc/process_ghost_teleport_locs() /area/shuttle/escape_pod5/transit icon_state = "shuttle" + mob_activate(var/mob/living/L) + push_mob_back(L, push_dir) + /area/shuttle/mining name = "\improper Mining Shuttle" music = "music/escape.ogg" diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index f395b16142f..111c80170fc 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -305,6 +305,9 @@ for(var/mob/living/carbon/human/M in SubA) thunk(M) +/area/proc/mob_activate(var/mob/living/L) + return + /area/proc/thunk(mob) if(istype(mob,/mob/living/carbon/human/)) // Only humans can wear magboots, so we give them a chance to. if((istype(mob:shoes, /obj/item/clothing/shoes/magboots) && (mob:shoes.flags & NOSLIP))) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 228f585a909..1241dcd2af9 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -118,11 +118,11 @@ //req_access = list(access_rd) //no, let departaments to work together TLV = list( "oxygen" = new/datum/tlv(-1.0, -1.0,-1.0,-1.0), // Partial pressure, kpa - "carbon dioxide" = new/datum/tlv(-1.0, -1.0, 5, 10), // Partial pressure, kpa - "plasma" = new/datum/tlv(-1.0, -1.0, 0.2, 0.5), // Partial pressure, kpa - "other" = new/datum/tlv(-1.0, -1.0, 0.5, 1.0), // Partial pressure, kpa - "pressure" = new/datum/tlv(-1.0, -1.0, -1.0, -1.0), /* kpa */ - "temperature" = new/datum/tlv(40, 60, 120, 140), // K + "carbon dioxide" = new/datum/tlv(-1.0, -1.0,-1.0,-1.0), // Partial pressure, kpa + "plasma" = new/datum/tlv(-1.0, -1.0,-1.0,-1.0), // Partial pressure, kpa + "other" = new/datum/tlv(-1.0, -1.0,-1.0,-1.0), // Partial pressure, kpa + "pressure" = new/datum/tlv(-1.0, -1.0,-1.0,-1.0), /* kpa */ + "temperature" = new/datum/tlv(-1.0, -1.0,-1.0,-1.0), // K ) /obj/machinery/alarm/kitchen_cold_room diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 63d4478a050..32f54ccbb97 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1,3 +1,9 @@ +/mob/living/Life() + ..() + var/area/cur_area = get_area(loc) + if(cur_area) + cur_area.mob_activate(src) + /mob/living/verb/succumb() set hidden = 1 diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 5892429c013..03675752967 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -212,7 +212,7 @@ var/global/list/uneatable = list( for(var/atom/X in orange(grav_pull,src)) var/dist = get_dist(X, src) // Movable atoms only - if(!contained && dist > consume_range && istype(X, /atom/movable)) + if(dist > consume_range && istype(X, /atom/movable)) if(is_type_in_list(X, uneatable)) continue if(((X) &&(!X:anchored) && (!istype(X,/mob/living/carbon/human)))|| (src.current_size >= 9)) step_towards(X,src)