mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-18 13:04:45 +00:00
*TABLEPASS was already totally obsolete. FPRINT was used, but it was on virtually everything anyway. Removes those flags from every instance where they were used. Also assigned and removed other flags where it made sense. If it is desired, I can revive the flag as NOFPRINT, which would retain the original functionality, though inverted. That way it would be be used only where it was intentional (holodeck items could use this for example).
78 lines
1.8 KiB
Plaintext
78 lines
1.8 KiB
Plaintext
/obj/item/device/radio/intercom
|
|
name = "station intercom"
|
|
desc = "Talk through this."
|
|
icon_state = "intercom"
|
|
anchored = 1
|
|
w_class = 4.0
|
|
canhear_range = 2
|
|
flags = CONDUCT
|
|
var/number = 0
|
|
var/anyai = 1
|
|
var/mob/living/silicon/ai/ai = list()
|
|
var/last_tick //used to delay the powercheck
|
|
|
|
/obj/item/device/radio/intercom/New()
|
|
..()
|
|
processing_objects += src
|
|
|
|
/obj/item/device/radio/intercom/Del()
|
|
processing_objects -= src
|
|
..()
|
|
|
|
/obj/item/device/radio/intercom/attack_ai(mob/user as mob)
|
|
src.add_fingerprint(user)
|
|
spawn (0)
|
|
attack_self(user)
|
|
|
|
/obj/item/device/radio/intercom/attack_paw(mob/user as mob)
|
|
return src.attack_hand(user)
|
|
|
|
|
|
/obj/item/device/radio/intercom/attack_hand(mob/user as mob)
|
|
src.add_fingerprint(user)
|
|
spawn (0)
|
|
attack_self(user)
|
|
|
|
/obj/item/device/radio/intercom/receive_range(freq, level)
|
|
if (!on)
|
|
return -1
|
|
if (isWireCut(WIRE_RECEIVE))
|
|
return -1
|
|
if(!(0 in level))
|
|
var/turf/position = get_turf(src)
|
|
if(isnull(position) || !(position.z in level))
|
|
return -1
|
|
if (!src.listening)
|
|
return -1
|
|
if(freq == SYND_FREQ)
|
|
if(!(src.syndie))
|
|
return -1//Prevents broadcast of messages over devices lacking the encryption
|
|
|
|
return canhear_range
|
|
|
|
|
|
/obj/item/device/radio/intercom/hear_talk(mob/M as mob, msg)
|
|
if(!src.anyai && !(M in src.ai))
|
|
return
|
|
..()
|
|
|
|
/obj/item/device/radio/intercom/process()
|
|
if(((world.timeofday - last_tick) > 30) || ((world.timeofday - last_tick) < 0))
|
|
last_tick = world.timeofday
|
|
|
|
if(!src.loc)
|
|
on = 0
|
|
else
|
|
var/area/A = src.loc.loc
|
|
if(!A || !isarea(A) || !A.master || emped)
|
|
on = 0
|
|
else
|
|
on = A.master.powered(EQUIP) // set "on" to the power status
|
|
|
|
if(!on)
|
|
icon_state = "intercom-p"
|
|
else
|
|
icon_state = "intercom"
|
|
|
|
/obj/item/device/radio/intercom/rejects_blood()
|
|
return 1 |