mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-02 13:34:49 +00:00
Rewrote targeting.
This commit is contained in:
4
code/__defines/targeting.dm
Normal file
4
code/__defines/targeting.dm
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#define TARGET_CAN_MOVE 1
|
||||||
|
#define TARGET_CAN_RUN 2
|
||||||
|
#define TARGET_CAN_CLICK 4
|
||||||
|
#define TARGET_CAN_RADIO 8
|
||||||
@@ -38,8 +38,10 @@
|
|||||||
* mob/RangedAttack(atom,params) - used only ranged, only used for tk and laser eyes but could be changed
|
* mob/RangedAttack(atom,params) - used only ranged, only used for tk and laser eyes but could be changed
|
||||||
*/
|
*/
|
||||||
/mob/proc/ClickOn(var/atom/A, var/params)
|
/mob/proc/ClickOn(var/atom/A, var/params)
|
||||||
|
|
||||||
if(world.time <= next_click) // Hard check, before anything else, to avoid crashing
|
if(world.time <= next_click) // Hard check, before anything else, to avoid crashing
|
||||||
return
|
return
|
||||||
|
|
||||||
next_click = world.time + 1
|
next_click = world.time + 1
|
||||||
|
|
||||||
if(client.buildmode)
|
if(client.buildmode)
|
||||||
@@ -49,19 +51,19 @@
|
|||||||
var/list/modifiers = params2list(params)
|
var/list/modifiers = params2list(params)
|
||||||
if(modifiers["shift"] && modifiers["ctrl"])
|
if(modifiers["shift"] && modifiers["ctrl"])
|
||||||
CtrlShiftClickOn(A)
|
CtrlShiftClickOn(A)
|
||||||
return
|
return 1
|
||||||
if(modifiers["middle"])
|
if(modifiers["middle"])
|
||||||
MiddleClickOn(A)
|
MiddleClickOn(A)
|
||||||
return
|
return 1
|
||||||
if(modifiers["shift"])
|
if(modifiers["shift"])
|
||||||
ShiftClickOn(A)
|
ShiftClickOn(A)
|
||||||
return
|
return 0
|
||||||
if(modifiers["alt"]) // alt and alt-gr (rightalt)
|
if(modifiers["alt"]) // alt and alt-gr (rightalt)
|
||||||
AltClickOn(A)
|
AltClickOn(A)
|
||||||
return
|
return 1
|
||||||
if(modifiers["ctrl"])
|
if(modifiers["ctrl"])
|
||||||
CtrlClickOn(A)
|
CtrlClickOn(A)
|
||||||
return
|
return 1
|
||||||
|
|
||||||
if(stat || paralysis || stunned || weakened)
|
if(stat || paralysis || stunned || weakened)
|
||||||
return
|
return
|
||||||
@@ -80,12 +82,12 @@
|
|||||||
if(restrained())
|
if(restrained())
|
||||||
setClickCooldown(10)
|
setClickCooldown(10)
|
||||||
RestrainedClickOn(A)
|
RestrainedClickOn(A)
|
||||||
return
|
return 1
|
||||||
|
|
||||||
if(in_throw_mode)
|
if(in_throw_mode)
|
||||||
if(isturf(A) || isturf(A.loc))
|
if(isturf(A) || isturf(A.loc))
|
||||||
throw_item(A)
|
throw_item(A)
|
||||||
return
|
return 1
|
||||||
throw_mode_off()
|
throw_mode_off()
|
||||||
|
|
||||||
var/obj/item/W = get_active_hand()
|
var/obj/item/W = get_active_hand()
|
||||||
@@ -96,7 +98,7 @@
|
|||||||
update_inv_l_hand(0)
|
update_inv_l_hand(0)
|
||||||
else
|
else
|
||||||
update_inv_r_hand(0)
|
update_inv_r_hand(0)
|
||||||
return
|
return 1
|
||||||
|
|
||||||
//Atoms on your person
|
//Atoms on your person
|
||||||
// A is your location but is not a turf; or is on you (backpack); or is on something on you (box in backpack); sdepth is needed here because contents depth does not equate inventory storage depth.
|
// A is your location but is not a turf; or is on you (backpack); or is on something on you (box in backpack); sdepth is needed here because contents depth does not equate inventory storage depth.
|
||||||
@@ -114,7 +116,7 @@
|
|||||||
if(ismob(A)) // No instant mob attacking
|
if(ismob(A)) // No instant mob attacking
|
||||||
setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||||
UnarmedAttack(A, 1)
|
UnarmedAttack(A, 1)
|
||||||
return
|
return 1
|
||||||
|
|
||||||
if(!isturf(loc)) // This is going to stop you from telekinesing from inside a closet, but I don't shed many tears for that
|
if(!isturf(loc)) // This is going to stop you from telekinesing from inside a closet, but I don't shed many tears for that
|
||||||
return
|
return
|
||||||
@@ -141,8 +143,7 @@
|
|||||||
W.afterattack(A, src, 0, params) // 0: not Adjacent
|
W.afterattack(A, src, 0, params) // 0: not Adjacent
|
||||||
else
|
else
|
||||||
RangedAttack(A, params)
|
RangedAttack(A, params)
|
||||||
|
return 1
|
||||||
return
|
|
||||||
|
|
||||||
/mob/proc/setClickCooldown(var/timeout)
|
/mob/proc/setClickCooldown(var/timeout)
|
||||||
next_move = max(world.time + timeout, next_move)
|
next_move = max(world.time + timeout, next_move)
|
||||||
|
|||||||
66
code/_onclick/hud/gun_mode.dm
Normal file
66
code/_onclick/hud/gun_mode.dm
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
/obj/screen/gun
|
||||||
|
name = "gun"
|
||||||
|
icon = 'icons/mob/screen1.dmi'
|
||||||
|
master = null
|
||||||
|
dir = 2
|
||||||
|
|
||||||
|
/obj/screen/gun/Click(location, control, params)
|
||||||
|
if(!usr)
|
||||||
|
return
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/obj/screen/gun/move
|
||||||
|
name = "Allow Movement"
|
||||||
|
icon_state = "no_walk0"
|
||||||
|
screen_loc = ui_gun2
|
||||||
|
|
||||||
|
/obj/screen/gun/move/Click(location, control, params)
|
||||||
|
if(..())
|
||||||
|
var/mob/living/user = usr
|
||||||
|
if(istype(user))
|
||||||
|
if(!user.aiming) user.aiming = new(user)
|
||||||
|
user.aiming.toggle_permission(TARGET_CAN_MOVE)
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
|
/obj/screen/gun/item
|
||||||
|
name = "Allow Item Use"
|
||||||
|
icon_state = "no_item0"
|
||||||
|
screen_loc = ui_gun1
|
||||||
|
|
||||||
|
/obj/screen/gun/item/Click(location, control, params)
|
||||||
|
if(..())
|
||||||
|
var/mob/living/user = usr
|
||||||
|
if(istype(user))
|
||||||
|
if(!user.aiming) user.aiming = new(user)
|
||||||
|
user.aiming.toggle_permission(TARGET_CAN_CLICK)
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
|
/obj/screen/gun/mode
|
||||||
|
name = "Toggle Gun Mode"
|
||||||
|
icon_state = "gun0"
|
||||||
|
screen_loc = ui_gun_select
|
||||||
|
|
||||||
|
/obj/screen/gun/mode/Click(location, control, params)
|
||||||
|
if(..())
|
||||||
|
var/mob/living/user = usr
|
||||||
|
if(istype(user))
|
||||||
|
if(!user.aiming) user.aiming = new(user)
|
||||||
|
user.aiming.toggle_active()
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
|
/obj/screen/gun/radio
|
||||||
|
name = "Allow Radio Use"
|
||||||
|
icon_state = "no_radio0"
|
||||||
|
screen_loc = ui_gun4
|
||||||
|
|
||||||
|
/obj/screen/gun/radio/Click(location, control, params)
|
||||||
|
if(..())
|
||||||
|
var/mob/living/user = usr
|
||||||
|
if(istype(user))
|
||||||
|
if(!user.aiming) user.aiming = new(user)
|
||||||
|
user.aiming.toggle_permission(TARGET_CAN_RADIO)
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
@@ -310,7 +310,7 @@ datum/hud/New(mob/owner)
|
|||||||
else
|
else
|
||||||
src.client.screen -= src.healths
|
src.client.screen -= src.healths
|
||||||
src.client.screen -= src.internals
|
src.client.screen -= src.internals
|
||||||
//src.client.screen -= src.gun_setting_icon
|
src.client.screen -= src.gun_setting_icon
|
||||||
|
|
||||||
//These ones are not a part of 'adding', 'other' or 'hotkeybuttons' but we want them gone.
|
//These ones are not a part of 'adding', 'other' or 'hotkeybuttons' but we want them gone.
|
||||||
src.client.screen -= src.zone_sel //zone_sel is a mob variable for some reason.
|
src.client.screen -= src.zone_sel //zone_sel is a mob variable for some reason.
|
||||||
@@ -327,8 +327,8 @@ datum/hud/New(mob/owner)
|
|||||||
src.client.screen |= src.healths
|
src.client.screen |= src.healths
|
||||||
if(src.internals)
|
if(src.internals)
|
||||||
src.client.screen |= src.internals
|
src.client.screen |= src.internals
|
||||||
//if(src.gun_setting_icon)
|
if(src.gun_setting_icon)
|
||||||
// src.client.screen |= src.gun_setting_icon
|
src.client.screen |= src.gun_setting_icon
|
||||||
|
|
||||||
src.hud_used.action_intent.screen_loc = ui_acti //Restore intent selection to the original position
|
src.hud_used.action_intent.screen_loc = ui_acti //Restore intent selection to the original position
|
||||||
src.client.screen += src.zone_sel //This one is a special snowflake
|
src.client.screen += src.zone_sel //This one is a special snowflake
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
/datum/hud/proc/human_hud(var/ui_style='icons/mob/screen1_White.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255, var/mob/living/carbon/human/target)
|
/mob/living/carbon/human/instantiate_hud(var/datum/hud/HUD, var/ui_style, var/ui_color, var/ui_alpha)
|
||||||
|
HUD.human_hud(ui_style, ui_color, ui_alpha, src)
|
||||||
|
|
||||||
|
/datum/hud/proc/human_hud(var/ui_style='icons/mob/screen1_White.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255, var/mob/living/carbon/human/target)
|
||||||
var/datum/hud_data/hud_data
|
var/datum/hud_data/hud_data
|
||||||
if(!istype(target))
|
if(!istype(target))
|
||||||
hud_data = new()
|
hud_data = new()
|
||||||
@@ -337,7 +339,6 @@
|
|||||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||||
hud_elements |= mymob.zone_sel
|
hud_elements |= mymob.zone_sel
|
||||||
|
|
||||||
/*
|
|
||||||
//Handle the gun settings buttons
|
//Handle the gun settings buttons
|
||||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||||
mymob.gun_setting_icon.icon = ui_style
|
mymob.gun_setting_icon.icon = ui_style
|
||||||
@@ -355,16 +356,10 @@
|
|||||||
mymob.gun_move_icon.color = ui_color
|
mymob.gun_move_icon.color = ui_color
|
||||||
mymob.gun_move_icon.alpha = ui_alpha
|
mymob.gun_move_icon.alpha = ui_alpha
|
||||||
|
|
||||||
mymob.gun_run_icon = new /obj/screen/gun/run(null)
|
|
||||||
mymob.gun_run_icon.icon = ui_style
|
|
||||||
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 = new /obj/screen/gun/radio(null)
|
||||||
mymob.radio_use_icon.icon = ui_style
|
mymob.radio_use_icon.icon = ui_style
|
||||||
mymob.radio_use_icon.color = ui_color
|
mymob.radio_use_icon.color = ui_color
|
||||||
mymob.radio_use_icon.alpha = ui_alpha
|
mymob.radio_use_icon.alpha = ui_alpha
|
||||||
*/
|
|
||||||
|
|
||||||
mymob.client.screen = null
|
mymob.client.screen = null
|
||||||
|
|
||||||
|
|||||||
@@ -1,285 +0,0 @@
|
|||||||
/datum/hud/proc/monkey_hud(var/ui_style='icons/mob/screen1_old.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255)
|
|
||||||
|
|
||||||
src.adding = list()
|
|
||||||
src.other = list()
|
|
||||||
|
|
||||||
var/obj/screen/using
|
|
||||||
var/obj/screen/inventory/inv_box
|
|
||||||
|
|
||||||
using = new /obj/screen()
|
|
||||||
using.name = "act_intent"
|
|
||||||
using.icon = ui_style
|
|
||||||
using.color = ui_color
|
|
||||||
using.alpha = ui_alpha
|
|
||||||
using.icon_state = 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 = I_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 = I_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 = I_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 = I_HURT
|
|
||||||
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()
|
|
||||||
using.name = "mov_intent"
|
|
||||||
using.icon = ui_style
|
|
||||||
using.color = ui_color
|
|
||||||
using.alpha = ui_alpha
|
|
||||||
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()
|
|
||||||
using.name = "drop"
|
|
||||||
using.icon = ui_style
|
|
||||||
using.color = ui_color
|
|
||||||
using.alpha = ui_alpha
|
|
||||||
using.icon_state = "act_drop"
|
|
||||||
using.screen_loc = ui_drop_throw
|
|
||||||
using.layer = 19
|
|
||||||
src.adding += using
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
|
||||||
inv_box.name = "r_hand"
|
|
||||||
inv_box.icon = ui_style
|
|
||||||
using.color = ui_color
|
|
||||||
using.alpha = ui_alpha
|
|
||||||
inv_box.icon_state = "r_hand_inactive"
|
|
||||||
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
|
|
||||||
inv_box.icon_state = "hand_active"
|
|
||||||
inv_box.screen_loc = ui_rhand
|
|
||||||
inv_box.slot_id = slot_r_hand
|
|
||||||
inv_box.layer = 19
|
|
||||||
src.r_hand_hud_object = inv_box
|
|
||||||
src.adding += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
|
||||||
inv_box.name = "l_hand"
|
|
||||||
inv_box.icon = ui_style
|
|
||||||
using.color = ui_color
|
|
||||||
using.alpha = ui_alpha
|
|
||||||
inv_box.icon_state = "l_hand_inactive"
|
|
||||||
if(mymob && mymob.hand) //This being 1 means the left hand is in use
|
|
||||||
inv_box.icon_state = "hand_active"
|
|
||||||
inv_box.screen_loc = ui_lhand
|
|
||||||
inv_box.slot_id = slot_l_hand
|
|
||||||
inv_box.layer = 19
|
|
||||||
src.l_hand_hud_object = inv_box
|
|
||||||
src.adding += inv_box
|
|
||||||
|
|
||||||
using = new /obj/screen/inventory()
|
|
||||||
using.name = "hand"
|
|
||||||
using.icon = ui_style
|
|
||||||
using.color = ui_color
|
|
||||||
using.alpha = ui_alpha
|
|
||||||
using.icon_state = "hand1"
|
|
||||||
using.screen_loc = ui_swaphand1
|
|
||||||
using.layer = 19
|
|
||||||
src.adding += using
|
|
||||||
|
|
||||||
using = new /obj/screen/inventory()
|
|
||||||
using.name = "hand"
|
|
||||||
using.icon = ui_style
|
|
||||||
using.color = ui_color
|
|
||||||
using.alpha = ui_alpha
|
|
||||||
using.icon_state = "hand2"
|
|
||||||
using.screen_loc = ui_swaphand2
|
|
||||||
using.layer = 19
|
|
||||||
src.adding += using
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
|
||||||
inv_box.name = "mask"
|
|
||||||
inv_box.icon = ui_style
|
|
||||||
inv_box.color = ui_color
|
|
||||||
inv_box.alpha = ui_alpha
|
|
||||||
inv_box.icon_state = "equip"
|
|
||||||
inv_box.screen_loc = ui_monkey_mask
|
|
||||||
inv_box.slot_id = slot_wear_mask
|
|
||||||
inv_box.layer = 19
|
|
||||||
src.adding += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
|
||||||
inv_box.name = "back"
|
|
||||||
inv_box.icon = ui_style
|
|
||||||
inv_box.color = ui_color
|
|
||||||
inv_box.alpha = ui_alpha
|
|
||||||
inv_box.icon_state = "equip"
|
|
||||||
inv_box.screen_loc = ui_back
|
|
||||||
inv_box.slot_id = slot_back
|
|
||||||
inv_box.layer = 19
|
|
||||||
src.adding += inv_box
|
|
||||||
|
|
||||||
mymob.throw_icon = new /obj/screen()
|
|
||||||
mymob.throw_icon.icon = ui_style
|
|
||||||
mymob.throw_icon.color = ui_color
|
|
||||||
mymob.throw_icon.alpha = ui_alpha
|
|
||||||
mymob.throw_icon.icon_state = "act_throw_off"
|
|
||||||
mymob.throw_icon.name = "throw"
|
|
||||||
mymob.throw_icon.screen_loc = ui_drop_throw
|
|
||||||
|
|
||||||
mymob.oxygen = new /obj/screen()
|
|
||||||
mymob.oxygen.icon = ui_style
|
|
||||||
mymob.oxygen.color = ui_color
|
|
||||||
mymob.oxygen.alpha = ui_alpha
|
|
||||||
mymob.oxygen.icon_state = "oxy0"
|
|
||||||
mymob.oxygen.name = "oxygen"
|
|
||||||
mymob.oxygen.screen_loc = ui_oxygen
|
|
||||||
|
|
||||||
mymob.pressure = new /obj/screen()
|
|
||||||
mymob.pressure.icon = ui_style
|
|
||||||
mymob.pressure.color = ui_color
|
|
||||||
mymob.pressure.alpha = ui_alpha
|
|
||||||
mymob.pressure.icon_state = "pressure0"
|
|
||||||
mymob.pressure.name = "pressure"
|
|
||||||
mymob.pressure.screen_loc = ui_pressure
|
|
||||||
|
|
||||||
mymob.toxin = new /obj/screen()
|
|
||||||
mymob.toxin.icon = ui_style
|
|
||||||
mymob.toxin.color = ui_color
|
|
||||||
mymob.toxin.alpha = ui_alpha
|
|
||||||
mymob.toxin.icon_state = "tox0"
|
|
||||||
mymob.toxin.name = "toxin"
|
|
||||||
mymob.toxin.screen_loc = ui_toxin
|
|
||||||
|
|
||||||
mymob.internals = new /obj/screen()
|
|
||||||
mymob.internals.icon = ui_style
|
|
||||||
mymob.internals.color = ui_color
|
|
||||||
mymob.internals.alpha = ui_alpha
|
|
||||||
mymob.internals.icon_state = "internal0"
|
|
||||||
mymob.internals.name = "internal"
|
|
||||||
mymob.internals.screen_loc = ui_internal
|
|
||||||
|
|
||||||
mymob.fire = new /obj/screen()
|
|
||||||
mymob.fire.icon = ui_style
|
|
||||||
mymob.fire.color = ui_color
|
|
||||||
mymob.fire.alpha = ui_alpha
|
|
||||||
mymob.fire.icon_state = "fire0"
|
|
||||||
mymob.fire.name = "fire"
|
|
||||||
mymob.fire.screen_loc = ui_fire
|
|
||||||
|
|
||||||
mymob.bodytemp = new /obj/screen()
|
|
||||||
mymob.bodytemp.icon = ui_style
|
|
||||||
mymob.bodytemp.color = ui_color
|
|
||||||
mymob.bodytemp.alpha = ui_alpha
|
|
||||||
mymob.bodytemp.icon_state = "temp1"
|
|
||||||
mymob.bodytemp.name = "body temperature"
|
|
||||||
mymob.bodytemp.screen_loc = ui_temp
|
|
||||||
|
|
||||||
mymob.healths = new /obj/screen()
|
|
||||||
mymob.healths.icon = ui_style
|
|
||||||
mymob.healths.color = ui_color
|
|
||||||
mymob.healths.alpha = ui_alpha
|
|
||||||
mymob.healths.icon_state = "health0"
|
|
||||||
mymob.healths.name = "health"
|
|
||||||
mymob.healths.screen_loc = ui_health
|
|
||||||
|
|
||||||
mymob.pullin = new /obj/screen()
|
|
||||||
mymob.pullin.icon = ui_style
|
|
||||||
mymob.pullin.color = ui_color
|
|
||||||
mymob.pullin.alpha = ui_alpha
|
|
||||||
mymob.pullin.icon_state = "pull0"
|
|
||||||
mymob.pullin.name = "pull"
|
|
||||||
mymob.pullin.screen_loc = ui_pull_resist
|
|
||||||
|
|
||||||
mymob.blind = new /obj/screen()
|
|
||||||
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
|
|
||||||
mymob.blind.icon_state = "blackimageoverlay"
|
|
||||||
mymob.blind.name = " "
|
|
||||||
mymob.blind.screen_loc = "1,1"
|
|
||||||
mymob.blind.layer = 0
|
|
||||||
|
|
||||||
mymob.flash = new /obj/screen()
|
|
||||||
mymob.flash.icon = ui_style
|
|
||||||
mymob.flash.icon_state = "blank"
|
|
||||||
mymob.flash.name = "flash"
|
|
||||||
mymob.flash.screen_loc = ui_entire_screen
|
|
||||||
mymob.flash.layer = 17
|
|
||||||
|
|
||||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
|
||||||
mymob.zone_sel.icon = ui_style
|
|
||||||
mymob.zone_sel.color = ui_color
|
|
||||||
mymob.zone_sel.alpha = ui_alpha
|
|
||||||
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.set_dir(2)
|
|
||||||
|
|
||||||
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
|
|
||||||
if (G.aim_targets)
|
|
||||||
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
|
||||||
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)
|
|
||||||
mymob.gun_run_icon = new /obj/screen/gun/run(null)
|
|
||||||
if (mymob.client.target_can_run)
|
|
||||||
mymob.gun_run_icon.set_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.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
|
|
||||||
mymob.client.screen += src.adding + src.other
|
|
||||||
|
|
||||||
return
|
|
||||||
@@ -151,35 +151,15 @@ var/obj/screen/robot_inventory
|
|||||||
mymob.zone_sel.overlays.Cut()
|
mymob.zone_sel.overlays.Cut()
|
||||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||||
|
|
||||||
/*
|
|
||||||
//Handle the gun settings buttons
|
//Handle the gun settings buttons
|
||||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||||
if (mymob.client)
|
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
||||||
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
|
mymob.gun_move_icon = new /obj/screen/gun/move(null)
|
||||||
mymob.gun_setting_icon.set_dir(2)
|
mymob.radio_use_icon = new /obj/screen/gun/radio(null)
|
||||||
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
|
|
||||||
if (G.aim_targets)
|
|
||||||
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
|
||||||
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)
|
|
||||||
mymob.gun_run_icon = new /obj/screen/gun/run(null)
|
|
||||||
if (mymob.client.target_can_run)
|
|
||||||
mymob.gun_run_icon.set_dir(1)
|
|
||||||
src.adding += mymob.gun_run_icon
|
|
||||||
src.adding += mymob.gun_move_icon
|
|
||||||
*/
|
|
||||||
|
|
||||||
mymob.client.screen = null
|
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, robot_inventory) //, mymob.gun_setting_icon, 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, robot_inventory, mymob.gun_setting_icon)
|
||||||
mymob.client.screen += src.adding + src.other
|
mymob.client.screen += src.adding + src.other
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
layer = 20.0
|
layer = 20.0
|
||||||
unacidable = 1
|
unacidable = 1
|
||||||
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
|
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
|
||||||
var/gun_click_time = -100 //I'm lazy.
|
|
||||||
|
|
||||||
/obj/screen/Destroy()
|
/obj/screen/Destroy()
|
||||||
master = null
|
master = null
|
||||||
@@ -169,7 +168,6 @@
|
|||||||
|
|
||||||
/obj/screen/Click(location, control, params)
|
/obj/screen/Click(location, control, params)
|
||||||
if(!usr) return 1
|
if(!usr) return 1
|
||||||
|
|
||||||
switch(name)
|
switch(name)
|
||||||
if("toggle")
|
if("toggle")
|
||||||
if(usr.hud_used.inventory_shown)
|
if(usr.hud_used.inventory_shown)
|
||||||
@@ -399,47 +397,6 @@
|
|||||||
if("module3")
|
if("module3")
|
||||||
if(istype(usr, /mob/living/silicon/robot))
|
if(istype(usr, /mob/living/silicon/robot))
|
||||||
usr:toggle_module(3)
|
usr:toggle_module(3)
|
||||||
|
|
||||||
/*
|
|
||||||
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))
|
|
||||||
usr << "You need your gun in your active hand to do that!"
|
|
||||||
return
|
|
||||||
usr.client.AllowTargetMove()
|
|
||||||
gun_click_time = world.time
|
|
||||||
|
|
||||||
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))
|
|
||||||
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", "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))
|
|
||||||
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()
|
|
||||||
|
|
||||||
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
|
else
|
||||||
return 0
|
return 0
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -949,7 +949,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
/obj/item/device/pda/proc/create_message(var/mob/living/U = usr, var/obj/item/device/pda/P, var/tap = 1)
|
/obj/item/device/pda/proc/create_message(var/mob/living/U = usr, var/obj/item/device/pda/P, var/tap = 1)
|
||||||
if(tap)
|
if(tap)
|
||||||
U.visible_message("<span class='notice'>\The [U] taps on \his PDA's screen.</span>")
|
U.visible_message("<span class='notice'>\The [U] taps on \his PDA's screen.</span>")
|
||||||
//U.last_target_click = world.time
|
|
||||||
var/t = input(U, "Please enter message", P.name, null) as text
|
var/t = input(U, "Please enter message", P.name, null) as text
|
||||||
t = sanitize(t)
|
t = sanitize(t)
|
||||||
//t = readd_quotes(t)
|
//t = readd_quotes(t)
|
||||||
|
|||||||
@@ -273,13 +273,13 @@ var/global/list/default_medbay_channels = list(
|
|||||||
// Fix for permacell radios, but kinda eh about actually fixing them.
|
// Fix for permacell radios, but kinda eh about actually fixing them.
|
||||||
if(!M || !message) return 0
|
if(!M || !message) return 0
|
||||||
|
|
||||||
|
if(istype(M)) M.trigger_aiming(TARGET_CAN_RADIO)
|
||||||
|
|
||||||
// Uncommenting this. To the above comment:
|
// 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
|
// 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(wires.IsIndexCut(WIRE_TRANSMIT)) // The device has to have all its wires and shit intact
|
if(wires.IsIndexCut(WIRE_TRANSMIT)) // The device has to have all its wires and shit intact
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
//M.last_target_radio = world.time // For the projectile targeting system
|
|
||||||
|
|
||||||
if(!radio_connection)
|
if(!radio_connection)
|
||||||
set_frequency(frequency)
|
set_frequency(frequency)
|
||||||
|
|
||||||
|
|||||||
@@ -35,13 +35,10 @@
|
|||||||
//update UI
|
//update UI
|
||||||
var/list/icons = usr.hud_used.adding + usr.hud_used.other + usr.hud_used.hotkeybuttons
|
var/list/icons = usr.hud_used.adding + usr.hud_used.other + usr.hud_used.hotkeybuttons
|
||||||
icons.Add(usr.zone_sel)
|
icons.Add(usr.zone_sel)
|
||||||
/*
|
|
||||||
icons.Add(usr.gun_setting_icon)
|
icons.Add(usr.gun_setting_icon)
|
||||||
icons.Add(usr.item_use_icon)
|
icons.Add(usr.item_use_icon)
|
||||||
icons.Add(usr.gun_move_icon)
|
icons.Add(usr.gun_move_icon)
|
||||||
icons.Add(usr.gun_run_icon)
|
|
||||||
icons.Add(usr.radio_use_icon)
|
icons.Add(usr.radio_use_icon)
|
||||||
*/
|
|
||||||
|
|
||||||
var/icon/ic = all_ui_styles[UI_style_new]
|
var/icon/ic = all_ui_styles[UI_style_new]
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
slot = "utility"
|
slot = "utility"
|
||||||
var/obj/item/holstered = null
|
var/obj/item/holstered = null
|
||||||
|
|
||||||
/obj/item/clothing/accessory/holster/proc/holster(obj/item/I, mob/user as mob)
|
/obj/item/clothing/accessory/holster/proc/holster(var/obj/item/I, var/mob/living/user)
|
||||||
if(holstered)
|
if(holstered && istype(user))
|
||||||
user << "<span class='warning'>There is already \a [holstered] holstered here!</span>"
|
user << "<span class='warning'>There is already \a [holstered] holstered here!</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -14,6 +14,8 @@
|
|||||||
user << "<span class='warning'>[I] won't fit in [src]!</span>"
|
user << "<span class='warning'>[I] won't fit in [src]!</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(istype(user))
|
||||||
|
user.stop_aiming(no_message=1)
|
||||||
holstered = I
|
holstered = I
|
||||||
user.drop_from_inventory(holstered)
|
user.drop_from_inventory(holstered)
|
||||||
holstered.loc = src
|
holstered.loc = src
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ var/list/slot_equipment_priority = list( \
|
|||||||
// Removes an item from inventory and places it in the target atom.
|
// Removes an item from inventory and places it in the target atom.
|
||||||
// If canremove or other conditions need to be checked then use unEquip instead.
|
// If canremove or other conditions need to be checked then use unEquip instead.
|
||||||
/mob/proc/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
|
/mob/proc/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
|
||||||
|
|
||||||
if(W)
|
if(W)
|
||||||
if(!Target)
|
if(!Target)
|
||||||
Target = loc
|
Target = loc
|
||||||
|
|||||||
@@ -49,6 +49,8 @@
|
|||||||
|
|
||||||
if(shock_stage >= 10) tally += 3
|
if(shock_stage >= 10) tally += 3
|
||||||
|
|
||||||
|
if(aiming && aiming.aiming_at) tally += 5 // Iron sights make you slower, it's a well-known fact.
|
||||||
|
|
||||||
if(FAT in src.mutations)
|
if(FAT in src.mutations)
|
||||||
tally += 1.5
|
tally += 1.5
|
||||||
if (bodytemperature < 283.222)
|
if (bodytemperature < 283.222)
|
||||||
|
|||||||
@@ -37,10 +37,9 @@
|
|||||||
pressure = null
|
pressure = null
|
||||||
damageoverlay = null
|
damageoverlay = null
|
||||||
pain = null
|
pain = null
|
||||||
//item_use_icon = null
|
item_use_icon = null
|
||||||
//gun_move_icon = null
|
gun_move_icon = null
|
||||||
//gun_run_icon = null
|
gun_setting_icon = null
|
||||||
//gun_setting_icon = null
|
|
||||||
spell_masters = null
|
spell_masters = null
|
||||||
zone_sel = null
|
zone_sel = null
|
||||||
|
|
||||||
@@ -765,8 +764,8 @@
|
|||||||
|
|
||||||
if(lying)
|
if(lying)
|
||||||
density = 0
|
density = 0
|
||||||
drop_l_hand()
|
if(l_hand) unEquip(l_hand)
|
||||||
drop_r_hand()
|
if(r_hand) unEquip(r_hand)
|
||||||
else
|
else
|
||||||
density = initial(density)
|
density = initial(density)
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
if(process_projectile(P, user, user, pick("l_foot", "r_foot")))
|
if(process_projectile(P, user, user, pick("l_foot", "r_foot")))
|
||||||
handle_post_fire(user, user)
|
handle_post_fire(user, user)
|
||||||
user.visible_message(
|
user.visible_message(
|
||||||
"<span class='danger'>[user] shoots \himself in the foot with \the [src]!</span>",
|
"<span class='danger'>\The [user] shoots \himself in the foot with \the [src]!</span>",
|
||||||
"<span class='danger'>You shoot yourself in the foot with \the [src]!</span>"
|
"<span class='danger'>You shoot yourself in the foot with \the [src]!</span>"
|
||||||
)
|
)
|
||||||
M.drop_item()
|
M.drop_item()
|
||||||
@@ -123,21 +123,18 @@
|
|||||||
/obj/item/weapon/gun/afterattack(atom/A, mob/living/user, adjacent, params)
|
/obj/item/weapon/gun/afterattack(atom/A, mob/living/user, adjacent, params)
|
||||||
if(adjacent) return //A is adjacent, is the user, or is on the user's person
|
if(adjacent) return //A is adjacent, is the user, or is on the user's person
|
||||||
|
|
||||||
/*
|
if(!user.aiming)
|
||||||
if(user && user.client && !(A in aim_targets))
|
user.aiming = new(user)
|
||||||
if(user.client.gun_mode)
|
|
||||||
aiming = PreFire(A,user,params) //They're using the new gun system, locate what they're aiming at.
|
if(user && user.client && user.aiming && user.aiming.active && user.aiming.aiming_at != A)
|
||||||
return
|
PreFire(A,user,params) //They're using the new gun system, locate what they're aiming at.
|
||||||
*/
|
return
|
||||||
|
|
||||||
if(user && user.a_intent == I_HELP) //regardless of what happens, refuse to shoot if help intent is on
|
if(user && user.a_intent == I_HELP) //regardless of what happens, refuse to shoot if help intent is on
|
||||||
user << "<span class='warning'>You refrain from firing your [src] as your intent is set to help.</span>"
|
user << "<span class='warning'>You refrain from firing your [src] as your intent is set to help.</span>"
|
||||||
else
|
else
|
||||||
Fire(A,user,params) //Otherwise, fire normally.
|
Fire(A,user,params) //Otherwise, fire normally.
|
||||||
|
|
||||||
/obj/item/weapon/gun/proc/PreFire(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, params)
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/attack(atom/A, mob/living/user, def_zone)
|
/obj/item/weapon/gun/attack(atom/A, mob/living/user, def_zone)
|
||||||
if (A == user && user.zone_sel.selecting == "mouth" && !mouthshoot)
|
if (A == user && user.zone_sel.selecting == "mouth" && !mouthshoot)
|
||||||
handle_suicide(user)
|
handle_suicide(user)
|
||||||
|
|||||||
12
code/modules/projectiles/targeting/targeting_client.dm
Normal file
12
code/modules/projectiles/targeting/targeting_client.dm
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
//These are called by the on-screen buttons, adjusting what the victim can and cannot do.
|
||||||
|
/client/proc/add_gun_icons()
|
||||||
|
if(!usr) return 1 // This can runtime if someone manages to throw a gun out of their hand before the proc is called.
|
||||||
|
screen |= usr.item_use_icon
|
||||||
|
screen |= usr.gun_move_icon
|
||||||
|
screen |= usr.radio_use_icon
|
||||||
|
|
||||||
|
/client/proc/remove_gun_icons()
|
||||||
|
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
|
||||||
21
code/modules/projectiles/targeting/targeting_gun.dm
Normal file
21
code/modules/projectiles/targeting/targeting_gun.dm
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
//Removing the lock and the buttons.
|
||||||
|
/obj/item/weapon/gun/dropped(var/mob/living/user)
|
||||||
|
if(istype(user))
|
||||||
|
user.stop_aiming(src)
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/equipped(var/mob/living/user, var/slot)
|
||||||
|
if(istype(user) && (slot != slot_l_hand && slot != slot_r_hand))
|
||||||
|
user.stop_aiming(src)
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
//Compute how to fire.....
|
||||||
|
//Return 1 if a target was found, 0 otherwise.
|
||||||
|
/obj/item/weapon/gun/proc/PreFire(var/atom/A, var/mob/living/user, var/params)
|
||||||
|
if(!user.aiming)
|
||||||
|
user.aiming = new(user)
|
||||||
|
user.face_atom(A)
|
||||||
|
if(ismob(A) && user.aiming)
|
||||||
|
user.aiming.aim_at(A, src)
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
44
code/modules/projectiles/targeting/targeting_mob.dm
Normal file
44
code/modules/projectiles/targeting/targeting_mob.dm
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/mob/living/var/obj/aiming_overlay/aiming
|
||||||
|
/mob/living/var/list/aimed = list()
|
||||||
|
|
||||||
|
/mob/living/proc/stop_aiming(var/obj/item/thing, var/no_message = 0)
|
||||||
|
if(!aiming)
|
||||||
|
aiming = new(src)
|
||||||
|
if(thing && aiming.aiming_with != thing)
|
||||||
|
return
|
||||||
|
aiming.cancel_aiming(no_message)
|
||||||
|
|
||||||
|
/mob/living/death(gibbed,deathmessage="seizes up and falls limp...")
|
||||||
|
if(..())
|
||||||
|
stop_aiming(no_message=1)
|
||||||
|
|
||||||
|
/mob/living/update_canmove()
|
||||||
|
..()
|
||||||
|
if(lying)
|
||||||
|
stop_aiming(no_message=1)
|
||||||
|
|
||||||
|
/mob/living/Weaken(amount)
|
||||||
|
stop_aiming(no_message=1)
|
||||||
|
..()
|
||||||
|
|
||||||
|
/mob/living/Destroy()
|
||||||
|
if(aiming)
|
||||||
|
qdel(aiming)
|
||||||
|
aiming = null
|
||||||
|
aimed.Cut()
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/turf/Enter(var/mob/living/mover)
|
||||||
|
. = ..()
|
||||||
|
if(istype(mover))
|
||||||
|
if(mover.aiming && mover.aiming.aiming_at)
|
||||||
|
mover.aiming.update_aiming()
|
||||||
|
if(mover.aimed.len)
|
||||||
|
mover.trigger_aiming(TARGET_CAN_MOVE)
|
||||||
|
|
||||||
|
/mob/living/forceMove(var/atom/destination)
|
||||||
|
. = ..()
|
||||||
|
if(aiming && aiming.aiming_at)
|
||||||
|
aiming.update_aiming()
|
||||||
|
if(aimed.len)
|
||||||
|
trigger_aiming(TARGET_CAN_MOVE)
|
||||||
213
code/modules/projectiles/targeting/targeting_overlay.dm
Normal file
213
code/modules/projectiles/targeting/targeting_overlay.dm
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
/obj/aiming_overlay
|
||||||
|
name = "target indicator"
|
||||||
|
desc = "Stick 'em up!"
|
||||||
|
icon = 'icons/effects/Targeted.dmi'
|
||||||
|
icon_state = "locking"
|
||||||
|
anchored = 1
|
||||||
|
density = 0
|
||||||
|
opacity = 0
|
||||||
|
layer = FLY_LAYER
|
||||||
|
simulated = 0
|
||||||
|
|
||||||
|
var/mob/living/aiming_at // Who are we currently targeting, if anyone?
|
||||||
|
var/obj/item/aiming_with // What are we targeting with?
|
||||||
|
var/mob/owner // Who do we belong to?
|
||||||
|
var/locked = 0 // Have we locked on?
|
||||||
|
var/lock_time = 0 // When -will- we lock on?
|
||||||
|
var/active = 0 // Is our owner intending to take hostages?
|
||||||
|
var/target_permissions = 0 // Permission bitflags.
|
||||||
|
|
||||||
|
/obj/aiming_overlay/New(var/newowner)
|
||||||
|
..()
|
||||||
|
owner = newowner
|
||||||
|
loc = null
|
||||||
|
|
||||||
|
/obj/aiming_overlay/proc/toggle_permission(var/perm)
|
||||||
|
|
||||||
|
if(target_permissions & perm)
|
||||||
|
target_permissions &= ~perm
|
||||||
|
else
|
||||||
|
target_permissions |= perm
|
||||||
|
|
||||||
|
// Update HUD icons.
|
||||||
|
if(owner.gun_move_icon)
|
||||||
|
if(!(target_permissions & TARGET_CAN_MOVE))
|
||||||
|
owner.gun_move_icon.icon_state = "no_walk0"
|
||||||
|
owner.gun_move_icon.name = "Allow Movement"
|
||||||
|
else
|
||||||
|
owner.gun_move_icon.icon_state = "no_walk1"
|
||||||
|
owner.gun_move_icon.name = "Disallow Movement"
|
||||||
|
|
||||||
|
if(owner.item_use_icon)
|
||||||
|
if(!(target_permissions & TARGET_CAN_CLICK))
|
||||||
|
owner.item_use_icon.icon_state = "no_item0"
|
||||||
|
owner.item_use_icon.name = "Allow Item Use"
|
||||||
|
else
|
||||||
|
owner.item_use_icon.icon_state = "no_item1"
|
||||||
|
owner.item_use_icon.name = "Disallow Item Use"
|
||||||
|
|
||||||
|
if(owner.radio_use_icon)
|
||||||
|
if(!(target_permissions & TARGET_CAN_RADIO))
|
||||||
|
owner.radio_use_icon.icon_state = "no_radio0"
|
||||||
|
owner.radio_use_icon.name = "Allow Radio Use"
|
||||||
|
else
|
||||||
|
owner.radio_use_icon.icon_state = "no_radio1"
|
||||||
|
owner.radio_use_icon.name = "Disallow Radio Use"
|
||||||
|
|
||||||
|
var/message = "no longer permitted to "
|
||||||
|
var/use_span = "warning"
|
||||||
|
if(target_permissions & perm)
|
||||||
|
message = "now permitted to "
|
||||||
|
use_span = "notice"
|
||||||
|
|
||||||
|
switch(perm)
|
||||||
|
if(TARGET_CAN_MOVE)
|
||||||
|
message += "move"
|
||||||
|
if(TARGET_CAN_CLICK)
|
||||||
|
message += "use items"
|
||||||
|
if(TARGET_CAN_RADIO)
|
||||||
|
message += "use a radio"
|
||||||
|
else
|
||||||
|
return
|
||||||
|
|
||||||
|
owner << "<span class='[use_span]'>[aiming_at ? "\The [aiming_at] is" : "Your targets are"] [message].</span>"
|
||||||
|
if(aiming_at)
|
||||||
|
aiming_at << "<span class='[use_span]'>You are [message].</span>"
|
||||||
|
|
||||||
|
/obj/aiming_overlay/process()
|
||||||
|
if(!owner)
|
||||||
|
qdel(src)
|
||||||
|
return
|
||||||
|
..()
|
||||||
|
update_aiming()
|
||||||
|
|
||||||
|
/obj/aiming_overlay/Destroy()
|
||||||
|
if(aiming_at)
|
||||||
|
aiming_at.aimed -= src
|
||||||
|
aiming_at = null
|
||||||
|
owner = null
|
||||||
|
aiming_with = null
|
||||||
|
processing_objects -= src
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
obj/aiming_overlay/proc/update_aiming_deferred()
|
||||||
|
set waitfor = 0
|
||||||
|
sleep(0)
|
||||||
|
update_aiming()
|
||||||
|
|
||||||
|
/obj/aiming_overlay/proc/update_aiming()
|
||||||
|
|
||||||
|
if(!owner)
|
||||||
|
qdel(src)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!aiming_at)
|
||||||
|
cancel_aiming()
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!locked && lock_time >= world.time)
|
||||||
|
locked = 1
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
var/cancel_aim = 1
|
||||||
|
if(!(aiming_with in owner) || (owner.l_hand != aiming_with && owner.r_hand != aiming_with))
|
||||||
|
owner << "<span class='warning'>You must keep hold of your weapon!</span>"
|
||||||
|
else if(!aiming_at || !istype(aiming_at.loc, /turf))
|
||||||
|
owner << "<span class='warning'>You have lost sight of your target!</span>"
|
||||||
|
else if(owner.incapacitated() || owner.lying || owner.restrained())
|
||||||
|
owner << "<span class='warning'>You must be conscious and standing to keep track of your target!</span>"
|
||||||
|
else if(aiming_at.alpha == 0 || (aiming_at.invisibility > owner.see_invisible))
|
||||||
|
owner << "<span class='warning'>Your target has become invisible!</span>"
|
||||||
|
else if(get_dist(get_turf(owner), get_turf(aiming_at)) > 7) // !(owner in viewers(aiming_at, 7))
|
||||||
|
owner << "<span class='warning'>Your target is too far away to track!</span>"
|
||||||
|
else
|
||||||
|
cancel_aim = 0
|
||||||
|
|
||||||
|
forceMove(get_turf(aiming_at))
|
||||||
|
|
||||||
|
if(cancel_aim)
|
||||||
|
cancel_aiming()
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!owner.incapacitated() && owner.client)
|
||||||
|
spawn(0)
|
||||||
|
owner.set_dir(get_dir(get_turf(owner), get_turf(src)))
|
||||||
|
|
||||||
|
/obj/aiming_overlay/proc/aim_at(var/mob/target, var/obj/thing)
|
||||||
|
|
||||||
|
if(!owner)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(owner.incapacitated())
|
||||||
|
owner << "<span class='warning'>You cannot aim a gun in your current state.</span>"
|
||||||
|
return
|
||||||
|
if(owner.lying)
|
||||||
|
owner << "<span class='warning'>You cannot aim a gun while prone.</span>"
|
||||||
|
return
|
||||||
|
if(owner.restrained())
|
||||||
|
owner << "<span class='warning'>You cannot aim a gun while handcuffed.</span>"
|
||||||
|
return
|
||||||
|
|
||||||
|
if(aiming_at)
|
||||||
|
if(aiming_at == target)
|
||||||
|
return
|
||||||
|
aiming_at.aimed -= src
|
||||||
|
owner.visible_message("<span class='danger'>\The [owner] turns \the [thing] on \the [target]!</span>")
|
||||||
|
else
|
||||||
|
owner.visible_message("<span class='danger'>\The [owner] aims \the [thing] at \the [target]!</span>")
|
||||||
|
|
||||||
|
if(owner.client)
|
||||||
|
owner.client.add_gun_icons()
|
||||||
|
target << "<span class='danger'>You now have a gun pointed at you. No sudden moves!</span>"
|
||||||
|
aiming_with = thing
|
||||||
|
aiming_at = target
|
||||||
|
if(istype(aiming_with, /obj/item/weapon/gun))
|
||||||
|
playsound(get_turf(owner), 'sound/weapons/TargetOn.ogg', 50,1)
|
||||||
|
forceMove(get_turf(target))
|
||||||
|
processing_objects |= src
|
||||||
|
|
||||||
|
aiming_at.aimed |= src
|
||||||
|
toggle_active(1)
|
||||||
|
locked = 0
|
||||||
|
update_icon()
|
||||||
|
lock_time = world.time + 35
|
||||||
|
|
||||||
|
/obj/aiming_overlay/update_icon()
|
||||||
|
if(locked)
|
||||||
|
icon_state = "locked"
|
||||||
|
else
|
||||||
|
icon_state = "locking"
|
||||||
|
|
||||||
|
/obj/aiming_overlay/proc/toggle_active(var/force_state = null)
|
||||||
|
if(!isnull(force_state))
|
||||||
|
if(active == force_state)
|
||||||
|
return
|
||||||
|
active = force_state
|
||||||
|
else
|
||||||
|
active = !active
|
||||||
|
|
||||||
|
if(!active)
|
||||||
|
cancel_aiming()
|
||||||
|
|
||||||
|
if(owner.client)
|
||||||
|
if(active)
|
||||||
|
owner << "<span class='notice'>You will now aim rather than fire.</span>"
|
||||||
|
owner.client.add_gun_icons()
|
||||||
|
else
|
||||||
|
owner << "<span class='notice'>You will no longer aim rather than fire.</span>"
|
||||||
|
owner.client.remove_gun_icons()
|
||||||
|
|
||||||
|
/obj/aiming_overlay/proc/cancel_aiming(var/no_message = 0)
|
||||||
|
if(!aiming_with || !aiming_at)
|
||||||
|
return
|
||||||
|
if(istype(aiming_with, /obj/item/weapon/gun))
|
||||||
|
playsound(get_turf(owner), 'sound/weapons/TargetOff.ogg', 50,1)
|
||||||
|
if(!no_message)
|
||||||
|
owner.visible_message("<span class='notice'>\The [owner] lowers \the [aiming_with].</span>")
|
||||||
|
|
||||||
|
aiming_with = null
|
||||||
|
aiming_at.aimed -= src
|
||||||
|
aiming_at = null
|
||||||
|
loc = null
|
||||||
|
processing_objects -= src
|
||||||
|
|
||||||
29
code/modules/projectiles/targeting/targeting_triggers.dm
Normal file
29
code/modules/projectiles/targeting/targeting_triggers.dm
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
/mob/living/proc/trigger_aiming(var/trigger_type)
|
||||||
|
if(!aimed.len)
|
||||||
|
return
|
||||||
|
for(var/obj/aiming_overlay/AO in aimed)
|
||||||
|
if(AO.aiming_at == src)
|
||||||
|
AO.update_aiming()
|
||||||
|
if(AO.aiming_at == src)
|
||||||
|
AO.trigger(trigger_type)
|
||||||
|
AO.update_aiming_deferred()
|
||||||
|
|
||||||
|
/obj/aiming_overlay/proc/trigger(var/perm)
|
||||||
|
if(!owner || !aiming_with || !aiming_at || !locked)
|
||||||
|
return
|
||||||
|
if(perm && (target_permissions & perm))
|
||||||
|
return
|
||||||
|
if(!owner.canClick())
|
||||||
|
return
|
||||||
|
owner.setClickCooldown(5) // Spam prevention, essentially.
|
||||||
|
if(owner.a_intent == I_HELP)
|
||||||
|
owner << "<span class='warning'>You refrain from firing \the [aiming_with] as your intent is set to help.</span>"
|
||||||
|
return
|
||||||
|
owner.visible_message("<span class='danger'>\The [owner] pulls the trigger reflexively!</span>")
|
||||||
|
var/obj/item/weapon/gun/G = aiming_with
|
||||||
|
if(istype(G))
|
||||||
|
G.Fire(aiming_at, owner)
|
||||||
|
|
||||||
|
/mob/living/ClickOn(var/atom/A, var/params)
|
||||||
|
. = ..()
|
||||||
|
trigger_aiming(TARGET_CAN_CLICK)
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
if (GM.client)
|
if (GM.client)
|
||||||
GM.client.perspective = EYE_PERSPECTIVE
|
GM.client.perspective = EYE_PERSPECTIVE
|
||||||
GM.client.eye = src
|
GM.client.eye = src
|
||||||
GM.loc = src
|
GM.forceMove(src)
|
||||||
for (var/mob/C in viewers(src))
|
for (var/mob/C in viewers(src))
|
||||||
C.show_message("\red [GM.name] has been placed in the [src] by [user].", 3)
|
C.show_message("\red [GM.name] has been placed in the [src] by [user].", 3)
|
||||||
qdel(G)
|
qdel(G)
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
|
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
if(I)
|
if(I)
|
||||||
I.loc = src
|
I.forceMove(src)
|
||||||
|
|
||||||
user << "You place \the [I] into the [src]."
|
user << "You place \the [I] into the [src]."
|
||||||
for(var/mob/M in viewers(src))
|
for(var/mob/M in viewers(src))
|
||||||
@@ -177,7 +177,8 @@
|
|||||||
if (target.client)
|
if (target.client)
|
||||||
target.client.perspective = EYE_PERSPECTIVE
|
target.client.perspective = EYE_PERSPECTIVE
|
||||||
target.client.eye = src
|
target.client.eye = src
|
||||||
target.loc = src
|
|
||||||
|
target.forceMove(src)
|
||||||
|
|
||||||
for (var/mob/C in viewers(src))
|
for (var/mob/C in viewers(src))
|
||||||
if(C == user)
|
if(C == user)
|
||||||
@@ -201,7 +202,7 @@
|
|||||||
if (user.client)
|
if (user.client)
|
||||||
user.client.eye = user.client.mob
|
user.client.eye = user.client.mob
|
||||||
user.client.perspective = MOB_PERSPECTIVE
|
user.client.perspective = MOB_PERSPECTIVE
|
||||||
user.loc = src.loc
|
user.forceMove(src.loc)
|
||||||
update()
|
update()
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -310,7 +311,7 @@
|
|||||||
// eject the contents of the disposal unit
|
// eject the contents of the disposal unit
|
||||||
/obj/machinery/disposal/proc/eject()
|
/obj/machinery/disposal/proc/eject()
|
||||||
for(var/atom/movable/AM in src)
|
for(var/atom/movable/AM in src)
|
||||||
AM.loc = src.loc
|
AM.forceMove(src.loc)
|
||||||
AM.pipe_eject(0)
|
AM.pipe_eject(0)
|
||||||
update()
|
update()
|
||||||
|
|
||||||
@@ -443,7 +444,7 @@
|
|||||||
for(var/atom/movable/AM in H)
|
for(var/atom/movable/AM in H)
|
||||||
target = get_offset_target_turf(src.loc, rand(5)-rand(5), rand(5)-rand(5))
|
target = get_offset_target_turf(src.loc, rand(5)-rand(5), rand(5)-rand(5))
|
||||||
|
|
||||||
AM.loc = src.loc
|
AM.forceMove(src.loc)
|
||||||
AM.pipe_eject(0)
|
AM.pipe_eject(0)
|
||||||
if(!istype(AM,/mob/living/silicon/robot/drone)) //Poor drones kept smashing windows and taking system damage being fired out of disposals. ~Z
|
if(!istype(AM,/mob/living/silicon/robot/drone)) //Poor drones kept smashing windows and taking system damage being fired out of disposals. ~Z
|
||||||
spawn(1)
|
spawn(1)
|
||||||
@@ -459,7 +460,7 @@
|
|||||||
if(istype(I, /obj/item/projectile))
|
if(istype(I, /obj/item/projectile))
|
||||||
return
|
return
|
||||||
if(prob(75))
|
if(prob(75))
|
||||||
I.loc = src
|
I.forceMove(src)
|
||||||
for(var/mob/M in viewers(src))
|
for(var/mob/M in viewers(src))
|
||||||
M.show_message("\The [I] lands in \the [src].", 3)
|
M.show_message("\The [I] lands in \the [src].", 3)
|
||||||
else
|
else
|
||||||
@@ -508,7 +509,7 @@
|
|||||||
// now everything inside the disposal gets put into the holder
|
// now everything inside the disposal gets put into the holder
|
||||||
// note AM since can contain mobs or objs
|
// note AM since can contain mobs or objs
|
||||||
for(var/atom/movable/AM in D)
|
for(var/atom/movable/AM in D)
|
||||||
AM.loc = src
|
AM.forceMove(src)
|
||||||
if(istype(AM, /obj/structure/bigDelivery) && !hasmob)
|
if(istype(AM, /obj/structure/bigDelivery) && !hasmob)
|
||||||
var/obj/structure/bigDelivery/T = AM
|
var/obj/structure/bigDelivery/T = AM
|
||||||
src.destinationTag = T.sortTag
|
src.destinationTag = T.sortTag
|
||||||
@@ -528,7 +529,7 @@
|
|||||||
D.expel(src) // no trunk connected, so expel immediately
|
D.expel(src) // no trunk connected, so expel immediately
|
||||||
return
|
return
|
||||||
|
|
||||||
loc = D.trunk
|
forceMove(D.trunk)
|
||||||
active = 1
|
active = 1
|
||||||
set_dir(DOWN)
|
set_dir(DOWN)
|
||||||
spawn(1)
|
spawn(1)
|
||||||
@@ -585,7 +586,7 @@
|
|||||||
// used when a a holder meets a stuck holder
|
// used when a a holder meets a stuck holder
|
||||||
proc/merge(var/obj/structure/disposalholder/other)
|
proc/merge(var/obj/structure/disposalholder/other)
|
||||||
for(var/atom/movable/AM in other)
|
for(var/atom/movable/AM in other)
|
||||||
AM.loc = src // move everything in other holder to this one
|
AM.forceMove(src) // move everything in other holder to this one
|
||||||
if(ismob(AM))
|
if(ismob(AM))
|
||||||
var/mob/M = AM
|
var/mob/M = AM
|
||||||
if(M.client) // if a client mob, update eye to follow this holder
|
if(M.client) // if a client mob, update eye to follow this holder
|
||||||
@@ -671,7 +672,7 @@
|
|||||||
// this is unlikely, but just dump out everything into the turf in case
|
// this is unlikely, but just dump out everything into the turf in case
|
||||||
|
|
||||||
for(var/atom/movable/AM in H)
|
for(var/atom/movable/AM in H)
|
||||||
AM.loc = T
|
AM.forceMove(T)
|
||||||
AM.pipe_eject(0)
|
AM.pipe_eject(0)
|
||||||
qdel(H)
|
qdel(H)
|
||||||
..()
|
..()
|
||||||
@@ -702,9 +703,9 @@
|
|||||||
if(H2 && !H2.active)
|
if(H2 && !H2.active)
|
||||||
H.merge(H2)
|
H.merge(H2)
|
||||||
|
|
||||||
H.loc = P
|
H.forceMove(P)
|
||||||
else // if wasn't a pipe, then set loc to turf
|
else // if wasn't a pipe, then set loc to turf
|
||||||
H.loc = T
|
H.forceMove(T)
|
||||||
return null
|
return null
|
||||||
|
|
||||||
return P
|
return P
|
||||||
@@ -746,6 +747,7 @@
|
|||||||
H.active = 0
|
H.active = 0
|
||||||
H.loc = src
|
H.loc = src
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!T.is_plating() && istype(T,/turf/simulated/floor)) //intact floor, pop the tile
|
if(!T.is_plating() && istype(T,/turf/simulated/floor)) //intact floor, pop the tile
|
||||||
var/turf/simulated/floor/F = T
|
var/turf/simulated/floor/F = T
|
||||||
F.break_tile()
|
F.break_tile()
|
||||||
@@ -760,7 +762,7 @@
|
|||||||
playsound(src, 'sound/machines/hiss.ogg', 50, 0, 0)
|
playsound(src, 'sound/machines/hiss.ogg', 50, 0, 0)
|
||||||
if(H)
|
if(H)
|
||||||
for(var/atom/movable/AM in H)
|
for(var/atom/movable/AM in H)
|
||||||
AM.loc = T
|
AM.forceMove(T)
|
||||||
AM.pipe_eject(direction)
|
AM.pipe_eject(direction)
|
||||||
spawn(1)
|
spawn(1)
|
||||||
if(AM)
|
if(AM)
|
||||||
@@ -775,7 +777,7 @@
|
|||||||
for(var/atom/movable/AM in H)
|
for(var/atom/movable/AM in H)
|
||||||
target = get_offset_target_turf(T, rand(5)-rand(5), rand(5)-rand(5))
|
target = get_offset_target_turf(T, rand(5)-rand(5), rand(5)-rand(5))
|
||||||
|
|
||||||
AM.loc = T
|
AM.forceMove(T)
|
||||||
AM.pipe_eject(0)
|
AM.pipe_eject(0)
|
||||||
spawn(1)
|
spawn(1)
|
||||||
if(AM)
|
if(AM)
|
||||||
@@ -808,7 +810,7 @@
|
|||||||
// this is unlikely, but just dump out everything into the turf in case
|
// this is unlikely, but just dump out everything into the turf in case
|
||||||
|
|
||||||
for(var/atom/movable/AM in H)
|
for(var/atom/movable/AM in H)
|
||||||
AM.loc = T
|
AM.forceMove(T)
|
||||||
AM.pipe_eject(0)
|
AM.pipe_eject(0)
|
||||||
qdel(H)
|
qdel(H)
|
||||||
return
|
return
|
||||||
@@ -929,7 +931,7 @@
|
|||||||
// this is unlikely, but just dump out everything into the turf in case
|
// this is unlikely, but just dump out everything into the turf in case
|
||||||
|
|
||||||
for(var/atom/movable/AM in H)
|
for(var/atom/movable/AM in H)
|
||||||
AM.loc = T
|
AM.forceMove(T)
|
||||||
AM.pipe_eject(0)
|
AM.pipe_eject(0)
|
||||||
qdel(H)
|
qdel(H)
|
||||||
..()
|
..()
|
||||||
@@ -990,7 +992,7 @@
|
|||||||
if(nextdir == 12)
|
if(nextdir == 12)
|
||||||
T = GetAbove(src)
|
T = GetAbove(src)
|
||||||
if(!T)
|
if(!T)
|
||||||
H.loc = loc
|
H.forceMove(loc)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
for(var/obj/structure/disposalpipe/down/F in T)
|
for(var/obj/structure/disposalpipe/down/F in T)
|
||||||
@@ -1006,9 +1008,9 @@
|
|||||||
if(H2 && !H2.active)
|
if(H2 && !H2.active)
|
||||||
H.merge(H2)
|
H.merge(H2)
|
||||||
|
|
||||||
H.loc = P
|
H.forceMove(P)
|
||||||
else // if wasn't a pipe, then set loc to turf
|
else // if wasn't a pipe, then set loc to turf
|
||||||
H.loc = T
|
H.forceMove(T)
|
||||||
return null
|
return null
|
||||||
|
|
||||||
return P
|
return P
|
||||||
@@ -1040,7 +1042,7 @@
|
|||||||
if(nextdir == 11)
|
if(nextdir == 11)
|
||||||
T = GetBelow(src)
|
T = GetBelow(src)
|
||||||
if(!T)
|
if(!T)
|
||||||
H.loc = src.loc
|
H.forceMove(src.loc)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
for(var/obj/structure/disposalpipe/up/F in T)
|
for(var/obj/structure/disposalpipe/up/F in T)
|
||||||
@@ -1056,9 +1058,9 @@
|
|||||||
if(H2 && !H2.active)
|
if(H2 && !H2.active)
|
||||||
H.merge(H2)
|
H.merge(H2)
|
||||||
|
|
||||||
H.loc = P
|
H.forceMove(P)
|
||||||
else // if wasn't a pipe, then set loc to turf
|
else // if wasn't a pipe, then set loc to turf
|
||||||
H.loc = T
|
H.forceMove(T)
|
||||||
return null
|
return null
|
||||||
|
|
||||||
return P
|
return P
|
||||||
@@ -1249,9 +1251,9 @@
|
|||||||
if(H2 && !H2.active)
|
if(H2 && !H2.active)
|
||||||
H.merge(H2)
|
H.merge(H2)
|
||||||
|
|
||||||
H.loc = P
|
H.forceMove(P)
|
||||||
else // if wasn't a pipe, then set loc to turf
|
else // if wasn't a pipe, then set loc to turf
|
||||||
H.loc = T
|
H.forceMove(T)
|
||||||
return null
|
return null
|
||||||
|
|
||||||
return P
|
return P
|
||||||
@@ -1439,7 +1441,7 @@
|
|||||||
|
|
||||||
if(H)
|
if(H)
|
||||||
for(var/atom/movable/AM in H)
|
for(var/atom/movable/AM in H)
|
||||||
AM.loc = src.loc
|
AM.forceMove(src.loc)
|
||||||
AM.pipe_eject(dir)
|
AM.pipe_eject(dir)
|
||||||
if(!istype(AM,/mob/living/silicon/robot/drone)) //Drones keep smashing windows from being fired out of chutes. Bad for the station. ~Z
|
if(!istype(AM,/mob/living/silicon/robot/drone)) //Drones keep smashing windows from being fired out of chutes. Bad for the station. ~Z
|
||||||
spawn(5)
|
spawn(5)
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
#include "code\__defines\mobs.dm"
|
#include "code\__defines\mobs.dm"
|
||||||
#include "code\__defines\research.dm"
|
#include "code\__defines\research.dm"
|
||||||
#include "code\__defines\species_languages.dm"
|
#include "code\__defines\species_languages.dm"
|
||||||
|
#include "code\__defines\targeting.dm"
|
||||||
#include "code\__defines\turfs.dm"
|
#include "code\__defines\turfs.dm"
|
||||||
#include "code\_helpers\atmospherics.dm"
|
#include "code\_helpers\atmospherics.dm"
|
||||||
#include "code\_helpers\datum_pool.dm"
|
#include "code\_helpers\datum_pool.dm"
|
||||||
@@ -64,9 +65,9 @@
|
|||||||
#include "code\_onclick\hud\_defines.dm"
|
#include "code\_onclick\hud\_defines.dm"
|
||||||
#include "code\_onclick\hud\action.dm"
|
#include "code\_onclick\hud\action.dm"
|
||||||
#include "code\_onclick\hud\alien_larva.dm"
|
#include "code\_onclick\hud\alien_larva.dm"
|
||||||
|
#include "code\_onclick\hud\gun_mode.dm"
|
||||||
#include "code\_onclick\hud\hud.dm"
|
#include "code\_onclick\hud\hud.dm"
|
||||||
#include "code\_onclick\hud\human.dm"
|
#include "code\_onclick\hud\human.dm"
|
||||||
#include "code\_onclick\hud\monkey.dm"
|
|
||||||
#include "code\_onclick\hud\movable_screen_objects.dm"
|
#include "code\_onclick\hud\movable_screen_objects.dm"
|
||||||
#include "code\_onclick\hud\other_mobs.dm"
|
#include "code\_onclick\hud\other_mobs.dm"
|
||||||
#include "code\_onclick\hud\robot.dm"
|
#include "code\_onclick\hud\robot.dm"
|
||||||
@@ -1640,6 +1641,11 @@
|
|||||||
#include "code\modules\projectiles\projectile\energy.dm"
|
#include "code\modules\projectiles\projectile\energy.dm"
|
||||||
#include "code\modules\projectiles\projectile\force.dm"
|
#include "code\modules\projectiles\projectile\force.dm"
|
||||||
#include "code\modules\projectiles\projectile\special.dm"
|
#include "code\modules\projectiles\projectile\special.dm"
|
||||||
|
#include "code\modules\projectiles\targeting\targeting_client.dm"
|
||||||
|
#include "code\modules\projectiles\targeting\targeting_gun.dm"
|
||||||
|
#include "code\modules\projectiles\targeting\targeting_mob.dm"
|
||||||
|
#include "code\modules\projectiles\targeting\targeting_overlay.dm"
|
||||||
|
#include "code\modules\projectiles\targeting\targeting_triggers.dm"
|
||||||
#include "code\modules\random_map\_random_map_setup.dm"
|
#include "code\modules\random_map\_random_map_setup.dm"
|
||||||
#include "code\modules\random_map\random_map.dm"
|
#include "code\modules\random_map\random_map.dm"
|
||||||
#include "code\modules\random_map\random_map_verbs.dm"
|
#include "code\modules\random_map\random_map_verbs.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user