Cleaned up some code, fixed a bug with dead/sleeping people seeing you talk into headsets, reworked guncode some, readded point-blank shooting, removed disposal space cannon, hacktool works on windoors and secure closets, now.

This commit is contained in:
SkyMarshal
2012-03-05 12:27:55 -07:00
parent 3c9fe5a27f
commit 7534154fa2
23 changed files with 4980 additions and 4910 deletions
@@ -37,6 +37,7 @@ emp_act
/mob/living/carbon/human/proc/checkarmor(var/datum/organ/external/def_zone, var/type)
if(!type) return 0
var/protection = 0
var/adjuster = 0
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform)
for(var/bp in body_parts)
if(!bp) continue
@@ -44,6 +45,8 @@ emp_act
var/obj/item/clothing/C = bp
if(C.body_parts_covered & def_zone.body_part)
protection += C.armor[type]
adjuster++
protection = (adjuster ? protection/(sqrt(adjuster)) : 0)
return protection
+3
View File
@@ -338,6 +338,9 @@
var/list/eavesdroppers = get_mobs_in_view(7, src)
for(var/mob/M in listening)
eavesdroppers.Remove(M)
for(var/mob/M in eavesdroppers)
if(M.stat)
eavesdroppers.Remove(M)
for (var/obj/O in ((W | contents)-used_radios))
W |= O
+6 -3
View File
@@ -606,12 +606,15 @@
machine = null
src << browse(null, t1)
if(href_list["teleto"])
src.client.jumptoturf(locate(href_list["teleto"]))
if(href_list["priv_msg"])
var/mob/M = locate(href_list["priv_msg"])
if(M)
if(src.client && client.muted_complete)
src << "You are muted have a nice day"
return
//if(src.client && client.muted_complete)
// src << "You are muted have a nice day"
// return
if (!ismob(M))
return
+7 -19
View File
@@ -603,9 +603,7 @@
if(!istype(usr.equipped(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
usr.AllowTargetMove()
dir = (dir%2)+1
name = "Disallow Walking"
usr.client.AllowTargetMove()
gun_click_time = world.time
if("Disallow Walking")
@@ -614,9 +612,7 @@
if(!istype(usr.equipped(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
usr.AllowTargetMove()
dir = (dir%2)+1
name = "Allow Walking"
usr.client.AllowTargetMove()
gun_click_time = world.time
if("Allow Running")
@@ -625,9 +621,7 @@
if(!istype(usr.equipped(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
usr.AllowTargetRun()
dir = (dir%2)+1
name = "Disallow Running"
usr.client.AllowTargetRun()
gun_click_time = world.time
if("Disallow Running")
@@ -636,9 +630,7 @@
if(!istype(usr.equipped(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
usr.AllowTargetRun()
dir = (dir%2)+1
name = "Allow Running"
usr.client.AllowTargetRun()
gun_click_time = world.time
if("Allow Item Use")
@@ -647,9 +639,7 @@
if(!istype(usr.equipped(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
name = "Disallow Item Use"
dir = (dir%2)+1
usr.AllowTargetClick()
usr.client.AllowTargetClick()
gun_click_time = world.time
@@ -659,13 +649,11 @@
if(!istype(usr.equipped(),/obj/item/weapon/gun))
usr << "You need your gun in your active hand to do that!"
return
name = "Allow Item Use"
dir = (dir%2)+1
usr.AllowTargetClick()
usr.client.AllowTargetClick()
gun_click_time = world.time
if("Toggle Gun Mode")
usr.ToggleGunMode()
usr.client.ToggleGunMode()
else
DblClick()