From d58f613f690f4415fdad3a332a3b7926f72c54e2 Mon Sep 17 00:00:00 2001 From: SoundScopes Date: Thu, 6 Nov 2014 12:27:05 +0000 Subject: [PATCH] Bay Merge --- Scopes Files/gravitygenerator.dm | 1 - Scopes Files/space_cooler.dm | 2 +- code/__HELPERS/game.dm | 7 +++ code/game/machinery/recharger.dm | 17 +++++- code/modules/admin/admin_verbs.dm | 15 ++--- code/modules/admin/player_panel.dm | 1 - .../mob/living/carbon/human/update_icons.dm | 14 +++++ .../mob/living/carbon/metroid/powers.dm | 58 +++++++++---------- code/modules/mob/living/living_defense.dm | 3 +- code/modules/supermatter/supermatter.dm | 8 --- 10 files changed, 74 insertions(+), 52 deletions(-) diff --git a/Scopes Files/gravitygenerator.dm b/Scopes Files/gravitygenerator.dm index edc866e3..6f5472a4 100644 --- a/Scopes Files/gravitygenerator.dm +++ b/Scopes Files/gravitygenerator.dm @@ -170,7 +170,6 @@ var/list/gravity_field_generators = list() // We will keep track of this by addi power_channel = ENVIRON sprite_number = 8 use_power = 1 - interact_offline = 1 var/on = 1 var/breaker = 1 var/list/parts = list() diff --git a/Scopes Files/space_cooler.dm b/Scopes Files/space_cooler.dm index 6e2307a2..ca99e4b9 100644 --- a/Scopes Files/space_cooler.dm +++ b/Scopes Files/space_cooler.dm @@ -184,7 +184,7 @@ if(istype(L)) var/datum/gas_mixture/env = L.return_air() if(env.temperature > set_temperature + T0C) - var/transfer_moles = 0.25 * env.total_moles() + var/transfer_moles = 0.25 * env.total_moles var/datum/gas_mixture/air_removed = env.remove(transfer_moles) var/datum/gas_mixture/tank_removed = tank_env.remove(transfer_moles) if(air_removed) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 05d8e81a..ec17215b 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -468,3 +468,10 @@ datum/projectile_data rstats[i] = environment.vars[stats[i]] temps[direction] = rstats return temps + +/proc/flick_overlay(image/I, list/show_to, duration) + for(var/client/C in show_to) + C.images += I + sleep(duration) + for(var/client/C in show_to) + C.images -= I \ No newline at end of file diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 5f757d72..1e22bebb 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -91,7 +91,15 @@ obj/machinery/recharger/process() if(istype(charging, /obj/item/weapon/melee/baton)) var/obj/item/weapon/melee/baton/B = charging - if(B.bcell) +//Should really update the baton to use cells + if(B.charges < initial(B.charges)) + B.charges++ + icon_state = "recharger1" + use_power(150) + else + icon_state = "recharger2" + +/* if(B.bcell) if(!B.bcell.fully_charged()) icon_state = icon_state_charging B.bcell.give(active_power_usage*CELLRATE) @@ -102,6 +110,7 @@ obj/machinery/recharger/process() else icon_state = icon_state_idle update_use_power(1) +*/ return /* if(istype(charging, /obj/item/device/laptop)) @@ -138,8 +147,12 @@ obj/machinery/recharger/emp_act(severity) else if(istype(charging, /obj/item/weapon/melee/baton)) var/obj/item/weapon/melee/baton/B = charging - if(B.bcell) + //same here + if(B.charges) + B.charges = 0 +/* if(B.bcell) B.bcell.charge = 0 +*/ ..(severity) obj/machinery/recharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier. diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index efbecb0a..6c4830a9 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -978,15 +978,12 @@ var/list/admin_verbs_mod = list( return var/datum/gas_mixture/environment = usr.loc.return_air() - environment.toxins_archived = null - environment.toxins = 0 - environment.carbon_dioxide = 0 - environment.carbon_dioxide_archived = null - environment.oxygen = 21.8366 - environment.oxygen_archived = null - environment.nitrogen = 82.1472 - environment.nitrogen_archived = null - environment.temperature_archived = null + environment.gas["phoron"] = 0 + environment.gas["nitrogen"] = 82.1472 + environment.gas["oxygen"] = 21.8366 + environment.gas["carbon_dioxide"] = 0 + environment.gas["sleeping_agent"] = 0 + environment.gas["oxygen_agent_b"] = 0 environment.temperature = 293.15 environment.update_values() var/turf/simulated/location = get_turf(usr) diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index b5bc3b1c..f3e9096a 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -371,7 +371,6 @@ if(usr.client) - var/client/C = usr.client if(!check_rights(R_ADMIN|R_MOD, 0)) dat += {" N/A "} else diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 7a9d7918..3c7b3050 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -134,8 +134,22 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human var/list/overlays_standing[TOTAL_LAYERS] + var/list/overlays_lying[TOTAL_LAYERS] var/previous_damage_appearance // store what the body last looked like, so we only have to update it if something changed +/mob/living/carbon/human/proc/apply_overlay(cache_index) + var/image/I = lying ? overlays_lying[cache_index] : overlays_standing[cache_index] + if(I) + overlays += I + +/mob/living/carbon/human/proc/remove_overlay(cache_index) + if(overlays_lying[cache_index]) + overlays -= overlays_lying[cache_index] + overlays_lying[cache_index] = null + if(overlays_standing[cache_index]) + overlays -= overlays_standing[cache_index] + overlays_standing[cache_index] = null + //UPDATES OVERLAYS FROM OVERLAYS_LYING/OVERLAYS_STANDING //this proc is messy as I was forced to include some old laggy cloaking code to it so that I don't break cloakers //I'll work on removing that stuff by rewriting some of the cloaking stuff at a later date. diff --git a/code/modules/mob/living/carbon/metroid/powers.dm b/code/modules/mob/living/carbon/metroid/powers.dm index 29edf5b0..5e4c1b65 100644 --- a/code/modules/mob/living/carbon/metroid/powers.dm +++ b/code/modules/mob/living/carbon/metroid/powers.dm @@ -204,35 +204,35 @@ var/new_powerlevel = round(powerlevel / 4) for(var/i=1,i<=4,i++) var/mob/living/carbon/slime/M = new /mob/living/carbon/slime/(loc) - if(prob(mutation_chance)) - M.colour = slime_mutation[rand(1,4)] - else - var/mutations = pick("one","two","three","four") - switch(mutations) - if("one") - var/mob/living/carbon/slime/O = new mutationone(loc) - O.nutrition = new_nutrition - O.powerlevel = new_powerlevel - if(i != 1) step_away(M,src) - babies += O - if("two") - var/mob/living/carbon/slime/K = new mutationtwo(loc) - K.nutrition = new_nutrition - K.powerlevel = new_powerlevel - if(i != 1) step_away(M,src) - babies += K - if("three") - var/mob/living/carbon/slime/L = new mutationthree(loc) - L.nutrition = new_nutrition - L.powerlevel = new_powerlevel - if(i != 1) step_away(M,src) - babies += L - if("four") - var/mob/living/carbon/slime/N = new mutationfour(loc) - N.nutrition = new_nutrition - N.powerlevel = new_powerlevel - if(i != 1) step_away(M,src) - babies += N +// if(prob(mutation_chance)) +// M.colour = slime_mutation[rand(1,4)] +// else + var/mutations = pick("one","two","three","four") + switch(mutations) + if("one") + var/mob/living/carbon/slime/O = new mutationone(loc) + O.nutrition = new_nutrition + O.powerlevel = new_powerlevel + if(i != 1) step_away(M,src) + babies += O + if("two") + var/mob/living/carbon/slime/K = new mutationtwo(loc) + K.nutrition = new_nutrition + K.powerlevel = new_powerlevel + if(i != 1) step_away(M,src) + babies += K + if("three") + var/mob/living/carbon/slime/L = new mutationthree(loc) + L.nutrition = new_nutrition + L.powerlevel = new_powerlevel + if(i != 1) step_away(M,src) + babies += L + if("four") + var/mob/living/carbon/slime/N = new mutationfour(loc) + N.nutrition = new_nutrition + N.powerlevel = new_powerlevel + if(i != 1) step_away(M,src) + babies += N var/mob/living/carbon/slime/new_slime = pick(babies) new_slime.universal_speak = universal_speak diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 6115dc37..b2cbf320 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -197,7 +197,8 @@ if(!on_fire) return 1 var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment - if(G.oxygen < 1) //Investigate this when it's NOT 2332hrs local, K? - Skull132 + if(!G.gas["oxygen"]) +// if(G.oxygen < 1) //Investigate this when it's NOT 2332hrs local, K? - Skull132 ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire return var/turf/location = get_turf(src) diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index 3b6eba4b..3b170dfb 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -204,16 +204,8 @@ equilibrium_power = 250 icon_state = base_icon_state -<<<<<<< HEAD temp_factor = ( (equilibrium_power/DECAY_FACTOR)**3 )/800 power = max( (removed.temperature * temp_factor) * oxygen + power, 0) -======= - //Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock - //is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall. - - var/thermal_power = THERMAL_RELEASE_MODIFIER - if(removed.total_moles < 35) thermal_power += 750 //If you don't add coolant, you are going to have a bad time. ->>>>>>> master //We've generated power, now let's transfer it to the collectors for storing/usage transfer_energy()