mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 03:51:49 +01:00
Mouse drop refactor (#20256)
Refactored mousedrag procs, added signals, some safeguards, did some cleanups around, renamed them to make a little more sense. Mostly put in line with TG's code. Fast clicking and releasing with a drag, depending on the grace period and how fast it is done, can be counted as clicks, to aid in combat scenarios where you spamclick.
This commit is contained in:
@@ -18,17 +18,18 @@
|
||||
update_icon()
|
||||
. = ..()
|
||||
|
||||
/obj/item/battle_monsters/MouseDrop(mob/user) //Dropping the card onto something else.
|
||||
if(istype(user))
|
||||
user.put_in_active_hand(src)
|
||||
src.pickup(user)
|
||||
/obj/item/battle_monsters/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params) //Dropping the card onto something else.
|
||||
var/mob/mob_dropped_onto = over
|
||||
if(istype(mob_dropped_onto))
|
||||
mob_dropped_onto.put_in_active_hand(src)
|
||||
src.pickup(mob_dropped_onto)
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/item/battle_monsters/MouseDrop_T(atom/dropping, mob/user) //Dropping C onto the card
|
||||
if(istype(dropping, /obj/item/battle_monsters))
|
||||
src.attackby(dropping,user)
|
||||
/obj/item/battle_monsters/mouse_drop_receive(atom/dropped, mob/user, params) //Dropping C onto the card
|
||||
if(istype(dropped, /obj/item/battle_monsters))
|
||||
src.attackby(dropped, user)
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
@@ -65,11 +65,11 @@
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/item/battle_monsters/deck/MouseDrop_T(atom/dropping, mob/user) //Dropping C onto the card
|
||||
/obj/item/battle_monsters/deck/mouse_drop_receive(atom/dropped, mob/user, params) //Dropping C onto the card
|
||||
|
||||
if(istype(dropping, /obj/item/battle_monsters/deck/))
|
||||
if(istype(dropped, /obj/item/battle_monsters/deck/))
|
||||
|
||||
var/obj/item/battle_monsters/deck/added_deck = dropping
|
||||
var/obj/item/battle_monsters/deck/added_deck = dropped
|
||||
stored_card_names += added_deck.stored_card_names
|
||||
|
||||
user.visible_message(\
|
||||
@@ -77,7 +77,7 @@
|
||||
SPAN_NOTICE("You combine two decks together.")\
|
||||
)
|
||||
|
||||
qdel(dropping)
|
||||
qdel(dropped)
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
@@ -85,3 +85,7 @@
|
||||
var/list/spell_tabs = list()
|
||||
///Our object window datum. It stores info about and handles behavior for the object tab
|
||||
var/datum/object_window_info/obj_window
|
||||
///When we started the currently active drag
|
||||
var/drag_start = 0
|
||||
///The params we were passed at the start of the drag, in list form
|
||||
var/list/drag_details
|
||||
|
||||
@@ -814,6 +814,12 @@ var/list/localhost_addresses = list(
|
||||
CRASH("Age check regex failed for [src.ckey]")
|
||||
|
||||
/client/MouseDrag(src_object, over_object, src_location, over_location, src_control, over_control, params)
|
||||
var/list/modifiers = params2list(params)
|
||||
|
||||
if(!drag_start) // If we're just starting to drag
|
||||
drag_start = world.time
|
||||
drag_details = modifiers.Copy()
|
||||
|
||||
. = ..()
|
||||
|
||||
if(over_object)
|
||||
@@ -831,7 +837,18 @@ var/list/localhost_addresses = list(
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
/client/MouseDown(object, location, control, params)
|
||||
/client/MouseDrop(atom/src_object, atom/over_object, atom/src_location, atom/over_location, src_control, over_control, params)
|
||||
SHOULD_NOT_OVERRIDE(TRUE)
|
||||
|
||||
..()
|
||||
drag_start = 0
|
||||
drag_details = null
|
||||
|
||||
/client/MouseDown(datum/object, location, control, params)
|
||||
if(QDELETED(object)) //Yep, you can click on qdeleted things before they have time to nullspace. Fun.
|
||||
return
|
||||
SEND_SIGNAL(src, COMSIG_CLIENT_MOUSEDOWN, object, location, control, params)
|
||||
|
||||
var/obj/item/I = mob.get_active_hand()
|
||||
var/obj/O = object
|
||||
if(istype(I, /obj/item/gun) && !mob.in_throw_mode)
|
||||
@@ -893,6 +910,8 @@ var/list/localhost_addresses = list(
|
||||
sleep(G.fire_delay)
|
||||
|
||||
/client/MouseUp(object, location, control, params)
|
||||
if(SEND_SIGNAL(src, COMSIG_CLIENT_MOUSEUP, object, location, control, params) & COMPONENT_CLIENT_MOUSEUP_INTERCEPT)
|
||||
src = src //This doesn't do shit, when you implement click interception change this
|
||||
autofire_aiming_at[1] = null
|
||||
|
||||
/atom/proc/is_auto_clickable()
|
||||
|
||||
@@ -46,39 +46,39 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/MouseDrop(var/obj/over_object)
|
||||
if(ishuman(usr) || issmall(usr))
|
||||
/obj/item/clothing/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(ishuman(user) || issmall(user))
|
||||
//makes sure that the clothing is equipped so that we can't drag it into our hand from miles away.
|
||||
if(!(src.loc == usr))
|
||||
if(!(src.loc == user))
|
||||
return
|
||||
|
||||
if(!over_object || over_object == src)
|
||||
if(!over || over == src)
|
||||
return
|
||||
|
||||
if(istype(over_object, /atom/movable/screen/inventory))
|
||||
var/atom/movable/screen/inventory/S = over_object
|
||||
if(istype(over, /atom/movable/screen/inventory))
|
||||
var/atom/movable/screen/inventory/S = over
|
||||
if(S.slot_id == src.equip_slot)
|
||||
return
|
||||
|
||||
if(use_check_and_message(usr))
|
||||
if(use_check_and_message(user))
|
||||
return
|
||||
|
||||
if(!usr.canUnEquip(src))
|
||||
if(!user.canUnEquip(src))
|
||||
return
|
||||
|
||||
var/obj/item/clothing/C = src
|
||||
usr.unEquip(C)
|
||||
user.unEquip(C)
|
||||
|
||||
switch(over_object.name)
|
||||
switch(over.name)
|
||||
if("right hand")
|
||||
if(istype(src, /obj/item/clothing/ears))
|
||||
C = check_two_ears(usr)
|
||||
usr.equip_to_slot_if_possible(C, slot_r_hand)
|
||||
C = check_two_ears(user)
|
||||
user.equip_to_slot_if_possible(C, slot_r_hand)
|
||||
if("left hand")
|
||||
if(istype(src, /obj/item/clothing/ears))
|
||||
C = check_two_ears(usr)
|
||||
usr.equip_to_slot_if_possible(C, slot_l_hand)
|
||||
src.add_fingerprint(usr)
|
||||
C = check_two_ears(user)
|
||||
user.equip_to_slot_if_possible(C, slot_l_hand)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
/obj/item/clothing/proc/check_two_ears(var/mob/user)
|
||||
// if you have to ask, it's earcode
|
||||
|
||||
@@ -55,10 +55,10 @@
|
||||
return
|
||||
return ..(user)
|
||||
|
||||
/obj/item/clothing/head/helmet/MouseDrop(obj/over_object)
|
||||
if(has_storage && !hold.handle_mousedrop(usr, over_object))
|
||||
/obj/item/clothing/head/helmet/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(has_storage && !hold.handle_mousedrop(user, over))
|
||||
return
|
||||
return ..(over_object)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/head/helmet/handle_middle_mouse_click(mob/user)
|
||||
if(has_storage && Adjacent(user))
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/item/rig/MouseDrop(obj/over_object as obj)
|
||||
/obj/item/rig/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
var/obj/item/rig_module/storage/storage = locate() in installed_modules
|
||||
if(storage && !storage.pockets.handle_mousedrop(usr, over_object))
|
||||
if(storage && !storage.pockets.handle_mousedrop(user, over))
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -38,12 +38,12 @@
|
||||
else
|
||||
..(user)
|
||||
|
||||
/obj/item/clothing/suit/armor/MouseDrop(obj/over_object as obj)
|
||||
/obj/item/clothing/suit/armor/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if (pockets)
|
||||
if (pockets.handle_mousedrop(usr, over_object))
|
||||
..(over_object)
|
||||
if (pockets.handle_mousedrop(user, over))
|
||||
..()
|
||||
else
|
||||
..(over_object)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/armor/attackby(obj/item/attacking_item, mob/user)
|
||||
..()
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
if (pockets.handle_attack_hand(user))
|
||||
..(user)
|
||||
|
||||
/obj/item/clothing/suit/storage/MouseDrop(obj/over_object as obj)
|
||||
if (pockets.handle_mousedrop(usr, over_object))
|
||||
..(over_object)
|
||||
/obj/item/clothing/suit/storage/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if (pockets.handle_mousedrop(user, over))
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/storage/handle_middle_mouse_click(mob/user)
|
||||
if(Adjacent(user))
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
if (hold.handle_attack_hand(user)) //otherwise interact as a regular storage item
|
||||
..(user)
|
||||
|
||||
/obj/item/clothing/accessory/storage/MouseDrop(obj/over_object as obj)
|
||||
/obj/item/clothing/accessory/storage/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if (has_suit)
|
||||
return
|
||||
|
||||
if (hold.handle_mousedrop(usr, over_object))
|
||||
..(over_object)
|
||||
if (hold.handle_mousedrop(user, over))
|
||||
..()
|
||||
|
||||
/obj/item/clothing/accessory/storage/attackby(obj/item/attacking_item, mob/user)
|
||||
return hold.attackby(attacking_item, user)
|
||||
|
||||
@@ -301,8 +301,8 @@
|
||||
if(length(contents) || reagents?.total_volume)
|
||||
. += SPAN_NOTICE("To attempt cooking: click and hold, then drag this onto your character.")
|
||||
|
||||
/obj/item/reagent_containers/cooking_container/board/MouseDrop(var/obj/over_obj)
|
||||
if(over_obj != usr || use_check(usr))
|
||||
/obj/item/reagent_containers/cooking_container/board/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(over != user || use_check(user))
|
||||
return ..()
|
||||
if(!(length(contents) || reagents?.total_volume))
|
||||
return ..()
|
||||
@@ -329,12 +329,12 @@
|
||||
R.forceMove(src) //Move everything from the buffer back to the container
|
||||
|
||||
var/l = length(results)
|
||||
if (l && usr)
|
||||
if (l && user)
|
||||
var/name = results[1].name
|
||||
if (l > 1)
|
||||
to_chat(usr, SPAN_NOTICE("You made some [pluralize_word(name, TRUE)]!"))
|
||||
to_chat(user, SPAN_NOTICE("You made some [pluralize_word(name, TRUE)]!"))
|
||||
else
|
||||
to_chat(usr, SPAN_NOTICE("You made [name]!"))
|
||||
to_chat(user, SPAN_NOTICE("You made [name]!"))
|
||||
|
||||
QDEL_NULL(temp) //delete buffer object
|
||||
return ..()
|
||||
|
||||
@@ -107,10 +107,10 @@
|
||||
|
||||
do_hair_pull(user)
|
||||
|
||||
/obj/machinery/gibber/MouseDrop_T(atom/dropping, mob/user)
|
||||
/obj/machinery/gibber/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
if(user.stat || user.restrained())
|
||||
return
|
||||
move_into_gibber(user, dropping)
|
||||
move_into_gibber(user, dropped)
|
||||
|
||||
/obj/machinery/gibber/proc/move_into_gibber(var/mob/user,var/mob/living/victim)
|
||||
|
||||
|
||||
@@ -425,21 +425,21 @@ All custom items with worn sprites must follow the contained sprite system: http
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/fluff/tokash_spear/MouseDrop(mob/user)
|
||||
if((user == usr && (!(usr.restrained()) && (!(usr.stat) && (usr.contents.Find(src) || in_range(src, usr))))))
|
||||
if(!istype(usr, /mob/living/carbon/slime) && !istype(usr, /mob/living/simple_animal))
|
||||
if(!usr.get_active_hand()) // If active hand is empty.
|
||||
var/mob/living/carbon/human/H = user
|
||||
/obj/item/fluff/tokash_spear/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if((over == user && (!(user.restrained()) && (!(user.stat) && (user.contents.Find(src) || in_range(src, user))))))
|
||||
if(!istype(user, /mob/living/carbon/slime) && !istype(user, /mob/living/simple_animal))
|
||||
if(!user.get_active_hand()) // If active hand is empty.
|
||||
var/mob/living/carbon/human/H = over
|
||||
var/obj/item/organ/external/temp = H.organs_by_name[BP_R_HAND]
|
||||
|
||||
if(H.hand)
|
||||
temp = H.organs_by_name[BP_L_HAND]
|
||||
if(temp && !temp.is_usable())
|
||||
to_chat(user, SPAN_NOTICE("You try to move your [temp.name], but cannot!"))
|
||||
to_chat(H, SPAN_NOTICE("You try to move your [temp.name], but cannot!"))
|
||||
return
|
||||
|
||||
to_chat(user, SPAN_NOTICE("You pick up \the [src]."))
|
||||
user.put_in_hands(src)
|
||||
to_chat(H, SPAN_NOTICE("You pick up \the [src]."))
|
||||
H.put_in_hands(src)
|
||||
return
|
||||
|
||||
/obj/item/fluff/tokash_spearhead
|
||||
@@ -830,11 +830,12 @@ All custom items with worn sprites must follow the contained sprite system: http
|
||||
to_chat(user, SPAN_NOTICE("You place \the [attacking_item] on \the [src]."))
|
||||
update_icon()
|
||||
|
||||
/obj/item/fluff/akinyi_stand/MouseDrop(mob/user as mob)
|
||||
if((user == usr && (!use_check(user))) && (user.contents.Find(src) || in_range(src, user)))
|
||||
if(ishuman(user))
|
||||
forceMove(get_turf(user))
|
||||
user.put_in_hands(src)
|
||||
/obj/item/fluff/akinyi_stand/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if((over == user && (!use_check(over))) && (over.contents.Find(src) || in_range(src, over)))
|
||||
if(ishuman(over))
|
||||
var/mob/living/carbon/human/H = over
|
||||
forceMove(get_turf(H))
|
||||
H.put_in_hands(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/fluff/akinyi_stand/attack_hand(mob/user)
|
||||
|
||||
@@ -174,9 +174,9 @@
|
||||
/obj/machinery/microscope/AltClick()
|
||||
remove_sample(usr)
|
||||
|
||||
/obj/machinery/microscope/MouseDrop(var/atom/other)
|
||||
if(usr == other)
|
||||
remove_sample(usr)
|
||||
/obj/machinery/microscope/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(over == user)
|
||||
remove_sample(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -15,32 +15,32 @@
|
||||
. = ..()
|
||||
AddComponent(/datum/component/base_name, name)
|
||||
|
||||
/obj/item/evidencebag/MouseDrop(var/obj/item/I as obj)
|
||||
if (!ishuman(usr))
|
||||
/obj/item/evidencebag/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
var/mob/living/carbon/human/human_user = user
|
||||
var/obj/item/I = over
|
||||
if(!istype(human_user) || !istype(I))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/user = usr
|
||||
|
||||
if (!(user.l_hand == src || user.r_hand == src))
|
||||
if (!(human_user.l_hand == src || human_user.r_hand == src))
|
||||
return //bag must be in your hands to use
|
||||
|
||||
if (isturf(I.loc))
|
||||
if (!user.Adjacent(I))
|
||||
if (!human_user.Adjacent(I))
|
||||
return
|
||||
else
|
||||
//If it isn't on the floor. Do some checks to see if it's in our hands or a box. Otherwise give up.
|
||||
if(istype(I.loc,/obj/item/storage)) //in a container.
|
||||
var/sdepth = I.storage_depth(user)
|
||||
var/sdepth = I.storage_depth(human_user)
|
||||
if (sdepth == -1 || sdepth > 1)
|
||||
return //too deeply nested to access
|
||||
|
||||
var/obj/item/storage/U = I.loc
|
||||
user.client.screen -= I
|
||||
human_user.client.screen -= I
|
||||
U.contents.Remove(I)
|
||||
else if(user.l_hand == I) //in a hand
|
||||
user.drop_l_hand()
|
||||
else if(user.r_hand == I) //in a hand
|
||||
user.drop_r_hand()
|
||||
else if(human_user.l_hand == I) //in a hand
|
||||
human_user.drop_l_hand()
|
||||
else if(human_user.r_hand == I) //in a hand
|
||||
human_user.drop_r_hand()
|
||||
else
|
||||
return
|
||||
|
||||
@@ -48,18 +48,18 @@
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/evidencebag))
|
||||
to_chat(user, SPAN_NOTICE("You find putting a plastic bag in another plastic bag to be slightly absurd and think better of it."))
|
||||
to_chat(human_user, SPAN_NOTICE("You find putting a plastic bag in another plastic bag to be slightly absurd and think better of it."))
|
||||
return
|
||||
|
||||
if(I.w_class > 3)
|
||||
to_chat(user, SPAN_NOTICE("[I] won't fit in [src]."))
|
||||
to_chat(human_user, SPAN_NOTICE("[I] won't fit in [src]."))
|
||||
return
|
||||
|
||||
if(contents.len)
|
||||
to_chat(user, SPAN_NOTICE("[src] already has something inside it."))
|
||||
to_chat(human_user, SPAN_NOTICE("[src] already has something inside it."))
|
||||
return
|
||||
|
||||
user.visible_message("<b>[user]</b> puts \the [I] into \the [src].", SPAN_NOTICE("You put \the [I] inside \the [src]."),\
|
||||
human_user.visible_message("<b>[human_user]</b> puts \the [I] into \the [src].", SPAN_NOTICE("You put \the [I] inside \the [src]."),\
|
||||
"You hear a rustle as someone puts something into a plastic bag.")
|
||||
store_item(I)
|
||||
|
||||
|
||||
@@ -189,10 +189,10 @@
|
||||
return FALSE
|
||||
. = ..()
|
||||
|
||||
/obj/item/forensics/sample_kit/MouseDrop(atom/over)
|
||||
/obj/item/forensics/sample_kit/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
var/mob/M = loc
|
||||
if(ismob(M) && (M.get_active_hand() == src || M.get_inactive_hand() == src))
|
||||
afterattack(over, usr, TRUE)
|
||||
afterattack(over, user, TRUE)
|
||||
|
||||
/obj/item/forensics/sample_kit/powder
|
||||
name = "fingerprint powder"
|
||||
|
||||
@@ -171,17 +171,20 @@
|
||||
playsound(src.loc, 'sound/items/cardshuffle.ogg', 100, 1, -4)
|
||||
user.visible_message("<b>\The [user]</b> shuffles [src].")
|
||||
|
||||
/obj/item/deck/MouseDrop(atom/over)
|
||||
if(!usr || !over) return
|
||||
if(!Adjacent(usr) || !over.Adjacent(usr)) return // should stop you from dragging through windows
|
||||
/obj/item/deck/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(!user || !over)
|
||||
return
|
||||
if(!Adjacent(user) || !over.Adjacent(user))
|
||||
return // should stop you from dragging through windows
|
||||
|
||||
if(!ishuman(over) || !(over in viewers(3))) return
|
||||
|
||||
if(!cards.len)
|
||||
to_chat(usr, SPAN_WARNING("There are no cards in the deck."))
|
||||
if(!ishuman(over) || !(over in viewers(3)))
|
||||
return
|
||||
|
||||
deal_at(usr, over)
|
||||
if(!cards.len)
|
||||
to_chat(user, SPAN_WARNING("There are no cards in the deck."))
|
||||
return
|
||||
|
||||
deal_at(user, over)
|
||||
|
||||
/obj/item/pack/
|
||||
name = "card pack"
|
||||
|
||||
@@ -147,8 +147,8 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/mech_component/chassis/MouseDrop_T(atom/dropping, mob/user)
|
||||
var/obj/machinery/portable_atmospherics/canister/C = dropping
|
||||
/obj/item/mech_component/chassis/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
var/obj/machinery/portable_atmospherics/canister/C = dropped
|
||||
if(istype(C) && do_after(user, 5, src))
|
||||
to_chat(user, SPAN_NOTICE("You install the canister into \the [src]."))
|
||||
if(air_supply)
|
||||
|
||||
@@ -50,9 +50,10 @@
|
||||
hardpoint_tag = null
|
||||
. = ..()
|
||||
|
||||
/atom/movable/screen/mecha/hardpoint/MouseDrop()
|
||||
/atom/movable/screen/mecha/hardpoint/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
..()
|
||||
if(holding) holding.screen_loc = screen_loc
|
||||
if(holding)
|
||||
holding.screen_loc = screen_loc
|
||||
|
||||
/atom/movable/screen/mecha/hardpoint/proc/update_system_info()
|
||||
// No point drawing it if we have no item to use or nobody to see it.
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
/mob/living/MouseDrop(atom/over)
|
||||
if(usr == src && usr != over)
|
||||
/mob/living/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(user == src && user != over)
|
||||
if(istype(over, /mob/living/heavy_vehicle))
|
||||
if(usr.mob_size >= MOB_SMALL && usr.mob_size <= 14)
|
||||
if(user.mob_size >= MOB_SMALL && user.mob_size <= 14)
|
||||
var/mob/living/heavy_vehicle/M = over
|
||||
if(M.enter(src))
|
||||
return
|
||||
else
|
||||
to_chat(usr, SPAN_WARNING("You cannot pilot a mech of this size."))
|
||||
to_chat(user, SPAN_WARNING("You cannot pilot a mech of this size."))
|
||||
return
|
||||
return ..()
|
||||
|
||||
/mob/living/heavy_vehicle/MouseDrop_T(atom/dropping, mob/user)
|
||||
var/obj/machinery/portable_atmospherics/canister/C = dropping
|
||||
/mob/living/heavy_vehicle/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
var/obj/machinery/portable_atmospherics/canister/C = dropped
|
||||
if(istype(C))
|
||||
body.MouseDrop_T(dropping, user)
|
||||
body.mouse_drop_receive(arglist(args))
|
||||
else . = ..()
|
||||
|
||||
/mob/living/heavy_vehicle/ClickOn(var/atom/A, params, var/mob/user)
|
||||
|
||||
@@ -335,15 +335,16 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
to_chat(src, SPAN_WARNING("You are dead! You have no mind to store memory!"))
|
||||
|
||||
//This is called when a ghost is drag clicked to something.
|
||||
/mob/abstract/ghost/observer/MouseDrop(atom/over)
|
||||
if(!usr || !over) return
|
||||
if(isobserver(usr) && usr.client && isliving(over))
|
||||
/mob/abstract/ghost/observer/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(!user || !over)
|
||||
return
|
||||
if(isobserver(user) && user.client && isliving(over))
|
||||
var/mob/living/M = over
|
||||
// If they an admin, see if control can be resolved.
|
||||
if(usr.client.holder && usr.client.holder.cmd_ghost_drag(src,M))
|
||||
if(user.client.holder && user.client.holder.cmd_ghost_drag(src, M))
|
||||
return
|
||||
// Otherwise, see if we can possess the target.
|
||||
if(usr == src && try_possession(M))
|
||||
if(user == src && try_possession(M))
|
||||
return
|
||||
if(istype(over, /obj/machinery/drone_fabricator))
|
||||
var/obj/machinery/drone_fabricator/fab = over
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
..()
|
||||
|
||||
//#TODO-MERGE: Test nymph hats
|
||||
/mob/living/carbon/alien/diona/MouseDrop(atom/over_object)
|
||||
var/mob/living/carbon/H = over_object
|
||||
/mob/living/carbon/alien/diona/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
var/mob/living/carbon/H = over
|
||||
if(!istype(H) || !Adjacent(H))
|
||||
return ..()
|
||||
if(H.a_intent == I_HELP)
|
||||
|
||||
@@ -1884,11 +1884,11 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/MouseDrop(var/atom/over_object)
|
||||
if(ishuman(over_object))
|
||||
var/mob/living/carbon/human/H = over_object
|
||||
/mob/living/carbon/human/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(ishuman(over))
|
||||
var/mob/living/carbon/human/H = over
|
||||
if(holder_type && istype(H) && H.a_intent == I_HELP && !H.lying && !issmall(H) && Adjacent(H))
|
||||
get_scooped(H, (usr == src))
|
||||
get_scooped(H, (user == src))
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -62,12 +62,12 @@
|
||||
if(default_part_replacement(user, attacking_item))
|
||||
return
|
||||
|
||||
/obj/machinery/slime_extractor/MouseDrop_T(atom/dropping, mob/user)
|
||||
/obj/machinery/slime_extractor/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
if(!Adjacent(user))
|
||||
to_chat(user, SPAN_WARNING("You can't reach \the [src]!"))
|
||||
return
|
||||
if(isslime(dropping))
|
||||
var/mob/living/carbon/slime/slimey = dropping
|
||||
if(isslime(dropped))
|
||||
var/mob/living/carbon/slime/slimey = dropped
|
||||
if(length(extract_slimes) >= slime_limit)
|
||||
to_chat(user, SPAN_WARNING("\The [src] is fully loaded!"))
|
||||
return
|
||||
|
||||
@@ -514,10 +514,12 @@
|
||||
post_scoop()
|
||||
return H
|
||||
|
||||
/mob/living/silicon/pai/MouseDrop(atom/over_object)
|
||||
var/mob/living/carbon/H = over_object
|
||||
if(!istype(H) || !Adjacent(H)) return ..()
|
||||
get_scooped(H, usr)
|
||||
/mob/living/silicon/pai/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
var/mob/living/carbon/H = over
|
||||
if(!istype(H) || !Adjacent(H))
|
||||
return ..()
|
||||
|
||||
get_scooped(H, user)
|
||||
|
||||
/mob/living/silicon/pai/start_pulling(var/atom/movable/AM)
|
||||
if(istype(AM,/obj/item))
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
to_chat(src, SPAN_NOTICE("\The [D] acknowledges your signal."))
|
||||
D.flush_count = D.flush_every_ticks
|
||||
|
||||
/mob/living/silicon/robot/drone/MouseDrop(atom/over_object)
|
||||
var/mob/living/carbon/H = over_object
|
||||
/mob/living/silicon/robot/drone/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
var/mob/living/carbon/H = over
|
||||
if(!istype(H) || !Adjacent(H))
|
||||
return ..()
|
||||
if(H.a_intent == "help")
|
||||
|
||||
@@ -910,13 +910,13 @@
|
||||
gib()
|
||||
|
||||
/// For picking up small animals
|
||||
/mob/living/simple_animal/MouseDrop(atom/over_object)
|
||||
/mob/living/simple_animal/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if (holder_type)//we need a defined holder type in order for picking up to work
|
||||
var/mob/living/carbon/H = over_object
|
||||
var/mob/living/carbon/H = over
|
||||
if(!istype(H) || !Adjacent(H))
|
||||
return ..()
|
||||
|
||||
get_scooped(H, usr)
|
||||
get_scooped(H, user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
+13
-6
@@ -698,13 +698,20 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/MouseDrop(mob/M as mob)
|
||||
/mob/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
..()
|
||||
if(M != usr) return
|
||||
if(usr == src) return
|
||||
if(!Adjacent(usr)) return
|
||||
if(istype(M,/mob/living/silicon/ai)) return
|
||||
show_inv(usr)
|
||||
var/mob/M = over
|
||||
if(M != user)
|
||||
return
|
||||
if(user == src)
|
||||
return
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
|
||||
if(istype(M,/mob/living/silicon/ai))
|
||||
return
|
||||
|
||||
show_inv(user)
|
||||
|
||||
|
||||
/mob/verb/stop_pulling()
|
||||
|
||||
@@ -431,7 +431,8 @@
|
||||
destroying = 1 // stops us calling qdel(src) on dropped()
|
||||
return ..()
|
||||
|
||||
/obj/item/grab/MouseDrop(mob/living/carbon/human/H)
|
||||
/obj/item/grab/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
var/mob/living/carbon/human/H = affecting
|
||||
if(wielded || affecting.buckled_to || !istype(H) || assailant != H || H.get_active_hand() != src)
|
||||
return
|
||||
if(!ishuman(affecting))
|
||||
|
||||
@@ -323,13 +323,13 @@
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/modular_computer/MouseDrop(atom/over_object)
|
||||
var/mob/M = usr
|
||||
/obj/item/modular_computer/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
var/mob/M = user
|
||||
if(use_check_and_message(M))
|
||||
return
|
||||
if(istype(over_object, /obj/machinery/power/apc) && tesla_link)
|
||||
return over_object.attackby(src, M)
|
||||
if(!istype(over_object, /atom/movable/screen) && !(over_object == src))
|
||||
if(istype(over, /obj/machinery/power/apc) && tesla_link)
|
||||
return over.attackby(src, M)
|
||||
if(!istype(over, /atom/movable/screen) && !(over == src))
|
||||
return attack_self(M)
|
||||
|
||||
/obj/item/modular_computer/GetID()
|
||||
|
||||
@@ -25,31 +25,31 @@
|
||||
return attack_self(user)
|
||||
..()
|
||||
|
||||
/obj/item/modular_computer/handheld/wristbound/MouseDrop(obj/over_object)
|
||||
/obj/item/modular_computer/handheld/wristbound/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(!canremove)
|
||||
return
|
||||
if(!over_object || over_object == src)
|
||||
if(!over || over == src)
|
||||
return
|
||||
if(istype(over_object, /atom/movable/screen/inventory))
|
||||
var/atom/movable/screen/inventory/S = over_object
|
||||
if(istype(over, /atom/movable/screen/inventory))
|
||||
var/atom/movable/screen/inventory/S = over
|
||||
if(S.slot_id == equip_slot)
|
||||
return
|
||||
if(ishuman(usr))
|
||||
if(!(istype(over_object, /atom/movable/screen)))
|
||||
if(ishuman(user))
|
||||
if(!(istype(over, /atom/movable/screen)))
|
||||
return ..()
|
||||
|
||||
if(!(loc == usr) || (loc && loc.loc == usr))
|
||||
if(!(loc == user) || (loc && loc.loc == user))
|
||||
return
|
||||
if(use_check_and_message(usr))
|
||||
if(use_check_and_message(user))
|
||||
return
|
||||
if((loc == usr) && !usr.unEquip(src))
|
||||
if((loc == user) && !user.unEquip(src))
|
||||
return
|
||||
|
||||
switch(over_object.name)
|
||||
switch(over.name)
|
||||
if("right hand")
|
||||
usr.u_equip(src)
|
||||
usr.equip_to_slot_if_possible(src, slot_r_hand)
|
||||
user.u_equip(src)
|
||||
user.equip_to_slot_if_possible(src, slot_r_hand)
|
||||
if("left hand")
|
||||
usr.u_equip(src)
|
||||
usr.equip_to_slot_if_possible(src, slot_l_hand)
|
||||
add_fingerprint(usr)
|
||||
user.u_equip(src)
|
||||
user.equip_to_slot_if_possible(src, slot_l_hand)
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
user.visible_message(SPAN_NOTICE("[user] detaches \the [source_hoist.hoistee] from the hoist clamp."), SPAN_NOTICE("You detach \the [source_hoist.hoistee] from the hoist clamp."), SPAN_NOTICE("You hear something unclamp."))
|
||||
source_hoist.release_hoistee()
|
||||
|
||||
/obj/effect/hoist_hook/MouseDrop_T(atom/dropping, mob/user)
|
||||
var/atom/movable/AM = dropping
|
||||
/obj/effect/hoist_hook/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
var/atom/movable/AM = dropped
|
||||
if(!istype(AM))
|
||||
return
|
||||
|
||||
@@ -63,25 +63,26 @@
|
||||
AM.anchored = TRUE
|
||||
source_hook.layer = AM.layer + 0.1
|
||||
|
||||
/obj/effect/hoist_hook/MouseDrop(atom/dest)
|
||||
/obj/effect/hoist_hook/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
..()
|
||||
if(!dest.Adjacent(usr)) return // carried over from the default proc
|
||||
if(!over.Adjacent(user))
|
||||
return // carried over from the default proc
|
||||
|
||||
if(use_check_and_message(usr, USE_DISALLOW_SILICONS))
|
||||
if(use_check_and_message(user, USE_DISALLOW_SILICONS))
|
||||
return
|
||||
|
||||
if (!source_hoist.hoistee)
|
||||
return
|
||||
if (!isturf(dest))
|
||||
if (!isturf(over))
|
||||
return
|
||||
if (!dest.Adjacent(source_hoist.hoistee))
|
||||
if (!over.Adjacent(source_hoist.hoistee))
|
||||
return
|
||||
|
||||
source_hoist.check_consistency()
|
||||
|
||||
var/turf/desturf = dest
|
||||
var/turf/desturf = over
|
||||
source_hoist.hoistee.forceMove(desturf)
|
||||
usr.visible_message(SPAN_NOTICE("[usr] detaches \the [source_hoist.hoistee] from the hoist clamp."), SPAN_NOTICE("You detach \the [source_hoist.hoistee] from the hoist clamp."), SPAN_NOTICE("You hear something unclamp."))
|
||||
user.visible_message(SPAN_NOTICE("[user] detaches \the [source_hoist.hoistee] from the hoist clamp."), SPAN_NOTICE("You detach \the [source_hoist.hoistee] from the hoist clamp."), SPAN_NOTICE("You hear something unclamp."))
|
||||
source_hoist.release_hoistee()
|
||||
|
||||
// This will handle mobs unbuckling themselves.
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/clipboard/MouseDrop(obj/over_object as obj) //Quick clipboard fix. -Agouri
|
||||
if(ishuman(usr))
|
||||
var/mob/M = usr
|
||||
if(!(istype(over_object, /atom/movable/screen) ))
|
||||
/obj/item/clipboard/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(ishuman(user))
|
||||
var/mob/M = user
|
||||
if(!(istype(over, /atom/movable/screen) ))
|
||||
return ..()
|
||||
|
||||
if(!M.restrained() && !M.stat)
|
||||
switch(over_object.name)
|
||||
switch(over.name)
|
||||
if("right hand")
|
||||
M.u_equip(src)
|
||||
M.equip_to_slot_if_possible(src, slot_r_hand)
|
||||
@@ -34,7 +34,7 @@
|
||||
M.u_equip(src)
|
||||
M.equip_to_slot_if_possible(src, slot_l_hand)
|
||||
|
||||
add_fingerprint(usr)
|
||||
add_fingerprint(M)
|
||||
return
|
||||
|
||||
/obj/item/clipboard/update_icon()
|
||||
|
||||
@@ -14,21 +14,21 @@
|
||||
var/list/papers = new/list() //List of papers put in the bin for reference.
|
||||
|
||||
|
||||
/obj/item/paper_bin/MouseDrop(mob/user as mob)
|
||||
if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
|
||||
if(!istype(usr, /mob/living/carbon/slime) && !istype(usr, /mob/living/simple_animal))
|
||||
if( !usr.get_active_hand() ) //if active hand is empty
|
||||
var/mob/living/carbon/human/H = user
|
||||
/obj/item/paper_bin/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if((over == user && (!( user.restrained() ) && (!( user.stat ) && (user.contents.Find(src) || in_range(src, user))))))
|
||||
if(!istype(user, /mob/living/carbon/slime) && !istype(user, /mob/living/simple_animal))
|
||||
if( !user.get_active_hand() ) //if active hand is empty
|
||||
var/mob/living/carbon/human/H = over
|
||||
var/obj/item/organ/external/temp = H.organs_by_name[BP_R_HAND]
|
||||
|
||||
if (H.hand)
|
||||
temp = H.organs_by_name[BP_L_HAND]
|
||||
if(temp && !temp.is_usable())
|
||||
to_chat(user, SPAN_NOTICE("You try to move your [temp.name], but cannot!"))
|
||||
to_chat(H, SPAN_NOTICE("You try to move your [temp.name], but cannot!"))
|
||||
return
|
||||
|
||||
to_chat(user, SPAN_NOTICE("You pick up the [src]."))
|
||||
user.put_in_hands(src)
|
||||
to_chat(H, SPAN_NOTICE("You pick up the [src]."))
|
||||
H.put_in_hands(src)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -109,27 +109,27 @@ var/global/photo_count = 0
|
||||
item_state = "briefcase"
|
||||
can_hold = list(/obj/item/photo)
|
||||
|
||||
/obj/item/storage/photo_album/MouseDrop(obj/over_object as obj)
|
||||
/obj/item/storage/photo_album/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
|
||||
if((istype(usr, /mob/living/carbon/human)))
|
||||
var/mob/M = usr
|
||||
if(!( istype(over_object, /atom/movable/screen) ))
|
||||
if((istype(user, /mob/living/carbon/human)))
|
||||
var/mob/M = user
|
||||
if(!( istype(over, /atom/movable/screen) ))
|
||||
return ..()
|
||||
playsound(loc, /singleton/sound_category/rustle_sound, 50, 1, -5)
|
||||
if((!( M.restrained() ) && !( M.stat ) && M.back == src))
|
||||
switch(over_object.name)
|
||||
switch(over.name)
|
||||
if("right hand")
|
||||
M.u_equip(src)
|
||||
M.equip_to_slot_if_possible(src, slot_r_hand)
|
||||
if("left hand")
|
||||
M.u_equip(src)
|
||||
M.equip_to_slot_if_possible(src, slot_l_hand)
|
||||
add_fingerprint(usr)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
if(usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
show_to(usr)
|
||||
if(over == user && in_range(src, user) || user.contents.Find(src))
|
||||
if(user.s_active)
|
||||
user.s_active.close(user)
|
||||
show_to(user)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
@@ -55,15 +55,16 @@
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/item/portable_typewriter/MouseDrop(mob/user as mob)
|
||||
if(use_check_and_message(user))
|
||||
/obj/item/portable_typewriter/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
var/mob/mob_dropped_over = over
|
||||
if(use_check_and_message(mob_dropped_over))
|
||||
return
|
||||
|
||||
if(((user.contents.Find(src) || in_range(src, user))))
|
||||
if(((mob_dropped_over.contents.Find(src) || in_range(src, mob_dropped_over))))
|
||||
if(isnull(stored_paper))
|
||||
to_chat(user, SPAN_ALERT("\The [src] has no paper fed for typing!"))
|
||||
to_chat(mob_dropped_over, SPAN_ALERT("\The [src] has no paper fed for typing!"))
|
||||
else
|
||||
stored_paper.attackby(pen, user)
|
||||
stored_paper.attackby(pen, mob_dropped_over)
|
||||
return
|
||||
|
||||
/obj/item/portable_typewriter/update_icon()
|
||||
@@ -179,8 +180,8 @@
|
||||
to_chat(user, SPAN_ALERT("\The [src] is currently closed!"))
|
||||
return
|
||||
|
||||
/obj/item/typewriter_case/MouseDrop(mob/user as mob)
|
||||
attack_self(user)
|
||||
/obj/item/typewriter_case/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
attack_self(over)
|
||||
|
||||
/obj/item/typewriter_case/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(istype(attacking_item, /obj/item/portable_typewriter))
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
anchored = TRUE
|
||||
layer = 4
|
||||
|
||||
/obj/machinery/fusion_fuel_compressor/MouseDrop_T(atom/dropping, mob/user)
|
||||
/obj/machinery/fusion_fuel_compressor/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
if(user.incapacitated() || !user.Adjacent(src))
|
||||
return
|
||||
return do_fuel_compression(dropping, user)
|
||||
return do_fuel_compression(dropped, user)
|
||||
|
||||
/obj/machinery/fusion_fuel_compressor/attackby(obj/item/attacking_item, mob/user)
|
||||
return do_fuel_compression(attacking_item, user) || ..()
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
self_recharge = initial(self_recharge)
|
||||
use_external_power = initial(use_external_power)
|
||||
|
||||
/obj/item/gun/energy/MouseDrop(atom/over)
|
||||
/obj/item/gun/energy/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
. = ..()
|
||||
|
||||
|
||||
|
||||
@@ -578,8 +578,8 @@
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/machinery/reagentgrinder/MouseDrop_T(atom/dropping, mob/user)
|
||||
var/mob/living/carbon/human/target = dropping
|
||||
/obj/machinery/reagentgrinder/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
var/mob/living/carbon/human/target = dropped
|
||||
if (!istype(target) || target.buckled_to || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || istype(user, /mob/living/silicon/ai))
|
||||
return
|
||||
if(target == user)
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
feed_sound(user)
|
||||
return 1
|
||||
|
||||
/obj/item/reagent_containers/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
||||
/obj/item/reagent_containers/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
. = ..()
|
||||
if(ishuman(over))
|
||||
var/mob/living/carbon/human/H = over
|
||||
|
||||
@@ -97,20 +97,20 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/blood/MouseDrop(over_object, src_location, over_location)
|
||||
/obj/item/reagent_containers/blood/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(!ismob(loc))
|
||||
return
|
||||
var/turf/our_turf = get_turf(src)
|
||||
var/turf/target_turf = get_turf(over_object)
|
||||
var/turf/target_turf = get_turf(over)
|
||||
if(!our_turf.Adjacent(target_turf))
|
||||
return
|
||||
if(attached_mob)
|
||||
remove_iv_mob()
|
||||
else if(ishuman(over_object))
|
||||
visible_message(SPAN_WARNING("\The [usr] starts hooking \the [over_object] up to \the [src]."))
|
||||
if(do_after(usr, 30))
|
||||
to_chat(usr, SPAN_NOTICE("You hook \the [over_object] up to \the [src]."))
|
||||
attached_mob = WEAKREF(over_object)
|
||||
else if(ishuman(over))
|
||||
visible_message(SPAN_WARNING("\The [user] starts hooking \the [over] up to \the [src]."))
|
||||
if(do_after(user, 30))
|
||||
to_chat(user, SPAN_NOTICE("You hook \the [over] up to \the [src]."))
|
||||
attached_mob = WEAKREF(over)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -36,11 +36,12 @@
|
||||
can.pixel_y = positions[2]
|
||||
underlays += can
|
||||
|
||||
/obj/item/storage/box/fancy/yoke/MouseDrop(mob/user)
|
||||
if(use_check_and_message(user))
|
||||
/obj/item/storage/box/fancy/yoke/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
var/mob/mob_dropped_over = over
|
||||
if(use_check_and_message(mob_dropped_over))
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("You pick up \the [src]."))
|
||||
user.put_in_hands(src)
|
||||
to_chat(mob_dropped_over, SPAN_NOTICE("You pick up \the [src]."))
|
||||
mob_dropped_over.put_in_hands(src)
|
||||
|
||||
/obj/item/storage/box/fancy/yoke/attack_hand(mob/user)
|
||||
if(!length(contents)) // no more cans, continue as normal
|
||||
|
||||
@@ -574,11 +574,13 @@ ABSTRACT_TYPE(/obj/item/reagent_containers/food/snacks/bowl)
|
||||
user.put_in_hands(waste)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/bowl/MouseDrop(mob/user) //Dropping the bowl of food onto the user
|
||||
if(istype(user) && !use_check_and_message(user))
|
||||
user.put_in_active_hand(src)
|
||||
src.pickup(user)
|
||||
/obj/item/reagent_containers/food/snacks/bowl/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params) //Dropping the bowl of food onto the user
|
||||
var/mob/mob_dropped_over = over
|
||||
if(istype(mob_dropped_over) && !use_check_and_message(mob_dropped_over))
|
||||
mob_dropped_over.put_in_active_hand(src)
|
||||
src.pickup(mob_dropped_over)
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/bowl/puffpuffs/update_icon()
|
||||
|
||||
@@ -208,11 +208,13 @@
|
||||
user.put_in_hands(waste)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/chipplate/MouseDrop(mob/user) //Dropping the chip onto the user
|
||||
if(istype(user) && user == usr)
|
||||
user.put_in_active_hand(src)
|
||||
src.pickup(user)
|
||||
/obj/item/reagent_containers/food/snacks/chipplate/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params) //Dropping the chip onto the user
|
||||
var/mob/mob_dropped_over = over
|
||||
if(istype(mob_dropped_over) && user == user)
|
||||
mob_dropped_over.put_in_active_hand(src)
|
||||
src.pickup(mob_dropped_over)
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/chipplate/nachos
|
||||
|
||||
@@ -246,8 +246,11 @@
|
||||
|
||||
// mouse drop another mob or self
|
||||
//
|
||||
/obj/machinery/disposal/MouseDrop_T(atom/dropping, mob/user)
|
||||
var/mob/target = dropping
|
||||
/obj/machinery/disposal/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
var/mob/target = dropped
|
||||
if(!istype(target))
|
||||
return
|
||||
|
||||
if(user.stat || !user.canmove || !istype(target))
|
||||
return
|
||||
if(target.buckled_to || get_dist(user, src) > 1 || get_dist(user, target) > 1)
|
||||
@@ -304,7 +307,6 @@
|
||||
C.show_message(msg, 3)
|
||||
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/machinery/disposal/proc/check_mob_size(mob/target)
|
||||
return 1
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
underlays.Cut()
|
||||
desc = initial(desc)
|
||||
|
||||
/obj/machinery/artifact/MouseDrop(atom/over)
|
||||
/obj/machinery/artifact/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(istype(over, /obj/structure/anomaly_container))
|
||||
var/obj/structure/anomaly_container/box = over
|
||||
box.contain(src)
|
||||
|
||||
@@ -132,23 +132,23 @@
|
||||
throw_things(user)
|
||||
LAZYREMOVE(climbers, user)
|
||||
|
||||
/obj/structure/table/MouseDrop_T(atom/dropping, mob/user, params)
|
||||
var/obj/item/stack/material/what = dropping
|
||||
/obj/structure/table/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
var/obj/item/stack/material/what = dropped
|
||||
if(can_reinforce && isliving(usr) && (!usr.stat) && istype(what) && usr.get_active_hand() == what && Adjacent(usr))
|
||||
reinforce_table(what, usr)
|
||||
return
|
||||
|
||||
if(ismob(dropping.loc)) //If placing an item
|
||||
if(!isitem(dropping) || user.get_active_hand() != dropping)
|
||||
if(ismob(dropped.loc)) //If placing an item
|
||||
if(!isitem(dropped) || user.get_active_hand() != dropped)
|
||||
return ..()
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item()
|
||||
if(dropping.loc != src.loc)
|
||||
step(dropping, get_dir(dropping, src))
|
||||
if(dropped.loc != src.loc)
|
||||
step(dropped, get_dir(dropped, src))
|
||||
|
||||
else if(isturf(dropping.loc) && isitem(dropping)) //If pushing an item on the tabletop
|
||||
var/obj/item/I = dropping
|
||||
else if(isturf(dropped.loc) && isitem(dropped)) //If pushing an item on the tabletop
|
||||
var/obj/item/I = dropped
|
||||
if(I.anchored)
|
||||
return
|
||||
|
||||
|
||||
@@ -54,20 +54,20 @@
|
||||
return FALSE
|
||||
return ..(M)
|
||||
|
||||
/obj/vehicle/animal/MouseDrop(atom/over)
|
||||
if(use_check_and_message(usr))
|
||||
return
|
||||
|
||||
if(usr == over && ishuman(over))
|
||||
var/mob/living/carbon/human/H = over
|
||||
storage_compartment.open(H)
|
||||
|
||||
/obj/vehicle/animal/MouseDrop_T(atom/dropping, mob/user)
|
||||
/obj/vehicle/animal/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(use_check_and_message(user))
|
||||
return
|
||||
|
||||
if(!load(dropping))
|
||||
to_chat(user, SPAN_WARNING("You were unable to load \the [dropping] onto \the [src]."))
|
||||
if(user == over && ishuman(over))
|
||||
var/mob/living/carbon/human/H = over
|
||||
storage_compartment.open(H)
|
||||
|
||||
/obj/vehicle/animal/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
if(use_check_and_message(user))
|
||||
return
|
||||
|
||||
if(!load(dropped))
|
||||
to_chat(user, SPAN_WARNING("You were unable to load \the [dropped] onto \the [src]."))
|
||||
return
|
||||
|
||||
/obj/vehicle/animal/attack_hand(var/mob/user as mob)
|
||||
|
||||
@@ -151,14 +151,14 @@
|
||||
return 0
|
||||
return ..(M)
|
||||
|
||||
/obj/vehicle/bike/MouseDrop(atom/over)
|
||||
if(usr == over && ishuman(over))
|
||||
/obj/vehicle/bike/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(user == over && ishuman(over))
|
||||
var/mob/living/carbon/human/H = over
|
||||
storage_compartment.open(H)
|
||||
|
||||
/obj/vehicle/bike/MouseDrop_T(atom/dropping, mob/user)
|
||||
if(!load(dropping))
|
||||
to_chat(user, SPAN_WARNING("You were unable to load \the [dropping] onto \the [src]."))
|
||||
/obj/vehicle/bike/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
if(!load(dropped))
|
||||
to_chat(user, SPAN_WARNING("You were unable to load \the [dropped] onto \the [src]."))
|
||||
return
|
||||
|
||||
/obj/vehicle/bike/attack_hand(var/mob/user as mob)
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
desc = "A high-tech titanium pod, capable of transporting its passenger right into the action at considerable ranges. The metal foam dispensers lining the top prevent most hull breaches on station ingress."
|
||||
icon_state = "syndie_pod"
|
||||
|
||||
/obj/vehicle/droppod/MouseDrop()
|
||||
/obj/vehicle/droppod/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
return
|
||||
|
||||
/obj/vehicle/droppod/MouseDrop_T()
|
||||
/obj/vehicle/droppod/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
return
|
||||
|
||||
/obj/vehicle/droppod/emag_act()
|
||||
|
||||
@@ -84,14 +84,14 @@
|
||||
// Interaction procs
|
||||
//-------------------------------------------
|
||||
|
||||
/obj/vehicle/train/MouseDrop_T(atom/dropping, mob/user)
|
||||
/obj/vehicle/train/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
if(use_check_and_message(user))
|
||||
return
|
||||
if(istype(dropping, /obj/vehicle/train))
|
||||
latch(dropping, user)
|
||||
if(istype(dropped, /obj/vehicle/train))
|
||||
latch(dropped, user)
|
||||
else
|
||||
if(!load(dropping))
|
||||
to_chat(user, SPAN_WARNING("You were unable to load \the [dropping] on \the [src]."))
|
||||
if(!load(dropped))
|
||||
to_chat(user, SPAN_WARNING("You were unable to load \the [dropped] on \the [src]."))
|
||||
|
||||
/obj/vehicle/train/attack_hand(mob/user as mob)
|
||||
if(use_check_and_message(user))
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
return 0
|
||||
return ..(M)
|
||||
|
||||
/obj/vehicle/unicycle/MouseDrop_T(atom/dropping, mob/user)
|
||||
if(!load(dropping))
|
||||
to_chat(user, SPAN_WARNING("You were unable to load \the [dropping] onto \the [src]."))
|
||||
/obj/vehicle/unicycle/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
if(!load(dropped))
|
||||
to_chat(user, SPAN_WARNING("You were unable to load \the [dropped] onto \the [src]."))
|
||||
return
|
||||
|
||||
/obj/vehicle/unicycle/attack_hand(var/mob/user as mob)
|
||||
|
||||
Reference in New Issue
Block a user