From c3e161117823e6031d9c5959639dc5e9341aa338 Mon Sep 17 00:00:00 2001 From: Atlantis Date: Fri, 16 Oct 2015 14:38:20 +0200 Subject: [PATCH 01/19] Fixes #11149 - Corrects APC behavior when hacked by malfunctioning AI. - It should now be possible to hack the APC to unlock it even when it is hacked by the AI. Normal IDs still don't work on hacked APCs. - A little side-fix, removal of malfunctioning AI's hack of an APC should now work correctly. --- code/modules/power/apc.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 6a3fd1da71c..ba2bf2a7e7c 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -627,6 +627,7 @@ // Malf AI, removes the APC from AI's hacked APCs list. if(hacker && hacker.hacked_apcs && src in hacker.hacked_apcs) hacker.hacked_apcs -= src + hacker = null if (opened==2) opened = 1 update_icon() @@ -862,7 +863,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)) From cbcddcad53b9bb62acdc74a3a2edb3d006b65de7 Mon Sep 17 00:00:00 2001 From: Atlantis Date: Fri, 16 Oct 2015 14:44:01 +0200 Subject: [PATCH 02/19] Adjustment according to PsiOmegaDelta's suggestion --- code/modules/power/apc.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index ba2bf2a7e7c..a1811e496c4 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -625,7 +625,7 @@ 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) From e33ae21f75f3180c165e0d668b84255ef9427f19 Mon Sep 17 00:00:00 2001 From: Atlantis Date: Mon, 30 Nov 2015 23:19:04 +0100 Subject: [PATCH 03/19] Adjusts APC emag behavior - Mostly under-the-hood changes. - Emagged APCs may now have their panel removed with screwdriver, so you can access wires - Emagged APCs no longer rely on locked var, instead they check for emagged var as mwerezak suggested. --- code/modules/power/apc.dm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index a1811e496c4..7f232d80412 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"]" @@ -750,7 +748,7 @@ return var/list/data = list( - "locked" = locked, + "locked" = (locked && !emagged) ? 1 : 0, "isOperating" = operating, "externalPower" = main_status, "powerCellStatus" = cell ? cell.percent() : null, @@ -882,7 +880,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 From 1a293e2d9607a828cba59e5464c459d777982b0e Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Tue, 1 Dec 2015 08:48:47 +0100 Subject: [PATCH 04/19] Renames the rig mounted taser. Was previously called an energy gun, which could be mildly confusing. Port of https://github.com/PolarisSS13/Polaris/pull/127. --- code/modules/clothing/spacesuits/rig/modules/combat.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/spacesuits/rig/modules/combat.dm b/code/modules/clothing/spacesuits/rig/modules/combat.dm index d4bd12ec4bf..ee9f16e1a24 100644 --- a/code/modules/clothing/spacesuits/rig/modules/combat.dm +++ b/code/modules/clothing/spacesuits/rig/modules/combat.dm @@ -135,8 +135,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 From 44cb040e54d16ca3013a1ffab61267ae5190a5f4 Mon Sep 17 00:00:00 2001 From: Hubblenaut Date: Tue, 1 Dec 2015 17:10:45 +0100 Subject: [PATCH 05/19] Fixes camera repair --- code/game/machinery/camera/camera.dm | 14 ++++++- code/game/machinery/camera/camera_assembly.dm | 10 +++-- html/changelogs/Hubblenaut-master.yml | 37 +++++++++++++++++++ 3 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 html/changelogs/Hubblenaut-master.yml diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index e2371bbeb21..52ff3d08a38 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 75397278c03..86095dedfb8 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/html/changelogs/Hubblenaut-master.yml b/html/changelogs/Hubblenaut-master.yml new file mode 100644 index 00000000000..fca68d64515 --- /dev/null +++ b/html/changelogs/Hubblenaut-master.yml @@ -0,0 +1,37 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Hubblenaut + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Welding a broken camera will use the correct icon." + - tweak: "Camera assemblies remember their tag and network from previous usage." From c7e7c05a34b1a1082a9ecb890341eb051b24ec1f Mon Sep 17 00:00:00 2001 From: Atlantis Date: Wed, 2 Dec 2015 11:14:41 +0100 Subject: [PATCH 06/19] Fixes #11546 --- .../research/xenoarchaeology/machinery/artifact_analyser.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm b/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm index 99113bd1f2e..b449237d775 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 From 89f5c9f4056fff5dde20ccec051811748243dc74 Mon Sep 17 00:00:00 2001 From: Atlantis Date: Wed, 2 Dec 2015 11:27:28 +0100 Subject: [PATCH 07/19] Fixes #11540 --- code/game/objects/structures/crates_lockers/closets.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 40a8c9d38db..08a2a5af237 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) From cc72f823719946e11a274d7a2c2a9e47c8b72ffe Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Thu, 3 Dec 2015 21:50:24 +0100 Subject: [PATCH 08/19] Backports NanoUI fixes from dev. Fixes #11579. --- code/modules/nano/modules/crew_monitor.dm | 2 +- code/modules/nano/modules/power_monitor.dm | 2 +- code/modules/nano/nanoui.dm | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/nano/modules/crew_monitor.dm b/code/modules/nano/modules/crew_monitor.dm index b38ac805153..3d0cdac6575 100644 --- a/code/modules/nano/modules/crew_monitor.dm +++ b/code/modules/nano/modules/crew_monitor.dm @@ -2,7 +2,7 @@ name = "Crew monitor" /obj/nano_module/crew_monitor/Topic(href, href_list) - if(..()) return + if(..()) return 1 var/turf/T = get_turf(src) if (!T || !(T.z in config.player_levels)) usr << "Unable to establish a connection: You're too far away from the station!" diff --git a/code/modules/nano/modules/power_monitor.dm b/code/modules/nano/modules/power_monitor.dm index ed7c64aa943..b0bf72f39a3 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. /obj/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 74c21d49822..e1db4b4cc6c 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) From 7c85f846eb873385f85119bbfa6a19a6646c6bfa Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Fri, 4 Dec 2015 17:38:58 +1030 Subject: [PATCH 09/19] put_in_hands() refactor. --- code/game/objects/items.dm | 3 + .../objects/items/devices/chameleonproj.dm | 2 + code/modules/mob/inventory.dm | 56 +++++-------------- code/modules/mob/living/carbon/human/human.dm | 39 +++++++++++++ .../species/xenomorphs/alien_facehugger.dm | 1 + 5 files changed, 58 insertions(+), 43 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 2a68cb87f7f..fef7336371c 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -242,6 +242,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 f7ef8ad5c21..5a97968e93b 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/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index d820e89cf97..8944bc31099 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/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 308f2359e1f..5abb81b8dd9 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1383,3 +1383,42 @@ 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) + 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) + update_inv_r_hand() 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 d6767fbbc4e..34455a47a11 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) From 0cf5a709d1b9059f150e6123d0148ee347517e68 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Fri, 4 Dec 2015 17:55:21 +1030 Subject: [PATCH 10/19] Refactored give(). --- code/modules/mob/living/carbon/give.dm | 83 +++++++++++--------------- 1 file changed, 36 insertions(+), 47 deletions(-) diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm index 579321a5128..e9e3392dd45 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 + + 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].") From 398541f4ebae351467c5f3418692d4fafdf4cb6d Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Fri, 4 Dec 2015 18:14:40 +1030 Subject: [PATCH 11/19] Amendments. --- code/modules/mob/living/carbon/human/human.dm | 3 +++ code/modules/mob/living/carbon/human/inventory.dm | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 5abb81b8dd9..5da1ea100f8 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1412,6 +1412,7 @@ W.forceMove(src) l_hand = W W.equipped(src,slot_l_hand) + W.add_fingerprint(src) update_inv_l_hand() return 1 @@ -1421,4 +1422,6 @@ 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 c3b115e4f92..83d57579490 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" From 834f86241a844d2ac8068df1d2425f25470884bc Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 5 Dec 2015 00:49:35 +1030 Subject: [PATCH 12/19] Alters an unEquip() conditional in Give(). --- code/modules/mob/living/carbon/give.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm index e9e3392dd45..5c4be494ee5 100644 --- a/code/modules/mob/living/carbon/give.dm +++ b/code/modules/mob/living/carbon/give.dm @@ -37,6 +37,6 @@ usr << "Their hands are full." return - 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].") + 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].") From da080df7654a4b4a754732e8ff3f141070fb12d2 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Sat, 5 Dec 2015 09:25:56 +0100 Subject: [PATCH 13/19] Fixes records unintentionally referencing each other. Because of the limitations of BYOND's bitwise operators (which affect both the old and new implementations of num2hex()), you cannot use numbers larger than 2^16 with that proc. Manual port of https://github.com/PolarisSS13/Polaris/pull/430. --- code/datums/datacore.dm | 6 ++++-- code/defines/procs/records.dm | 2 +- code/game/machinery/records_scanner.dm | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 84a64d8ade4..d55662620ba 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 256ae51dbf2..d00bd415778 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/records_scanner.dm b/code/game/machinery/records_scanner.dm index af74c7c9412..90773dd5f9e 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"] From e6790c7e6d766f48bafb8a0977f2013ac4be6167 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Dec 2015 02:24:37 -0500 Subject: [PATCH 14/19] Fixes #11594 --- code/ATMOSPHERICS/datum_pipeline.dm | 3 --- code/ZAS/_gas_mixture_xgm.dm | 23 ++++++++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm index f4f4e379905..44c7cd25905 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/ZAS/_gas_mixture_xgm.dm b/code/ZAS/_gas_mixture_xgm.dm index 594924eb474..406ddfa98d7 100644 --- a/code/ZAS/_gas_mixture_xgm.dm +++ b/code/ZAS/_gas_mixture_xgm.dm @@ -308,7 +308,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. @@ -444,20 +444,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 From 29192fd8e8990a6dbc9c8c5063dae90335dcb301 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Dec 2015 02:35:18 -0500 Subject: [PATCH 15/19] Fixes #11466 --- code/modules/projectiles/gun.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 0cc7b38fe61..fbcc62e4fd4 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -340,7 +340,8 @@ in_chamber.on_hit(M) if (in_chamber.damage_type != HALLOSS) - 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) + log_and_message_admins("[key_name(user)] commited suicide using \a [src]") + user.apply_damage(in_chamber.damage*3.0, in_chamber.damage_type, "head", used_weapon = "Point blank shot in the mouth with \a [in_chamber]", sharp=1) user.death() else user << "Ow..." From 6688fc49fb95394ea6cc3a0c993d035013690229 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Dec 2015 02:38:17 -0500 Subject: [PATCH 16/19] Adds logging for regular suicide --- code/game/verbs/suicide.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index 030dad6d3fe..31c80661ab0 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("\red [src] is attempting to bite \his tongue off! It looks like \he's trying to commit suicide.", \ "\red [src] is jamming \his thumbs into \his eye sockets! It looks like \he's trying to commit suicide.", \ "\red [src] is twisting \his own neck! It looks like \he's trying to commit suicide.", \ From d508893e3cd500d2bf42ae010c249b53d9ace5f0 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Dec 2015 02:41:01 -0500 Subject: [PATCH 17/19] Tweaks pointblank multipliers to play better with droplimb thresholds --- code/modules/projectiles/gun.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index fbcc62e4fd4..ac5f322971a 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 @@ -341,7 +341,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*3.0, in_chamber.damage_type, "head", used_weapon = "Point blank shot in the mouth with \a [in_chamber]", sharp=1) + 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 user << "Ow..." From 23126315089e70b2e3d4e4d482cc0b636495679f Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Dec 2015 02:49:46 -0500 Subject: [PATCH 18/19] Fixes #11510 Splashing and external transfer now checks if the container is open --- code/modules/reagents/Chemistry-Holder.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index d077c5f3aa1..85d7191048b 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -301,7 +301,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 From eb81128fe3c5363a680f28d476d24646aff2437e Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Sun, 6 Dec 2015 11:28:26 +0100 Subject: [PATCH 19/19] Changelog update. --- html/changelog.html | 7 +++++ html/changelogs/.all_changelog.yml | 4 +++ html/changelogs/Hubblenaut-master.yml | 37 --------------------------- 3 files changed, 11 insertions(+), 37 deletions(-) delete mode 100644 html/changelogs/Hubblenaut-master.yml diff --git a/html/changelog.html b/html/changelog.html index da0c373d463..3b3bb449ae9 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,13 @@ -->
+

