Turret exploit fix

This commit is contained in:
Markolie
2015-02-28 23:55:28 +01:00
parent 0b5494194e
commit 6ecfb9adf2
2 changed files with 9 additions and 9 deletions
+2 -4
View File
@@ -159,8 +159,7 @@
Topic("breaker=1", list("breaker"="1"), 0) // 0 meaning no window (consistency! wait...)
/obj/machinery/turretid/AICtrlClick() //turns off/on Turrets
src.enabled = !src.enabled
src.updateTurrets()
Topic("toggleOn", list("toggleOn" = 1), 1) // 1 meaning no window (consistency!)
/atom/proc/AIAltClick(var/atom/A)
AltClick(A)
@@ -179,8 +178,7 @@
return
/obj/machinery/turretid/AIAltClick() //toggles lethal on turrets
src.lethal = !src.lethal
src.updateTurrets()
Topic("toggleLethal", list("toggleLethal" = 1), 1) // 1 meaning no window (consistency!)
/atom/proc/AIMiddleClick()
return
+7 -5
View File
@@ -468,8 +468,8 @@
/obj/machinery/turretid/Topic(href, href_list)
if(..())
/obj/machinery/turretid/Topic(href, href_list, var/nowindow = 0)
if(..(href, href_list))
return 1
if (src.locked)
if (!istype(usr, /mob/living/silicon))
@@ -481,7 +481,8 @@
else if (href_list["toggleLethal"])
src.lethal = !src.lethal
src.updateTurrets()
src.attack_hand(usr)
if(!nowindow)
src.attack_hand(usr)
/obj/machinery/turretid/proc/updateTurrets()
if(control_area)
@@ -566,8 +567,9 @@
/obj/machinery/gun_turret/bullet_act(var/obj/item/projectile/Proj)
take_damage(Proj.damage)
return
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
take_damage(Proj.damage)
return
/obj/machinery/gun_turret/proc/die()
state = 2