diff --git a/code/defines/obj/clothing/gimmick.dm b/code/defines/obj/clothing/gimmick.dm index cdfce897d1..c795cb0ebc 100644 --- a/code/defines/obj/clothing/gimmick.dm +++ b/code/defines/obj/clothing/gimmick.dm @@ -2,13 +2,13 @@ name = "Rabbit Ears" desc = "Wearing these makes you looks useless, and only good for your sex appeal." icon_state = "bunny" - flags = FPRINT | TABLEPASS | HEADSPACE + flags = FPRINT | TABLEPASS /obj/item/clothing/head/kitty name = "Kitty Ears" desc = "A pair of kitty ears. Meow!" icon_state = "kitty" - flags = FPRINT | TABLEPASS | HEADSPACE + flags = FPRINT | TABLEPASS var/icon/mob var/icon/mob2 diff --git a/code/defines/obj/clothing/head.dm b/code/defines/obj/clothing/head.dm index 72c3165928..d8e873497b 100644 --- a/code/defines/obj/clothing/head.dm +++ b/code/defines/obj/clothing/head.dm @@ -261,7 +261,7 @@ desc = "An amish looking helmet" icon_state = "tophat" item_state = "that" - flags = FPRINT|TABLEPASS|HEADSPACE + flags = FPRINT|TABLEPASS armor = list(melee = 0, bullet = 0, laser = 2,energy = 2, bomb = 0, bio = 0, rad = 0) /obj/item/clothing/head/helmet/greenbandana @@ -269,7 +269,7 @@ desc = "A green bandana with some fine nanotech lining." icon_state = "greenbandana" item_state = "greenbandana" - flags = FPRINT|TABLEPASS|HEADSPACE + flags = FPRINT|TABLEPASS armor = list(melee = 5, bullet = 5, laser = 5,energy = 5, bomb = 15, bio = 15, rad = 15) /obj/item/clothing/head/helmet/riot @@ -303,4 +303,4 @@ name = "Nurse Hat" desc = "Smokin'" icon_state = "nursehat" - flags = FPRINT|TABLEPASS|HEADSPACE \ No newline at end of file + flags = FPRINT|TABLEPASS \ No newline at end of file diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 5a1cf01c9d..74cb097fb6 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -1249,6 +1249,7 @@ w_class = 3.0 flags = FPRINT | TABLEPASS | CONDUCT m_amt = 3000 + /* // NOPE var/food_total= 0 var/burger_amt = 0 var/cheese_amt = 0 @@ -1262,6 +1263,11 @@ var/meatbreadslice_amt = 0 var/salad_amt = 0 var/miscfood_amt = 0 + */ + var/list/carrying = list() // List of things on the tray. - Doohl + var/max_carry = 10 // w_class = 1 -- takes up 1 + // w_class = 2 -- takes up 3 + // w_class = 3 -- takes up 5 /obj/item/weapon/kitchen/utensil diff --git a/code/game/dna.dm b/code/game/dna.dm index e60e84a4ee..d6594aed8c 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -546,10 +546,12 @@ usr.loc = src src.occupant = usr src.icon_state = "scanner_1" - for(var/obj/O in src) + /* + for(var/obj/O in src) // THIS IS P. STUPID -- LOVE, DOOHL //O = null del(O) //Foreach goto(124) + */ src.add_fingerprint(usr) return @@ -569,9 +571,11 @@ M.loc = src src.occupant = M src.icon_state = "scanner_1" - for(var/obj/O in src) + /* + for(var/obj/O in src) // this is stupid too O.loc = src.loc //Foreach goto(154) + */ src.add_fingerprint(user) //G = null diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm index 208af3efd5..f8dd639114 100644 --- a/code/game/objects/items/weapons/clown_items.dm +++ b/code/game/objects/items/weapons/clown_items.dm @@ -16,8 +16,8 @@ BIKE HORN M.pulling = null M << "\blue You slipped on the [name]!" playsound(src.loc, 'slip.ogg', 50, 1, -3) - M.stunned = 8 - M.weakened = 5 + M.stunned = 4 + M.weakened = 2 /obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato/HasEntered(AM as mob|obj) if (istype(AM, /mob/living/carbon)) @@ -28,8 +28,8 @@ BIKE HORN M.pulling = null M << "\blue You slipped on the [name]!" playsound(src.loc, 'slip.ogg', 50, 1, -3) - M.stunned = 10 - M.weakened = 7 + M.stunned = 8 + M.weakened = 5 /obj/item/weapon/soap/HasEntered(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist if (istype(AM, /mob/living/carbon)) @@ -40,8 +40,8 @@ BIKE HORN M.pulling = null M << "\blue You slipped on the [name]!" playsound(src.loc, 'slip.ogg', 50, 1, -3) - M.stunned = 8 - M.weakened = 5 + M.stunned = 3 + M.weakened = 2 /obj/item/weapon/soap/afterattack(atom/target, mob/user as mob) if(istype(target,/obj/effect/decal/cleanable)) diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index b8c126dbb5..937e256bbb 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -93,6 +93,20 @@ KNIFE ///////////////////////////////// TRAY -Agouri :3 /////////////////////////////////////////////// /obj/item/weapon/tray/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) + + // Drop all the things. All of them. + overlays = null + for(var/obj/item/I in carrying) + I.loc = M.loc + carrying.Remove(I) + if(isturf(I.loc)) + spawn() + for(var/i = 1, i <= rand(1,2), i++) + if(I) + step(I, pick(NORTH,SOUTH,EAST,WEST)) + sleep(rand(2,4)) + + if((user.mutations & CLOWN) && prob(50)) //What if he's a clown? M << "\red You accidentally slam yourself with the [src]!" M.weakened += 1 @@ -123,12 +137,12 @@ KNIFE else M.take_organ_damage(5) if(prob(50)) - //playsound(M, 'trayhit1.wav', 50, 1) + playsound(M, 'trayhit1.ogg', 50, 1) for(var/mob/O in viewers(M, null)) O.show_message(text("\red [] slams [] with the tray!", user, M), 1) return else - //playsound(M, 'trayhit2.wav', 50, 1) //we applied the damage, we played the sound, we showed the appropriate messages. Time to return and stop the proc + playsound(M, 'trayhit2.ogg', 50, 1) //we applied the damage, we played the sound, we showed the appropriate messages. Time to return and stop the proc for(var/mob/O in viewers(M, null)) O.show_message(text("\red [] slams [] with the tray!", user, M), 1) return @@ -151,11 +165,11 @@ KNIFE location.add_blood(H) if(prob(50)) - //playsound(M, 'trayhit1.wav', 50, 1) + playsound(M, 'trayhit1.ogg', 50, 1) for(var/mob/O in viewers(M, null)) O.show_message(text("\red [] slams [] with the tray!", user, M), 1) else - //playsound(M, 'trayhit2.wav', 50, 1) //sound playin' + playsound(M, 'trayhit2.ogg', 50, 1) //sound playin' for(var/mob/O in viewers(M, null)) O.show_message(text("\red [] slams [] with the tray!", user, M), 1) if(prob(10)) @@ -175,11 +189,11 @@ KNIFE location.add_blood(H) if(prob(50)) - // playsound(M, 'trayhit1.ogg', 50, 1) + playsound(M, 'trayhit1.ogg', 50, 1) for(var/mob/O in viewers(M, null)) O.show_message(text("\red [] slams [] in the face with the tray!", user, M), 1) else - //playsound(M, 'trayhit2.ogg', 50, 1) //sound playin' again + playsound(M, 'trayhit2.ogg', 50, 1) //sound playin' again for(var/mob/O in viewers(M, null)) O.show_message(text("\red [] slams [] in the face with the tray!", user, M), 1) if(prob(30)) @@ -193,6 +207,73 @@ KNIFE return return + +/* +===============~~~~~================================~~~~~==================== += = += Code for trays carrying things. By Doohl for Doohl erryday Doohl Doohl~ = += = +===============~~~~~================================~~~~~==================== +*/ +/obj/item/weapon/tray/proc/calc_carry() + // calculate the weight of the items on the tray + var/val = 0 // value to return + + for(var/obj/item/I in carrying) + if(I.w_class == 1.0) + val ++ + else if(I.w_class == 2.0) + val += 3 + else + val += 5 + + return val + +/obj/item/weapon/tray/pickup(mob/user) + overlays = null + + if(!isturf(loc)) + return + + for(var/obj/item/I in loc) + if( I != src && !I.anchored && !istype(I, /obj/item/clothing/under) && !istype(I, /obj/item/clothing/suit) && !istype(I, /obj/item/projectile) ) + var/add = 0 + if(I.w_class == 1.0) + add = 1 + else if(I.w_class == 2.0) + add = 3 + else + add = 5 + if(calc_carry() + add >= max_carry) + break + + I.loc = src + carrying.Add(I) + overlays += image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = 30 + I.layer) + +/obj/item/weapon/tray/dropped(mob/user) + var/foundtable = 0 + for(var/obj/structure/table/T in loc) + foundtable = 1 + break + + overlays = null + + for(var/obj/item/I in carrying) + I.loc = loc + carrying.Remove(I) + if(!foundtable && isturf(loc)) + // if no table, presume that the person just shittily dropped the tray on the ground and made a mess everywhere! + spawn() + for(var/i = 1, i <= rand(1,2), i++) + if(I) + step(I, pick(NORTH,SOUTH,EAST,WEST)) + sleep(rand(2,4)) + + + + + ///////////////////////////////////////////////////////////////////////////////////////// //Enough with the violent stuff, here's what happens if you try putting food on it ///////////////////////////////////////////////////////////////////////////////////////////// diff --git a/code/game/objects/storage/storage.dm b/code/game/objects/storage/storage.dm index 5b2797b1f6..b7186cc3f3 100644 --- a/code/game/objects/storage/storage.dm +++ b/code/game/objects/storage/storage.dm @@ -129,6 +129,20 @@ user << "\red This [W] is too big for this [src]" return + if(istype(W, /obj/item/weapon/tray)) + var/obj/item/weapon/tray/T = W + if(T.calc_carry() > 0) + if(prob(85)) + user << "\red The tray won't fit in [src]." + return + else + + W.loc = user.loc + if ((user.client && user.s_active != src)) + user.client.screen -= W + W.dropped(user) + user << "\red God damnit!" + var/sum_w_class = W.w_class for(var/obj/item/I in contents) sum_w_class += I.w_class //Adds up the combined w_classes which will be in the storage item if the item is added to it. @@ -138,7 +152,7 @@ return if ( W.w_class >= src.w_class && (istype(W, /obj/item/weapon/storage))) - user << "\red The [src] cannot hold [W] as it's a storage item of the same size." + user << "\red The [src] cannot hold [W] as it's a storage item of the same size." return //To prevent the stacking of the same sized items. user.u_equip(W) diff --git a/code/game/objects/tables_racks.dm b/code/game/objects/tables_racks.dm index ce9d17d411..db9eaf1de3 100644 --- a/code/game/objects/tables_racks.dm +++ b/code/game/objects/tables_racks.dm @@ -155,8 +155,8 @@ TABLE AND RACK OBJECT INTERATIONS del(src) return - user.drop_item() - if(W && W.loc) W.loc = src.loc + user.drop_item(src) + //if(W && W.loc) W.loc = src.loc // Unnecessary - see: mob/proc/drop_item(atom) - Doohl return @@ -197,8 +197,8 @@ TABLE AND RACK OBJECT INTERATIONS del(src) return - user.drop_item() - if(W && W.loc) W.loc = src.loc + user.drop_item(src) + //if(W && W.loc) W.loc = src.loc return @@ -239,8 +239,8 @@ TABLE AND RACK OBJECT INTERATIONS return if(isrobot(user)) return - user.drop_item() - if(W && W.loc) W.loc = src.loc + user.drop_item(src) + //if(W && W.loc) W.loc = src.loc return if (istype(W, /obj/item/weapon/wrench)) @@ -267,8 +267,8 @@ TABLE AND RACK OBJECT INTERATIONS del(src) return - user.drop_item() - if(W && W.loc) W.loc = src.loc + user.drop_item(src) + //if(W && W.loc) W.loc = src.loc return //RACKS diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm index 7e5c54ca85..2642edc791 100644 --- a/code/modules/mob/living/carbon/brain/brain.dm +++ b/code/modules/mob/living/carbon/brain/brain.dm @@ -20,8 +20,12 @@ return 1 if (istype(other, /mob/living/silicon/decoy)) return 1 + if (istype(other, /mob/living/silicon/pai)) + return 1 if (istype(other, /mob/living/silicon/robot)) return 1 if (istype(other, /mob/living/carbon/human)) return 1 + if (istype(other, /mob/living/carbon/metroid)) + return 1 return ..() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index d539cb00fe..44b21d7514 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -62,6 +62,10 @@ message = "[src] [input]" if ("me") + if (muted || silent) + return + if (stat) + return if(!(message)) return else diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 8ae52a1764..3dce0a8a6d 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -159,7 +159,7 @@ T.Entered(item) return -/mob/proc/drop_item() +/mob/proc/drop_item(var/atom/target) var/obj/item/W = equipped() if (W) @@ -178,7 +178,10 @@ if (client) client.screen -= W if (W) - W.loc = loc + if(target) + W.loc = target.loc + else + W.loc = loc W.dropped(src) if (W) W.layer = initial(W.layer) diff --git a/icons/changelog.html b/icons/changelog.html index 1db6667279..4adb0bc90f 100644 --- a/icons/changelog.html +++ b/icons/changelog.html @@ -54,6 +54,22 @@ Stuff which is in development and not yet visible to players or just code relate (ie. code improvements for expandability, etc.) should not be listed here. They should be listed in the changelog upon commit tho. Thanks. --> +8 October 2011: + + 2 October 2011:
  • Petethegoat updated: