diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm index f4f4e37990..44c7cd2590 100644 --- a/code/ATMOSPHERICS/datum_pipeline.dm +++ b/code/ATMOSPHERICS/datum_pipeline.dm @@ -28,9 +28,6 @@ datum/pipeline if(!member.check_pressure(pressure)) break //Only delete 1 pipe per process - //Allow for reactions - //air.react() //Should be handled by pipe_network now - proc/temporarily_store_air() //Update individual gas_mixtures by volume ratio diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 84a64d8ade..d55662620b 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -48,7 +48,7 @@ else assignment = "Unassigned" - var/id = add_zero(num2hex(rand(1, 1.6777215E7)), 6) //this was the best they could come up with? A large random number? *sigh* + var/id = generate_record_id() var/icon/front = new(get_id_photo(H), dir = SOUTH) var/icon/side = new(get_id_photo(H), dir = WEST) //General Record @@ -136,8 +136,10 @@ locked += L return +/proc/generate_record_id() + return add_zero(num2hex(rand(1, 65535)), 4) //no point generating higher numbers because of the limitations of num2hex -proc/get_id_photo(var/mob/living/carbon/human/H) +/proc/get_id_photo(var/mob/living/carbon/human/H) var/icon/preview_icon = null var/g = "m" diff --git a/code/defines/procs/records.dm b/code/defines/procs/records.dm index 256ae51dbf..d00bd41577 100644 --- a/code/defines/procs/records.dm +++ b/code/defines/procs/records.dm @@ -5,7 +5,7 @@ var/icon/side = new(get_id_photo(dummy), dir = WEST) var/datum/data/record/G = new /datum/data/record() G.fields["name"] = "New Record" - G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6)) + G.fields["id"] = generate_record_id() G.fields["rank"] = "Unassigned" G.fields["real_rank"] = "Unassigned" G.fields["sex"] = "Male" diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 9dc39f257b..358a3e5660 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -140,9 +140,19 @@ if(weld(W, user)) if(assembly) assembly.loc = src.loc - assembly.state = 1 + assembly.anchored = 1 + assembly.camera_name = c_tag + assembly.camera_network = english_list(network, "Exodus", ",", ",") + assembly.update_icon() + assembly.dir = src.dir assembly = null //so qdel doesn't eat it. - new /obj/item/stack/cable_coil(src.loc, length=2) + if(stat & BROKEN) + assembly.state = 2 + user << "You repaired \the [src] frame." + else + assembly.state = 1 + user << "You cut \the [src] free from the wall." + new /obj/item/stack/cable_coil(src.loc, length=2) qdel(src) // OTHER diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 75397278c0..86095dedfb 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -11,6 +11,8 @@ // Motion, EMP-Proof, X-Ray var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/material/osmium, /obj/item/weapon/stock_parts/scanning_module) var/list/upgrades = list() + var/camera_name + var/camera_network var/state = 0 var/busy = 0 /* @@ -47,7 +49,7 @@ else if(iswrench(W)) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - user << "You unattach the assembly from it's place." + user << "You unattach the assembly from its place." anchored = 0 update_icon() state = 0 @@ -67,7 +69,7 @@ else if(iswelder(W)) if(weld(W, user)) - user << "You unweld the assembly from it's place." + user << "You unweld the assembly from its place." state = 1 anchored = 1 return @@ -78,7 +80,7 @@ if(isscrewdriver(W)) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - var/input = sanitize(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: Exodus,Security,Secret ", "Set Network", "Exodus")) + var/input = sanitize(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: Exodus,Security,Secret ", "Set Network", camera_network ? camera_network : "Exodus")) if(!input) usr << "No input found please hang up and try your call again." return @@ -90,7 +92,7 @@ var/area/camera_area = get_area(src) var/temptag = "[sanitize(camera_area.name)] ([rand(1, 999)])" - input = sanitizeSafe(input(usr, "How would you like to name the camera?", "Set Camera Name", temptag), MAX_NAME_LEN) + input = sanitizeSafe(input(usr, "How would you like to name the camera?", "Set Camera Name", camera_name ? camera_name : temptag), MAX_NAME_LEN) state = 4 var/obj/machinery/camera/C = new(src.loc) diff --git a/code/game/machinery/records_scanner.dm b/code/game/machinery/records_scanner.dm index 3a2974008f..54faef41f8 100644 --- a/code/game/machinery/records_scanner.dm +++ b/code/game/machinery/records_scanner.dm @@ -88,7 +88,7 @@ obj/machinery/scanner/attack_hand(mob/living/carbon/human/user) G.fields["rank"] = "Unassigned" G.fields["real_rank"] = G.fields["rank"] G.fields["name"] = mname - G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6)) + G.fields["id"] = generate_record_id() M.fields["name"] = G.fields["name"] M.fields["id"] = G.fields["id"] S.fields["name"] = G.fields["name"] diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 4c5a9dc39b..5a1e86d542 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -247,6 +247,9 @@ // for items that can be placed in multiple slots // note this isn't called during the initial dressing of a player /obj/item/proc/equipped(var/mob/user, var/slot) + layer = 20 + if(user.client) user.client.screen |= src + if(user.pulling == src) user.stop_pulling() return //Defines which slots correspond to which slot flags diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 36a6d4f805..5b694e1918 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -18,9 +18,11 @@ /obj/item/device/chameleon/dropped() disrupt() + ..() /obj/item/device/chameleon/equipped() disrupt() + ..() /obj/item/device/chameleon/attack_self() toggle() diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index bc99d77e49..92729f5fc9 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -172,19 +172,18 @@ if(1) for(var/atom/movable/A as mob|obj in src)//pulls everything out of the locker and hits it with an explosion A.forceMove(src.loc) - A.ex_act(severity++) + A.ex_act(severity + 1) qdel(src) if(2) if(prob(50)) for (var/atom/movable/A as mob|obj in src) A.forceMove(src.loc) - A.ex_act(severity++) + A.ex_act(severity + 1) qdel(src) if(3) if(prob(5)) for(var/atom/movable/A as mob|obj in src) A.forceMove(src.loc) - A.ex_act(severity++) qdel(src) /obj/structure/closet/proc/damage(var/damage) diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index cad22a9e27..bed720d584 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -31,6 +31,7 @@ if(held_item) var/damagetype = held_item.suicide_act(src) if(damagetype) + log_and_message_admins("[key_name(src)] commited suicide using \a [held_item]") var/damage_mod = 1 switch(damagetype) //Sorry about the magic numbers. //brute = 1, burn = 2, tox = 4, oxy = 8 @@ -70,7 +71,7 @@ updatehealth() return - + log_and_message_admins("[key_name(src)] commited suicide") viewers(src) << pick("[src] is attempting to bite \his tongue off! It looks like \he's trying to commit suicide.", \ "[src] is jamming \his thumbs into \his eye sockets! It looks like \he's trying to commit suicide.", \ "[src] is twisting \his own neck! It looks like \he's trying to commit suicide.", \ diff --git a/code/modules/clothing/spacesuits/rig/modules/combat.dm b/code/modules/clothing/spacesuits/rig/modules/combat.dm index ed6ea15852..8f2e35f304 100644 --- a/code/modules/clothing/spacesuits/rig/modules/combat.dm +++ b/code/modules/clothing/spacesuits/rig/modules/combat.dm @@ -144,8 +144,8 @@ suit_overlay_active = "mounted-taser" suit_overlay_inactive = "mounted-taser" - interface_name = "mounted energy gun" - interface_desc = "A shoulder-mounted cell-powered energy gun." + interface_name = "mounted taser" + interface_desc = "A shoulder-mounted cell-powered taser." gun_type = /obj/item/weapon/gun/energy/taser/mounted diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index d820e89cf9..8944bc3109 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -103,64 +103,34 @@ var/list/slot_equipment_priority = list( \ //Puts the item into your l_hand if possible and calls all necessary triggers/updates. returns 1 on success. /mob/proc/put_in_l_hand(var/obj/item/W) - if(lying) return 0 - if(!istype(W)) return 0 - if(!l_hand) - W.forceMove(src) //TODO: move to equipped? - l_hand = W - W.layer = 20 //TODO: move to equipped? -// l_hand.screen_loc = ui_lhand - W.equipped(src,slot_l_hand) - if(client) client.screen |= W - if(pulling == W) stop_pulling() - update_inv_l_hand() - return 1 - return 0 + if(lying || !istype(W)) + return 0 + return 1 //Puts the item into your r_hand if possible and calls all necessary triggers/updates. returns 1 on success. /mob/proc/put_in_r_hand(var/obj/item/W) - if(lying) return 0 - if(!istype(W)) return 0 - if(!r_hand) - W.forceMove(src) - r_hand = W - W.layer = 20 -// r_hand.screen_loc = ui_rhand - W.equipped(src,slot_r_hand) - if(client) client.screen |= W - if(pulling == W) stop_pulling() - update_inv_r_hand() - return 1 - return 0 + if(lying || !istype(W)) + return 0 + return 1 //Puts the item into our active hand if possible. returns 1 on success. /mob/proc/put_in_active_hand(var/obj/item/W) - if(hand) return put_in_l_hand(W) - else return put_in_r_hand(W) + return 0 // Moved to human procs because only they need to use hands. //Puts the item into our inactive hand if possible. returns 1 on success. /mob/proc/put_in_inactive_hand(var/obj/item/W) - if(hand) return put_in_r_hand(W) - else return put_in_l_hand(W) + return 0 // As above. //Puts the item our active hand if possible. Failing that it tries our inactive hand. Returns 1 on success. //If both fail it drops it on the floor and returns 0. //This is probably the main one you need to know :) /mob/proc/put_in_hands(var/obj/item/W) - if(!W) return 0 - if(put_in_active_hand(W)) - update_inv_l_hand() - update_inv_r_hand() - return 1 - else if(put_in_inactive_hand(W)) - update_inv_l_hand() - update_inv_r_hand() - return 1 - else - W.forceMove(get_turf(src)) - W.layer = initial(W.layer) - W.dropped() + if(!W) return 0 + W.forceMove(get_turf(src)) + W.layer = initial(W.layer) + W.dropped() + return 0 // Removes an item from inventory and places it in the target atom. // If canremove or other conditions need to be checked then use unEquip instead. diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm index 579321a512..5c4be494ee 100644 --- a/code/modules/mob/living/carbon/give.dm +++ b/code/modules/mob/living/carbon/give.dm @@ -1,53 +1,42 @@ -mob/living/carbon/verb/give(var/mob/living/carbon/target in view(1)-usr) +/mob/living/carbon/human/verb/give(var/mob/living/target in view(1)-usr) set category = "IC" set name = "Give" - if(!istype(target) || target.stat == 2 || usr.stat == 2|| target.client == null) + + // TODO : Change to incapacitated() on merge. + if(usr.stat || usr.lying || usr.resting || usr.buckled) return - var/obj/item/I - if(!usr.hand && usr.r_hand == null) - usr << "You don't have anything in your right hand to give to [target.name]" + if(!istype(target) || target.stat || target.lying || target.resting || target.buckled || target.client == null) return - if(usr.hand && usr.l_hand == null) - usr << "You don't have anything in your left hand to give to [target.name]" - return - if(usr.hand) - I = usr.l_hand - else if(!usr.hand) - I = usr.r_hand + + var/obj/item/I = usr.get_active_hand() if(!I) + I = usr.get_inactive_hand() + if(!I) + usr << "You don't have anything in your hands to give to \the [target]." return - if(target.r_hand == null || target.l_hand == null) - switch(alert(target,"[usr] wants to give you \a [I]?",,"Yes","No")) - if("Yes") - if(!I) - return - if(!Adjacent(usr)) - usr << "You need to stay in reaching distance while giving an object." - target << "[usr.name] moved too far away." - return - if((usr.hand && usr.l_hand != I) || (!usr.hand && usr.r_hand != I)) - usr << "You need to keep the item in your active hand." - target << "[usr.name] seem to have given up on giving \the [I.name] to you." - return - if(target.r_hand != null && target.l_hand != null) - target << "Your hands are full." - usr << "Their hands are full." - return - else - usr.drop_item() - if(target.r_hand == null) - target.r_hand = I - else - target.l_hand = I - I.loc = target - I.layer = 20 - I.add_fingerprint(target) - target.update_inv_l_hand() - target.update_inv_r_hand() - usr.update_inv_l_hand() - usr.update_inv_r_hand() - target.visible_message("[usr.name] handed \the [I.name] to [target.name].") - if("No") - target.visible_message("[usr.name] tried to hand [I.name] to [target.name] but [target.name] didn't want it.") - else - usr << "[target.name]'s hands are full." + + if(alert(target,"[usr] wants to give you \a [I]. Will you accept it?",,"No","Yes") == "No") + target.visible_message("\The [usr] tried to hand \the [I] to \the [target], \ + but \the [target] didn't want it.") + return + + if(!I) return + + if(!Adjacent(target)) + usr << "You need to stay in reaching distance while giving an object." + target << "\The [usr] moved too far away." + return + + if(I.loc != usr || (usr.l_hand != I && usr.r_hand != I)) + usr << "You need to keep the item in your hands." + target << "\The [usr] seems to have given up on passing \the [I] to you." + return + + if(target.r_hand != null && target.l_hand != null) + target << "Your hands are full." + usr << "Their hands are full." + return + + if(usr.unEquip(I)) + target.put_in_hands(I) // If this fails it will just end up on the floor, but that's fitting for things like dionaea. + target.visible_message("\The [usr] handed \the [I] to \the [target].") diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index b8d93b1c55..047a7089c8 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1404,3 +1404,45 @@ get_scooped(H) return return ..() + +//Puts the item into our active hand if possible. returns 1 on success. +/mob/living/carbon/human/put_in_active_hand(var/obj/item/W) + return (hand ? put_in_l_hand(W) : put_in_r_hand(W)) + +//Puts the item into our inactive hand if possible. returns 1 on success. +/mob/living/carbon/human/put_in_inactive_hand(var/obj/item/W) + return (hand ? put_in_r_hand(W) : put_in_l_hand(W)) + +/mob/living/carbon/human/put_in_hands(var/obj/item/W) + if(!W) + return 0 + if(put_in_active_hand(W)) + update_inv_l_hand() + update_inv_r_hand() + return 1 + else if(put_in_inactive_hand(W)) + update_inv_l_hand() + update_inv_r_hand() + return 1 + else + return ..() + +/mob/living/carbon/human/put_in_l_hand(var/obj/item/W) + if(!..() || l_hand) + return 0 + W.forceMove(src) + l_hand = W + W.equipped(src,slot_l_hand) + W.add_fingerprint(src) + update_inv_l_hand() + return 1 + +/mob/living/carbon/human/put_in_r_hand(var/obj/item/W) + if(!..() || r_hand) + return 0 + W.forceMove(src) + r_hand = W + W.equipped(src,slot_r_hand) + W.add_fingerprint(src) + update_inv_r_hand() + return 1 diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index f3f399c886..75e6750d9f 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -1,15 +1,7 @@ /* Add fingerprints to items when we put them in our hands. This saves us from having to call add_fingerprint() any time something is put in a human's hands programmatically. - */ -/mob/living/carbon/human/put_in_l_hand(var/obj/item/W) - . = ..() - if(.) W.add_fingerprint(src) - -/mob/living/carbon/human/put_in_r_hand(var/obj/item/W) - . = ..() - if(.) W.add_fingerprint(src) /mob/living/carbon/human/verb/quick_equip() set name = "quick-equip" diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm index d6767fbbc4..34455a47a1 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm @@ -70,6 +70,7 @@ var/const/MAX_ACTIVE_TIME = 400 return /obj/item/clothing/mask/facehugger/equipped(mob/M) + ..() Attach(M) /obj/item/clothing/mask/facehugger/Crossed(atom/target) diff --git a/code/modules/nano/modules/power_monitor.dm b/code/modules/nano/modules/power_monitor.dm index 9d386e8c93..94223fc4ef 100644 --- a/code/modules/nano/modules/power_monitor.dm +++ b/code/modules/nano/modules/power_monitor.dm @@ -47,7 +47,7 @@ // Allows us to process UI clicks, which are relayed in form of hrefs. /datum/nano_module/power_monitor/Topic(href, href_list) if(..()) - return + return 1 if( href_list["clear"] ) active_sensor = null if( href_list["refresh"] ) diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index 8ad1ad0b26..c2feeaebfa 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -140,6 +140,7 @@ nanoui is used to open and update nano browser uis * @return nothing */ /datum/nanoui/proc/update_status(var/push_update = 0) + src_object = src_object.nano_host() var/new_status = src_object.CanUseTopic(user, state) if(master_ui) new_status = min(new_status, master_ui.status) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 6a60e79042..deec4910e6 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -479,8 +479,6 @@ user << "There is nothing to secure." return update_icon() - else if(emagged) - user << "The interface is broken." else wiresexposed = !wiresexposed user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]" @@ -608,8 +606,9 @@ qdel(W) stat &= ~BROKEN // Malf AI, removes the APC from AI's hacked APCs list. - if(hacker && hacker.hacked_apcs && src in hacker.hacked_apcs) + if(hacker && hacker.hacked_apcs && (src in hacker.hacked_apcs)) hacker.hacked_apcs -= src + hacker = null if (opened==2) opened = 1 update_icon() @@ -725,7 +724,7 @@ return var/list/data = list( - "locked" = locked, + "locked" = (locked && !emagged) ? 1 : 0, "isOperating" = operating, "externalPower" = main_status, "powerCellStatus" = cell ? cell.percent() : null, @@ -838,7 +837,7 @@ user << "\The [src] have AI control disabled!" return 0 else - if ((!in_range(src, user) || !istype(src.loc, /turf) || hacker)) // AI-hacked APCs cannot be controlled by other AIs, unlinked cyborgs or humans. + if (!in_range(src, user) || !istype(src.loc, /turf)) return 0 var/mob/living/carbon/human/H = user if (istype(H)) @@ -857,7 +856,7 @@ if(!can_use(usr, 1)) return 1 - if(!istype(usr, /mob/living/silicon) && locked) + if(!istype(usr, /mob/living/silicon) && (locked && !emagged)) // Shouldn't happen, this is here to prevent href exploits usr << "You must unlock the panel to use this!" return 1 diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 14e70bcfa4..3cf4113362 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -269,7 +269,7 @@ for(var/obj/item/weapon/grab/G in M.grabbed_by) grabstate = max(grabstate, G.state) if(grabstate >= GRAB_NECK) - damage_mult = 3.0 + damage_mult = 2.5 else if(grabstate >= GRAB_AGGRESSIVE) damage_mult = 1.5 P.damage *= damage_mult @@ -340,6 +340,7 @@ in_chamber.on_hit(M) if (in_chamber.damage_type != HALLOSS) + log_and_message_admins("[key_name(user)] commited suicide using \a [src]") user.apply_damage(in_chamber.damage*2.5, in_chamber.damage_type, "head", used_weapon = "Point blank shot in the mouth with \a [in_chamber]", sharp=1) user.death() else diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 3f4837df8b..1f43338b80 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -288,7 +288,7 @@ return splash_mob(target, amount, copy) if(isturf(target)) return trans_to_turf(target, amount, multiplier, copy) - if(isobj(target)) + if(isobj(target) && target.is_open_container()) return trans_to_obj(target, amount, multiplier, copy) return 0 diff --git a/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm b/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm index 99113bd1f2..b449237d77 100644 --- a/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm +++ b/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm @@ -85,6 +85,7 @@ var/obj/machinery/artifact/A = scanned_object A.anchored = 0 A.being_used = 0 + scanned_object = null /obj/machinery/artifact_analyser/Topic(href, href_list) if(href_list["begin_scan"]) @@ -97,8 +98,8 @@ continue if(O.invisibility) continue - if(istype(scanned_object, /obj/machinery/artifact)) - var/obj/machinery/artifact/A = scanned_object + if(istype(O, /obj/machinery/artifact)) + var/obj/machinery/artifact/A = O if(A.being_used) artifact_in_use = 1 else diff --git a/code/modules/xgm/xgm_gas_mixture.dm b/code/modules/xgm/xgm_gas_mixture.dm index 41100f6f1c..18c210a6dc 100644 --- a/code/modules/xgm/xgm_gas_mixture.dm +++ b/code/modules/xgm/xgm_gas_mixture.dm @@ -306,7 +306,7 @@ return 1 -/datum/gas_mixture/proc/react(atom/dump_location) +/datum/gas_mixture/proc/react() zburn(null, force_burn=0, no_check=0) //could probably just call zburn() here with no args but I like being explicit. @@ -442,20 +442,25 @@ total_gas[g] += gasmix.gas[g] if(total_volume > 0) - //Average out the gases - for(var/g in total_gas) - total_gas[g] /= total_volume + var/datum/gas_mixture/combined = new(total_volume) + combined.gas = total_gas //Calculate temperature - var/temperature = 0 - if(total_heat_capacity > 0) - temperature = total_thermal_energy / total_heat_capacity + combined.temperature = total_thermal_energy / total_heat_capacity + combined.update_values() + + //Allow for reactions + combined.react() + + //Average out the gases + for(var/g in combined.gas) + combined.gas[g] /= total_volume //Update individual gas_mixtures for(var/datum/gas_mixture/gasmix in gases) - gasmix.gas = total_gas.Copy() - gasmix.temperature = temperature + gasmix.gas = combined.gas.Copy() + gasmix.temperature = combined.temperature gasmix.multiply(gasmix.volume) return 1 diff --git a/html/changelog.html b/html/changelog.html index c917658ccd..aaf224fa94 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,13 @@ -->
+

06 December 2015

+

Hubblenaut updated:

+ +

22 November 2015

neersighted updated: