diff --git a/code/WorkInProgress/Cib/amorph/amorph_hud.dm b/code/WorkInProgress/Cib/amorph/amorph_hud.dm
index 2f3390342aa..efd9ad65a65 100644
--- a/code/WorkInProgress/Cib/amorph/amorph_hud.dm
+++ b/code/WorkInProgress/Cib/amorph/amorph_hud.dm
@@ -1,300 +1,318 @@
-/obj/hud/proc/amorph_hud(var/ui_style='screen1_old.dmi')
-
- src.adding = list( )
- src.other = list( )
- src.intents = list( )
- src.mon_blo = list( )
- src.m_ints = list( )
- src.mov_int = list( )
- src.vimpaired = list( )
- src.darkMask = list( )
- src.intent_small_hud_objects = list( )
-
- src.g_dither = new /obj/screen( src )
- src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
- src.g_dither.name = "Mask"
- src.g_dither.icon = ui_style
- src.g_dither.icon_state = "dither12g"
- src.g_dither.layer = 18
- src.g_dither.mouse_opacity = 0
-
- src.alien_view = new /obj/screen(src)
- src.alien_view.screen_loc = "WEST,SOUTH to EAST,NORTH"
- src.alien_view.name = "Alien"
- src.alien_view.icon = ui_style
- src.alien_view.icon_state = "alien"
- src.alien_view.layer = 18
- src.alien_view.mouse_opacity = 0
-
- src.blurry = new /obj/screen( src )
- src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
- src.blurry.name = "Blurry"
- src.blurry.icon = ui_style
- src.blurry.icon_state = "blurry"
- src.blurry.layer = 17
- src.blurry.mouse_opacity = 0
-
- src.druggy = new /obj/screen( src )
- src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
- src.druggy.name = "Druggy"
- src.druggy.icon = ui_style
- src.druggy.icon_state = "druggy"
- src.druggy.layer = 17
- src.druggy.mouse_opacity = 0
-
- var/obj/screen/using
-
- using = new /obj/screen( src )
- using.name = "act_intent"
- using.dir = SOUTHWEST
- using.icon = ui_style
- using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
- using.screen_loc = ui_acti
- using.layer = 20
- src.adding += using
- action_intent = using
-
-//intent small hud objects
- var/icon/ico
-
- ico = new(ui_style, "black")
- ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
- ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
- using = new /obj/screen( src )
- using.name = "help"
- using.icon = ico
- using.screen_loc = ui_acti
- using.layer = 21
- src.adding += using
- help_intent = using
-
- ico = new(ui_style, "black")
- ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
- ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
- using = new /obj/screen( src )
- using.name = "disarm"
- using.icon = ico
- using.screen_loc = ui_acti
- using.layer = 21
- src.adding += using
- disarm_intent = using
-
- ico = new(ui_style, "black")
- ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
- ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
- using = new /obj/screen( src )
- using.name = "grab"
- using.icon = ico
- using.screen_loc = ui_acti
- using.layer = 21
- src.adding += using
- grab_intent = using
-
- ico = new(ui_style, "black")
- ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
- ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
- using = new /obj/screen( src )
- using.name = "harm"
- using.icon = ico
- using.screen_loc = ui_acti
- using.layer = 21
- src.adding += using
- hurt_intent = using
-
-//end intent small hud objects
-
- using = new /obj/screen( src )
- using.name = "mov_intent"
- using.dir = SOUTHWEST
- using.icon = ui_style
- using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
- using.screen_loc = ui_movi
- using.layer = 20
- src.adding += using
- move_intent = using
-
- using = new /obj/screen( src )
- using.name = "drop"
- using.icon = ui_style
- using.icon_state = "act_drop"
- using.screen_loc = ui_dropbutton
- using.layer = 19
- src.adding += using
-
- using = new /obj/screen( src )
- using.name = "r_hand"
- using.dir = WEST
- using.icon = ui_style
- using.icon_state = "hand_inactive"
- if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
- using.icon_state = "hand_active"
- using.screen_loc = ui_rhand
- using.layer = 19
- src.r_hand_hud_object = using
- src.adding += using
-
- using = new /obj/screen( src )
- using.name = "l_hand"
- using.dir = EAST
- using.icon = ui_style
- using.icon_state = "hand_inactive"
- if(mymob && mymob.hand) //This being 1 means the left hand is in use
- using.icon_state = "hand_active"
- using.screen_loc = ui_lhand
- using.layer = 19
- src.l_hand_hud_object = using
- src.adding += using
-
- using = new /obj/screen( src )
- using.name = "hand"
- using.dir = SOUTH
- using.icon = ui_style
- using.icon_state = "hand1"
- using.screen_loc = ui_swaphand1
- using.layer = 19
- src.adding += using
-
- using = new /obj/screen( src )
- using.name = "hand"
- using.dir = SOUTH
- using.icon = ui_style
- using.icon_state = "hand2"
- using.screen_loc = ui_swaphand2
- using.layer = 19
- src.adding += using
-
- using = new /obj/screen( src )
- using.name = "mask"
- using.dir = NORTH
- using.icon = ui_style
- using.icon_state = "equip"
- using.screen_loc = ui_monkey_mask
- using.layer = 19
- src.adding += using
-
- using = new /obj/screen( src )
- using.name = "back"
- using.dir = NORTHEAST
- using.icon = ui_style
- using.icon_state = "equip"
- using.screen_loc = ui_back
- using.layer = 19
- src.adding += using
-
- using = new /obj/screen( src )
- using.name = null
- using.icon = ui_style
- using.icon_state = "dither50"
- using.screen_loc = "1,1 to 5,15"
- using.layer = 17
- using.mouse_opacity = 0
- src.vimpaired += using
- using = new /obj/screen( src )
- using.name = null
- using.icon = ui_style
- using.icon_state = "dither50"
- using.screen_loc = "5,1 to 10,5"
- using.layer = 17
- using.mouse_opacity = 0
- src.vimpaired += using
- using = new /obj/screen( src )
- using.name = null
- using.icon = ui_style
- using.icon_state = "dither50"
- using.screen_loc = "6,11 to 10,15"
- using.layer = 17
- using.mouse_opacity = 0
- src.vimpaired += using
- using = new /obj/screen( src )
- using.name = null
- using.icon = ui_style
- using.icon_state = "dither50"
- using.screen_loc = "11,1 to 15,15"
- using.layer = 17
- using.mouse_opacity = 0
- src.vimpaired += using
-
- mymob.throw_icon = new /obj/screen(null)
- mymob.throw_icon.icon = ui_style
- mymob.throw_icon.icon_state = "act_throw_off"
- mymob.throw_icon.name = "throw"
- mymob.throw_icon.screen_loc = ui_throw
-
- mymob.oxygen = new /obj/screen( null )
- mymob.oxygen.icon = ui_style
- mymob.oxygen.icon_state = "oxy0"
- mymob.oxygen.name = "oxygen"
- mymob.oxygen.screen_loc = ui_oxygen
-
- mymob.pressure = new /obj/screen( null )
- mymob.pressure.icon = ui_style
- mymob.pressure.icon_state = "pressure0"
- mymob.pressure.name = "pressure"
- mymob.pressure.screen_loc = ui_pressure
-
- mymob.toxin = new /obj/screen( null )
- mymob.toxin.icon = ui_style
- mymob.toxin.icon_state = "tox0"
- mymob.toxin.name = "toxin"
- mymob.toxin.screen_loc = ui_toxin
-
- mymob.internals = new /obj/screen( null )
- mymob.internals.icon = ui_style
- mymob.internals.icon_state = "internal0"
- mymob.internals.name = "internal"
- mymob.internals.screen_loc = ui_internal
-
- mymob.fire = new /obj/screen( null )
- mymob.fire.icon = ui_style
- mymob.fire.icon_state = "fire0"
- mymob.fire.name = "fire"
- mymob.fire.screen_loc = ui_fire
-
- mymob.bodytemp = new /obj/screen( null )
- mymob.bodytemp.icon = ui_style
- mymob.bodytemp.icon_state = "temp1"
- mymob.bodytemp.name = "body temperature"
- mymob.bodytemp.screen_loc = ui_temp
-
- mymob.healths = new /obj/screen( null )
- mymob.healths.icon = ui_style
- mymob.healths.icon_state = "health0"
- mymob.healths.name = "health"
- mymob.healths.screen_loc = ui_health
-
- mymob.pullin = new /obj/screen( null )
- mymob.pullin.icon = ui_style
- mymob.pullin.icon_state = "pull0"
- mymob.pullin.name = "pull"
- mymob.pullin.screen_loc = ui_pull
-
- mymob.blind = new /obj/screen( null )
- mymob.blind.icon = ui_style
- mymob.blind.icon_state = "blackanimate"
- mymob.blind.name = " "
- mymob.blind.screen_loc = "1,1 to 15,15"
- mymob.blind.layer = 0
- mymob.blind.mouse_opacity = 0
-
- mymob.flash = new /obj/screen( null )
- mymob.flash.icon = ui_style
- mymob.flash.icon_state = "blank"
- mymob.flash.name = "flash"
- mymob.flash.screen_loc = "1,1 to 15,15"
- mymob.flash.layer = 17
-
- mymob.zone_sel = new /obj/screen/zone_sel( null )
- mymob.zone_sel.overlays = null
- mymob.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
-
- mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
-
- mymob.client.screen = null
-
- //, mymob.i_select, mymob.m_select
- mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach, mymob.hands, )
- mymob.client.screen += src.adding + src.other
-
- //if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
-
- return
+/obj/hud/proc/amorph_hud(var/ui_style='screen1_old.dmi')
+
+ src.adding = list( )
+ src.other = list( )
+ src.intents = list( )
+ src.mon_blo = list( )
+ src.m_ints = list( )
+ src.mov_int = list( )
+ src.vimpaired = list( )
+ src.darkMask = list( )
+ src.intent_small_hud_objects = list( )
+
+ src.g_dither = new /obj/screen( src )
+ src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
+ src.g_dither.name = "Mask"
+ src.g_dither.icon = ui_style
+ src.g_dither.icon_state = "dither12g"
+ src.g_dither.layer = 18
+ src.g_dither.mouse_opacity = 0
+
+ src.alien_view = new /obj/screen(src)
+ src.alien_view.screen_loc = "WEST,SOUTH to EAST,NORTH"
+ src.alien_view.name = "Alien"
+ src.alien_view.icon = ui_style
+ src.alien_view.icon_state = "alien"
+ src.alien_view.layer = 18
+ src.alien_view.mouse_opacity = 0
+
+ src.blurry = new /obj/screen( src )
+ src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
+ src.blurry.name = "Blurry"
+ src.blurry.icon = ui_style
+ src.blurry.icon_state = "blurry"
+ src.blurry.layer = 17
+ src.blurry.mouse_opacity = 0
+
+ src.druggy = new /obj/screen( src )
+ src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
+ src.druggy.name = "Druggy"
+ src.druggy.icon = ui_style
+ src.druggy.icon_state = "druggy"
+ src.druggy.layer = 17
+ src.druggy.mouse_opacity = 0
+
+ var/obj/screen/using
+
+ using = new /obj/screen( src )
+ using.name = "act_intent"
+ using.dir = SOUTHWEST
+ using.icon = ui_style
+ using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
+ using.screen_loc = ui_acti
+ using.layer = 20
+ src.adding += using
+ action_intent = using
+
+//intent small hud objects
+ var/icon/ico
+
+ ico = new(ui_style, "black")
+ ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
+ ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
+ using = new /obj/screen( src )
+ using.name = "help"
+ using.icon = ico
+ using.screen_loc = ui_acti
+ using.layer = 21
+ src.adding += using
+ help_intent = using
+
+ ico = new(ui_style, "black")
+ ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
+ ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
+ using = new /obj/screen( src )
+ using.name = "disarm"
+ using.icon = ico
+ using.screen_loc = ui_acti
+ using.layer = 21
+ src.adding += using
+ disarm_intent = using
+
+ ico = new(ui_style, "black")
+ ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
+ ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
+ using = new /obj/screen( src )
+ using.name = "grab"
+ using.icon = ico
+ using.screen_loc = ui_acti
+ using.layer = 21
+ src.adding += using
+ grab_intent = using
+
+ ico = new(ui_style, "black")
+ ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
+ ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
+ using = new /obj/screen( src )
+ using.name = "harm"
+ using.icon = ico
+ using.screen_loc = ui_acti
+ using.layer = 21
+ src.adding += using
+ hurt_intent = using
+
+//end intent small hud objects
+
+ using = new /obj/screen( src )
+ using.name = "mov_intent"
+ using.dir = SOUTHWEST
+ using.icon = ui_style
+ using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
+ using.screen_loc = ui_movi
+ using.layer = 20
+ src.adding += using
+ move_intent = using
+
+ using = new /obj/screen( src )
+ using.name = "drop"
+ using.icon = ui_style
+ using.icon_state = "act_drop"
+ using.screen_loc = ui_dropbutton
+ using.layer = 19
+ src.adding += using
+
+ using = new /obj/screen( src )
+ using.name = "r_hand"
+ using.dir = WEST
+ using.icon = ui_style
+ using.icon_state = "hand_inactive"
+ if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
+ using.icon_state = "hand_active"
+ using.screen_loc = ui_rhand
+ using.layer = 19
+ src.r_hand_hud_object = using
+ src.adding += using
+
+ using = new /obj/screen( src )
+ using.name = "l_hand"
+ using.dir = EAST
+ using.icon = ui_style
+ using.icon_state = "hand_inactive"
+ if(mymob && mymob.hand) //This being 1 means the left hand is in use
+ using.icon_state = "hand_active"
+ using.screen_loc = ui_lhand
+ using.layer = 19
+ src.l_hand_hud_object = using
+ src.adding += using
+
+ using = new /obj/screen( src )
+ using.name = "hand"
+ using.dir = SOUTH
+ using.icon = ui_style
+ using.icon_state = "hand1"
+ using.screen_loc = ui_swaphand1
+ using.layer = 19
+ src.adding += using
+
+ using = new /obj/screen( src )
+ using.name = "hand"
+ using.dir = SOUTH
+ using.icon = ui_style
+ using.icon_state = "hand2"
+ using.screen_loc = ui_swaphand2
+ using.layer = 19
+ src.adding += using
+
+ using = new /obj/screen( src )
+ using.name = "mask"
+ using.dir = NORTH
+ using.icon = ui_style
+ using.icon_state = "equip"
+ using.screen_loc = ui_monkey_mask
+ using.layer = 19
+ src.adding += using
+
+ using = new /obj/screen( src )
+ using.name = "back"
+ using.dir = NORTHEAST
+ using.icon = ui_style
+ using.icon_state = "equip"
+ using.screen_loc = ui_back
+ using.layer = 19
+ src.adding += using
+
+ using = new /obj/screen( src )
+ using.name = null
+ using.icon = ui_style
+ using.icon_state = "dither50"
+ using.screen_loc = "1,1 to 5,15"
+ using.layer = 17
+ using.mouse_opacity = 0
+ src.vimpaired += using
+ using = new /obj/screen( src )
+ using.name = null
+ using.icon = ui_style
+ using.icon_state = "dither50"
+ using.screen_loc = "5,1 to 10,5"
+ using.layer = 17
+ using.mouse_opacity = 0
+ src.vimpaired += using
+ using = new /obj/screen( src )
+ using.name = null
+ using.icon = ui_style
+ using.icon_state = "dither50"
+ using.screen_loc = "6,11 to 10,15"
+ using.layer = 17
+ using.mouse_opacity = 0
+ src.vimpaired += using
+ using = new /obj/screen( src )
+ using.name = null
+ using.icon = ui_style
+ using.icon_state = "dither50"
+ using.screen_loc = "11,1 to 15,15"
+ using.layer = 17
+ using.mouse_opacity = 0
+ src.vimpaired += using
+
+ mymob.throw_icon = new /obj/screen(null)
+ mymob.throw_icon.icon = ui_style
+ mymob.throw_icon.icon_state = "act_throw_off"
+ mymob.throw_icon.name = "throw"
+ mymob.throw_icon.screen_loc = ui_throw
+
+ mymob.oxygen = new /obj/screen( null )
+ mymob.oxygen.icon = ui_style
+ mymob.oxygen.icon_state = "oxy0"
+ mymob.oxygen.name = "oxygen"
+ mymob.oxygen.screen_loc = ui_oxygen
+
+ mymob.pressure = new /obj/screen( null )
+ mymob.pressure.icon = ui_style
+ mymob.pressure.icon_state = "pressure0"
+ mymob.pressure.name = "pressure"
+ mymob.pressure.screen_loc = ui_pressure
+
+ mymob.toxin = new /obj/screen( null )
+ mymob.toxin.icon = ui_style
+ mymob.toxin.icon_state = "tox0"
+ mymob.toxin.name = "toxin"
+ mymob.toxin.screen_loc = ui_toxin
+
+ mymob.internals = new /obj/screen( null )
+ mymob.internals.icon = ui_style
+ mymob.internals.icon_state = "internal0"
+ mymob.internals.name = "internal"
+ mymob.internals.screen_loc = ui_internal
+
+ mymob.fire = new /obj/screen( null )
+ mymob.fire.icon = ui_style
+ mymob.fire.icon_state = "fire0"
+ mymob.fire.name = "fire"
+ mymob.fire.screen_loc = ui_fire
+
+ mymob.bodytemp = new /obj/screen( null )
+ mymob.bodytemp.icon = ui_style
+ mymob.bodytemp.icon_state = "temp1"
+ mymob.bodytemp.name = "body temperature"
+ mymob.bodytemp.screen_loc = ui_temp
+
+ mymob.healths = new /obj/screen( null )
+ mymob.healths.icon = ui_style
+ mymob.healths.icon_state = "health0"
+ mymob.healths.name = "health"
+ mymob.healths.screen_loc = ui_health
+
+ mymob.pullin = new /obj/screen( null )
+ mymob.pullin.icon = ui_style
+ mymob.pullin.icon_state = "pull0"
+ mymob.pullin.name = "pull"
+ mymob.pullin.screen_loc = ui_pull
+
+ mymob.blind = new /obj/screen( null )
+ mymob.blind.icon = ui_style
+ mymob.blind.icon_state = "blackanimate"
+ mymob.blind.name = " "
+ mymob.blind.screen_loc = "1,1 to 15,15"
+ mymob.blind.layer = 0
+ mymob.blind.mouse_opacity = 0
+
+ mymob.flash = new /obj/screen( null )
+ mymob.flash.icon = ui_style
+ mymob.flash.icon_state = "blank"
+ mymob.flash.name = "flash"
+ mymob.flash.screen_loc = "1,1 to 15,15"
+ mymob.flash.layer = 17
+
+ mymob.zone_sel = new /obj/screen/zone_sel( null )
+ mymob.zone_sel.overlays = null
+ mymob.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
+
+ //Handle the gun settings buttons
+ mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
+ if (mymob.client)
+ if (mymob.client.gun_mode) // If in aim mode, correct the sprite
+ mymob.gun_setting_icon.dir = 2
+ for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
+ if (G.target)
+ mymob.item_use_icon = new /obj/screen/gun/item(null)
+ if (mymob.client.target_can_click)
+ mymob.item_use_icon.dir = 1
+ src.adding += mymob.item_use_icon
+ mymob.gun_move_icon = new /obj/screen/gun/move(null)
+ if (mymob.client.target_can_move)
+ mymob.gun_move_icon.dir = 1
+ mymob.gun_run_icon = new /obj/screen/gun/run(null)
+ if (mymob.client.target_can_run)
+ mymob.gun_run_icon.dir = 1
+ src.adding += mymob.gun_run_icon
+ src.adding += mymob.gun_move_icon
+
+ mymob.client.screen = null
+
+ //, mymob.i_select, mymob.m_select
+ mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach, mymob.hands, )
+ mymob.client.screen += src.adding + src.other
+
+ //if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
+
+ return
diff --git a/code/WorkInProgress/Cib/meme.dm b/code/WorkInProgress/Cib/meme.dm
index 60a729c6628..880f21bad51 100644
--- a/code/WorkInProgress/Cib/meme.dm
+++ b/code/WorkInProgress/Cib/meme.dm
@@ -259,7 +259,7 @@ mob/living/parasite/meme/verb/Paralyze()
set desc = "Prevents your host from using emote for a while."
if(!src.host) return
- if(!host.emote_allowed)
+ if(!host.use_me)
usr << "\red Your host already can't use body language.."
return
if(!use_points(250)) return
@@ -271,11 +271,11 @@ mob/living/parasite/meme/verb/Paralyze()
host << "\red Your body feels numb.. You lose your ability to use body language."
usr << "\red Your host can't use body language anymore."
- host.emote_allowed = 0
+ host.use_me = 0
sleep(1200)
- host.emote_allowed = 1
+ host.use_me = 1
host << "\red Your body has feeling again.."
usr << "\red [host] can use body language again."
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 19cb67e8ceb..99b56c346e0 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -550,6 +550,8 @@ its easier to just keep the beam vertical.
/atom/Click(location,control,params)
//world << "atom.Click() on [src] by [usr] : src.type is [src.type]"
+ if(!istype(src,/obj/item/weapon/gun))
+ usr.last_target_click = world.time
if(usr.client.buildmode)
build_click(usr, usr.client.buildmode, location, control, params, src)
return
diff --git a/code/game/gamemodes/events/space_ninja.dm b/code/game/gamemodes/events/space_ninja.dm
index ca4f9d24637..2314f382588 100644
--- a/code/game/gamemodes/events/space_ninja.dm
+++ b/code/game/gamemodes/events/space_ninja.dm
@@ -1060,4 +1060,4 @@ message = replacetext(message, "ch", "chi")
message = replacetext(message, "than", "sen")
message = replacetext(message, ".", "")
message = lowertext(message)
-*/
\ No newline at end of file
+*/
diff --git a/code/game/hud.dm b/code/game/hud.dm
index 84b2c8e2125..04399852886 100644
--- a/code/game/hud.dm
+++ b/code/game/hud.dm
@@ -45,6 +45,12 @@
#define ui_borg_module "13:26,2:7"
#define ui_borg_panel "14:28,2:7"
+//Gun buttons
+#define ui_gun1 "13:26,3:7"
+#define ui_gun2 "14:28, 4:7"
+#define ui_gun3 "13:26,4:7"
+#define ui_gun_select "14:28,3:7"
+
//Upper-middle right (damage indicators)
#define ui_toxin "14:28,13:27"
#define ui_fire "14:28,12:25"
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index e1df286a2ca..9064b51c930 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -104,9 +104,17 @@
new /obj/item/weapon/shard(loc)
if(reinf) new /obj/item/stack/rods(loc)
del(src)
+ else if (usr.a_intent == "hurt")
+ playsound(src.loc, 'Glassknock.ogg', 80, 1)
+ usr.visible_message("\red [usr.name] bangs against the [src.name]!", \
+ "\red You bang against the [src.name]!", \
+ "You hear a banging sound.")
else
- user.visible_message("[user] knocks on [src].")
- playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
+ playsound(src.loc, 'Glassknock.ogg', 80, 1)
+ usr.visible_message("[usr.name] knocks on the [src.name].", \
+ "You knock on the [src.name].", \
+ "You hear a knocking sound.")
+ return
/obj/structure/window/attack_paw(mob/user as mob)
diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm
index 4b6e4e17539..3c070bdbd2b 100644
--- a/code/modules/mob/emote.dm
+++ b/code/modules/mob/emote.dm
@@ -1,7 +1,7 @@
// All mobs should have custom emote, really..
mob/proc/custom_emote(var/m_type=1,var/message = null)
- if(!emote_allowed && usr == src)
+ if(!use_me && usr == src)
usr << "You are unable to emote."
return
diff --git a/code/modules/mob/living/blob/blob.dm b/code/modules/mob/living/blob/blob.dm
index 2e8f86282f9..ec90c4fb7ff 100644
--- a/code/modules/mob/living/blob/blob.dm
+++ b/code/modules/mob/living/blob/blob.dm
@@ -9,6 +9,7 @@
var/ghost_name = "Unknown"
var/creating_blob = 0
faction = "blob"
+ use_me = 0 //Blobs can't emote
New()
diff --git a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm
index 00c2d5b4075..57d0300b39d 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm
@@ -3,7 +3,8 @@
#define X_SUIT_LAYER 2
#define X_L_HAND_LAYER 3
#define X_R_HAND_LAYER 4
-#define X_TOTAL_LAYERS 4
+#define TARGETED_LAYER 5
+#define X_TOTAL_LAYERS 5
/////////////////////////////////
/mob/living/carbon/alien/humanoid
@@ -132,10 +133,22 @@
overlays_standing[X_L_HAND_LAYER] = null
if(update_icons) update_icons()
+//Call when target overlay should be added/removed
+/mob/living/carbon/alien/humanoid/update_targeted(var/update_icons=1)
+ if (targeted_by && target_locked)
+ overlays_lying[TARGETED_LAYER] = target_locked
+ overlays_standing[TARGETED_LAYER] = target_locked
+ else if (!targeted_by && target_locked)
+ del(target_locked)
+ if (!targeted_by)
+ overlays_lying[TARGETED_LAYER] = null
+ overlays_standing[TARGETED_LAYER] = null
+ if(update_icons) update_icons()
//Xeno Overlays Indexes//////////
#undef X_HEAD_LAYER
#undef X_SUIT_LAYER
#undef X_L_HAND_LAYER
#undef X_R_HAND_LAYER
+#undef TARGETED_LAYER
#undef X_TOTAL_LAYERS
diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm
index 0de81585a37..25fda0c7126 100644
--- a/code/modules/mob/living/carbon/brain/brain.dm
+++ b/code/modules/mob/living/carbon/brain/brain.dm
@@ -5,6 +5,7 @@
var/timeofhostdeath = 0
var/emp_damage = 0//Handles a type of MMI damage
var/alert = null
+ use_me = 0 //Can't use the me verb, it's a freaking immobile brain
New()
var/datum/reagents/R = new/datum/reagents(1000)
@@ -48,6 +49,8 @@
/mob/living/carbon/brain/update_canmove()
- if(in_contents_of(/obj/mecha)) canmove = 1
+ if(in_contents_of(/obj/mecha))
+ canmove = 1
+ use_me = 1 //If it can move, let it emote
else canmove = 0
return canmove
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/human/hud.dm b/code/modules/mob/living/carbon/human/hud.dm
index db9c4fb6ff4..c1cf1634694 100644
--- a/code/modules/mob/living/carbon/human/hud.dm
+++ b/code/modules/mob/living/carbon/human/hud.dm
@@ -485,9 +485,30 @@
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
+ //Handle the gun settings buttons
+ mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
+ if (mymob.client)
+ if (mymob.client.gun_mode) // If in aim mode, correct the sprite
+ mymob.gun_setting_icon.dir = 2
+ for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
+ if (G.target)
+ mymob.item_use_icon = new /obj/screen/gun/item(null)
+ if (mymob.client.target_can_click)
+ mymob.item_use_icon.dir = 1
+ src.adding += mymob.item_use_icon
+ mymob.gun_move_icon = new /obj/screen/gun/move(null)
+ if (mymob.client.target_can_move)
+ mymob.gun_move_icon.dir = 1
+ mymob.gun_run_icon = new /obj/screen/gun/run(null)
+ if (mymob.client.target_can_run)
+ mymob.gun_run_icon.dir = 1
+ src.adding += mymob.gun_run_icon
+ src.adding += mymob.gun_move_icon
+
+
mymob.client.screen = null
- mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
+ mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += src.adding + src.hotkeybuttons
inventory_shown = 0;
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index 88b96a13deb..375d175f21d 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -64,6 +64,7 @@ There are several things that need to be remembered:
update_body() //Handles updating your mob's icon to reflect their gender/race/complexion etc
update_hair() //Handles updating your hair overlay (used to be update_face, but mouth and
...eyes were merged into update_body)
+ update_targeted() // Updates the target overlay when someone points a gun at you
> All of these procs update our overlays_lying and overlays_standing, and then call update_icons() by default.
If you wish to update several overlays at once, you can set the argument to 0 to disable the update and call
@@ -117,7 +118,8 @@ Please contact me on #coderbus IRC. ~Carn x
#define L_HAND_LAYER 19
#define R_HAND_LAYER 20
#define TAIL_LAYER 21 //bs12 specific. this hack is probably gonna come back to haunt me
-#define TOTAL_LAYERS 21
+#define TARGETED_LAYER 22 //BS12: Layer for the target overlay from weapon targeting system
+#define TOTAL_LAYERS 22
//////////////////////////////////
/mob/living/carbon/human
@@ -130,7 +132,6 @@ Please contact me on #coderbus IRC. ~Carn x
//this proc is messy as I was forced to include some old laggy cloaking code to it so that I don't break cloakers
//I'll work on removing that stuff by rewriting some of the cloaking stuff at a later date.
/mob/living/carbon/human/update_icons()
-
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
update_hud() //TODO: remove the need for this
overlays.Cut()
@@ -472,6 +473,19 @@ proc/get_damage_icon_part(damage_state, body_part)
update_hair(0)
if(update_icons) update_icons()
+//Call when target overlay should be added/removed
+/mob/living/carbon/human/update_targeted(var/update_icons=1)
+ if (targeted_by && target_locked)
+ overlays_lying[TARGETED_LAYER] = target_locked
+ overlays_standing[TARGETED_LAYER] = target_locked
+ else if (!targeted_by && target_locked)
+ del(target_locked)
+ if (!targeted_by)
+ overlays_lying[TARGETED_LAYER] = null
+ overlays_standing[TARGETED_LAYER] = null
+ if(update_icons) update_icons()
+
+
/* --------------------------------------- */
//For legacy support.
/mob/living/carbon/human/regenerate_icons()
@@ -858,4 +872,5 @@ proc/get_damage_icon_part(damage_state, body_part)
#undef L_HAND_LAYER
#undef R_HAND_LAYER
#undef TAIL_LAYER
-#undef TOTAL_LAYERS
+#undef TARGETED_LAYER
+#undef TOTAL_LAYERS
diff --git a/code/modules/mob/living/carbon/monkey/hud.dm b/code/modules/mob/living/carbon/monkey/hud.dm
index 5a781d7a419..35f86d2e6b7 100644
--- a/code/modules/mob/living/carbon/monkey/hud.dm
+++ b/code/modules/mob/living/carbon/monkey/hud.dm
@@ -220,9 +220,29 @@
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
+ //Handle the gun settings buttons
+ mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
+ if (mymob.client)
+ if (mymob.client.gun_mode) // If in aim mode, correct the sprite
+ mymob.gun_setting_icon.dir = 2
+ for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
+ if (G.target)
+ mymob.item_use_icon = new /obj/screen/gun/item(null)
+ if (mymob.client.target_can_click)
+ mymob.item_use_icon.dir = 1
+ src.adding += mymob.item_use_icon
+ mymob.gun_move_icon = new /obj/screen/gun/move(null)
+ if (mymob.client.target_can_move)
+ mymob.gun_move_icon.dir = 1
+ mymob.gun_run_icon = new /obj/screen/gun/run(null)
+ if (mymob.client.target_can_run)
+ mymob.gun_run_icon.dir = 1
+ src.adding += mymob.gun_run_icon
+ src.adding += mymob.gun_move_icon
+
mymob.client.screen = null
- mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
+ mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other
return
diff --git a/code/modules/mob/living/carbon/monkey/update_icons.dm b/code/modules/mob/living/carbon/monkey/update_icons.dm
index 8ff72af8d36..9dd3e416410 100644
--- a/code/modules/mob/living/carbon/monkey/update_icons.dm
+++ b/code/modules/mob/living/carbon/monkey/update_icons.dm
@@ -4,7 +4,8 @@
#define M_HANDCUFF_LAYER 3
#define M_L_HAND_LAYER 4
#define M_R_HAND_LAYER 5
-#define M_TOTAL_LAYERS 5
+#define TARGETED_LAYER 6
+#define M_TOTAL_LAYERS 6
/////////////////////////////////
/mob/living/carbon/monkey
@@ -101,11 +102,24 @@
if (client)
client.screen |= contents
+//Call when target overlay should be added/removed
+/mob/living/carbon/monkey/update_targeted(var/update_icons=1)
+ if (targeted_by && target_locked)
+ overlays_lying[TARGETED_LAYER] = target_locked
+ overlays_standing[TARGETED_LAYER] = target_locked
+ else if (!targeted_by && target_locked)
+ del(target_locked)
+ if (!targeted_by)
+ overlays_lying[TARGETED_LAYER] = null
+ overlays_standing[TARGETED_LAYER] = null
+ if(update_icons) update_icons()
+
//Monkey Overlays Indexes////////
#undef M_MASK_LAYER
#undef M_BACK_LAYER
#undef M_HANDCUFF_LAYER
#undef M_L_HAND_LAYER
#undef M_R_HAND_LAYER
+#undef TARGETED_LAYER
#undef M_TOTAL_LAYERS
diff --git a/code/modules/mob/living/silicon/robot/hud.dm b/code/modules/mob/living/silicon/robot/hud.dm
index d5ff0ad6e62..8b82011bc2f 100644
--- a/code/modules/mob/living/silicon/robot/hud.dm
+++ b/code/modules/mob/living/silicon/robot/hud.dm
@@ -143,9 +143,29 @@
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
+ //Handle the gun settings buttons
+ mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
+ if (mymob.client)
+ if (mymob.client.gun_mode) // If in aim mode, correct the sprite
+ mymob.gun_setting_icon.dir = 2
+ for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
+ if (G.target)
+ mymob.item_use_icon = new /obj/screen/gun/item(null)
+ if (mymob.client.target_can_click)
+ mymob.item_use_icon.dir = 1
+ src.adding += mymob.item_use_icon
+ mymob.gun_move_icon = new /obj/screen/gun/move(null)
+ if (mymob.client.target_can_move)
+ mymob.gun_move_icon.dir = 1
+ mymob.gun_run_icon = new /obj/screen/gun/run(null)
+ if (mymob.client.target_can_run)
+ mymob.gun_run_icon.dir = 1
+ src.adding += mymob.gun_run_icon
+ src.adding += mymob.gun_move_icon
+
mymob.client.screen = null
- mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
+ mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other
return
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 45a7b7999dc..b82f7b1d984 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -1,7 +1,7 @@
/mob/living/silicon/robot
name = "Cyborg"
real_name = "Cyborg"
- icon = 'icons/mob/robots.dmi'//
+ icon = 'icons/mob/robots.dmi'
icon_state = "robot"
maxHealth = 300
health = 300
@@ -806,7 +806,13 @@
overlays += "ov-openpanel -c"
return
-
+//Call when target overlay should be added/removed
+/mob/living/silicon/robot/update_targeted()
+ if(!targeted_by && target_locked)
+ del(target_locked)
+ updateicon()
+ if (targeted_by && target_locked)
+ overlays += target_locked
/mob/living/silicon/robot/proc/installed_modules()
if(weapon_lock)
diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm
index 95053e72a3b..e1e0a0eea40 100644
--- a/code/modules/mob/living/simple_animal/friendly/corgi.dm
+++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm
@@ -27,7 +27,7 @@
regenerate_icons()
/mob/living/simple_animal/corgi/show_inv(mob/user as mob)
- /*
+ /* If you're turning this back on, scroll down and uncomment target_updated
user.set_machine(src)
if(user.stat) return
@@ -404,7 +404,6 @@
return
-
/mob/living/simple_animal/corgi/puppy
name = "\improper corgi puppy"
real_name = "corgi"
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index 4c29fff323f..131711916b8 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -456,4 +456,12 @@
var/obj/machinery/bot/B = target_mob
if(B.health > 0)
return (0)
- return (1)
\ No newline at end of file
+ return (1)
+
+//Call when target overlay should be added/removed
+/mob/living/simple_animal/update_targeted()
+ if(!targeted_by && target_locked)
+ del(target_locked)
+ overlays = null
+ if (targeted_by && target_locked)
+ overlays += target_locked
\ No newline at end of file
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index f8960a586db..882714cd0e3 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -27,6 +27,10 @@
var/obj/screen/pressure = null
var/obj/screen/damageoverlay = null
var/obj/screen/pain = null
+ var/obj/screen/gun/item/item_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
/*A bunch of this stuff really needs to go under their own defines instead of being globally attached to mob.
A variable should only be globally attached to turfs/objects/whatever, when it is in fact needed as such.
@@ -36,6 +40,7 @@
*/
var/obj/screen/zone_sel/zone_sel = null
+ var/use_me = 1 //Allows all mobs to use the me verb by default, will have to manually specify they cannot
var/damageoverlaytemp = 0
var/computer_id = null
var/lastattacker = null
@@ -210,4 +215,4 @@
var/has_limbs = 1 //Whether this mob have any limbs he can move with
var/can_stand = 1 //Whether this mob have ability to stand
- var/immune_to_ssd = 0
\ No newline at end of file
+ var/immune_to_ssd = 0
diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm
index c88c52c4957..cec9b06861a 100644
--- a/code/modules/mob/mob_movement.dm
+++ b/code/modules/mob/mob_movement.dm
@@ -280,7 +280,7 @@
return 0
move_delay = world.time//set move delay
-
+ mob.last_move_intent = world.time + 10
switch(mob.m_intent)
if("run")
if(mob.drowsyness > 0)
diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm
index 9a8999b8dfb..5876a874e94 100644
--- a/code/modules/mob/say.dm
+++ b/code/modules/mob/say.dm
@@ -24,7 +24,7 @@
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
- if(ishuman(src) || isrobot(src))
+ if(use_me)
usr.emote("me",1,message)
else
usr.emote(message)
diff --git a/code/modules/mob/screen.dm b/code/modules/mob/screen.dm
index d1f16075e00..7eb8ad2005a 100644
--- a/code/modules/mob/screen.dm
+++ b/code/modules/mob/screen.dm
@@ -5,6 +5,7 @@
unacidable = 1
var/id = 0.0
var/obj/master
+ var/gun_click_time = -100 //I'm lazy.
/obj/screen/text
icon = null
@@ -72,6 +73,33 @@
var/selecting = "chest"
screen_loc = ui_zonesel
+/obj/screen/gun
+ name = "gun"
+ icon = 'screen1.dmi'
+ master = null
+ dir = 2
+
+ move
+ name = "Allow Walking"
+ icon_state = "no_walk"
+ screen_loc = ui_gun2
+
+ run
+ name = "Allow Running"
+ icon_state = "no_run"
+ screen_loc = ui_gun3
+
+ item
+ name = "Allow Item Use"
+ icon_state = "no_item"
+ screen_loc = ui_gun1
+
+ mode
+ name = "Toggle Gun Mode"
+ icon_state = "gun"
+ screen_loc = ui_gun_select
+ dir = 1
+
/obj/screen/zone_sel/MouseDown(location, control,params)
// Changes because of 4.0
@@ -460,6 +488,64 @@
usr:inv3.icon_state = "inv3"
usr:module_active = null
+ if("Allow Walking")
+ if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
+ return
+ if(!istype(usr.equipped(),/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("Disallow Walking")
+ if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
+ return
+ if(!istype(usr.equipped(),/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(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
+ return
+ if(!istype(usr.equipped(),/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("Disallow Running")
+ if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
+ return
+ if(!istype(usr.equipped(),/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.equipped(),/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(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
+ return
+ if(!istype(usr.equipped(),/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("Toggle Gun Mode")
+ usr.client.ToggleGunMode()
+
else
DblClick()
return
diff --git a/code/modules/mob/update_icons.dm b/code/modules/mob/update_icons.dm
index 252439277c5..a6ae6dc4a09 100644
--- a/code/modules/mob/update_icons.dm
+++ b/code/modules/mob/update_icons.dm
@@ -63,3 +63,6 @@
/mob/proc/update_inv_ears()
return
+
+/mob/proc/update_targeted()
+ return
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index d97115d777f..14f44329ee8 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -22,11 +22,30 @@
var/recoil = 0
var/ejectshell = 1
var/clumsy_check = 1
-
+ var/tmp/list/mob/living/target //List of who yer targeting.
+ var/tmp/lock_time = -100
+ var/tmp/mouthshoot = 0 ///To stop people from suiciding twice... >.>
+ var/automatic = 0 //Used to determine if you can target multiple people.
+ var/tmp/mob/living/last_moved_mob //Used to fire faster at more than one person.
+ var/tmp/told_cant_shoot = 0 //So that it doesn't spam them with the fact they cannot hit them.
+ var/firerate = 1 // 0 for one bullet after tarrget moves and aim is lowered,
+ //1 for keep shooting until aim is lowered
proc/load_into_chamber()
return 0
+ //Removing the lock and the buttons.
+ dropped(mob/user as mob)
+ if(target)
+ for(var/mob/living/M in target)
+ if(M)
+ M.NotTargeted(src) //Untargeting people.
+ del(target)
+ del(user.item_use_icon) //Removing the control icons.
+ del(user.gun_move_icon)
+ del(user.gun_run_icon)
+ return ..()
+
proc/special_check(var/mob/M) //Placeholder for any special checks, like detective's revolver.
return 1
@@ -35,11 +54,157 @@
for(var/obj/O in contents)
O.emp_act(severity)
+ verb/lower_aim()
+ set name = "Lower Aim"
+ set category = "Object"
+ if(target)
+ for(var/mob/living/M in target)
+ if(M)
+ M.NotTargeted(src)
+ del(target)
+ usr.visible_message("\blue \The [usr] lowers \the [src]...")
+ //Clicking gun will still lower aim for guns that don't overwrite this
+ attack_self()
+ lower_aim()
afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params)//TODO: go over this
if(flag) return //we're placing gun on a table or in backpack
if(istype(target, /obj/machinery/recharger) && istype(src, /obj/item/weapon/gun/energy)) return//Shouldnt flag take care of this?
+ verb/toggle_firerate()
+ set name = "Toggle Firerate"
+ set category = "Object"
+ firerate = !firerate
+ if (firerate == 0)
+ loc << "You will now continue firing when your target moves."
+ else
+ loc << "You will now only fire once, then lower your aim, when your target moves."
+
+//Suiciding.
+ attack(mob/living/M as mob, mob/living/user as mob, def_zone)
+ world << "[user] USED ATTACK()"
+ if (M == user && user.zone_sel.selecting == "mouth" && load_into_chamber() && !mouthshoot) //Suicide handling.
+ mouthshoot = 1
+ M.visible_message("\red \The [user] sticks their gun in their mouth, ready to pull the trigger...")
+ if(!do_after(user, 40))
+ M.visible_message("\blue \The [user] decided life was worth living")
+ mouthshoot = 0
+ return
+ if(istype(src.in_chamber, /obj/item/projectile/bullet) && !istype(src.in_chamber, /obj/item/projectile/bullet/stunshot) && !istype(src.in_chamber, /obj/item/ammo_casing/shotgun/beanbag))
+ M.apply_damage(75, BRUTE, "head", used_weapon = "Suicide attempt with a projectile weapon.")
+ M.apply_damage(85, BRUTE, "chest")
+ M.visible_message("\red \The [user] pulls the trigger.")
+ else if(istype(src.in_chamber, /obj/item/projectile/bullet/stunshot) || istype(src.in_chamber, /obj/item/projectile/energy/electrode))
+ M.apply_damage(10, BURN, "head", used_weapon = "Suicide attempt with a stun round.")
+ M.visible_message("\red \The [user] pulls the trigger, but luckily it was a stun round.")
+ else if(istype(src.in_chamber, /obj/item/ammo_casing/shotgun/beanbag))
+ M.apply_damage(20, BRUTE, "head", used_weapon = "Suicide attempt with a beanbag.")
+ M.visible_message("\red \The [user] pulls the trigger, but luckily it was a stun round.")
+ else if(istype(src.in_chamber, /obj/item/projectile/beam) || istype(src.in_chamber, /obj/item/projectile/energy))
+ M.apply_damage(75, BURN, "head", used_weapon = "Suicide attempt with an energy weapon")
+ M.apply_damage(85, BURN, "chest")
+ M.visible_message("\red \The [user] pulls the trigger.")
+ else
+ M.apply_damage(75, BRUTE, "head", used_weapon = "Suicide attempt with a gun")
+ M.apply_damage(85, BRUTE, "chest")
+ M.visible_message("\red \The [user] pulls the trigger. Ow.")
+ del(in_chamber)
+ mouthshoot = 0
+ return
+ else if(user.a_intent == "hurt" && load_into_chamber() && (istype(src.in_chamber, /obj/item/projectile/beam) || istype(src.in_chamber, /obj/item/projectile/energy)\
+ || istype(src.in_chamber, /obj/item/projectile/bullet)) && !istype(in_chamber,/obj/item/projectile/energy/electrode)) //Point blank shooting.
+ //Lets shoot them, then.
+ user.visible_message("\red \The [user] fires \the [src] point blank at [M]!")
+ if(silenced)
+ playsound(user, fire_sound, 10, 1)
+ else
+ playsound(user, fire_sound, 50, 1)
+ M.apply_damage(30+in_chamber.damage, BRUTE, user.zone_sel.selecting, used_weapon = "Point Blank Shot") //So we'll put him an inch from death.
+ M.attack_log += text("\[[]\] []/[] shot []/[] point blank with a []", time_stamp(), user, user.ckey, M, M.ckey, src)
+ user.attack_log += text("\[[]\] []/[] shot []/[] point blank with a []", time_stamp(), user, user.ckey, M, M.ckey, src)
+ log_admin("ATTACK: [user] ([user.ckey]) shot [M] ([M.ckey]) point blank with [src].")
+ message_admins("ATTACK: [user] ([user.ckey]) shot [M] ([M.ckey]) point blank with [src].")
+ del(in_chamber)
+ update_icon()
+ return
+ else if(user.a_intent != "hurt" && load_into_chamber() && istype(in_chamber,/obj/item/projectile/energy/electrode)) //Point blank tasering.
+ if (!(M.status_flags & CANSTUN) || !(M.status_flags & CANWEAKEN))
+ user.visible_message("\red \The [M] has been stunned with the taser gun by \the [user] to no effect!")
+ del(in_chamber)
+ update_icon()
+ return
+ if (prob(50))
+ if (M.paralysis < 60 && (!(HULK in M.mutations)) )
+ M.paralysis = 60
+ else
+ if (M.weakened < 60 && (!(HULK in M.mutations)) )
+ M.weakened = 60
+ if (M.stuttering < 60 && (!(HULK in M.mutations)) )
+ M.stuttering = 60
+ if(silenced)
+ playsound(user, fire_sound, 10, 1)
+ else
+ playsound(user, fire_sound, 50, 1)
+ user.visible_message("\red \The [M] has been stunned with the taser gun by \the [user]!")
+ M.attack_log += text("\[[]\] []/[] stunned []/[] with a []", time_stamp(), user, user.ckey, M, M.ckey, src)
+ user.attack_log += text("\[[]\] []/[] stunned []/[] with a []", time_stamp(), user, user.ckey, M, M.ckey, src)
+ log_admin("ATTACK: [user] ([user.ckey]) stunned [M] ([M.ckey]) with [src].")
+ message_admins("ATTACK: [user] ([user.ckey]) stunned [M] ([M.ckey]) with [src].")
+ del(in_chamber)
+ update_icon()
+ return
+ else if(target && M in target) //Yer targeting them, and 1 tile away. FIRE!
+ if(!load_into_chamber()) //No ammo, hit them!
+ return ..()
+ else
+ world << "\red PREFIRE IS CALLED TO SHOOT AT [M] BY [user]"
+ PreFire(M,user) ///Otherwise, shoot!
+ return
+ else
+ return ..() //Pistolwhippin'
+
+//Compute how to fire.....
+ proc/PreFire(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, params)
+ //GraphicTrace(usr.x,usr.y,A.x,A.y,usr.z)
+ if(lock_time > world.time - 2) return //Lets not spam it.
+ if(!ismob(A)) //Didn't click someone, check if there is anyone along that guntrace
+// var/mob/M = locate() in range(0,A)
+// if(M && !ismob(A))
+// if(M.type == /mob)
+// return FindTarget(M,user,params)
+ var/mob/M = GunTrace(usr.x,usr.y,A.x,A.y,usr.z,usr) //Find dat mob.
+ if(M && ismob(M) && isliving(M) && M in view(user))
+ Aim(M) //Aha! Aim at them!
+ return
+ else if(!ismob(M) || (ismob(M) && !(M in view(user)))) //Nope! They weren't there!
+ world << "\red CLICKED BUT COULDN'T FIND MOB, FIRED"
+ Fire(A,user,params) //Fire like normal, then.
+ if(ismob(A) && isliving(A) && !(A in target))
+ Aim(A) //Clicked a mob, aim at them.
+ else if(!target)
+ world << "\red DIDN'T HAVE A TARGET, FIRED"
+ Fire(A,user,params) //Boom!
+ //else
+ //var/item/gun/G = usr.OHand
+ //if(!G)
+ //Fire(A,0)
+ //else if(istype(G))
+ //G.Fire(A,3)
+ //Fire(A,2)
+ //else
+ //Fire(A)
+ // Stolen from sd_get_approx_dir, didn't want to reinclude
+ var/d=get_dir(usr,A)
+ var/dir_to_fire = d //Turn them to face their target.
+ if(d&d-1) // diagonal
+ var/ax=abs(usr.x-A.x)
+ var/ay=abs(usr.y-A.y)
+ if(ax>=ay<<1) dir_to_fire = d&12 // keep east/west (4 and 8)
+ else if(ay>=ax<<1) dir_to_fire = d&3 // keep north/south (1 and 2)
+ if(dir_to_fire != usr.dir)
+ usr.dir = dir_to_fire
+
+ proc/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)//TODO: go over this
//Exclude lasertag guns from the CLUMSY check.
if(clumsy_check)
if(istype(user, /mob/living))
@@ -73,8 +238,10 @@
if(!special_check(user))
return
- if(!load_into_chamber())
- user << "\red *click*";
+ if(!load_into_chamber()) //CHECK
+ user.visible_message("*click click*", "\red *click*")
+ for(var/mob/K in viewers(usr))
+ K << 'empty.ogg'
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
return
@@ -84,7 +251,6 @@
in_chamber.firer = user
in_chamber.def_zone = user.zone_sel.selecting
-
if(targloc == curloc)
user.bullet_act(in_chamber)
del(in_chamber)
@@ -100,6 +266,10 @@
else
playsound(user, fire_sound, 50, 1)
user.visible_message("[user] fires [src]!", "You fire [src]!", "You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
+ if(reflex)
+ user.visible_message("\red \The [user] fires \the [src] by reflex!", "\red You reflex fire \the [src]!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
+ else
+ user.visible_message("\red \The [user] fires \the [src]!", "\red You fire \the [src]!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
in_chamber.original = target
in_chamber.loc = get_turf(user)
@@ -120,7 +290,7 @@
spawn()
if(in_chamber)
- in_chamber.process()
+ in_chamber.process() //CHECK Might need to be fired()
sleep(1)
in_chamber = null
@@ -131,6 +301,372 @@
else
user.update_inv_r_hand()
+//Aiming at the target mob.
+ proc/Aim(var/mob/M)
+ if(!target || !(M in target))
+ lock_time = world.time
+ if(target && !automatic) //If they're targeting someone and they have a non automatic weapon.
+ //usr.ClearRequest("Aim")
+ for(var/mob/living/L in target)
+ if(L)
+ L.NotTargeted(src)
+ del(target)
+ usr.visible_message("\red [usr] turns \the [src] on [M]!")
+ else
+ usr.visible_message("\red [usr] aims \a [src] at [M]!")
+ M.Targeted(src)
+//HE MOVED, SHOOT HIM!
+ proc/TargetActed(var/mob/living/T)
+ var/mob/living/M = loc
+ if(M == T) return
+ if(!istype(M) || src != M.equipped())
+ for(var/mob/living/N in target)
+ if(N)
+ N.NotTargeted(src)
+ del(target)
+ return
+ M.last_move_intent = world.time
+ if(load_into_chamber())
+ var/firing_check = in_chamber.check_fire(T,usr) //0 if it cannot hit them, 1 if it is capable of hitting, and 2 if a special check is preventing it from firing.
+ if(firing_check > 0)
+ if(firing_check == 1)
+ Fire(T,usr, reflex = 1)
+ else if(!told_cant_shoot)
+ M << "\red They can't be hit from here!"
+ told_cant_shoot = 1
+ spawn(30)
+ told_cant_shoot = 0
+ else
+ usr.visible_message("*click click*", "\red *click*")
+ for(var/mob/K in viewers(usr))
+ K << 'empty.ogg'
+ // Stolen from sd_get_approx_dir, didn't want to reinclude
+ var/d=get_dir(M,T)
+ var/dir_to_fire = d
+ if(d&d-1) // diagonal
+ var/ax=abs(M.x-T.x)
+ var/ay=abs(M.y-T.y)
+ if(ax>=ay<<1) dir_to_fire = d&12 // keep east/west (4 and 8)
+ else if(ay>=ax<<1) dir_to_fire = d&3 // keep north/south (1 and 2)
+ if(dir_to_fire != M.dir)
+ M.dir = dir_to_fire
+ if (!firerate) // If firerate is set to lower aim after one shot, untarget the target
+ T.NotTargeted(src)
+
+ afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
+ if(flag) return //we're placing gun on a table or in backpack
+ if(istype(target, /obj/machinery/recharger) && istype(src, /obj/item/weapon/gun/energy)) return//Shouldnt flag take care of this?
+ if(user && user.client && user.client.gun_mode)
+ PreFire(A,user,params) //They're using the new gun system, locate what they're aiming at.
+ else
+ Fire(A,user,params) //Otherwise, fire normally.
+
+//Yay, math!
+
+#define SIGN(X) ((X<0)?-1:1)
+
+proc/GunTrace(X1,Y1,X2,Y2,Z=1,exc_obj,PX1=16,PY1=16,PX2=16,PY2=16)
+ //bluh << "Tracin' [X1],[Y1] to [X2],[Y2] on floor [Z]."
+ var/turf/T
+ var/mob/M
+ if(X1==X2)
+ if(Y1==Y2) return 0 //Light cannot be blocked on same tile
+ else
+ var/s = SIGN(Y2-Y1)
+ Y1+=s
+ while(1)
+ T = locate(X1,Y1,Z)
+ if(!T) return 0
+ M = locate() in T
+ if(M) return M
+ M = locate() in orange(1,T)-exc_obj
+ if(M) return M
+ Y1+=s
+ else
+ var
+ m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1))
+ b=(Y1+PY1/32-0.015625)-m*(X1+PX1/32-0.015625) //In tiles
+ signX = SIGN(X2-X1)
+ signY = SIGN(Y2-Y1)
+ if(X1= 5)
+ if(ismob(I.loc))
+ I.loc << "You can only target 5 people at once!"
+ return
+ else
+ return
+ for(var/mob/K in viewers(usr))
+ K << 'TargetOn.ogg'
+ 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 \
+ drag and drop items in or into the map, speak, and click on interface buttons. Clicking on the map, 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 ))"
+ if(targeted_by.len == 1)
+ spawn(0)
+ target_locked = image("icon" = 'icons/effects/Targeted.dmi', "icon_state" = "locking")
+ overlays += target_locked
+ spawn(0)
+ sleep(20)
+ if(target_locked)
+ target_locked = image("icon" = 'icons/effects/Targeted.dmi', "icon_state" = "locked")
+ update_targeted()
+ var/mob/T = I.loc
+ //Adding the buttons to the controler person
+ if(T)
+ T.item_use_icon = new /obj/screen/gun/item(null)
+ T.gun_move_icon = new /obj/screen/gun/move(null)
+ if(T.client)
+ T.client.screen += T.item_use_icon
+ T.client.screen += T.gun_move_icon
+ else //If the client's gone, stop aiming
+ 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.
+ m_intent = "walk"
+ hud_used.move_intent.icon_state = "walking"
+ while(targeted_by && T.client)
+ if(last_move_intent > I.lock_time + 10 && !T.client.target_can_move) //If target moved when not allowed to
+ 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
+ else if(last_move_intent > I.lock_time + 10 && !T.client.target_can_run && m_intent == "run") //If the target ran while targeted
+ 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
+ if(last_target_click > I.lock_time + 10 && !T.client.target_can_click) //If the target clicked the map to pick something up/shoot/etc
+ 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)
+
+ NotTargeted(var/obj/item/weapon/gun/I)
+ if(!I.silenced)
+ for(var/mob/M in viewers(src))
+ M << 'TargetOff.ogg'
+ del(target_locked) //Remove the overlay
+ targeted_by -= I
+ I.target.Remove(src) //De-target them
+ if(!I.target.len)
+ del(I.target)
+ var/mob/T = I.loc //Remove the targeting icons
+ if(T && ismob(T) && !I.target)
+ del(T.item_use_icon)
+ del(T.gun_move_icon)
+ del(T.gun_run_icon)
+ if(!targeted_by.len) del targeted_by
+ spawn(1) update_targeted()
+
+/* Captive(var/obj/item/weapon/gun/I)
+ Sound(src,'CounterAttack.ogg')
+ if(!targeted_by) targeted_by = list()
+ targeted_by += I
+ I.target = src
+// Stun("Captive")
+ I.lock_time = world.time + 10 //Target has 1 second to realize they're targeted and stop (or target the opponent).
+ src << "(Your character is being held captive. They have 1 second to stop any click or move actions. While held, they may \
+ drag and drop items in or into the map, speak, and click on interface buttons. Clicking on the map or their items \
+ (other than a weapon to de-target) will result in being attacked. The aggressor may also attack manually, \
+ so try not to get on their bad side.)"
+ if(targeted_by.len == 1)
+ var/mob/T = I.loc
+ while(targeted_by)
+ sleep(1)
+ if(last_target_click > I.lock_time + 10 && !T.target_can_click) //If the target clicked the map to pick something up/shoot/etc
+ I.TargetActed()
+
+ NotCaptive(var/obj/item/weapon/gun/I,silent)
+ if(!silent) Sound(src,'SwordSheath.ogg')
+// UnStun("Captive")
+ targeted_by -= I
+ I.target = null
+ if(!targeted_by.len) del targeted_by*/
+
+
+//Used to overlay the awesome stuff
+///obj/effect
+// target_locking
+// icon = 'icons/effects/Targeted.dmi'
+// icon_state = "locking"
+// layer = 99
+// target_locked
+// icon = 'icons/effects/Targeted.dmi'
+// icon_state = "locking"
+// layer = 17.9
+// captured
+// icon = 'Captured.dmi'
+// layer = 99
+
+//If you move out of range, it isn't going to still stay locked on you any more.
+client/var
+ target_can_move = 0
+ move_dir = 2
+ target_can_run = 0
+ run_dir = 2
+ target_can_click = 0
+ click_dir = 2
+ gun_mode = 0
+ mode_dir = 1
+mob/Move()
+ . = ..()
+ for(var/obj/item/weapon/gun/G in targeted_by) //Handle moving out of the gunner's view.
+ var/mob/M = G.loc
+ if(!(M in view(src)))
+ //ClearRequest("Aim")
+ NotTargeted(G)
+ for(var/obj/item/weapon/gun/G in src) //Handle the gunner loosing sight of their target/s
+ if(G.target)
+ for(var/mob/living/M in G.target)
+ if(M && !(M in view(src)))
+ //ClearRequest("Aim")
+ M.NotTargeted(G)
+client/verb
+//These are called by the on-screen buttons, adjusting what the victim can and cannot do.
+ AllowTargetMove()
+ set hidden=1
+ if (move_dir == 2)
+ move_dir = 1
+ else
+ move_dir = 2
+ if(!target_can_move)
+// winset(usr,"default.target_can_move","is-flat=true;border=sunken")
+ usr << "Target may now walk."
+ usr.gun_run_icon = new /obj/screen/gun/run(null)
+ screen += usr.gun_run_icon
+ if(usr.gun_move_icon)
+ usr.gun_move_icon.dir = move_dir
+ usr.gun_move_icon.name = "Disallow Walking"
+ else
+// winset(usr,"default.target_can_move","is-flat=false;border=none")
+ usr << "Target may no longer move."
+ target_can_run = 0
+ del(usr.gun_run_icon)
+ if(usr.gun_move_icon)
+ usr.gun_move_icon.dir = move_dir
+ usr.gun_move_icon.name = "Allow Walking"
+ for(var/obj/item/weapon/gun/G in usr)
+ G.lock_time = world.time + 5
+ if(G.target)
+ for(var/mob/living/M in G.target)
+ 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.m_intent = "walk"
+ if(M.hud_used)
+ if (M.hud_used.move_intent)
+ M.hud_used.move_intent.icon_state = "walking"
+ else
+ M << "\red Your character will now be shot if they move."
+ target_can_move = !target_can_move
+
+ AllowTargetRun()
+ set hidden=1
+ if (run_dir == 2)
+ run_dir = 1
+ else
+ run_dir = 2
+ if(!target_can_run)
+// winset(usr,"default.target_can_move","is-flat=true;border=sunken")
+ usr << "Target may now run."
+ if(usr.gun_run_icon)
+ usr.gun_run_icon.dir = run_dir
+ usr.gun_run_icon.name = "Disallow Running"
+ else
+// winset(usr,"default.target_can_move","is-flat=false;border=none")
+ usr << "Target may no longer run."
+ if(usr.gun_run_icon)
+ usr.gun_run_icon.dir = run_dir
+ usr.gun_run_icon.name = "Allow Running"
+ for(var/obj/item/weapon/gun/G in src)
+ G.lock_time = world.time + 5
+ if(G.target)
+ for(var/mob/living/M in G.target)
+ 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."
+ target_can_run = !target_can_run
+
+ AllowTargetClick()
+ set hidden=1
+ if (click_dir == 2)
+ click_dir = 1
+ else
+ click_dir = 2
+ if(!target_can_click)
+// winset(usr,"default.target_can_click","is-flat=true;border=sunken")
+ usr << "Target may now use items."
+ if(usr.item_use_icon)
+ usr.item_use_icon.dir = click_dir
+ usr.item_use_icon.name = "Disallow Item Use"
+ else
+// winset(usr,"default.target_can_click","is-flat=false;border=none")
+ usr << "Target may no longer use items."
+ if(usr.item_use_icon)
+ usr.item_use_icon.dir = click_dir
+ usr.item_use_icon.name = "Allow Item Use"
+ for(var/obj/item/weapon/gun/G in src)
+ G.lock_time = world.time + 5
+ if(G.target)
+ for(var/mob/living/M in G.target)
+ 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."
+ target_can_click = !target_can_click
+
+ ToggleGunMode()
+ set hidden = 1
+ gun_mode = !gun_mode
+ if (mode_dir == 1)
+ mode_dir = 2
+ else if (mode_dir == 2)
+ mode_dir = 1
+ if(gun_mode)
+// winset(usr,"default.target_can_click","is-flat=true;border=sunken")
+ usr << "You will now take people captive."
+ else
+// winset(usr,"default.target_can_click","is-flat=false;border=none")
+ usr << "You will now shoot where you target."
+ if(usr.gun_setting_icon)
+ usr.gun_setting_icon.dir = mode_dir
/obj/item/weapon/gun/proc/isHandgun()
return 1
diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm
index c40b533055c..3846ddf522c 100644
--- a/code/modules/projectiles/guns/projectile/automatic.dm
+++ b/code/modules/projectiles/guns/projectile/automatic.dm
@@ -7,6 +7,7 @@
caliber = "9mm"
origin_tech = "combat=4;materials=2"
ammo_type = "/obj/item/ammo_casing/c9mm"
+ automatic = 1
isHandgun()
return 0
@@ -18,7 +19,7 @@
icon_state = "mini-uzi"
w_class = 3.0
max_shells = 16
- caliber = ".45"
+ caliber = " .45"
origin_tech = "combat=5;materials=2;syndicate=8"
ammo_type = "/obj/item/ammo_casing/c45"
diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm
index 5170421e17e..34ea3e3423a 100644
--- a/code/modules/projectiles/guns/projectile/shotgun.dm
+++ b/code/modules/projectiles/guns/projectile/shotgun.dm
@@ -55,7 +55,7 @@
icon_state = "cshotgun"
max_shells = 8
origin_tech = "combat=5;materials=2"
- ammo_type = "/obj/item/ammo_casing/shotgun"
+ ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
//this is largely hacky and bad :( -Pete
/obj/item/weapon/gun/projectile/shotgun/doublebarrel
diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm
index 97825c60da9..72a8a49717b 100644
--- a/code/modules/projectiles/projectile.dm
+++ b/code/modules/projectiles/projectile.dm
@@ -58,6 +58,17 @@
L.apply_effects(stun, weaken, paralyze, irradiate, stutter, eyeblur, drowsy, blocked)
return 1
+ proc/check_fire(var/mob/living/target as mob, var/mob/living/user as mob) //Checks if you can hit them or not.
+ if(!istype(target) || !istype(user))
+ return 0
+ var/obj/item/projectile/test/in_chamber = new /obj/item/projectile/test(get_step_to(user,target)) //Making the test....
+ in_chamber.target = target
+ in_chamber.flags = flags //Set the flags...
+ in_chamber.pass_flags = pass_flags //And the pass flags to that of the real projectile...
+ in_chamber.firer = user
+ var/output = in_chamber.fired() //Test it!
+ del(in_chamber) //No need for it anymore
+ return output //Send it back to the gun!
Bump(atom/A as mob|obj|turf|area)
if(A == firer)
@@ -148,3 +159,61 @@
Bump(original)
sleep(1)
return
+
+ proc/fired()
+ spawn while(src)
+ if((!( current ) || loc == current))
+ current = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z)
+ if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
+ del(src)
+ return
+ step_towards(src, current)
+ sleep(1)
+ if(!bumped)
+ if(loc == original)
+ for(var/mob/living/M in original)
+ if(!(M in permutated))
+ Bump(M)
+ sleep(1)
+ return
+
+/obj/item/projectile/test //Used to see if you can hit them.
+ invisibility = 101 //Nope! Can't see me!
+ yo = null
+ xo = null
+ var/target = null
+ var/result = 0 //To pass the message back to the gun.
+
+ Bump(atom/A as mob|obj|turf|area)
+ if(A == firer)
+ loc = A.loc
+ return //cannot shoot yourself
+ if(istype(A, /obj/item/projectile))
+ return
+ if(istype(A, /mob/living))
+ result = 2 //We hit someone, return 1!
+ return
+ result = 1
+ return
+
+ fired()
+ var/turf/curloc = get_turf(src)
+ var/turf/targloc = get_turf(target)
+ if(!curloc || !targloc)
+ return 0
+ yo = targloc.y - curloc.y
+ xo = targloc.x - curloc.x
+ target = targloc
+ while(src) //Loop on through!
+ if(result)
+ return (result - 1)
+ if((!( target ) || loc == target))
+ target = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z) //Finding the target turf at map edge
+ step_towards(src, target)
+ var/mob/living/M = locate() in get_turf(src)
+ if(istype(M)) //If there is someting living...
+ return 1 //Return 1
+ else
+ M = locate() in get_step(src,target)
+ if(istype(M))
+ return 1
diff --git a/icons/effects/Targeted.dmi b/icons/effects/Targeted.dmi
index f0d4b95f64f..6d61505e6c5 100644
Binary files a/icons/effects/Targeted.dmi and b/icons/effects/Targeted.dmi differ
diff --git a/icons/mob/screen1.dmi b/icons/mob/screen1.dmi
index 6040e7107ce..f50f2ea8d87 100644
Binary files a/icons/mob/screen1.dmi and b/icons/mob/screen1.dmi differ
diff --git a/icons/mob/screen1_old.dmi b/icons/mob/screen1_old.dmi
index fb2d2c21c59..ebf104c8918 100644
Binary files a/icons/mob/screen1_old.dmi and b/icons/mob/screen1_old.dmi differ