06 December 2015

+

Hubblenaut updated:

+
    +
  • Welding a broken camera will use the correct icon.
  • +
  • Camera assemblies remember their tag and network from previous usage.
  • +
+

22 November 2015

neersighted updated:

    diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 49b16be0a5c..cd8d552d8ef 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -2040,3 +2040,7 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. neersighted: - bugfix: Laptop Vendors now accept ID Containers (PDA, Wallet, etc). - bugfix: Personal Lockers now accept ID Containers (PDA, Wallet, etc). +2015-12-06: + Hubblenaut: + - bugfix: Welding a broken camera will use the correct icon. + - tweak: Camera assemblies remember their tag and network from previous usage. diff --git a/html/changelogs/Hubblenaut-master.yml b/html/changelogs/Hubblenaut-master.yml deleted file mode 100644 index fca68d64515..00000000000 --- a/html/changelogs/Hubblenaut-master.yml +++ /dev/null @@ -1,37 +0,0 @@ -################################ -# Example Changelog File -# -# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. -# -# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) -# When it is, any changes listed below will disappear. -# -# Valid Prefixes: -# bugfix -# wip (For works in progress) -# tweak -# soundadd -# sounddel -# rscadd (general adding of nice things) -# rscdel (general deleting of nice things) -# imageadd -# imagedel -# maptweak -# spellcheck (typo fixes) -# experiment -################################# - -# Your name. -author: Hubblenaut - -# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. -delete-after: True - -# Any changes you've made. See valid prefix list above. -# INDENT WITH TWO SPACES. NOT TABS. SPACES. -# SCREW THIS UP AND IT WON'T WORK. -# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. -# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. -changes: - - bugfix: "Welding a broken camera will use the correct icon." - - tweak: "Camera assemblies remember their tag and network from previous usage."