mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 23:53:47 +01:00
Bugfixes:
◦ Some head gear (nurse masks, kitty ears...) no longer block CPR. (Issue 167)
◦ DNA Scanners no longer attempt to empty their contents whenever something enters them. This fixes the issue with constructed scanners puking out the circuitry they were made with. (Issue 169)
◦ You can longer /me emote when you've been paralyzed by Zombie Powder. (Issue 168)
◦ Fixed some problems with MMIs / Robots / pAIs being able to understand eachother.
◦ You can put items, that are not clothing/under or clothing/suit, on food trays. How it works is it loops through all acceptable items in the location and adds them to its overlays and a special list variable. I had to change the way mob/drop_item() works a bit. Trays have a maximum capacity, and items of a larger w_class take up more capacity.
◦ Slippery items like banana peels and soap have been nerfed significantly.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2335 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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 <B>[] slams [] with the tray!</B>", 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 <B>[] slams [] with the tray!</B>", 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 <B>[] slams [] with the tray!</B>", 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 <B>[] slams [] with the tray!</B>", 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 <B>[] slams [] in the face with the tray!</B>", 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 <B>[] slams [] in the face with the tray!</B>", 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
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user