mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 21:48:21 +01:00
-Fixed issue 540, someone thought that the prison's intercom microphone not working was a bug, which was actually intentional.
-Fixed issue 643, the code will now check that the TKed item's loc is on turf, i.e: not in a locker or in someone's pockets. -Fixed issue 282, the locker wouldn't pick up the chameleon's dummy because it was an effect and not an item. I added a hacky exception for the chameleon projector. I've also made the starting item something more useful so that people will use it more. Please report any issues you find with this, I'm sure nothing too bad will happen. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4313 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -17,6 +17,10 @@
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/dump_contents()
|
||||
//Cham Projector Exception
|
||||
for(var/obj/effect/dummy/chameleon/AD in src)
|
||||
AD.loc = src.loc
|
||||
|
||||
for(var/obj/item/I in src)
|
||||
I.loc = src.loc
|
||||
|
||||
@@ -52,6 +56,13 @@
|
||||
|
||||
var/itemcount = 0
|
||||
|
||||
//Cham Projector Exception
|
||||
for(var/obj/effect/dummy/chameleon/AD in src.loc)
|
||||
if(itemcount >= storage_capacity)
|
||||
break
|
||||
AD.loc = src
|
||||
itemcount++
|
||||
|
||||
for(var/obj/item/I in src.loc)
|
||||
if(itemcount >= storage_capacity)
|
||||
break
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
origin_tech = "syndicate=4;magnets=4"
|
||||
var/can_use = 1
|
||||
var/obj/effect/dummy/chameleon/active_dummy = null
|
||||
var/saved_item = "/obj/item/weapon/shard"
|
||||
var/saved_item = "/obj/item/weapon/cigbutt"
|
||||
|
||||
dropped()
|
||||
disrupt()
|
||||
@@ -73,7 +73,7 @@
|
||||
if(active_dummy)
|
||||
playsound(src, 'pop.ogg', 100, 1, 1)
|
||||
for(var/atom/movable/A in active_dummy)
|
||||
A.loc = get_turf(active_dummy)
|
||||
A.loc = active_dummy.loc
|
||||
if(ismob(A))
|
||||
if(A:client)
|
||||
A:client:eye = A
|
||||
@@ -88,7 +88,7 @@
|
||||
playsound(src, 'pop.ogg', 100, 1, 1)
|
||||
var/obj/O = new saved_item (src)
|
||||
if(!O) return
|
||||
var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(get_turf(src))
|
||||
var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(usr.loc)
|
||||
C.name = O.name
|
||||
C.desc = O.desc
|
||||
C.icon = O.icon
|
||||
@@ -111,7 +111,7 @@
|
||||
spark_system.attach(src)
|
||||
spark_system.start()
|
||||
for(var/atom/movable/A in active_dummy)
|
||||
A.loc = get_turf(active_dummy)
|
||||
A.loc = active_dummy.loc
|
||||
if(ismob(A))
|
||||
if(A:client)
|
||||
A:client:eye = A
|
||||
|
||||
@@ -49,6 +49,10 @@
|
||||
if(!(TK in host.mutations))
|
||||
del(src)
|
||||
return
|
||||
if(isobj(target))
|
||||
if(!target.loc || !isturf(target.loc))
|
||||
del(src)
|
||||
return
|
||||
if(!focus)
|
||||
focus_object(target, user)
|
||||
return
|
||||
@@ -68,6 +72,8 @@
|
||||
if(target.anchored)
|
||||
target.attack_hand(user) // you can use shit now!
|
||||
return//No throwing anchored things
|
||||
if(!isturf(target.loc))
|
||||
return
|
||||
focus = target
|
||||
update_icon()
|
||||
apply_focus_overlay()
|
||||
|
||||
@@ -9,46 +9,64 @@
|
||||
var/anyai = 1
|
||||
var/mob/living/silicon/ai/ai = list()
|
||||
|
||||
/obj/item/device/radio/intercom/New()
|
||||
spawn(5)
|
||||
checkpower()
|
||||
..()
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
spawn (0)
|
||||
attack_self(user)
|
||||
/obj/item/device/radio/intercom/attack_ai(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
spawn (0)
|
||||
attack_self(user)
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
if ((ticker && ticker.mode.name == "monkey"))
|
||||
return src.attack_hand(user)
|
||||
/obj/item/device/radio/intercom/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
spawn (0)
|
||||
attack_self(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 0
|
||||
if (!(src.wires & WIRE_RECEIVE))
|
||||
return 0
|
||||
var/turf/position = get_turf(src)
|
||||
if(isnull(position) || position.z != level)
|
||||
return 0
|
||||
if (!src.listening)
|
||||
return 0
|
||||
if(freq == SYND_FREQ)
|
||||
if(!(src.syndie))
|
||||
return 0//Prevents broadcast of messages over devices lacking the encryption
|
||||
|
||||
return canhear_range
|
||||
|
||||
|
||||
send_hear(freq, level)
|
||||
var/range = receive_range(freq, level)
|
||||
if(range > 0)
|
||||
return get_mobs_in_view(canhear_range, src)
|
||||
/obj/item/device/radio/intercom/hear_talk(mob/M as mob, msg)
|
||||
if(!src.anyai && !(M in src.ai))
|
||||
return
|
||||
..()
|
||||
|
||||
receive_range(freq, level)
|
||||
if (!on)
|
||||
return 0
|
||||
if (!(src.wires & WIRE_RECEIVE))
|
||||
return 0
|
||||
var/turf/position = get_turf(src)
|
||||
if(isnull(position) || position.z != level)
|
||||
return 0
|
||||
if (!src.listening)
|
||||
return 0
|
||||
if(freq == SYND_FREQ)
|
||||
if(!(src.syndie))
|
||||
return 0//Prevents broadcast of messages over devices lacking the encryption
|
||||
/obj/item/device/radio/intercom/proc/checkpower()
|
||||
|
||||
return canhear_range
|
||||
// Simple loop, checks for power. Strictly for intercoms
|
||||
while(src)
|
||||
|
||||
if(!src.loc)
|
||||
on = 0
|
||||
else
|
||||
var/area/A = src.loc.loc
|
||||
if(!A || !isarea(A) || !A.master)
|
||||
on = 0
|
||||
else
|
||||
on = A.master.powered(EQUIP) // set "on" to the power status
|
||||
|
||||
hear_talk(mob/M as mob, msg)
|
||||
if(!src.anyai && !(M in src.ai))
|
||||
return
|
||||
..()
|
||||
if(!on)
|
||||
icon_state = "intercom-p"
|
||||
else
|
||||
icon_state = "intercom"
|
||||
|
||||
sleep(30)
|
||||
@@ -54,10 +54,6 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
if(radio_controller)
|
||||
initialize()
|
||||
|
||||
// If intercom: do a local power check loop
|
||||
if(istype(src, /obj/item/device/radio/intercom))
|
||||
spawn(5)
|
||||
checkpower()
|
||||
|
||||
/obj/item/device/radio/initialize()
|
||||
|
||||
@@ -123,27 +119,6 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[list ? "Engaged" : "Disengaged"]</A><BR>
|
||||
"}
|
||||
|
||||
/obj/item/device/radio/proc/checkpower()
|
||||
|
||||
// Simple loop, checks for power. Strictly for intercoms
|
||||
while(src)
|
||||
|
||||
if(!src.loc)
|
||||
on = 0
|
||||
else
|
||||
var/area/A = src.loc.loc
|
||||
if(!A || !isarea(A) || !A.master)
|
||||
on = 0
|
||||
else
|
||||
on = A.master.powered(EQUIP) // set "on" to the power status
|
||||
|
||||
if(!on)
|
||||
icon_state = "intercom-p"
|
||||
else
|
||||
icon_state = "intercom"
|
||||
|
||||
sleep(30)
|
||||
|
||||
/obj/item/device/radio/Topic(href, href_list)
|
||||
//..()
|
||||
if (usr.stat || !on)
|
||||
@@ -233,10 +208,13 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
/obj/item/device/radio/talk_into(mob/M as mob, message, channel)
|
||||
|
||||
if(!on) return // the device has to be on
|
||||
/* Fix for permacell radios, but kinda eh about actually fixing them.
|
||||
// Fix for permacell radios, but kinda eh about actually fixing them.
|
||||
|
||||
// Uncommenting this. To the above comment:
|
||||
// The permacell radios aren't suppose to be able to transmit, this isn't a bug and this "fix" is just making radio wires useless. -Giacom
|
||||
if(!(src.wires & WIRE_TRANSMIT)) // The device has to have all its wires and shit intact
|
||||
return
|
||||
*/
|
||||
|
||||
|
||||
if(GLOBAL_RADIO_TYPE == 1) // NEW RADIO SYSTEMS: By Doohl
|
||||
|
||||
|
||||
Reference in New Issue
Block a user