diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm
index 13bdac7b536..cdab2906826 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -155,13 +155,15 @@
qdel(cover) // qdel
..()
-/obj/machinery/porta_turret/proc/isLocked(mob/user)
+/obj/machinery/porta_turret/proc/isLocked(mob/user,var/message = 1)
if(ailock && (isrobot(user) || isAI(user)))
- user << "There seems to be a firewall preventing you from accessing this device."
+ if(message)
+ user << "There seems to be a firewall preventing you from accessing this device."
return 1
if(locked && !(isrobot(user) || isAI(user)))
- user << "Access denied."
+ if(message)
+ user << "Access denied."
return 1
return 0
@@ -193,7 +195,7 @@
settings[++settings.len] = list("category" = "Check Security Records", "setting" = "check_records", "value" = check_records)
settings[++settings.len] = list("category" = "Check Arrest Status", "setting" = "check_arrest", "value" = check_arrest)
settings[++settings.len] = list("category" = "Check Access Authorization", "setting" = "check_access", "value" = check_access)
- settings[++settings.len] = list("category" = "Check misc. Lifeforms", "setting" = "check_anomalies", "value" = check_anomalies)
+ settings[++settings.len] = list("category" = "Check Misc. Lifeforms", "setting" = "check_anomalies", "value" = check_anomalies)
data["settings"] = settings
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
@@ -215,7 +217,7 @@
usr << "Turrets can only be controlled using the assigned turret controller."
return 1
- if(isLocked(usr))
+ if(isLocked(usr,0))
return 1
if(!anchored)
@@ -274,18 +276,6 @@
user << "You remove the turret but did not manage to salvage anything."
qdel(src) // qdel
- if(istype(I, /obj/item/weapon/card/emag) && !emagged)
- //Emagging the turret makes it go bonkers and stun everyone. It also makes
- //the turret shoot much, much faster.
- user << "You short out [src]'s threat assessment circuits."
- visible_message("[src] hums oddly...")
- emagged = 1
- iconholder = 1
- controllock = 1
- enabled = 0 //turns off the turret temporarily
- sleep(60) //6 seconds for the traitor to gtfo of the area before the turret decides to ruin his shit
- enabled = 1 //turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here
-
else if((istype(I, /obj/item/weapon/wrench)))
if(enabled || raised)
user << "You cannot unsecure an active turret!"
@@ -334,6 +324,7 @@
//if the turret was attacked with the intention of harming it:
user.changeNext_move(CLICK_CD_MELEE)
take_damage(I.force * 0.5)
+ playsound(src.loc, 'sound/weapons/smash.ogg', 60, 1)
if(I.force * 0.5 > 1) //if the force of impact dealt at least 1 damage, the turret gets pissed off
if(!attacked && !emagged)
attacked = 1
@@ -342,6 +333,19 @@
attacked = 0
..()
+
+/obj/machinery/porta_turret/emag_act(user as mob)
+ if(!emagged)
+ //Emagging the turret makes it go bonkers and stun everyone. It also makes
+ //the turret shoot much, much faster.
+ user << "You short out [src]'s threat assessment circuits."
+ visible_message("[src] hums oddly...")
+ emagged = 1
+ iconholder = 1
+ controllock = 1
+ enabled = 0 //turns off the turret temporarily
+ sleep(60) //6 seconds for the traitor to gtfo of the area before the turret decides to ruin his shit
+ enabled = 1 //turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here
/obj/machinery/porta_turret/proc/take_damage(var/force)
health -= force
@@ -524,6 +528,7 @@
return
if(stat & BROKEN)
return
+ playsound(get_turf(src), 'sound/effects/turret/open.wav', 60, 1)
invisibility = 0
raising = 1
flick("popup", cover)
@@ -542,6 +547,7 @@
return
if(stat & BROKEN)
return
+ playsound(get_turf(src), 'sound/effects/turret/open.wav', 60, 1)
layer = 3
raising = 1
flick("popdown", cover)
diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm
index 3b7b48b48d1..19d88713d98 100644
--- a/code/game/machinery/turret_control.dm
+++ b/code/game/machinery/turret_control.dm
@@ -79,13 +79,6 @@
if(stat & BROKEN)
return
- if(!emagged && istype(W, /obj/item/weapon/card/emag))
- user << "You short out the turret controls' access analysis module."
- emagged = 1
- locked = 0
- ailock = 0
- return
-
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if(src.allowed(usr))
if(emagged)
@@ -95,6 +88,14 @@
user << "You [ locked ? "lock" : "unlock"] the panel."
return
return ..()
+
+/obj/machinery/turretid/emag_act(user as mob)
+ if(!emagged)
+ user << "You short out the turret controls' access analysis module."
+ emagged = 1
+ locked = 0
+ ailock = 0
+ return
/obj/machinery/turretid/attack_ai(mob/user as mob)
if(isLocked(user))
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index 21146c38573..6500acbaf88 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -149,6 +149,12 @@
user.visible_message("[user] fires [src][reflex ? " by reflex":""]!", \
"You fire [src][reflex ? "by reflex":""]!", \
"You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
+
+ if(heavy_weapon)
+ if(user.get_inactive_hand())
+ if(prob(15))
+ user.visible_message("[src] flies out of [user]'s hands!", "[src] kicks out of your grip!")
+ user.drop_item()
if (istype(in_chamber, /obj/item/projectile/bullet/blank)) // A hacky way of making blank shotgun shells work again. Honk.
in_chamber.delete()
diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm
index d744525ee17..8f5a2f470e4 100644
--- a/code/modules/projectiles/guns/energy/nuclear.dm
+++ b/code/modules/projectiles/guns/energy/nuclear.dm
@@ -140,6 +140,9 @@
w_class = 5
heavy_weapon = 1
can_flashlight = 0
+ projectile_type = /obj/item/projectile/energy/electrode
+ charge_cost = 1000
+ fire_delay = 20
/obj/item/weapon/gun/energy/gun/turret/update_icon()
icon_state = initial(icon_state)
@@ -148,18 +151,20 @@
switch(mode)
if(0)
mode = 1
- charge_cost = 1000
+ charge_cost = 500
fire_sound = 'sound/weapons/Laser.ogg'
user << "\red [src.name] is now set to kill."
- projectile_type = "/obj/item/projectile/beam"
+ projectile_type = /obj/item/projectile/beam
modifystate = "energykill"
+ fire_delay = 0
if(1)
mode = 0
- charge_cost = 500
- fire_sound = 'sound/weapons/Taser2.ogg'
- user << "\red [src.name] is now set to disable."
- projectile_type = "/obj/item/projectile/beam/disabler"
+ charge_cost = 1000
+ fire_sound = 'sound/weapons/Taser.ogg'
+ user << "\red [src.name] is now set to stun."
+ projectile_type = /obj/item/projectile/energy/electrode
modifystate = "energystun"
+ fire_delay = 20
update_icon()
if(user.l_hand == src)
user.update_inv_l_hand()
diff --git a/icons/obj/gun.dmi b/icons/obj/gun.dmi
index 7cee746fc5d..cbc9742a6c5 100644
Binary files a/icons/obj/gun.dmi and b/icons/obj/gun.dmi differ