diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm
index 3a5f4032a2f..44973d3f0a5 100644
--- a/code/_onclick/hud/_defines.dm
+++ b/code/_onclick/hud/_defines.dm
@@ -66,6 +66,7 @@
#define ui_gun2 "14:28, 4:7"
#define ui_gun3 "13:26,4:7"
#define ui_gun_select "14:28,3:7"
+#define ui_gun4 "12:24,3:7"
//Upper-middle right (damage indicators)
#define ui_toxin "14:28,13:27"
diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm
index 92fe661d002..97b07e6154d 100644
--- a/code/_onclick/hud/human.dm
+++ b/code/_onclick/hud/human.dm
@@ -356,6 +356,9 @@
//mymob.gun_run_icon.color = ui_color
mymob.gun_run_icon.alpha = ui_alpha
+ mymob.radio_use_icon = new /obj/screen/gun/radio(null)
+ mymob.radio_use_icon.alpha = ui_alpha
+
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.set_dir(2)
diff --git a/code/_onclick/hud/monkey.dm b/code/_onclick/hud/monkey.dm
index 76adf0414c3..7314e8692d0 100644
--- a/code/_onclick/hud/monkey.dm
+++ b/code/_onclick/hud/monkey.dm
@@ -231,6 +231,10 @@
if (mymob.client.target_can_click)
mymob.item_use_icon.set_dir(1)
src.adding += mymob.item_use_icon
+ mymob.radio_use_icon = new /obj/screen/gun/radio(null)
+ if (mymob.client.target_can_radio)
+ mymob.radio_use_icon.set_dir(1)
+ src.adding += mymob.radio_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
if (mymob.client.target_can_move)
mymob.gun_move_icon.set_dir(1)
diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm
index 48378fce7f4..e07d5aaf201 100644
--- a/code/_onclick/hud/robot.dm
+++ b/code/_onclick/hud/robot.dm
@@ -162,6 +162,10 @@ var/obj/screen/robot_inventory
if (mymob.client.target_can_click)
mymob.item_use_icon.set_dir(1)
src.adding += mymob.item_use_icon
+ mymob.radio_use_icon = new /obj/screen/gun/radio(null)
+ if (mymob.client.target_can_radio)
+ mymob.radio_use_icon.set_dir(1)
+ src.adding += mymob.radio_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
if (mymob.client.target_can_move)
mymob.gun_move_icon.set_dir(1)
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 0cc2ad33652..767567b4b03 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -122,6 +122,11 @@
screen_loc = ui_gun_select
//dir = 1
+ radio
+ name = "Allow Radio Use"
+ icon_state = "no_radio0"
+ screen_loc = ui_gun4
+
/obj/screen/zone_sel
name = "damage zone"
icon_state = "zone_sel"
@@ -427,7 +432,7 @@
if(istype(usr, /mob/living/silicon/robot))
usr:toggle_module(3)
- if("Allow Walking")
+ if("Allow Walking", "Disallow Walking")
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
return
if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
@@ -436,16 +441,7 @@
usr.client.AllowTargetMove()
gun_click_time = world.time
- if("Disallow Walking")
- if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
- return
- if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
- usr << "You need your gun in your active hand to do that!"
- return
- usr.client.AllowTargetMove()
- gun_click_time = world.time
-
- if("Allow Running")
+ if("Allow Running", "Disallow Running")
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
return
if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
@@ -454,26 +450,7 @@
usr.client.AllowTargetRun()
gun_click_time = world.time
- if("Disallow Running")
- if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
- return
- if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
- usr << "You need your gun in your active hand to do that!"
- return
- usr.client.AllowTargetRun()
- gun_click_time = world.time
-
- if("Allow Item Use")
- if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
- return
- if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
- usr << "You need your gun in your active hand to do that!"
- return
- usr.client.AllowTargetClick()
- gun_click_time = world.time
-
-
- if("Disallow Item Use")
+ if("Allow Item Use", "Disallow Item Use")
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
return
if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
@@ -485,6 +462,15 @@
if("Toggle Gun Mode")
usr.client.ToggleGunMode()
+ if("Allow Radio Use", "Disallow Radio Use")
+ if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
+ return
+ if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
+ usr << "You need your gun in your active hand to do that!"
+ return
+ usr.client.AllowTargetRadio()
+ gun_click_time = world.time
+
else
return 0
return 1
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index d6b254cad19..dab778dcb90 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -202,7 +202,7 @@
if(wires.IsIndexCut(WIRE_TRANSMIT)) // The device has to have all its wires and shit intact
return 0
- M.last_target_click = world.time
+ M.last_target_radio = world.time // For the projectile targeting system
/* Quick introduction:
This new radio system uses a very robust FTL signaling technology unoriginally
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 9b17a182aa5..831798251a2 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -29,6 +29,7 @@
var/obj/screen/damageoverlay = null
var/obj/screen/pain = null
var/obj/screen/gun/item/item_use_icon = null
+ var/obj/screen/gun/radio/radio_use_icon = null
var/obj/screen/gun/move/gun_move_icon = null
var/obj/screen/gun/run/gun_run_icon = null
var/obj/screen/gun/mode/gun_setting_icon = null
diff --git a/code/modules/projectiles/targeting.dm b/code/modules/projectiles/targeting.dm
index 4e49a785e76..1136f832275 100644
--- a/code/modules/projectiles/targeting.dm
+++ b/code/modules/projectiles/targeting.dm
@@ -14,7 +14,7 @@
set category = "Object"
if(aim_targets)
stop_aim()
- usr.visible_message("\blue \The [usr] lowers \the [src]...")
+ usr.visible_message(" \The [usr] lowers \the [src]...")
//Clicking gun will still lower aim for guns that don't overwrite this
/obj/item/weapon/gun/attack_self()
@@ -70,9 +70,9 @@
if(L)
L.NotTargeted(src)
del(aim_targets)
- usr.visible_message("\red [usr] turns \the [src] on [M]!")
+ usr.visible_message("[usr] turns \the [src] on [M]!")
else
- usr.visible_message("\red [usr] aims \a [src] at [M]!")
+ usr.visible_message("[usr] aims \a [src] at [M]!")
M.Targeted(src)
//HE MOVED, SHOOT HIM!
@@ -86,7 +86,7 @@
//reflex firing is disabled when help intent is set
if (M.a_intent == I_HELP)
- M << "\red You refrain from firing your [src] as your intent is set to help."
+ M << "You refrain from firing your [src] as your intent is set to help."
return
M.last_move_intent = world.time
@@ -95,7 +95,7 @@
if(firing_check == 1)
Fire(T,usr, reflex = 1)
else if(!told_cant_shoot)
- M << "\red They can't be hit from here!"
+ M << "They can't be hit from here!"
told_cant_shoot = 1
spawn(30)
told_cant_shoot = 0
@@ -153,6 +153,7 @@
last_move_intent = -100
last_target_click = -5
target_locked = null
+ last_target_radio = -5;
/mob/living/proc/Targeted(var/obj/item/weapon/gun/I) //Self explanitory.
if(!I.aim_targets)
@@ -171,10 +172,10 @@
if(!targeted_by) targeted_by = list()
targeted_by += I
I.lock_time = world.time + 20 //Target has 2 second to realize they're targeted and stop (or target the opponent).
- src << "((\red Your character is being targeted. They have 2 seconds to stop any click or move actions. \black While targeted, they may \
+ src << "((Your character is being targeted. They have 2 seconds to stop any click or move actions. While targeted, they may \
drag and drop items in or into the map, speak, and click on interface buttons. Clicking on the map objects (floors and walls are fine), their items \
- (other than a weapon to de-target), or moving will result in being fired upon. \red The aggressor may also fire manually, \
- so try not to get on their bad side.\black ))"
+ (other than a weapon to de-target), moving, or talking into a radio will result in being fired upon. The aggressor may also fire manually, \
+ so try not to get on their bad side.))"
if(targeted_by.len == 1)
spawn(0)
@@ -195,7 +196,7 @@
I.lower_aim()
return
if(m_intent == "run" && T.client.target_can_move == 1 && T.client.target_can_run == 0)
- src << "\red Your move intent is now set to walk, as your targeter permits it." //Self explanitory.
+ src << "Your move intent is now set to walk, as your targeter permits it." //Self explanitory.
set_m_intent("walk")
//Processing the aiming. Should be probably in separate object with process() but lasy.
@@ -218,6 +219,12 @@
I.lock_time = world.time + 5
I.lock_time = world.time + 5
I.last_moved_mob = src
+ if(last_target_radio > I.lock_time + 10 && !T.client.target_can_radio)
+ I.TargetActed(src)
+ if(I.last_moved_mob == src) //If they were the last ones to move, give them more of a grace period, so that an automatic weapon can hold down a room better.
+ I.lock_time = world.time + 5
+ I.lock_time = world.time + 5
+ I.last_moved_mob = src
sleep(1)
/mob/living/proc/NotTargeted(var/obj/item/weapon/gun/I)
@@ -253,12 +260,14 @@
target_can_move = 0
target_can_run = 0
target_can_click = 0
+ target_can_radio = 0
gun_mode = 0
//These are called by the on-screen buttons, adjusting what the victim can and cannot do.
/client/proc/add_gun_icons()
screen += usr.item_use_icon
screen += usr.gun_move_icon
+ screen += usr.radio_use_icon
if (target_can_move)
screen += usr.gun_run_icon
@@ -268,6 +277,7 @@
if(!usr) return 1 // Runtime prevention on N00k agents spawning with SMG
screen -= usr.item_use_icon
screen -= usr.gun_move_icon
+ screen -= usr.radio_use_icon
if (target_can_move)
screen -= usr.gun_run_icon
@@ -313,10 +323,10 @@
if(target_can_move)
M << "Your character may now walk at the discretion of their targeter."
if(!target_can_run)
- M << "\red Your move intent is now set to walk, as your targeter permits it."
+ M << "Your move intent is now set to walk, as your targeter permits it."
M.set_m_intent("walk")
else
- M << "\red Your character will now be shot if they move."
+ M << "Your character will now be shot if they move."
/mob/living/proc/set_m_intent(var/intent)
if (intent != "walk" && intent != "run")
@@ -349,7 +359,7 @@ client/verb/AllowTargetRun()
if(target_can_run)
M << "Your character may now run at the discretion of their targeter."
else
- M << "\red Your character will now be shot if they run."
+ M << "Your character will now be shot if they run."
/client/verb/AllowTargetClick()
set hidden=1
@@ -373,4 +383,27 @@ client/verb/AllowTargetRun()
if(target_can_click)
M << "Your character may now use items at the discretion of their targeter."
else
- M << "\red Your character will now be shot if they use items."
+ M << "Your character will now be shot if they use items."
+
+/client/verb/AllowTargetRadio()
+ set hidden=1
+
+ target_can_radio = !target_can_radio
+ if(target_can_radio)
+ usr << "Target may now use radio."
+ else
+ usr << "Target may no longer use radio."
+
+ if(usr.radio_use_icon)
+ usr.radio_use_icon.icon_state = "no_radio[target_can_radio]"
+ usr.radio_use_icon.name = "[target_can_radio ? "Disallow" : "Allow"] Radio Use"
+
+ //Handling change for all the guns on client
+ for(var/obj/item/weapon/gun/G in src)
+ G.lock_time = world.time + 5
+ if(G.aim_targets)
+ for(var/mob/living/M in G.aim_targets)
+ if(target_can_radio)
+ M << "Your character may now use the radio at the discretion of their targeter."
+ else
+ M << "Your character will now be shot if they use the radio."
\ No newline at end of file
diff --git a/icons/mob/screen1.dmi b/icons/mob/screen1.dmi
index 5196ec25f8d..4dae20e2e6f 100644
Binary files a/icons/mob/screen1.dmi and b/icons/mob/screen1.dmi differ