mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
- Did some very minor optimizations to get_mobs_in_radio_ranges() and set the proc as a background proc.
- To help further lower the cost of this proc I have lowered the default intercom range to 2. I then added consistency of not being able to use an intercom from across the room by adding a check for distance, using the same variable as the intercom range. - Committing a fix by VistaPOWA for the changeling sting drink. You should be able to create it now by mixing screwdrivercocktail, limejuice and lemonjuice. Before it was orangejuice, limejuice, lemonuice and vodka but orangejuice and vodka would mix first to create screwdrivercocktail. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5560 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -188,20 +188,29 @@
|
||||
|
||||
|
||||
/proc/get_mobs_in_radio_ranges(var/list/obj/item/device/radio/radios)
|
||||
|
||||
set background = 1
|
||||
|
||||
. = list()
|
||||
|
||||
// Returns a list of mobs who can hear any of the radios given in @radios
|
||||
var/list/speaker_coverage = list()
|
||||
for(var/obj/item/device/radio/R in radios)
|
||||
|
||||
for(var/i = 1; i <= radios.len; i++)
|
||||
|
||||
var/obj/item/device/radio/R = radios[i]
|
||||
var/turf/speaker = get_turf(R)
|
||||
|
||||
if(speaker)
|
||||
for(var/turf/T in hear(R.canhear_range,speaker))
|
||||
speaker_coverage[T] = T
|
||||
|
||||
// Try to find all the players who can hear the message
|
||||
for(var/mob/M in player_list)
|
||||
for(var/i = 1; i <= player_list.len; i++)
|
||||
|
||||
var/mob/M = player_list[i]
|
||||
var/turf/ear = get_turf(M)
|
||||
|
||||
if(ear)
|
||||
if(speaker_coverage[ear])
|
||||
. |= M
|
||||
|
||||
@@ -558,7 +558,7 @@ Status: []<BR>"},
|
||||
return 10
|
||||
|
||||
if(auth_weapons) // check for weapon authorization
|
||||
if((isnull(perp:wear_id)) || (istype(perp:wear_id.GetID(), /obj/item/weapon/card/id/syndicate)))
|
||||
if((isnull(perp.wear_id)) || (istype(perp.wear_id.GetID(), /obj/item/weapon/card/id/syndicate)))
|
||||
|
||||
if((src.allowed(perp)) && !(src.lasercolor)) // if the perp has security access, return 0
|
||||
return 0
|
||||
@@ -569,40 +569,36 @@ Status: []<BR>"},
|
||||
if((istype(perp.r_hand, /obj/item/weapon/gun) && !istype(perp.r_hand, /obj/item/weapon/gun/projectile/shotgun)) || istype(perp.r_hand, /obj/item/weapon/melee/baton))
|
||||
threatcount += 4
|
||||
|
||||
if(istype(perp:belt, /obj/item/weapon/gun) || istype(perp:belt, /obj/item/weapon/melee/baton))
|
||||
if(istype(perp.belt, /obj/item/weapon/gun) || istype(perp.belt, /obj/item/weapon/melee/baton))
|
||||
threatcount += 2
|
||||
|
||||
if((src.lasercolor) == "b")//Lasertag turrets target the opposing team, how great is that? -Sieve
|
||||
threatcount = 0//But does not target anyone else
|
||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/redtag))
|
||||
threatcount += 4
|
||||
if((istype(perp:r_hand,/obj/item/weapon/gun/energy/laser/redtag)) || (istype(perp:l_hand,/obj/item/weapon/gun/energy/laser/redtag)))
|
||||
if((istype(perp.r_hand,/obj/item/weapon/gun/energy/laser/redtag)) || (istype(perp.l_hand,/obj/item/weapon/gun/energy/laser/redtag)))
|
||||
threatcount += 4
|
||||
if(istype(perp:belt, /obj/item/weapon/gun/energy/laser/redtag))
|
||||
if(istype(perp.belt, /obj/item/weapon/gun/energy/laser/redtag))
|
||||
threatcount += 2
|
||||
|
||||
if((src.lasercolor) == "r")
|
||||
threatcount = 0
|
||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||
threatcount += 4
|
||||
if((istype(perp:r_hand,/obj/item/weapon/gun/energy/laser/bluetag)) || (istype(perp:l_hand,/obj/item/weapon/gun/energy/laser/bluetag)))
|
||||
if((istype(perp.r_hand,/obj/item/weapon/gun/energy/laser/bluetag)) || (istype(perp.l_hand,/obj/item/weapon/gun/energy/laser/bluetag)))
|
||||
threatcount += 4
|
||||
if(istype(perp:belt, /obj/item/weapon/gun/energy/laser/bluetag))
|
||||
if(istype(perp.belt, /obj/item/weapon/gun/energy/laser/bluetag))
|
||||
threatcount += 2
|
||||
|
||||
if (src.check_records) // if the turret can check the records, check if they are set to *Arrest* on records
|
||||
for (var/datum/data/record/E in data_core.general)
|
||||
|
||||
var/perpname = perp.name
|
||||
if (perp:wear_id)
|
||||
var/obj/item/weapon/card/id/id = perp:wear_id
|
||||
if(istype(perp:wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = perp:wear_id
|
||||
id = pda.id
|
||||
if (perp.wear_id)
|
||||
var/obj/item/weapon/card/id/id = perp.wear_id.GetID()
|
||||
if (id)
|
||||
perpname = id.registered_name
|
||||
else
|
||||
var/obj/item/device/pda/pda = perp:wear_id
|
||||
perpname = pda.owner
|
||||
|
||||
if (E.fields["name"] == perpname)
|
||||
for (var/datum/data/record/R in data_core.security)
|
||||
if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "intercom"
|
||||
anchored = 1
|
||||
w_class = 4.0
|
||||
canhear_range = 4
|
||||
canhear_range = 2
|
||||
var/number = 0
|
||||
var/anyai = 1
|
||||
var/mob/living/silicon/ai/ai = list()
|
||||
|
||||
@@ -575,7 +575,8 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
/obj/item/device/radio/hear_talk(mob/M as mob, msg)
|
||||
|
||||
if (broadcasting)
|
||||
talk_into(M, msg)
|
||||
if(get_dist(src, M) <= canhear_range)
|
||||
talk_into(M, msg)
|
||||
/*
|
||||
/obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message)
|
||||
|
||||
|
||||
@@ -1763,8 +1763,8 @@ datum
|
||||
name = "Changeling Sting"
|
||||
id = "changelingsting"
|
||||
result = "changelingsting"
|
||||
required_reagents = list("orangejuice" = 1, "limejuice" = 1, "lemonjuice" = 1, "vodka" = 1)
|
||||
result_amount = 4
|
||||
required_reagents = list("screwdrivercocktail" = 1, "limejuice" = 1, "lemonjuice" = 1)
|
||||
result_amount = 5
|
||||
|
||||
aloe
|
||||
name = "Aloe"
|
||||
|
||||
Reference in New Issue
Block a user