diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm index 8107839b324..f2a10e3bcb4 100644 --- a/code/defines/procs/helpers.dm +++ b/code/defines/procs/helpers.dm @@ -1872,3 +1872,12 @@ proc/get_mob_with_client_list() proc/worldtime2text() return "[round(world.time / 36000)+12]:[(world.time / 600 % 60) < 10 ? add_zero(world.time / 600 % 60, 1) : world.time / 600 % 60]" + +/atom/proc/transfer_fingerprints_to(var/atom/A) + if(!istype(A.fingerprints,/list)) + A.fingerprints = list() + if(!istype(A.fingerprintshidden,/list)) + A.fingerprintshidden = list() + A.fingerprints |= fingerprints //detective + A.fingerprintshidden |= fingerprintshidden //admin + A.fingerprintslast = fingerprintslast \ No newline at end of file diff --git a/code/game/objects/devices/PDA/PDA.dm b/code/game/objects/devices/PDA/PDA.dm index aff5cfdf240..adb9bcf5e94 100644 --- a/code/game/objects/devices/PDA/PDA.dm +++ b/code/game/objects/devices/PDA/PDA.dm @@ -347,7 +347,7 @@ var/global/list/obj/item/device/pda/PDAs = list() var/count = 0 if (!toff) - for (var/obj/item/device/pda/P in PDAs) + for (var/obj/item/device/pda/P in sortList(PDAs)) if (!P.owner||P.toff||P == src) continue dat += "
  • [P]" if (istype(cartridge, /obj/item/weapon/cartridge/syndicate) && !istype(P, /obj/item/device/pda/ai)) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 2aa51adac39..b7ae0eefbd7 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -524,6 +524,7 @@ istype(W, /obj/item/weapon/scalpel) || \ istype(W, /obj/item/weapon/kitchen/utensil/knife) || \ istype(W, /obj/item/weapon/shard) || \ + istype(W, /obj/item/weapon/broken_bottle) || \ istype(W, /obj/item/weapon/reagent_containers/syringe) || \ istype(W, /obj/item/weapon/kitchen/utensil/fork) && W.icon_state != "forkloaded" || \ istype(W, /obj/item/weapon/twohanded/fireaxe) \ diff --git a/code/modules/chemical/Chemistry-Tools.dm b/code/modules/chemical/Chemistry-Tools.dm index e38437fccbb..24b50824b54 100644 --- a/code/modules/chemical/Chemistry-Tools.dm +++ b/code/modules/chemical/Chemistry-Tools.dm @@ -2732,12 +2732,135 @@ icon_state = "water_cup_e" ///////////////////////////////////////////////Alchohol bottles! -Agouri ////////////////////////// -//Notes by Darem: Functionally identical to regular drinks. The only difference is that the default bottle size is 100. +//Functionally identical to regular drinks. The only difference is that the default bottle size is 100. - Darem +//Bottles now weaken and break when smashed on people's heads. - Giacom + /obj/item/weapon/reagent_containers/food/drinks/bottle amount_per_transfer_from_this = 10 volume = 100 item_state = "beer" //Generic held-item sprite until unique ones are made. +// Bottles only last for one attack before breaking and becoming broken bottles + // Force is also part of the duration calculation. Meaning if you make a small bottle then give it a small force + // so it isn't too strong. + force = 15 + var/const/duration = 13 //Directly relates to the 'weaken' duration. Lowered by armor (i.e. helmets) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/smash(mob/living/target as mob, mob/living/user as mob) + + //Creates a shattering noise and replaces the bottle with a broken_bottle + user.drop_item() + var/obj/item/weapon/broken_bottle/B = new /obj/item/weapon/broken_bottle(user) + if(prob(33)) + new/obj/item/weapon/shard(target.loc) // Create a glass shard at the target's location! + B.icon_state = src.icon_state + + var/icon/I = new('drinks.dmi', src.icon_state) + I.Blend(B.broken_outline, ICON_OVERLAY, rand(5), 1) + I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0)) + B.icon = I + + playsound(src, "shatter", 70, 1) + user.put_in_active_hand(B) + src.transfer_fingerprints_to(B) + + del(src) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/attack(mob/living/target as mob, mob/living/user as mob) + + if(!target) + return + + if(user.a_intent != "hurt" || user == target) + return ..() + + + var/datum/organ/external/affecting = user.zone_sel.selecting //Find what the player is aiming at + + var/armor_block = 0 //Get the target's armour values for normal attack damage. + var/armor_duration = 0 //The more force the bottle has, the longer the duration. + + //Calculating duration and calculating damage. + if(ishuman(target)) + + var/mob/living/carbon/human/H = target + var/headarmor = 0 // Target's head armour + armor_block = H.run_armor_check(affecting, "melee") // For normal attack damage + + //If they have a hat/helmet and the user is targeting their head. + if(istype(H.head, /obj/item/clothing/head) && affecting == "head") + + // If their head has an armour value, assign headarmor to it, else give it 0. + if(H.head.armor["melee"]) + headarmor = H.head.armor["melee"] + else + headarmor = 0 + else + headarmor = 0 + + //Calculate the weakening duration for the target. + armor_duration = (duration - headarmor) + force + + else + //Only humans can have armour, right? + armor_block = target.run_armor_check(affecting, "melee") + if(affecting == "head") + armor_duration = duration + force + armor_duration /= 10 + + //Apply the damage! + target.apply_damage(force, BRUTE, affecting, armor_block) + + // You are going to knock someone out for longer if they are not wearing a helmet. + if(affecting == "head" && istype(target, /mob/living/carbon/)) + + //Display an attack message. + for(var/mob/O in viewers(user, null)) + O.show_message(text("\red [target] has been hit over the head with a bottle of [src.name], by [user]!"), 1) + + //Weaken the target for the duration that we calculated and divide it by 5. + if(armor_duration) + target.apply_effect(min(armor_duration, 10) , WEAKEN) // Never weaken more than a flash! + + else + //Default attack message and don't weaken the target. + for(var/mob/O in viewers(user, null)) + O.show_message(text("\red [target] has been attacked with a bottle of [src.name], by [user]!"), 1) + + //Attack logs + user.attack_log += text("\[[time_stamp()]\] Has attacked [target.name] ([target.ckey]) with a bottle!") + target.attack_log += text("\[[time_stamp()]\] Has been smashed with a bottle by [user.name] ([user.ckey])") + log_attack("[user.name] ([user.ckey]) attacked [target.name] with a bottle. ([target.ckey])") + + //The reagents in the bottle splash all over the target, thanks for the idea Nodrak + if(src.reagents) + for(var/mob/O in viewers(user, null)) + O.show_message(text("\blue The contents of the [src] splashes all over [target]!"), 1) + src.reagents.reaction(target, TOUCH) + + //Finally, smash the bottle. This kills (del) the bottle. + src.smash(target, user) + + return + +//Keeping this here for now, I'll ask if I should keep it here. +/obj/item/weapon/broken_bottle + + name = "Broken Bottle" + desc = "A bottle with a sharp broken bottom." + icon = 'drinks.dmi' + icon_state = "broken_bottle" + force = 9.0 + throwforce = 5.0 + throw_speed = 3 + throw_range = 5 + item_state = "beer" + //item_state - Need to find a bottle sprite + var/icon/broken_outline = icon('drinks.dmi', "broken") + + + + /obj/item/weapon/reagent_containers/food/drinks/bottle/gin name = "Griffeater Gin" desc = "A bottle of high quality gin, produced in the New London Space Station." diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 37471dba251..f8def31b1a8 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -30,7 +30,7 @@ aiPDA = new/obj/item/device/pda/ai(src) aiPDA.owner = name aiPDA.ownjob = "AI" - aiPDA.name = name + " (" + aiPDA.ownjob + ")" + aiPDA.name = "AI - " + name + " (" + aiPDA.ownjob + ")" if (istype(loc, /turf)) verbs.Add(/mob/living/silicon/ai/proc/ai_call_shuttle,/mob/living/silicon/ai/proc/ai_camera_track, \ diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 37b0513ba5d..c5a70dac5f7 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -16,7 +16,7 @@ if(aiPDA && aiPDA.name != name) aiPDA.owner = name - aiPDA.name = name + " (" + aiPDA.ownjob + ")" + aiPDA.name = "AI - " + name + " (" + aiPDA.ownjob + ")" if (src.malfhack) if (src.malfhack.aidisabled) diff --git a/html/changelog.html b/html/changelog.html index f1ed66ee4a4..cbfcc1eed29 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -47,7 +47,17 @@ should be listed in the changelog upon commit tho. Thanks. -->
    -

    05 July 2012

    +

    Friday July 6th, 2012

    +

    Giacom updated:

    + +
    + +
    +

    Thursday July 5th, 2012

    Carn updated:

    -

    Wed 4th July 2012

    +

    Wednesday July 4th, 2012

    39kk9t & Carn updated:

    -

    Saturday, June 30th

    +

    Saturday June 30th, 2012

    Icarus updated: