diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index 18653b0ec2..f3862f9825 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -201,21 +201,6 @@
details = 1
origin_tech = "magnets=4;biotech=2"
-/obj/item/weapon/melee/baton
- name = "stun baton"
- desc = "A stun baton for hitting people with."
- icon_state = "stunbaton"
- item_state = "baton"
- flags = FPRINT | TABLEPASS
- slot_flags = SLOT_BELT
- force = 10
- throwforce = 7
- w_class = 3
- var/charges = 10.0
- var/maximum_charges = 10.0
- var/status = 0
- origin_tech = "combat=2"
-
/obj/item/weapon/melee/chainofcommand
name = "chain of command"
desc = "The Captain is first and all other heads are last."
diff --git a/code/game/machinery/hydroponics.dm b/code/game/machinery/hydroponics.dm
index e25b257d25..696a1135f5 100644
--- a/code/game/machinery/hydroponics.dm
+++ b/code/game/machinery/hydroponics.dm
@@ -741,6 +741,14 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
playsound(src.loc, 'spray3.ogg', 50, 1, -6)
del(O)
src.updateicon()
+ else if(istype(O, /obj/item/weapon/wrench))
+ playsound(loc, 'Ratchet.ogg', 50, 1)
+ anchored = !anchored
+ user << "You [anchored ? "wrench" : "unwrench"] \the [src]."
+ else if(istype(O, /obj/item/weapon/shovel))
+ if(istype(src, /obj/machinery/hydroponics/soil))
+ user << "You clear up the [src]!"
+ del(src)
return
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index 1990e84452..d3c4471cba 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -1,91 +1,82 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
obj/machinery/recharger
- anchored = 1
+ name = "recharger"
icon = 'stationobjs.dmi'
icon_state = "recharger0"
- name = "recharger"
+ anchored = 1
use_power = 1
idle_power_usage = 4
active_power_usage = 250
+ var/obj/item/weapon/charging = null
- var/obj/item/weapon/gun/energy/charging = null
- var/obj/item/weapon/melee/baton/charging2 = null
-
- attackby(obj/item/weapon/G as obj, mob/user as mob)
- if (istype(G, /obj/item/weapon/gun/energy))
- if (src.charging || src.charging2)
- return
- if (istype(G, /obj/item/weapon/gun/energy/gun/nuclear) || istype(G, /obj/item/weapon/gun/energy/crossbow))
- user << "Your gun's recharge port was removed to make room for a miniaturized reactor."
- return
- if (istype(G, /obj/item/weapon/gun/energy/staff))
- user << "It's a wooden staff, not a gun!"
- return
- var/area/a = loc.loc // Gets our locations location, like a dream within a dream
- if(!isarea(a))
- return
- if(a.power_equip == 0) // There's no APC in this area, don't try to cheat power!
- user << "\red The [name] blinks red as you try to insert the item!"
- return
- user.drop_item()
- G.loc = src
- src.charging = G
- use_power = 2
- else if (istype(G, /obj/item/weapon/melee/baton))
- if (src.charging || src.charging2)
- return
- user.drop_item()
- G.loc = src
- src.charging2 = G
- use_power = 2
- else if(istype(G, /obj/item/weapon/wrench))
- if (src.charging || src.charging2)
- user << "\red Remove the weapon first!"
- return
- anchored = !anchored
- user << "You [anchored ? "attach" : "detach"] the recharger [anchored ? "to" : "from"] the ground"
- playsound(src.loc, 'Ratchet.ogg', 75, 1)
-
- attack_hand(mob/user as mob)
- src.add_fingerprint(user)
- if(ishuman(user))
- if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
- call(/obj/item/clothing/gloves/space_ninja/proc/drain)("MACHINERY",src,user:wear_suit)
- return
-
- if (src.charging)
- src.charging.update_icon()
- src.charging.loc = src.loc
- src.charging = null
- use_power = 1
- if(src.charging2)
- src.charging2.update_icon()
- src.charging2.loc = src.loc
- src.charging2 = null
- use_power = 1
-
- attack_paw(mob/user as mob)
- if ((ticker && ticker.mode.name == "monkey"))
- return src.attack_hand(user)
-
- process()
- if(stat & (NOPOWER|BROKEN) || !anchored)
+obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
+ if(istype(G, /obj/item/weapon/gun/energy) || istype(G, /obj/item/weapon/melee/baton))
+ if(charging)
return
+ var/area/a = get_area(src)
+ if(!isarea(a))
+ return
+ if(a.power_equip == 0) // There's no APC in this area, don't try to cheat power!
+ user << "\red The [name] blinks red as you try to insert the item!"
+ return
+ if (istype(G, /obj/item/weapon/gun/energy/gun/nuclear) || istype(G, /obj/item/weapon/gun/energy/crossbow))
+ user << "Your gun's recharge port was removed to make room for a miniaturized reactor."
+ return
+ if (istype(G, /obj/item/weapon/gun/energy/staff))
+ return
+ user.drop_item()
+ G.loc = src
+ charging = G
+ use_power = 2
+ update_icon()
+ else if(istype(G, /obj/item/weapon/wrench))
+ if(charging)
+ user << "\red Remove the weapon first!"
+ return
+ anchored = !anchored
+ user << "You [anchored ? "attached" : "detached"] the recharger."
+ playsound(loc, 'Ratchet.ogg', 75, 1)
- if (src.charging)
- if (src.charging.power_supply.charge < src.charging.power_supply.maxcharge)
- src.charging.power_supply.give(100)
- src.icon_state = "recharger1"
+obj/machinery/recharger/attack_hand(mob/user as mob)
+ add_fingerprint(user)
+
+ if(charging)
+ charging.update_icon()
+ charging.loc = loc
+ charging = null
+ use_power = 1
+ update_icon()
+
+obj/machinery/recharger/attack_paw(mob/user as mob)
+ if((ticker && ticker.mode.name == "monkey"))
+ return attack_hand(user)
+
+obj/machinery/recharger/process()
+ if(stat & (NOPOWER|BROKEN) || !anchored)
+ return
+
+ if(charging)
+ if(istype(charging, /obj/item/weapon/gun/energy))
+ var/obj/item/weapon/gun/energy/E = charging
+ if(E.power_supply.charge < E.power_supply.maxcharge)
+ E.power_supply.give(100)
+ icon_state = "recharger1"
use_power(250)
else
- src.icon_state = "recharger2"
- else if (src.charging2)
- if (src.charging2.charges < src.charging2.maximum_charges)
- src.charging2.charges++
- src.icon_state = "recharger1"
- use_power(250)
+ icon_state = "recharger2"
+ return
+ if(istype(charging, /obj/item/weapon/melee/baton))
+ var/obj/item/weapon/melee/baton/B = charging
+ if(B.charges < initial(B.charges))
+ B.charges++
+ icon_state = "recharger1"
+ use_power(150)
else
- src.icon_state = "recharger2"
- else
- src.icon_state = "recharger0"
+ icon_state = "recharger2"
+
+obj/machinery/recharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
+ if(charging)
+ icon_state = "recharger1"
+ else
+ icon_state = "recharger0"
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm
new file mode 100644
index 0000000000..cabccfa996
--- /dev/null
+++ b/code/game/objects/items/weapons/stunbaton.dm
@@ -0,0 +1,87 @@
+/obj/item/weapon/melee/baton
+ name = "stun baton"
+ desc = "A stun baton for incapacitating people with."
+ icon_state = "stunbaton"
+ item_state = "baton"
+ flags = FPRINT | TABLEPASS
+ slot_flags = SLOT_BELT
+ force = 10
+ throwforce = 7
+ w_class = 3
+ var/charges = 10
+ var/status = 0
+ origin_tech = "combat=2"
+
+/obj/item/weapon/melee/baton/update_icon()
+ if(status)
+ icon_state = "stunbaton_active"
+ else
+ icon_state = "stunbaton"
+
+/obj/item/weapon/melee/baton/attack_self(mob/user as mob)
+ if(status && (CLUMSY in user.mutations) && prob(50))
+ user << "\red You grab the [src] on the wrong side."
+ user.Weaken(30)
+ charges--
+ if(charges < 1)
+ status = 0
+ update_icon()
+ return
+ if(charges > 0)
+ status = !status
+ user << "\The [src] is now [status ? "on" : "off"]."
+ playsound(src.loc, "sparks", 75, 1, -1)
+ update_icon()
+ else
+ status = 0
+ user << "\The [src] is out of charge."
+ add_fingerprint(user)
+
+/obj/item/weapon/melee/baton/attack(mob/M as mob, mob/user as mob)
+ if(status && (CLUMSY in user.mutations) && prob(50))
+ user << "You accidentally hit yourself with the [src]!"
+ user.Weaken(30)
+ charges--
+ if(charges < 1)
+ status = 0
+ update_icon()
+ return
+
+ var/mob/living/carbon/human/H = M
+ if(isrobot(M))
+ ..()
+ return
+
+ if(user.a_intent != "help")
+ if(!..()) return
+ H.apply_effect(5, WEAKEN, 0)
+ H.visible_message("[M] has been beaten with the [src] by [user]!")
+ playsound(src.loc, "swing_hit", 50, 1, -1)
+ else if(!status)
+ H.visible_message("[M] has been prodded with the [src] by [user]. Luckily it was off.")
+ return
+
+ if(status)
+ H.apply_effect(10, STUN, 0)
+ H.apply_effect(10, WEAKEN, 0)
+ H.apply_effect(10, STUTTER, 0)
+ user.lastattacked = M
+ H.lastattacker = user
+ charges--
+ H.visible_message("[M] has been stunned with the [src] by [user]!")
+ playsound(src.loc, "sparks", 75, 1, -1)
+ if(charges < 1)
+ status = 0
+ update_icon()
+
+ add_fingerprint(user)
+
+/obj/item/weapon/melee/baton/emp_act(severity)
+ switch(severity)
+ if(1)
+ charges = 0
+ if(2)
+ charges = max(0, charges - 5)
+ if(charges < 1)
+ status = 0
+ update_icon()
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm
index 92908d7f37..9250c886b6 100644
--- a/code/game/objects/items/weapons/swords_axes_etc.dm
+++ b/code/game/objects/items/weapons/swords_axes_etc.dm
@@ -3,7 +3,7 @@ CONTAINS:
SWORD
BLADE
AXE
-STUN BATON
+CLASSIC BATON
ENERGY SHIELD (where else should i even put this)
*/
@@ -94,102 +94,6 @@ ENERGY SHIELD (where else should i even put this)
src.add_fingerprint(user)
return
-// STUN BATON
-
-/obj/item/weapon/melee/baton/update_icon()
- if(src.status)
- icon_state = "stunbaton_active"
- else
- icon_state = "stunbaton"
-
-/obj/item/weapon/melee/baton/attack_self(mob/user as mob)
- src.status = !( src.status )
- if ((CLUMSY in user.mutations) && prob(50))
- usr << "\red You grab the stunbaton on the wrong side."
- usr.Paralyse(60)
- return
- if (src.status)
- user << "\blue The baton is now on."
- playsound(src.loc, "sparks", 75, 1, -1)
- else
- user << "\blue The baton is now off."
- playsound(src.loc, "sparks", 75, 1, -1)
-
- update_icon()
- src.add_fingerprint(user)
- return
-
-/obj/item/weapon/melee/baton/attack(mob/M as mob, mob/user as mob)
- if ((CLUMSY in usr.mutations) && prob(50))
- usr << "\red You grab the stunbaton on the wrong side."
- usr.Weaken(30)
- return
- src.add_fingerprint(user)
- var/mob/living/carbon/human/H = M
-
- M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])")
- user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey]) (INTENT: [uppertext(user.a_intent)])")
-
- log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
-
-
-
- if(isrobot(M))
- ..()
- return
-
- if (status == 0 || (status == 1 && charges ==0))
- if(user.a_intent == "hurt")
- if(!..()) return
- M.Weaken(5)
- for(var/mob/O in viewers(M))
- if (O.client) O.show_message("\red [M] has been beaten with the stun baton by [user]!", 1)
- if(status == 1 && charges == 0)
- user << "\red Not enough charge"
- return
- else
- for(var/mob/O in viewers(M))
- if (O.client) O.show_message("\red [M] has been prodded with the stun baton by [user]! Luckily it was off.", 1)
- if(status == 1 && charges == 0)
- user << "\red Not enough charge"
- return
- if((charges > 0 && status == 1) && (istype(H, /mob/living/carbon)))
- flick("baton_active", src)
- if (user.a_intent == "hurt")
- if(!..()) return
- playsound(src.loc, 'Genhit.ogg', 50, 1, -1)
- if(isrobot(user))
- var/mob/living/silicon/robot/R = user
- R.cell.charge -= 20
- else
- charges--
- if (M.stuttering < 1 && (!(HULK in M.mutations) && M.canstun) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
- M.stuttering = 1
- M.Stun(1)
- M.Weaken(1)
- else
- playsound(src.loc, 'Egloves.ogg', 50, 1, -1)
- if(isrobot(user))
- var/mob/living/silicon/robot/R = user
- R.cell.charge -= 20
- else
- charges--
- if (M.stuttering < 10 && (!(HULK in M.mutations) && M.canstun) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
- M.stuttering = 10
- M.Stun(10)
- M.Weaken(10)
- user.lastattacked = M
- M.lastattacker = user
- for(var/mob/O in viewers(M))
- if (O.client) O.show_message("\red [M] has been stunned with the stun baton by [user]!", 1, "\red You hear someone fall", 2)
-
-/obj/item/weapon/melee/baton/emp_act(severity)
- switch(severity)
- if(1)
- src.charges = 0
- if(2)
- charges -= 5
-
/obj/item/weapon/melee/classic_baton/attack(mob/M as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You club yourself over the head."
diff --git a/code/game/objects/watercloset.dm b/code/game/objects/watercloset.dm
index 011acc91e7..ff020ee509 100644
--- a/code/game/objects/watercloset.dm
+++ b/code/game/objects/watercloset.dm
@@ -7,25 +7,53 @@
icon_state = "toilet0"
density = 0
anchored = 1
- var/open = 0
- var/mob/swirlie = null
+ var/open = 0 //if the lid is up
+ var/cistern = 0 //if the cistern bit is open
+ var/w_items = 0 //the combined w_class of all the items in the cistern
+ var/mob/swirlie = null //the mob being given a swirlie
/obj/structure/toilet/New()
open = round(rand(0, 1))
update_icon()
-/obj/structure/toilet/attack_hand()
- if(!swirlie)
- open = !open
- update_icon()
- else
- usr.visible_message("[usr] slams the toilet seat onto [swirlie.name]'s head!", "You slam the toilet seat onto [swirlie.name]'s head!", "You hear reverberating porcelain.")
+/obj/structure/toilet/attack_hand(mob/user as mob)
+ if(swirlie)
+ usr.visible_message("[user] slams the toilet seat onto [swirlie.name]'s head!", "You slam the toilet seat onto [swirlie.name]'s head!", "You hear reverberating porcelain.")
swirlie.adjustBruteLoss(8)
+ return
+
+ if(cistern && !open)
+ if(!contents.len)
+ user << "The cistern is empty."
+ return
+ else
+ var/obj/item/I = pick(contents)
+ if(ishuman(user))
+ if(!user.get_active_hand())
+ I.loc = user.loc
+ user.put_in_hand(I)
+ else
+ I.loc = get_turf(src)
+ user << "You find \an [I] in the cistern."
+ w_items -= I.w_class
+ return
+
+ open = !open
+ update_icon()
/obj/structure/toilet/update_icon()
- icon_state = "toilet[open]"
+ icon_state = "toilet[open][cistern]"
+
+/obj/structure/toilet/attackby(obj/item/I as obj, mob/user as mob)
+ if(istype(I, /obj/item/weapon/crowbar))
+ user << "You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]."
+ playsound(loc, 'stonedoor_openclose.ogg', 50, 1)
+ if(do_after(user, 30))
+ user.visible_message("[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!", "You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!", "You hear grinding porcelain.")
+ cistern = !cistern
+ update_icon()
+ return
-/obj/structure/toilet/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = I
var/mob/GM = G.affecting
@@ -45,6 +73,19 @@
else
user << "You need a tighter grip."
+ if(cistern)
+ if(I.w_class > 3)
+ user << "\The [I] does not fit."
+ return
+ if(w_items + I.w_class > 5)
+ user << "The cistern is full."
+ return
+ user.drop_item()
+ I.loc = src
+ w_items += I.w_class
+ user << "You carefully place \the [I] into the cistern."
+ return
+
/obj/structure/urinal
@@ -55,7 +96,7 @@
density = 0
anchored = 1
-/obj/structure/urinal/attackby(var/obj/item/I, var/mob/user)
+/obj/structure/urinal/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = I
var/mob/GM = G.affecting
@@ -97,7 +138,7 @@
wash(M)
check_heat(M)
-/obj/machinery/shower/attackby(var/obj/item/I, var/mob/user)
+/obj/machinery/shower/attackby(var/obj/item/I as obj, var/mob/user as mob)
if(I.type == /obj/item/device/analyzer)
user << "The water temperature seems to be [watertemp]."
if(istype(I, /obj/item/weapon/wrench))
diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm
index b7aedb1a59..e9b257bb6d 100644
--- a/code/modules/paperwork/filingcabinet.dm
+++ b/code/modules/paperwork/filingcabinet.dm
@@ -19,7 +19,7 @@
else if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'Ratchet.ogg', 50, 1)
anchored = !anchored
- user << "You [anchored ? "wrench" : "unwrench"] the [src]."
+ user << "You [anchored ? "wrench" : "unwrench"] \the [src]."
else
user << "You can't put a [P] in the [src]!"
diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm
index 496d26d3af..c94d279edb 100644
--- a/code/modules/paperwork/photocopier.dm
+++ b/code/modules/paperwork/photocopier.dm
@@ -102,6 +102,10 @@
updateUsrDialog()
else
user << "This cartridge is not yet ready for replacement! Use up the rest of the toner."
+ else if(istype(O, /obj/item/weapon/wrench))
+ playsound(loc, 'Ratchet.ogg', 50, 1)
+ anchored = !anchored
+ user << "You [anchored ? "wrench" : "unwrench"] \the [src]."
return
ex_act(severity)
diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm
index f4b1e1018e..d018e28934 100644
--- a/code/modules/projectiles/guns/projectile/shotgun.dm
+++ b/code/modules/projectiles/guns/projectile/shotgun.dm
@@ -70,6 +70,13 @@
origin_tech = "combat=3;materials=1"
ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
+ New()
+ for(var/i = 1, i <= max_shells, i++)
+ loaded += new ammo_type(src)
+
+ update_icon()
+ return
+
load_into_chamber()
// if(in_chamber)
// return 1 {R}
@@ -113,6 +120,7 @@
user << "You begin to shorten the barrel of \the [src]."
if(loaded.len)
afterattack(user, user) //will this work?
+ afterattack(user, user) //it will. we call it twice, for twice the FUN
playsound(user, fire_sound, 50, 1)
user.visible_message("The shotgun goes off!", "The shotgun goes off in your face!")
return
@@ -121,7 +129,7 @@
w_class = 3.0
item_state = "gun"
slot_flags &= ~SLOT_BACK //you can't sling it on your back
- slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
+ slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
name = "sawn-off shotgun"
desc = "Omar's coming!"
user << "You shorten the barrel of \the [src]!"
\ No newline at end of file
diff --git a/icons/obj/watercloset.dmi b/icons/obj/watercloset.dmi
index 6ca93940eb..99e28e8c27 100644
Binary files a/icons/obj/watercloset.dmi and b/icons/obj/watercloset.dmi differ
diff --git a/tgstation.dme b/tgstation.dme
index 273f5057a7..38cfa2ee8a 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -180,6 +180,8 @@
#define FILE_DIR "icons/vending_icons"
#define FILE_DIR "interface"
#define FILE_DIR "maps"
+#define FILE_DIR "maps/backup"
+#define FILE_DIR "maps/backup/backup"
#define FILE_DIR "maps/RandomZLevels"
#define FILE_DIR "sound"
#define FILE_DIR "sound/AI"
@@ -688,6 +690,7 @@
#include "code\game\objects\items\weapons\plant_bag.dm"
#include "code\game\objects\items\weapons\RCD.dm"
#include "code\game\objects\items\weapons\RSF.dm"
+#include "code\game\objects\items\weapons\stunbaton.dm"
#include "code\game\objects\items\weapons\stungloves.dm"
#include "code\game\objects\items\weapons\surgery_tools.dm"
#include "code\game\objects\items\weapons\swords_axes_etc.dm"