From b1900af5fb50719c6d591cce7f3cae5fa98af46a Mon Sep 17 00:00:00 2001 From: Ren Erthilo Date: Sun, 22 Apr 2012 20:25:21 +0100 Subject: [PATCH] TG: Commited on behalf of Nodrak - Fixes: Issue 257 , Issue 346 and Issue 343 - Monkeys no longer continue to take suffocation damage after dying. - PDAs can no longer be used while stunned or paralysed. - Vending machines now have a delay to stop product spamming. Note: I upped the delay a little as it was still pretty spammable when I tested it, seems to be fine now as it's way more effort than it's worth to empty a vending machine. Revision: r3107 Author: trubblebass --- code/game/machinery/vending.dm | 12 +++++++----- code/game/objects/devices/PDA/PDA.dm | 2 +- code/game/objects/devices/PDA/cart.dm | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index fa3f10211c7..f696f28e9f5 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -50,7 +50,6 @@ To combat this, I changed the window name. -- Doohl //Add hidden inventory src.build_inventory(temp_hidden,temp_hiddenprices,1) src.build_inventory(temp_coin,temp_coin_amt, 0, 1) - power_change() return @@ -302,18 +301,21 @@ To combat this, I changed the window name. -- Doohl FOLKS IN IRC RULED THAT THIS WAS SHITTY -- Doohl No more delays! Go nuts~~~~~~~~~~~ - if(((src.last_reply + (src.vend_delay + 200)) <= world.time) && src.vend_reply) + A 20 second delay is stupid, a 2 second delay however, is not. -- Nodrak + No more greyshirts intentionally crashing clients through vended item spam! + */ + + if(((src.last_reply + (src.vend_delay + 50)) <= world.time) && src.vend_reply) spawn(0) src.speak(src.vend_reply) src.last_reply = world.time - */ use_power(5) if (src.icon_vend) //Show the vending animation if needed flick(src.icon_vend,src) - // spawn(src.vend_delay) NOPE.jpg - //src.vend_ready = 1 + spawn(src.vend_delay) + src.vend_ready = 1 if(R.price <= points) new product_path(get_turf(src)) diff --git a/code/game/objects/devices/PDA/PDA.dm b/code/game/objects/devices/PDA/PDA.dm index 26139627de7..a5741d8e00f 100755 --- a/code/game/objects/devices/PDA/PDA.dm +++ b/code/game/objects/devices/PDA/PDA.dm @@ -567,7 +567,7 @@ playsound(P.loc, 'twobeep.ogg', 50, 1) -// log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]") + log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]") if("Send Honk")//Honk virus diff --git a/code/game/objects/devices/PDA/cart.dm b/code/game/objects/devices/PDA/cart.dm index 2461604742a..9f8c9529d27 100644 --- a/code/game/objects/devices/PDA/cart.dm +++ b/code/game/objects/devices/PDA/cart.dm @@ -564,7 +564,7 @@ Code: /obj/item/weapon/cartridge/Topic(href, href_list) ..() - if (usr.stat || usr.restrained() || !in_range(loc, usr)) + if (!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr)) usr.machine = null usr << browse(null, "window=pda") return