diff --git a/code/game/gamemodes/wizard/magic_summon.dm b/code/game/gamemodes/wizard/magic_summon.dm
index a0d3f9cc35..dbcb8790c0 100644
--- a/code/game/gamemodes/wizard/magic_summon.dm
+++ b/code/game/gamemodes/wizard/magic_summon.dm
@@ -89,7 +89,8 @@
if("stunrevolver")
new /obj/item/weapon/gun/energy/stunrevolver(get_turf(H))
if("glock")
- new /obj/item/weapon/gun/projectile/automatic/deagle/glock(get_turf(H))
+ new /obj/item/weapon/gun/projectile/automatic/pistol/glock(get_turf(H))
+ new /obj/item/weapon/silencer(get_turf(H))
if("m1911")
new /obj/item/weapon/gun/projectile/automatic/deagle/m1911(get_turf(H))
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index 0f69d77802..7419d30e85 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -72,6 +72,10 @@ var/global/list/autolathe_recipes_hidden = list( \
/* new /obj/item/weapon/shield/riot(), */ \
)
+var/global/list/autolathe_recipes_emagged = list( \
+ new /obj/item/weapon/silencer(), \
+ )
+
/obj/machinery/autolathe
name = "autolathe"
desc = "It produces items using metal and glass."
@@ -88,6 +92,7 @@ var/global/list/autolathe_recipes_hidden = list( \
anchored = 1.0
var/list/L = list()
var/list/LL = list()
+ var/list/LLL = list()
var/hacked = 0
var/disabled = 0
var/shocked = 0
@@ -115,6 +120,7 @@ var/global/list/autolathe_recipes_hidden = list( \
wires = new(src)
src.L = autolathe_recipes
src.LL = autolathe_recipes_hidden
+ src.LLL = autolathe_recipes_emagged
/obj/machinery/autolathe/interact(mob/user)
if(..())
@@ -151,6 +157,15 @@ var/global/list/autolathe_recipes_hidden = list( \
else
attack_hand(user)
return 1
+
+ else if(istype(O, /obj/item/weapon/card/emag) && !emagged)
+ src.emagged = 1
+ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+ s.set_up(5, 1, src)
+ s.start()
+ user << "You short out the [src]'s circuit board, enabling debug mode."
+ visible_message("BZZzZZzZZzZT")
+ return
if (src.m_amount + O.m_amt > max_m_amount)
user << "The autolathe is full. Please remove metal from the autolathe in order to insert more."
@@ -214,7 +229,7 @@ var/global/list/autolathe_recipes_hidden = list( \
if(!attempting_to_build)
return
- if(locate(attempting_to_build, src.L) || locate(attempting_to_build, src.LL)) // see if the requested object is in one of the construction lists, if so, it is legit -walter0o
+ if(locate(attempting_to_build, src.L) || locate(attempting_to_build, src.LL) || locate(attempting_to_build, src.LLL)) // see if the requested object is in one of the construction lists, if so, it is legit -walter0o
template = attempting_to_build
else // somebody is trying to exploit, alert admins -walter0o
@@ -293,6 +308,8 @@ var/global/list/autolathe_recipes_hidden = list( \
objs += src.L
if(src.hacked)
objs += src.LL
+ if(src.emagged)
+ objs += src.LLL
for(var/obj/t in objs)
if(disabled || m_amount[t]", "The ", "")
diff --git a/code/modules/projectiles/guns/projectile/pistol.dm b/code/modules/projectiles/guns/projectile/pistol.dm
index cb3c8c61d8..ebf79c60af 100644
--- a/code/modules/projectiles/guns/projectile/pistol.dm
+++ b/code/modules/projectiles/guns/projectile/pistol.dm
@@ -86,6 +86,13 @@
icon_state = "[initial(icon_state)][silenced ? "-silencer" : ""][chambered ? "" : "-e"]"
return
+/obj/item/weapon/gun/projectile/automatic/pistol/glock
+ name = "glock"
+ desc = "A Glock pistol. Uses 9mm ammo."
+ icon_state = "glock"
+ force = 10.0
+ origin_tech = "combat=4;materials=3"
+ mag_type = /obj/item/ammo_box/magazine/m9mm
/obj/item/weapon/gun/projectile/automatic/deagle/m1911
name = "\improper M1911"
@@ -95,14 +102,6 @@
origin_tech = "combat=4;materials=4"
mag_type = /obj/item/ammo_box/magazine/sm45
-/obj/item/weapon/gun/projectile/automatic/deagle/glock
- name = "glock"
- desc = "A glock pistol. Uses 9mm ammo."
- icon_state = "glock"
- force = 10.0
- origin_tech = "combat=4;materials=3"
- mag_type = /obj/item/ammo_box/magazine/m9mm
-
/obj/item/glockbarrel
name = "handgun barrel"
desc = "One third of a low-caliber handgun."
@@ -129,7 +128,7 @@
if(istype(W,/obj/item/weapon/screwdriver))
if(construction)
user << "You finish the handgun."
- new /obj/item/weapon/gun/projectile/automatic/deagle/glock(user.loc)
+ new /obj/item/weapon/gun/projectile/automatic/pistol/glock(user.loc)
del(src)
return
@@ -160,3 +159,4 @@
icon_state = "silencer"
w_class = 2
var/oldsound = 0 //Stores the true sound the gun made before it was silenced
+ m_amt = 200000
diff --git a/icons/obj/gun.dmi b/icons/obj/gun.dmi
index bfc2c3368a..8646b24e42 100644
Binary files a/icons/obj/gun.dmi and b/icons/obj/gun.dmi differ