From 2655c9b3411606bf60eea2f0376ddd2d5bb2b3ea Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Tue, 11 Feb 2014 01:55:32 -0600 Subject: [PATCH 01/17] pAI messenger bugfix. pAI has to be a special little snowflake and have it's own messenger proc instead of letting a AI-PDA handle it. So, updated it with the newest tnote variable functionality so it can participate. --- code/modules/mob/living/silicon/pai/software.dm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index 27d557c70cc..6e688c2bdc6 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -643,5 +643,12 @@ dat += "" dat += "" dat += "

" - dat += "Messages:
[pda.tnote]" - return dat \ No newline at end of file + for(var/index in pda.tnote) + if(index["sent"]) + dat += addtext("→ To ", index["owner"],":
", index["message"], "
") + else + dat += addtext("← From ", index["owner"],":
", index["message"], "
") + + + + return dat From 1c9271d2181d60989b522e57291f7567402ca494 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Thu, 13 Feb 2014 05:36:46 -0600 Subject: [PATCH 02/17] Code effeciency project: Sun datum Because of the wrong direction of this sign, every single solar array was being checked for occlusion every tick. This should fix that right up. Trackers set to update their angle only when the sun does. Solar panels set to calculate occlusion every minute (was every tick (though thought to be set to every 6 minutes (36 degrees)), now checks every 6 degrees of sun movement or so) --- code/datums/sun.dm | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/code/datums/sun.dm b/code/datums/sun.dm index 9ce8a73cb72..7e1cbb51749 100644 --- a/code/datums/sun.dm +++ b/code/datums/sun.dm @@ -6,6 +6,7 @@ var/rate var/list/solars // for debugging purposes, references solars_list at the constructor var/nexttime = 3600 // Replacement for var/counter to force the sun to move every X IC minutes + var/lastAngleUpdate /datum/sun/New() @@ -24,15 +25,25 @@ counter = 0 */ angle = ((rate*world.time/100)%360 + 360)%360 + /* Yields a 45 - 75 IC minute rotational period Rotation rate can vary from 4.8 deg/min to 8 deg/min (288 to 480 deg/hr) */ - // To prevent excess server load the server only updates the sun's sight lines every 6 minutes - if(nexttime < world.time) + if(lastAngleUpdate != angle) + for(var/obj/machinery/power/tracker/T in solars_list) + if(!T.powernet) + solars_list.Remove(T) + continue + T.set_angle(angle) + lastAngleUpdate=angle + + + + if(nexttime > world.time) return - nexttime = nexttime + 3600 // 600 world.time ticks = 1 minute, 3600 = 6 minutes. + nexttime = nexttime + 600 // 600 world.time ticks = 1 minute // now calculate and cache the (dx,dy) increments for line drawing @@ -54,22 +65,13 @@ dy = c / abs(s) - for(var/obj/machinery/power/M in solars_list) + for(var/obj/machinery/power/solar/S in solars_list) - if(!M.powernet) - solars_list.Remove(M) + if(!S.powernet) + solars_list.Remove(S) continue - - // Solar Tracker - if(istype(M, /obj/machinery/power/tracker)) - var/obj/machinery/power/tracker/T = M - T.set_angle(angle) - - // Solar Panel - else if(istype(M, /obj/machinery/power/solar)) - var/obj/machinery/power/solar/S = M - if(S.control) - occlusion(S) + if(S.control) + occlusion(S) From ca75160d6a76cf86beab7c54e49a617b94eeb125 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Thu, 13 Feb 2014 13:03:13 -0600 Subject: [PATCH 03/17] People in lobby won't see PDA messages. --- code/game/objects/items/devices/PDA/PDA.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 29a45a532d3..e3bb2f3e2f8 100755 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -809,6 +809,8 @@ var/global/list/obj/item/device/pda/PDAs = list() P.tnote.Add(list(list("sent" = 0, "owner" = "[owner]", "job" = "[ownjob]", "message" = "[t]", "target" = "\ref[src]"))) for(var/mob/M in player_list) if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS)) // src.client is so that ghosts don't have to listen to mice + if(istype(M, /mob/new_player)) + continue M.show_message("PDA Message - [owner] -> [P.owner]: [t]") if(!conversations.Find("\ref[P]")) From 39bfcc1e7a17aec0d60d0225c90c7d7125b48484 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Thu, 13 Feb 2014 21:56:58 -0600 Subject: [PATCH 04/17] Code effeciency project: handle_embedded_objects Before: EVERYTIME someone moved their character this proc would be called and loop through every organ looking for implanted items to see if it needs to apply damage. After: We create a flag that is set when an item embeddes, only when that flag is set do we do that loop through organs upon movement. Also every 10 ticks while that flag is set we will check to see if we need to unset it. Conflicts: code/modules/mob/living/carbon/human/human_damage.dm --- code/modules/mob/living/carbon/human/human.dm | 1 + code/modules/mob/living/carbon/human/human_damage.dm | 3 ++- code/modules/mob/living/carbon/human/human_defense.dm | 1 + code/modules/mob/living/carbon/human/human_movement.dm | 3 ++- code/modules/mob/living/carbon/human/life.dm | 9 ++++++++- 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 4455d7c27aa..b36fc9044df 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -7,6 +7,7 @@ icon_state = "body_m_s" var/list/hud_list = list() var/datum/species/species //Contains icon generation and language information, set during New(). + var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us. /mob/living/carbon/human/dummy real_name = "Test Dummy" diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index dec63819493..d09fa5b20da 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -251,6 +251,7 @@ if(!istype(W, /obj/item/weapon/butch/meatcleaver)) organ.implants += W visible_message("\The [W] sticks in the wound!") + embedded_flag = 1 src.verbs += /mob/proc/yank_out_object W.add_blood(src) if(ismob(W.loc)) @@ -273,4 +274,4 @@ if(prob(60)) step_rand(H) if(!stat) - src << "Your [H] fell off!" \ No newline at end of file + src << "Your [H] fell off!" diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 8ec602fc0c0..f3575e3bf5d 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -100,6 +100,7 @@ emp_act (SP.loc) = organ organ.implants += SP visible_message("The projectile sticks in the wound!") + embedded_flag = 1 src.verbs += /mob/proc/yank_out_object SP.add_blood(src) return (..(P , def_zone)) diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 51a68c4da91..32df867a023 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -6,7 +6,8 @@ if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything - handle_embedded_objects() //Moving with objects stuck in you can cause bad times. + if(embedded_flag) + handle_embedded_objects() //Moving with objects stuck in you can cause bad times. if(reagents.has_reagent("hyperzine")) return -1 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 087018404e0..59c0d5325a4 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -130,7 +130,7 @@ handle_environment(environment) //Status updates, death etc. - handle_regular_status_updates() //TODO: optimise ~Carn + handle_regular_status_updates() //TODO: optimise ~Carn NO SHIT ~Ccomp update_canmove() //Update our name based on whether our face is obscured/disfigured @@ -1146,6 +1146,13 @@ if(halloss > 0) adjustHalLoss(-1) + if(embedded_flag && !(life_tick % 10)) + var/list/E + E = get_visible_implants(0) + if(!E.len) + embedded_flag = 0 + + //Eyes if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own blinded = 1 From 0b7e70a293fbd7161e0381365d4c77e717c25eba Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Tue, 11 Feb 2014 03:20:22 -0600 Subject: [PATCH 05/17] Bugfix: AI Camera light toggle Fixes #3676 Before: Toggling would get stuck where it wouldn't toggle the camera until you reset your view. After: Camera light toggles, you have to toggle off before turning on a new camera light though. --- code/modules/mob/living/silicon/ai/ai.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index b2daab5bca5..a7b4daf78bb 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -692,10 +692,11 @@ var/list/ai_list = list() camera_light_on = !camera_light_on src << "Camera lights [camera_light_on ? "activated" : "deactivated"]." if(!camera_light_on) - if(src.current) - src.current.SetLuminosity(0) + if(current) + current.SetLuminosity(0) + current = null else - src.lightNearbyCamera() + lightNearbyCamera() From dd1f5f1546bc25d1a070c1748f177fa93c7a4004 Mon Sep 17 00:00:00 2001 From: Segrain Date: Mon, 10 Feb 2014 01:38:32 +0300 Subject: [PATCH 06/17] Fix for unpinning humans. --- code/modules/mob/mob.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 22ae39d5ce2..85a904f5de4 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1188,7 +1188,6 @@ mob/proc/yank_out_object() var/datum/wound/internal_bleeding/I = new (15) affected.wounds += I H.custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 1) - return 1 selection.loc = get_turf(src) From 0568a0d3f282cda2df76891ea6008759b7a82b09 Mon Sep 17 00:00:00 2001 From: Segrain Date: Sun, 9 Feb 2014 13:34:40 +0300 Subject: [PATCH 07/17] Fix for unlocking exploit. --- code/modules/mining/abandonedcrates.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm index ce2023db5b1..e7f45999a4e 100644 --- a/code/modules/mining/abandonedcrates.dm +++ b/code/modules/mining/abandonedcrates.dm @@ -62,7 +62,7 @@ if(30) new/obj/item/weapon/melee/baton(src) -/obj/structure/closet/crate/secure/loot/attack_hand(mob/user as mob) +/obj/structure/closet/crate/secure/loot/togglelock(mob/user as mob) if(locked) user << "The crate is locked with a Deca-code lock." var/input = input(usr, "Enter digit from [min] to [max].", "Deca-Code Lock", "") as num @@ -71,6 +71,8 @@ if (input == code) user << "The crate unlocks!" locked = 0 + overlays.Cut() + overlays += greenlight else if (input == null || input > max || input < min) user << "You leave the crate alone." else From 85b59532fe35de9812231d3e28e00847e370c7cf Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 30 Jan 2014 21:30:58 +1030 Subject: [PATCH 08/17] using a welder with already damaged eyes no longer causes you to go blind Conflicts: code/game/objects/items/weapons/tools.dm --- code/game/objects/items/weapons/tools.dm | 62 +++++++++++++----------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 78c2429f80d..21b59d4739d 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -360,35 +360,39 @@ /obj/item/weapon/weldingtool/proc/eyecheck(mob/user as mob) if(!iscarbon(user)) return 1 var/safety = user:eyecheck() - var/mob/living/carbon/human/H = user - var/datum/organ/internal/eyes/E = H.internal_organs["eyes"] - switch(safety) - if(1) - usr << "\red Your eyes sting a little." - E.damage += rand(1, 2) - if(E.damage > 12) - user.eye_blurry += rand(3,6) - if(0) - usr << "\red Your eyes burn." - E.damage += rand(2, 4) + if(istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + var/datum/organ/internal/eyes/E = H.internal_organs["eyes"] + switch(safety) + if(1) + usr << "\red Your eyes sting a little." + E.damage += rand(1, 2) + if(E.damage > 12) + user.eye_blurry += rand(3,6) + if(0) + usr << "\red Your eyes burn." + E.damage += rand(2, 4) + if(E.damage > 10) + E.damage += rand(4,10) + if(-1) + usr << "\red Your thermals intensify the welder's glow. Your eyes itch and burn severely." + user.eye_blurry += rand(12,20) + E.damage += rand(12, 16) + if(safety<2) + if(E.damage > 10) - E.damage += rand(4,10) - if(-1) - usr << "\red Your thermals intensify the welder's glow. Your eyes itch and burn severely." - user.eye_blurry += rand(12,20) - E.damage += rand(12, 16) - if(E.damage > 10 && safety < 2) - user << "\red Your eyes are really starting to hurt. This can't be good for you!" - if (E.damage >= E.min_broken_damage) - user << "\red You go blind!" - user.sdisabilities |= BLIND - else if (E.damage >= E.min_bruised_damage) - user << "\red You go blind!" - user.eye_blind = 5 - user.eye_blurry = 5 - user.disabilities |= NEARSIGHTED - spawn(100) - user.disabilities &= ~NEARSIGHTED + user << "\red Your eyes are really starting to hurt. This can't be good for you!" + + if (E.damage >= E.min_broken_damage) + user << "\red You go blind!" + user.sdisabilities |= BLIND + else if (E.damage >= E.min_bruised_damage) + user << "\red You go blind!" + user.eye_blind = 5 + user.eye_blurry = 5 + user.disabilities |= NEARSIGHTED + spawn(100) + user.disabilities &= ~NEARSIGHTED return @@ -491,4 +495,4 @@ attack_self(mob/user as mob) open = !open user << "\blue You [open?"open" : "close"] the conversion kit." - update_icon() + update_icon() From 438e48a5c1c7e02eed29c35456b1edd41ca75655 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 30 Jan 2014 21:35:02 +1030 Subject: [PATCH 09/17] Fixes #4306 (When a head goes into cryo storage during Rev, a random crewmember is chosen as a target instead.) Conflicts: code/game/machinery/cryopod.dm --- code/game/machinery/cryopod.dm | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 8dfc60e5981..7eb966a3e9f 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -211,20 +211,22 @@ obj/machinery/computer/cryopod/Topic(href, href_list) frozen_items += W //Update any existing objectives involving this mob. - for(var/mob/living/M in world) //There has to be a more efficient way to do this. - if(!(M.mind) || !(M.mind.objectives.len)) continue + for(var/datum/objective/O in all_objectives) + if(istype(O,/datum/objective/mutiny)) //We don't want revs to get objectives that aren't for heads of staff. Letting them win or lose based on cryo is silly so we remove the objective. + del(O) //TODO: Update rev objectives on login by head (may happen already?) ~ Z + else if(O.target && istype(O.target,/datum/mind)) + if(O.target == occupant.mind) + if(O.owner && O.owner.current) + O.owner.current << "\red You get the feeling your target is no longer within your reach. Time for Plan [pick(list("A","B","C","D","X","Y","Z"))]..." + O.target = null + spawn(1) //This should ideally fire after the occupant is deleted. + if(!O) return + O.find_target() + if(!(O.target)) + all_objectives -= O + O.owner.objectives -= O + del(O) - for(var/datum/objective/O in M.mind.objectives) - if(O.target && istype(O.target,/datum/mind)) - if(O.target == occupant.mind) - if(O.owner && O.owner.current) - O.owner.current << "\red You get the feeling your target is no longer within your reach. Time for Plan [pick(list("A","B","C","D","X","Y","Z"))]..." - O.target = null - spawn(1) //This should ideally fire after the occupant is deleted. - if(!O) return - O.find_target() - if(!(O.target)) - O.owner.objectives -= O //Handle job slot/tater cleanup. var/job = occupant.mind.assigned_role From 151e9f61287ed17fec377d7b744d02680e52bb67 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 30 Jan 2014 22:10:44 +1030 Subject: [PATCH 10/17] Discovered/fixed a division by zero error for standing on the supermatter core. --- code/modules/supermatter/supermatter.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index 477aab3914a..7877462fa76 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -177,7 +177,7 @@ for(var/mob/living/carbon/human/l in view(src, min(7, round(power ** 0.25)))) // If they can see it without mesons on. Bad on them. if(!istype(l.glasses, /obj/item/clothing/glasses/meson)) - l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / get_dist(l, src) ) ) ) + l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1,get_dist(l, src)) ) ) ) for(var/mob/living/l in range(src, round((power / 100) ** 0.25))) var/rads = (power / 10) * sqrt( 1 / get_dist(l, src) ) From 6464f04c88c1a4f82e0ee228481c949bcce736d1 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 30 Jan 2014 22:46:48 +1030 Subject: [PATCH 11/17] Fixes #3907 --- code/game/machinery/shieldgen.dm | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index a0b2b20ebee..ab2c3e77b9a 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -393,7 +393,7 @@ user.visible_message("[user] turned the shield generator off.", \ "You turn off the shield generator.", \ "You hear heavy droning fade out.") - src.cleanup() + for(var/dir in list(1,2,4,8)) src.cleanup(dir) else src.active = 1 icon_state = "Shield_Gen +a" @@ -433,14 +433,7 @@ "You hear heavy droning fade out") icon_state = "Shield_Gen" src.active = 0 - spawn(1) - src.cleanup(1) - spawn(1) - src.cleanup(2) - spawn(1) - src.cleanup(4) - spawn(1) - src.cleanup(8) + for(var/dir in list(1,2,4,8)) src.cleanup(dir) /obj/machinery/shieldwallgen/proc/setup_field(var/NSEW = 0) var/turf/T = src.loc From 4776dfd94fea87ab191c24c377886d858f58e917 Mon Sep 17 00:00:00 2001 From: alex-gh Date: Fri, 14 Feb 2014 14:13:03 +0100 Subject: [PATCH 12/17] Telebaton now only stuns if it actually hits. --- code/_onclick/item_attack.dm | 2 +- code/game/objects/items/weapons/swords_axes_etc.dm | 8 +++++--- code/modules/mob/living/carbon/human/human_defense.dm | 9 +++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 33289c34591..e1a89c454ce 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -145,7 +145,7 @@ if(istype(M, /mob/living/carbon/human)) - M:attacked_by(src, user, def_zone) + return M:attacked_by(src, user, def_zone) else switch(damtype) if("brute") diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index 0f5b6fcbf84..deb732895a7 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -166,8 +166,13 @@ H.update_inv_r_hand() playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1) add_fingerprint(user) +<<<<<<< HEAD if (!blood_DNA) return if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any +======= + + if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any +>>>>>>> 8850a43... Fixes #3847 overlays.Cut()//this might delete other item overlays as well but eeeeeeeh var/icon/I = new /icon(src.icon, src.icon_state) @@ -194,7 +199,6 @@ if(!..()) return if(!isrobot(target)) playsound(src.loc, "swing_hit", 50, 1, -1) - //target.Stun(4) //naaah target.Weaken(4) else playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1, -1) @@ -243,8 +247,6 @@ /* * Energy Axe */ -/obj/item/weapon/melee/energy/axe/attack(target as mob, mob/user as mob) - ..() /obj/item/weapon/melee/energy/axe/attack_self(mob/user as mob) src.active = !( src.active ) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index f3575e3bf5d..0c0e3096b50 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -201,7 +201,7 @@ emp_act target_zone = user.zone_sel.selecting if(!target_zone && !src.stat) visible_message("\red [user] misses [src] with \the [I]!") - return + return 0 if(istype(I, /obj/item/weapon/butch/meatcleaver) && src.stat == DEAD && user.a_intent == "harm") var/obj/item/weapon/reagent_containers/food/snacks/meat/human/newmeat = new /obj/item/weapon/reagent_containers/food/snacks/meat/human(get_turf(src.loc)) @@ -226,10 +226,10 @@ emp_act var/datum/organ/external/affecting = get_organ(target_zone) if (!affecting) - return + return 0 if(affecting.status & ORGAN_DESTROYED) user << "What [affecting.display_name]?" - return + return 0 var/hit_area = affecting.display_name if((user != src) && check_shields(I.force, "the [I.name]")) @@ -246,7 +246,7 @@ emp_act var/obj/item/weapon/card/emag/emag = I emag.uses-- affecting.sabotaged = 1 - return + return 1 if(I.attack_verb.len) visible_message("\red [src] has been [pick(I.attack_verb)] in the [hit_area] with [I.name] by [user]!") @@ -301,6 +301,7 @@ emp_act if(bloody) bloody_body(src) + return 1 /mob/living/carbon/human/proc/bloody_hands(var/mob/living/source, var/amount = 2) From 5ada6ea4cc706ee33ef70b226e77ab9b7d9e94d1 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Fri, 10 Jan 2014 01:24:24 +1030 Subject: [PATCH 13/17] Changed world loop to all_objective loop in cryopod check. Added all_objective add/remove procs to datum/objective. Conflicts: code/game/machinery/cryopod.dm --- code/game/gamemodes/objective.dm | 6 ++++++ code/game/machinery/cryopod.dm | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 1be0c2fe405..9b596da3028 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -1,4 +1,5 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 +var/global/list/all_objectives = list() var/list/potential_theft_objectives=typesof(/datum/theft_objective) \ - /datum/theft_objective \ @@ -14,9 +15,14 @@ datum/objective var/completed = 0 //currently only used for custom objectives. New(var/text) + all_objectives |= src if(text) explanation_text = text + Del() + all_objectives -= src + ..() + proc/check_completion() return completed diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 7eb966a3e9f..3a0de6a8006 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -96,7 +96,6 @@ obj/machinery/computer/cryopod/Topic(href, href_list) frozen_items -= I else if(href_list["crew"]) - user << "\red Functionality unavailable at this time." src.updateUsrDialog() @@ -227,7 +226,6 @@ obj/machinery/computer/cryopod/Topic(href, href_list) O.owner.objectives -= O del(O) - //Handle job slot/tater cleanup. var/job = occupant.mind.assigned_role From 9aaf0b8a5c5a59bce0d77f25f7f5e72a87bb426c Mon Sep 17 00:00:00 2001 From: alex-gh Date: Fri, 14 Feb 2014 14:22:39 +0100 Subject: [PATCH 14/17] fixed unfinished merge --- code/game/objects/items/weapons/swords_axes_etc.dm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index deb732895a7..9769ce6478d 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -166,13 +166,8 @@ H.update_inv_r_hand() playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1) add_fingerprint(user) -<<<<<<< HEAD if (!blood_DNA) return - if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any -======= - if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any ->>>>>>> 8850a43... Fixes #3847 overlays.Cut()//this might delete other item overlays as well but eeeeeeeh var/icon/I = new /icon(src.icon, src.icon_state) From 078e5af528667cbb46242c798a65f0df4b96555f Mon Sep 17 00:00:00 2001 From: Loganbacca Date: Thu, 30 Jan 2014 23:42:21 +1300 Subject: [PATCH 15/17] Fix item drop layer bug Similar to the handcuff resisting layer bug. When removing an item from your inventory that has associated inventory slots, items that were dropped from the extra inventory slots would be dropped with incorrect layer variables (set to 20 so they were rendered over the UI). Now when the extra items are dropped, it calls the drop_from_inventory() proc, which correctly changes their layer back. --- code/modules/mob/living/carbon/human/inventory.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 56fa7716d33..c5ed01fd688 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -104,20 +104,20 @@ if (W == wear_suit) if(s_store) - u_equip(s_store) + drop_from_inventory(s_store) if(W) success = 1 wear_suit = null update_inv_wear_suit() else if (W == w_uniform) if (r_store) - u_equip(r_store) + drop_from_inventory(r_store) if (l_store) - u_equip(l_store) + drop_from_inventory(l_store) if (wear_id) - u_equip(wear_id) + drop_from_inventory(wear_id) if (belt) - u_equip(belt) + drop_from_inventory(belt) w_uniform = null success = 1 update_inv_w_uniform() From f60e7c6488fbf7e8c472fa4bf5c0b5af34302b91 Mon Sep 17 00:00:00 2001 From: Loganbacca Date: Thu, 30 Jan 2014 21:35:38 +1300 Subject: [PATCH 16/17] Fix handcuff resist - layer bug Fixes #4324 Resisting out of handcuffs was leaving the handcuffs layer set to 20 (over top of the UI). Changed it to use the drop_from_inventory() proc so it handles the drop event correctly. --- code/modules/mob/living/living.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index be03e96784e..c346dc9db7d 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -623,9 +623,10 @@ for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink O.show_message("\red [CM] manages to remove the handcuffs!", 1) CM << "\blue You successfully remove \the [CM.handcuffed]." - CM.handcuffed.loc = usr.loc + CM.drop_from_inventory(CM.handcuffed) CM.handcuffed = null CM.update_inv_handcuffed() + else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time)) CM.next_move = world.time + 100 CM.last_special = world.time + 100 @@ -661,7 +662,7 @@ for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink O.show_message("\red [CM] manages to remove the legcuffs!", 1) CM << "\blue You successfully remove \the [CM.legcuffed]." - CM.legcuffed.loc = usr.loc + CM.drop_from_inventory(CM.legcuffed) CM.legcuffed = null CM.update_inv_legcuffed() From bf94d316427d9f8544725f0901acfe795f76b05d Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sat, 25 Jan 2014 23:36:11 -0600 Subject: [PATCH 17/17] RP-revconvert bugfix Now only humans that are logged in, alive, and not already a revolutionary (no special_role) show up in the list. Instead of EVERY mob type (simple_animals, borgs, etc.) --- code/game/gamemodes/revolution/rp_revolution.dm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/code/game/gamemodes/revolution/rp_revolution.dm b/code/game/gamemodes/revolution/rp_revolution.dm index 135ffa956a7..7deb03fd690 100644 --- a/code/game/gamemodes/revolution/rp_revolution.dm +++ b/code/game/gamemodes/revolution/rp_revolution.dm @@ -155,9 +155,17 @@ return 1 -/mob/living/carbon/human/proc/RevConvert(mob/M as mob in oview(src)) +/mob/living/carbon/human/proc/RevConvert() set name = "Rev-Convert" set category = "IC" + var/list/Possible = list() + for (var/mob/living/carbon/human/P in oview(src)) + if(!stat && P.client && P.mind && !P.mind.special_role) + Possible += P + if(!Possible.len) + src << "\red There doesn't appear to be anyone available for you to convert here." + return + var/mob/living/carbon/human/M = input("Select a person to convert", "Viva la revolution!", null) as mob in Possible if(((src.mind in ticker.mode:head_revolutionaries) || (src.mind in ticker.mode:revolutionaries))) if((M.mind in ticker.mode:head_revolutionaries) || (M.mind in ticker.mode:revolutionaries)) src << "\red [M] is already be a revolutionary!" @@ -250,4 +258,4 @@ rev_obj.target = M.mind rev_obj.explanation_text = "Assassinate, convert or capture [M.real_name], the [M.mind.assigned_role]." rev_mind.objectives += rev_obj - rev_mind.current << "\red A new Head of Staff, [M.real_name], the [M.mind.assigned_role] has appeared. Your objectives have been updated." \ No newline at end of file + rev_mind.current << "\red A new Head of Staff, [M.real_name], the [M.mind.assigned_role] has appeared. Your objectives have been updated."