mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 13:30:42 +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:
@@ -76,6 +76,7 @@
|
||||
#include "code\__DEFINES\icon_layering.dm"
|
||||
#include "code\__DEFINES\icon_smoothing.dm"
|
||||
#include "code\__DEFINES\important_recursive_contents.dm"
|
||||
#include "code\__DEFINES\interaction_flags.dm"
|
||||
#include "code\__DEFINES\inventory.dm"
|
||||
#include "code\__DEFINES\is_helpers.dm"
|
||||
#include "code\__DEFINES\items_clothing.dm"
|
||||
@@ -173,6 +174,7 @@
|
||||
#include "code\__DEFINES\dcs\signals\signals_weather.dm"
|
||||
#include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_attack.dm"
|
||||
#include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_main.dm"
|
||||
#include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_mouse.dm"
|
||||
#include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_movable.dm"
|
||||
#include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_movement.dm"
|
||||
#include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_x_act.dm"
|
||||
@@ -210,6 +212,7 @@
|
||||
#include "code\__HELPERS\qdel.dm"
|
||||
#include "code\__HELPERS\ref.dm"
|
||||
#include "code\__HELPERS\sanitize_values.dm"
|
||||
#include "code\__HELPERS\screen_objs.dm"
|
||||
#include "code\__HELPERS\shell.dm"
|
||||
#include "code\__HELPERS\smart_token_bucket.dm"
|
||||
#include "code\__HELPERS\spatial_info.dm"
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
// mouse signals. Format:
|
||||
// When the signal is called: (signal arguments)
|
||||
// All signals send the source datum of the signal as the first argument
|
||||
|
||||
|
||||
///from base of atom/MouseDrop(): (/atom/over, /mob/user)
|
||||
#define COMSIG_MOUSEDROP_ONTO "mousedrop_onto"
|
||||
#define COMPONENT_CANCEL_MOUSEDROP_ONTO (1<<0)
|
||||
///from base of atom/handle_mouse_drop_receive: (/atom/from, /mob/user)
|
||||
#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto"
|
||||
#define COMPONENT_CANCEL_MOUSEDROPPED_ONTO (1<<0)
|
||||
@@ -12,6 +12,12 @@
|
||||
/// The arugment of move_args which dictates our movement direction
|
||||
#define MOVE_ARG_DIRECTION 2
|
||||
|
||||
//from base of client/MouseDown(): (/client, object, location, control, params)
|
||||
#define COMSIG_CLIENT_MOUSEDOWN "client_mousedown"
|
||||
//from base of client/MouseUp(): (/client, object, location, control, params)
|
||||
#define COMSIG_CLIENT_MOUSEUP "client_mouseup"
|
||||
#define COMPONENT_CLIENT_MOUSEUP_INTERCEPT (1<<0)
|
||||
|
||||
///from base of /obj/item/attack(): (mob/M, mob/user)
|
||||
#define COMSIG_MOB_ITEM_ATTACK "mob_item_attack"
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
AURORA NOTE: INTERACT_ATOM_MOUSEDROP_IGNORE_USABILITY is not implemented at the moment, it's kept only to keep the INTERACT_ATOM_MOUSEDROP_IGNORE_CHECKS the same
|
||||
*/
|
||||
|
||||
/// Bypass all adjacency checks for mouse drop
|
||||
#define INTERACT_ATOM_MOUSEDROP_IGNORE_ADJACENT (1<<11)
|
||||
/// Bypass all can_perform_action checks for mouse drop
|
||||
#define INTERACT_ATOM_MOUSEDROP_IGNORE_USABILITY (1<<12)
|
||||
/// Bypass all adjacency and other checks for mouse drop
|
||||
#define INTERACT_ATOM_MOUSEDROP_IGNORE_CHECKS (INTERACT_ATOM_MOUSEDROP_IGNORE_ADJACENT | INTERACT_ATOM_MOUSEDROP_IGNORE_USABILITY)
|
||||
@@ -0,0 +1,115 @@
|
||||
/// Takes a screen loc string in the format
|
||||
/// "+-left-offset:+-pixel,+-bottom-offset:+-pixel"
|
||||
/// Where the :pixel is optional, and returns
|
||||
/// A list in the format (x_offset, y_offset)
|
||||
/// We require context to get info out of screen locs that contain relative info, so NORTH, SOUTH, etc
|
||||
/proc/screen_loc_to_offset(screen_loc, view)
|
||||
if(!screen_loc)
|
||||
return list(64, 64)
|
||||
var/list/view_size = view_to_pixels(view)
|
||||
var/x = 0
|
||||
var/y = 0
|
||||
// Time to parse for directional relative offsets
|
||||
if(findtext(screen_loc, "EAST")) // If you're starting from the east, we start from the east too
|
||||
x += view_size[1]
|
||||
if(findtext(screen_loc, "WEST")) // HHHHHHHHHHHHHHHHHHHHHH WEST is technically a 1 tile offset from the start. Shoot me please
|
||||
x += ICON_SIZE_X
|
||||
if(findtext(screen_loc, "NORTH"))
|
||||
y += view_size[2]
|
||||
if(findtext(screen_loc, "SOUTH"))
|
||||
y += ICON_SIZE_Y
|
||||
|
||||
var/list/x_and_y = splittext(screen_loc, ",")
|
||||
|
||||
var/list/x_pack = splittext(x_and_y[1], ":")
|
||||
var/list/y_pack = splittext(x_and_y[2], ":")
|
||||
|
||||
var/x_coord = x_pack[1]
|
||||
var/y_coord = y_pack[1]
|
||||
|
||||
if (findtext(x_coord, "CENTER"))
|
||||
x += view_size[1] / 2
|
||||
|
||||
if (findtext(y_coord, "CENTER"))
|
||||
y += view_size[2] / 2
|
||||
|
||||
x_coord = text2num(cut_relative_direction(x_coord))
|
||||
y_coord = text2num(cut_relative_direction(y_coord))
|
||||
|
||||
x += x_coord * ICON_SIZE_X
|
||||
y += y_coord * ICON_SIZE_Y
|
||||
|
||||
if(length(x_pack) > 1)
|
||||
x += text2num(x_pack[2])
|
||||
if(length(y_pack) > 1)
|
||||
y += text2num(y_pack[2])
|
||||
return list(x, y)
|
||||
|
||||
/// Takes a list in the form (x_offset, y_offset)
|
||||
/// And converts it to a screen loc string
|
||||
/// Accepts an optional view string/size to force the screen_loc around, so it can't go out of scope
|
||||
/proc/offset_to_screen_loc(x_offset, y_offset, view = null)
|
||||
if(view)
|
||||
var/list/view_bounds = view_to_pixels(view)
|
||||
x_offset = clamp(x_offset, ICON_SIZE_X, view_bounds[1])
|
||||
y_offset = clamp(y_offset, ICON_SIZE_Y, view_bounds[2])
|
||||
|
||||
// Round with no argument is floor, so we get the non pixel offset here
|
||||
var/x = round(x_offset / ICON_SIZE_X)
|
||||
var/pixel_x = x_offset % ICON_SIZE_X
|
||||
var/y = round(y_offset / ICON_SIZE_Y)
|
||||
var/pixel_y = y_offset % ICON_SIZE_Y
|
||||
|
||||
var/list/generated_loc = list()
|
||||
generated_loc += "[x]"
|
||||
if(pixel_x)
|
||||
generated_loc += ":[pixel_x]"
|
||||
generated_loc += ",[y]"
|
||||
if(pixel_y)
|
||||
generated_loc += ":[pixel_y]"
|
||||
return jointext(generated_loc, "")
|
||||
|
||||
/**
|
||||
* Returns a valid location to place a screen object without overflowing the viewport
|
||||
*
|
||||
* * target: The target location as a purely number based screen_loc string "+-left-offset:+-pixel,+-bottom-offset:+-pixel"
|
||||
* * target_offset: The amount we want to offset the target location by. We explictly don't care about direction here, we will try all 4
|
||||
* * view: The view variable of the client we're doing this for. We use this to get the size of the screen
|
||||
*
|
||||
* Returns a screen loc representing the valid location
|
||||
**/
|
||||
/proc/get_valid_screen_location(target_loc, target_offset, view)
|
||||
var/list/offsets = screen_loc_to_offset(target_loc)
|
||||
var/base_x = offsets[1]
|
||||
var/base_y = offsets[2]
|
||||
|
||||
var/list/view_size = view_to_pixels(view)
|
||||
|
||||
// Bias to the right, down, left, and then finally up
|
||||
if(base_x + target_offset < view_size[1])
|
||||
return offset_to_screen_loc(base_x + target_offset, base_y, view)
|
||||
if(base_y - target_offset > ICON_SIZE_Y)
|
||||
return offset_to_screen_loc(base_x, base_y - target_offset, view)
|
||||
if(base_x - target_offset > ICON_SIZE_X)
|
||||
return offset_to_screen_loc(base_x - target_offset, base_y, view)
|
||||
if(base_y + target_offset < view_size[2])
|
||||
return offset_to_screen_loc(base_x, base_y + target_offset, view)
|
||||
stack_trace("You passed in a scren location {[target_loc]} and offset {[target_offset]} that can't be fit in the viewport Width {[view_size[1]]}, Height {[view_size[2]]}. what did you do lad")
|
||||
return null // The fuck did you do lad
|
||||
|
||||
/// Takes a screen_loc string and cut out any directions like NORTH or SOUTH
|
||||
/proc/cut_relative_direction(fragment)
|
||||
var/static/regex/regex = regex(@"([A-Z])\w+", "g")
|
||||
return regex.Replace(fragment, "")
|
||||
|
||||
/// Returns a screen_loc format for a tiling screen objects from start and end positions. Start should be bottom left corner, and end top right corner.
|
||||
/proc/spanning_screen_loc(start_px, start_py, end_px, end_py)
|
||||
var/starting_tile_x = round(start_px / ICON_SIZE_X)
|
||||
start_px -= starting_tile_x * ICON_SIZE_X
|
||||
var/starting_tile_y = round(start_py/ ICON_SIZE_Y)
|
||||
start_py -= starting_tile_y * ICON_SIZE_Y
|
||||
var/ending_tile_x = round(end_px / ICON_SIZE_X)
|
||||
end_px -= ending_tile_x * ICON_SIZE_X
|
||||
var/ending_tile_y = round(end_py / ICON_SIZE_Y)
|
||||
end_py -= ending_tile_y * ICON_SIZE_Y
|
||||
return "[starting_tile_x]:[start_px],[starting_tile_y]:[start_py] to [ending_tile_x]:[end_px],[ending_tile_y]:[end_py]"
|
||||
+116
-6
@@ -2,17 +2,127 @@
|
||||
MouseDrop:
|
||||
|
||||
Called on the atom you're dragging. In a lot of circumstances we want to use the
|
||||
recieving object instead, so that's the default action. This allows you to drag
|
||||
receiving object instead, so that's the default action. This allows you to drag
|
||||
almost anything into a trash can.
|
||||
*/
|
||||
/atom/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
||||
SHOULD_NOT_OVERRIDE(TRUE)
|
||||
|
||||
if(!usr || !over)
|
||||
return
|
||||
if(!Adjacent(usr) || !over.Adjacent(usr))
|
||||
return // should stop you from dragging through windows
|
||||
|
||||
over.MouseDrop_T(src, usr, params)
|
||||
var/proximity_check = usr.client.check_drag_proximity(src, over, src_location, over_location, src_control, over_control, params)
|
||||
if(proximity_check)
|
||||
return proximity_check
|
||||
|
||||
base_mouse_drop_handler(over, src_location, over_location, params)
|
||||
|
||||
/**
|
||||
* Called when all sanity checks for mouse dropping have passed. Handles adjacency & other sanity checks before delegating the event
|
||||
* down to lower level handlers. Do not override unless you are trying to create hud & screen elements which do not require proximity
|
||||
* or other checks
|
||||
*/
|
||||
/atom/proc/base_mouse_drop_handler(atom/over, src_location, over_location, params)
|
||||
PROTECTED_PROC(TRUE)
|
||||
SHOULD_NOT_OVERRIDE(TRUE)
|
||||
|
||||
var/mob/user = usr
|
||||
|
||||
if(SEND_SIGNAL(src, COMSIG_MOUSEDROP_ONTO, over, user) & COMPONENT_CANCEL_MOUSEDROP_ONTO)
|
||||
return
|
||||
|
||||
if(SEND_SIGNAL(over, COMSIG_MOUSEDROPPED_ONTO, src, user, params) & COMPONENT_CANCEL_MOUSEDROPPED_ONTO)
|
||||
return
|
||||
|
||||
// only if both dragged object & receiver agree to do checks do we proceed
|
||||
var/combined_atom_flags = interaction_flags_atom | over.interaction_flags_atom
|
||||
if(!(combined_atom_flags & INTERACT_ATOM_MOUSEDROP_IGNORE_CHECKS))
|
||||
//Check for adjacency
|
||||
// In TG it's `if(!(combined_atom_flags & INTERACT_ATOM_MOUSEDROP_IGNORE_ADJACENT) && (!CanReach(user) || !over.CanReach(user)))` but i'm not recreating those procs now
|
||||
if(!(combined_atom_flags & INTERACT_ATOM_MOUSEDROP_IGNORE_ADJACENT) && (!Adjacent(user) || !over.Adjacent(user)))
|
||||
return // should stop you from dragging through windows
|
||||
|
||||
// NOT IMPLEMENTED IN AURORA
|
||||
// if(!(combined_atom_flags & INTERACT_ATOM_MOUSEDROP_IGNORE_USABILITY))
|
||||
// //Bypass adjacency cause we already checked for it above
|
||||
// if(!user.can_perform_action(src, interaction_flags_mouse_drop | over.interaction_flags_mouse_drop | BYPASS_ADJACENCY))
|
||||
// return // is the mob not able to drag the object with both sides conditions applied
|
||||
|
||||
mouse_drop_dragged(over, user, src_location, over_location, params)
|
||||
|
||||
over.mouse_drop_receive(src, user, params)
|
||||
|
||||
/// The proc that should be overridden by subtypes to handle mouse drop. Called on the atom being dragged
|
||||
/atom/proc/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
PROTECTED_PROC(TRUE)
|
||||
|
||||
///Receive a mousedrop
|
||||
/atom/proc/MouseDrop_T(atom/dropping, mob/user, params)
|
||||
return
|
||||
|
||||
/// The proc that should be overridden by subtypes to handle mouse drop. Called on the atom receiving a dragged object
|
||||
/atom/proc/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
PROTECTED_PROC(TRUE)
|
||||
|
||||
return
|
||||
|
||||
/// Handles treating drags as clicks if they're within some conditions
|
||||
/// Does some other stuff adjacent to trying to figure out what the user actually "wanted" to click
|
||||
/// Returns TRUE if it caused a click, FALSE otherwise
|
||||
/client/proc/check_drag_proximity(atom/dragging, atom/over, src_location, over_location, src_control, over_control, params)
|
||||
// We will swap which thing we're trying to check for clickability based off the type
|
||||
// Assertion is if you drag a turf to anything else, you really just wanted to click the anything else
|
||||
// And slightly misseed. I'm not interested in making this game pixel percise, so if it fits our other requirements
|
||||
// Lets just let that through yeah?
|
||||
var/atom/attempt_click = dragging
|
||||
var/atom/click_from = over
|
||||
var/location_to_use = src_location
|
||||
var/control_to_use = src_control
|
||||
if(isturf(attempt_click) && !isturf(over))
|
||||
// swapppp
|
||||
attempt_click = over
|
||||
click_from = dragging
|
||||
location_to_use = over_location
|
||||
control_to_use = over_control
|
||||
|
||||
if(is_drag_clickable(attempt_click, click_from, params))
|
||||
Click(attempt_click, location_to_use, control_to_use, params)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/// Distance in pixels that we consider "acceptable" from the initial click to the release
|
||||
/// Note: this does not account for the position of the object, just where it is on the screen
|
||||
#define LENIENCY_DISTANCE 16
|
||||
/// Accepted time in seconds between the initial click and drag release
|
||||
/// Go higher then this and we just don't care anymore
|
||||
#define LENIENCY_TIME (0.1 SECONDS)
|
||||
|
||||
/// Does the logic for checking if a drag counts as a click or not
|
||||
/// Returns true if it does, false otherwise
|
||||
/client/proc/is_drag_clickable(atom/dragging, atom/over, params)
|
||||
if(dragging == over)
|
||||
return TRUE
|
||||
if(world.time - drag_start > LENIENCY_TIME) // Time's up bestie
|
||||
return FALSE
|
||||
if(!get_turf(dragging)) // If it isn't in the world, drop it. This is for things that can move, and we assume hud elements will not have this problem
|
||||
return FALSE
|
||||
// Basically, are you trying to buckle someone down, or drag them onto you?
|
||||
// If so, we know you must be right about what you want
|
||||
if(ismovable(over))
|
||||
var/atom/movable/over_movable = over
|
||||
// The buckle bit will cover most mobs, for stupid reasons. still useful here tho
|
||||
if(over_movable.can_be_buckled || over_movable == eye)
|
||||
return FALSE
|
||||
|
||||
var/list/modifiers = params2list(params)
|
||||
var/list/old_offsets = screen_loc_to_offset(LAZYACCESS(drag_details, SCREEN_LOC), view)
|
||||
var/list/new_offsets = screen_loc_to_offset(LAZYACCESS(modifiers, SCREEN_LOC), view)
|
||||
|
||||
var/distance = sqrt(((old_offsets[1] - new_offsets[1]) ** 2) + ((old_offsets[2] - new_offsets[2]) ** 2))
|
||||
if(distance > LENIENCY_DISTANCE)
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
/*
|
||||
MOUSE UP AND MOUSE DOWN AREN'T HERE BUT IN code\modules\client\client_procs.dm
|
||||
*/
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
. = ..()
|
||||
|
||||
/atom/movable/screen/movable/ability_master/MouseDrop()
|
||||
/atom/movable/screen/movable/ability_master/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(showing)
|
||||
return
|
||||
|
||||
@@ -189,11 +189,11 @@
|
||||
|
||||
activate()
|
||||
|
||||
/atom/movable/screen/ability/MouseDrop(var/atom/A)
|
||||
if(!A || A == src)
|
||||
/atom/movable/screen/ability/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(!over || over == src)
|
||||
return
|
||||
if(istype(A, /atom/movable/screen/ability))
|
||||
var/atom/movable/screen/ability/ability = A
|
||||
if(istype(over, /atom/movable/screen/ability))
|
||||
var/atom/movable/screen/ability/ability = over
|
||||
if(ability.ability_master && ability.ability_master == src.ability_master)
|
||||
ability_master.ability_objects.Swap(src.index, ability.index)
|
||||
ability_master.toggle_open(2) // To update the UI.
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
snap2grid = TRUE
|
||||
|
||||
|
||||
/atom/movable/screen/movable/MouseDrop(over_object, src_location, over_location, src_control, over_control, params)
|
||||
/atom/movable/screen/movable/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
var/list/PM = params2list(params)
|
||||
|
||||
//No screen-loc information? abort.
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
hud = null
|
||||
. = ..()
|
||||
|
||||
///Screen elements are always on top of the players screen and don't move so yes they are adjacent
|
||||
/atom/movable/screen/Adjacent(atom/neighbor, atom/target, atom/movable/mover)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Handles the deletion of the HUD this screen is associated to
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
. = ..()
|
||||
|
||||
/atom/movable/screen/movable/spell_master/MouseDrop()
|
||||
/atom/movable/screen/movable/spell_master/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(showing)
|
||||
return
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
///First atom flags var
|
||||
var/flags_1 = NONE
|
||||
///Intearaction flags
|
||||
var/interaction_flags_atom = NONE
|
||||
|
||||
var/flags_ricochet = NONE
|
||||
|
||||
|
||||
@@ -391,9 +391,9 @@
|
||||
attackpylon(user, attacking_item.force, attacking_item)
|
||||
|
||||
//Mousedrop so that constructs can drag rats out of maintenance to make turrets
|
||||
/obj/structure/cult/pylon/MouseDrop_T(atom/dropping, mob/user)
|
||||
if(istype(dropping, /mob/living))
|
||||
present_sacrifice(user, dropping)
|
||||
/obj/structure/cult/pylon/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
if(istype(dropped, /mob/living))
|
||||
present_sacrifice(user, dropped)
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -260,11 +260,11 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/optable/MouseDrop_T(atom/dropping, mob/user)
|
||||
if(istype(dropping, /obj/item))
|
||||
user.drop_from_inventory(dropping, get_turf(src))
|
||||
/obj/machinery/optable/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
if(istype(dropped, /obj/item))
|
||||
user.drop_from_inventory(dropped, get_turf(src))
|
||||
|
||||
var/mob/living/carbon/patient = dropping
|
||||
var/mob/living/carbon/patient = dropped
|
||||
//No point if it's not a possible patient
|
||||
if(!istype(patient))
|
||||
return
|
||||
|
||||
@@ -277,8 +277,8 @@
|
||||
else if(default_part_replacement(user, attacking_item))
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/sleeper/MouseDrop_T(atom/dropping, mob/user)
|
||||
var/mob/target = dropping
|
||||
/obj/machinery/sleeper/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
var/mob/target = dropped
|
||||
if(!istype(target))
|
||||
return
|
||||
|
||||
|
||||
@@ -168,18 +168,18 @@
|
||||
qdel(G)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/bodyscanner/MouseDrop_T(atom/dropping, mob/user)
|
||||
/obj/machinery/bodyscanner/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
if(!istype(user))
|
||||
return
|
||||
|
||||
if(!ismob(dropping))
|
||||
if(!ismob(dropped))
|
||||
return
|
||||
|
||||
if (occupant)
|
||||
to_chat(user, SPAN_NOTICE("<B>The scanner is already occupied!</B>"))
|
||||
return
|
||||
|
||||
var/mob/living/L = dropping
|
||||
var/mob/living/L = dropped
|
||||
var/bucklestatus = L.bucklecheck(user)
|
||||
if (!bucklestatus)
|
||||
return
|
||||
|
||||
@@ -277,12 +277,12 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/MouseDrop_T(atom/dropping, mob/user)
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
if(!istype(user))
|
||||
return
|
||||
if(!ismob(dropping))
|
||||
if(!ismob(dropped))
|
||||
return
|
||||
var/mob/living/L = dropping
|
||||
var/mob/living/L = dropped
|
||||
for(var/mob/living/carbon/slime/M in range(1,L))
|
||||
if(M.victim == L)
|
||||
to_chat(usr, SPAN_WARNING("[L.name] will not fit into the cryo because they have a slime latched onto their head."))
|
||||
|
||||
@@ -408,14 +408,14 @@
|
||||
go_in(user, M)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/cryopod/MouseDrop_T(atom/dropping, mob/user)
|
||||
/obj/machinery/cryopod/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
if(!istype(user, /mob/living))
|
||||
return
|
||||
|
||||
if(!check_occupant_allowed(dropping))
|
||||
if(!check_occupant_allowed(dropped))
|
||||
return
|
||||
|
||||
var/mob/living/M = dropping
|
||||
var/mob/living/M = dropped
|
||||
if(istype(M))
|
||||
go_in(user, M)
|
||||
|
||||
|
||||
@@ -276,31 +276,31 @@
|
||||
if(attached.take_blood(beaker, amount))
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/iv_drip/MouseDrop(over_object, src_location, over_location)
|
||||
/obj/machinery/iv_drip/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
..()
|
||||
if(use_check_and_message(usr))
|
||||
if(use_check_and_message(user))
|
||||
return
|
||||
if(isDrone(usr))
|
||||
if(isDrone(user))
|
||||
return
|
||||
if(in_range(src, usr) && ishuman(over_object) && in_range(over_object, src))
|
||||
if(in_range(src, user) && ishuman(over) && in_range(over, src))
|
||||
var/list/options = list(
|
||||
"IV drip" = image('icons/mob/screen/radial.dmi', "iv_drip"),
|
||||
"Breath mask" = image('icons/mob/screen/radial.dmi', "iv_mask"))
|
||||
var/chosen_action = show_radial_menu(usr, src, options, require_near = TRUE, radius = 42, tooltips = TRUE)
|
||||
var/chosen_action = show_radial_menu(user, src, options, require_near = TRUE, radius = 42, tooltips = TRUE)
|
||||
if(!chosen_action)
|
||||
return
|
||||
switch(chosen_action)
|
||||
if("IV drip")
|
||||
if(attached)
|
||||
visible_message("[usr] detaches \the [src] from [attached]'s [vein.name].")
|
||||
visible_message("[user] detaches \the [src] from [attached]'s [vein.name].")
|
||||
vein = null
|
||||
attached = null
|
||||
blood_message_sent = FALSE
|
||||
update_icon()
|
||||
return
|
||||
attached = over_object
|
||||
vein = attached.get_organ(usr.zone_sel.selecting)
|
||||
var/checking = attached.can_inject(usr, TRUE, usr.zone_sel.selecting, armor_check)
|
||||
attached = over
|
||||
vein = attached.get_organ(user.zone_sel.selecting)
|
||||
var/checking = attached.can_inject(user, TRUE, user.zone_sel.selecting, armor_check)
|
||||
if(!checking)
|
||||
attached = null
|
||||
vein = null
|
||||
@@ -308,42 +308,42 @@
|
||||
if(armor_check)
|
||||
var/attach_time = attach_delay
|
||||
attach_time *= checking
|
||||
if(!do_mob(usr, attached, attach_time))
|
||||
to_chat(usr, SPAN_DANGER("Failed to insert \the [src]. You and [attached] must stay still!"))
|
||||
if(!do_mob(user, attached, attach_time))
|
||||
to_chat(user, SPAN_DANGER("Failed to insert \the [src]. You and [attached] must stay still!"))
|
||||
attached = null
|
||||
vein = null
|
||||
return
|
||||
visible_message("[usr][armor_check ? "" : " swiftly"] inserts \the [src] in \the [attached]'s [vein.name].")
|
||||
visible_message("[user][armor_check ? "" : " swiftly"] inserts \the [src] in \the [attached]'s [vein.name].")
|
||||
update_icon()
|
||||
return
|
||||
if("Breath mask")
|
||||
if(!breath_mask)
|
||||
to_chat(usr, SPAN_NOTICE("There is no breath mask installed into \the [src]!"))
|
||||
to_chat(user, SPAN_NOTICE("There is no breath mask installed into \the [src]!"))
|
||||
return
|
||||
if(breather)
|
||||
visible_message("[usr] removes [breather]'s mask.[valve_open ? " \The [tank]'s valve automatically closes." : ""]")
|
||||
breath_mask_rip()
|
||||
return
|
||||
breather = over_object
|
||||
breather = over
|
||||
if(!breather.organs_by_name[BP_HEAD])
|
||||
to_chat(usr, SPAN_WARNING("\The [breather] doesn't have a head!"))
|
||||
to_chat(user, SPAN_WARNING("\The [breather] doesn't have a head!"))
|
||||
breather = null
|
||||
return
|
||||
if(!breather.check_has_mouth())
|
||||
to_chat(usr, SPAN_WARNING("\The [breather] doesn't have a mouth!"))
|
||||
to_chat(user, SPAN_WARNING("\The [breather] doesn't have a mouth!"))
|
||||
breather = null
|
||||
return
|
||||
if(breather.head && (breather.head.body_parts_covered & FACE))
|
||||
to_chat(usr, SPAN_WARNING("You must remove \the [breather]'s [breather.head] first!"))
|
||||
to_chat(user, SPAN_WARNING("You must remove \the [breather]'s [breather.head] first!"))
|
||||
breather = null
|
||||
return
|
||||
if(breather.wear_mask)
|
||||
to_chat(usr, SPAN_WARNING("You must remove \the [breather]'s [breather.wear_mask] first!"))
|
||||
to_chat(user, SPAN_WARNING("You must remove \the [breather]'s [breather.wear_mask] first!"))
|
||||
breather = null
|
||||
return
|
||||
if(tank)
|
||||
tank_on()
|
||||
visible_message("<b>[usr]</b> secures the mask over \the <b>[breather]'s</b> face.")
|
||||
visible_message("<b>[user]</b> secures the mask over \the <b>[breather]'s</b> face.")
|
||||
playsound(breather, 'sound/effects/buckle.ogg', 50, extrarange = SILENCED_SOUND_EXTRARANGE)
|
||||
breath_mask.forceMove(breather.loc)
|
||||
breather.equip_to_slot(breath_mask, slot_wear_mask)
|
||||
|
||||
@@ -202,8 +202,8 @@
|
||||
to_chat(user, SPAN_NOTICE("\The [src] cannot hold more [sname]."))
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/MouseDrop_T(atom/dropping, mob/user)
|
||||
var/mob/living/carbon/human/target = dropping
|
||||
/obj/machinery/mecha_part_fabricator/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)
|
||||
|
||||
@@ -152,8 +152,8 @@
|
||||
window_id = "disposaldispenser"
|
||||
|
||||
//Allow you to drag-drop disposal pipes into it
|
||||
/obj/machinery/pipedispenser/disposal/MouseDrop_T(atom/dropping, mob/user)
|
||||
var/obj/structure/disposalconstruct/pipe = dropping
|
||||
/obj/machinery/pipedispenser/disposal/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
var/obj/structure/disposalconstruct/pipe = dropped
|
||||
if(!istype(pipe) || pipe.anchored || use_check_and_message(user))
|
||||
return
|
||||
|
||||
|
||||
@@ -299,30 +299,30 @@
|
||||
to_chat(usr, SPAN_DANGER("Cancelled loading [R] into the charger. You and [R] must stay still!"))
|
||||
return
|
||||
|
||||
/obj/machinery/recharge_station/MouseDrop_T(atom/dropping, mob/user)
|
||||
if (istype(dropping, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = dropping
|
||||
/obj/machinery/recharge_station/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
if (istype(dropped, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = dropped
|
||||
if (!user.Adjacent(R) || !Adjacent(user))
|
||||
to_chat(user, SPAN_DANGER("You need to get closer if you want to put [dropping] into that charger!"))
|
||||
to_chat(user, SPAN_DANGER("You need to get closer if you want to put [dropped] into that charger!"))
|
||||
return
|
||||
user.face_atom(src)
|
||||
user.visible_message(SPAN_DANGER("[user] starts hauling [dropping] into the recharging unit!"),
|
||||
SPAN_DANGER("You start hauling and pushing [dropping] into the recharger. This might take a while..."), "You hear heaving and straining")
|
||||
user.visible_message(SPAN_DANGER("[user] starts hauling [dropped] into the recharging unit!"),
|
||||
SPAN_DANGER("You start hauling and pushing [dropped] into the recharger. This might take a while..."), "You hear heaving and straining")
|
||||
|
||||
if (do_mob(user, R, R.mob_size*10, needhand = 1))
|
||||
if (go_in(R))
|
||||
user.visible_message(SPAN_NOTICE("After a great effort, [user] manages to get [dropping] into the recharging unit!"))
|
||||
user.visible_message(SPAN_NOTICE("After a great effort, [user] manages to get [dropped] into the recharging unit!"))
|
||||
return 1
|
||||
else
|
||||
to_chat(user, SPAN_DANGER("Failed loading [dropping] into the charger. Please ensure that [dropping] has a power cell and is not buckled down, and that the charger is functioning."))
|
||||
to_chat(user, SPAN_DANGER("Failed loading [dropped] into the charger. Please ensure that [dropped] has a power cell and is not buckled down, and that the charger is functioning."))
|
||||
else
|
||||
to_chat(user, SPAN_DANGER("Cancelled loading [dropping] into the charger. You and [dropping] must stay still!"))
|
||||
to_chat(user, SPAN_DANGER("Cancelled loading [dropped] into the charger. You and [dropped] must stay still!"))
|
||||
return
|
||||
|
||||
else if(isipc(dropping)) // IPCs don't take as long
|
||||
var/mob/living/carbon/human/machine/R = dropping
|
||||
else if(isipc(dropped)) // IPCs don't take as long
|
||||
var/mob/living/carbon/human/machine/R = dropped
|
||||
if(!user.Adjacent(R) || !Adjacent(user))
|
||||
to_chat(user, SPAN_DANGER("You need to get closer if you want to put [dropping] into that charger!"))
|
||||
to_chat(user, SPAN_DANGER("You need to get closer if you want to put [dropped] into that charger!"))
|
||||
return
|
||||
|
||||
var/bucklestatus = R.bucklecheck(user)
|
||||
|
||||
@@ -244,10 +244,13 @@
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/machinery/stasis_cage/MouseDrop_T(mob/target, mob/user)
|
||||
if (!isanimal(target) && safety)
|
||||
to_chat(user, SPAN_WARNING("\The [src] smartly refuses \the [target]."))
|
||||
/obj/machinery/stasis_cage/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
if (!isanimal(dropped) && safety)
|
||||
to_chat(user, SPAN_WARNING("\The [src] smartly refuses \the [dropped]."))
|
||||
return
|
||||
|
||||
var/mob/living/simple_animal/target = dropped
|
||||
|
||||
if (!allowed(user))
|
||||
to_chat(user, SPAN_NOTICE("\The [src] blinks, refusing access."))
|
||||
return
|
||||
|
||||
@@ -147,8 +147,8 @@
|
||||
|
||||
eject_occupant(user)
|
||||
|
||||
/obj/machinery/suit_cycler/MouseDrop_T(atom/dropping, mob/user)
|
||||
var/mob/living/M = dropping
|
||||
/obj/machinery/suit_cycler/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
var/mob/living/M = dropped
|
||||
if(use_check_and_message(user))
|
||||
return
|
||||
if(!istype(M))
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
if(buckled)
|
||||
user_unbuckle(user)
|
||||
|
||||
/obj/MouseDrop_T(atom/dropping, mob/user)
|
||||
/obj/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
. = ..()
|
||||
if(is_type_in_list(dropping, can_buckle))
|
||||
user_buckle(dropping, user)
|
||||
if(is_type_in_list(dropped, can_buckle))
|
||||
user_buckle(dropped, user)
|
||||
|
||||
/**
|
||||
* Buckles an `/atom/movable` to this obj, performed by a `/mob`
|
||||
|
||||
@@ -1327,7 +1327,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
else
|
||||
apply_outline(L) //if the player's alive and well we send the command with no color set, so it uses the theme's color
|
||||
|
||||
/obj/item/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
||||
/obj/item/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
. = ..()
|
||||
remove_outline()
|
||||
|
||||
|
||||
@@ -185,22 +185,22 @@
|
||||
return 1
|
||||
|
||||
// Fold the bubble, transfering properties.
|
||||
/obj/structure/closet/airbubble/MouseDrop(over_object, src_location, over_location)
|
||||
if((!zipped || ripped )&& (over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||
if(!ishuman(usr)) return
|
||||
/obj/structure/closet/airbubble/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if((!zipped || ripped )&& (over == user && (in_range(src, user) || user.contents.Find(src))))
|
||||
if(!ishuman(user)) return
|
||||
if(opened) return 0
|
||||
if(contents.len > 1) return 0
|
||||
if(cell)
|
||||
to_chat(usr, SPAN_WARNING("[src] can not be folded with [cell] attached to it."))
|
||||
to_chat(user, SPAN_WARNING("[src] can not be folded with [cell] attached to it."))
|
||||
return
|
||||
usr.visible_message(
|
||||
SPAN_WARNING("[usr] begins folding up the [src.name]."),
|
||||
user.visible_message(
|
||||
SPAN_WARNING("[user] begins folding up the [src.name]."),
|
||||
SPAN_NOTICE("You begin folding up the [src.name].")
|
||||
)
|
||||
if (!do_after(usr, 0.45 SECONDS))
|
||||
if (!do_after(user, 0.45 SECONDS))
|
||||
return
|
||||
usr.visible_message(
|
||||
SPAN_WARNING("[usr] folds up the [src.name].") ,
|
||||
user.visible_message(
|
||||
SPAN_WARNING("[user] folds up the [src.name].") ,
|
||||
SPAN_NOTICE("You fold up the [src.name].")
|
||||
)
|
||||
var/obj/item/airbubble/bag
|
||||
@@ -420,7 +420,7 @@
|
||||
if(opened)
|
||||
if(istype(attacking_item, /obj/item/grab))
|
||||
var/obj/item/grab/G = attacking_item
|
||||
MouseDrop_T(G.affecting, user)
|
||||
mouse_drop_receive(G.affecting, user)
|
||||
return FALSE
|
||||
if(!attacking_item.dropsafety())
|
||||
return FALSE
|
||||
|
||||
@@ -121,10 +121,10 @@
|
||||
..()
|
||||
slowdown = initial(slowdown)
|
||||
|
||||
/obj/structure/closet/body_bag/MouseDrop(over_object, src_location, over_location)
|
||||
/obj/structure/closet/body_bag/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
..()
|
||||
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||
fold(usr)
|
||||
if((over == user && (in_range(src, user) || user.contents.Find(src))))
|
||||
fold(user)
|
||||
|
||||
/obj/structure/closet/body_bag/proc/fold(var/user)
|
||||
if(!(ishuman(user)))
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
QDEL_NULL(my_tent)
|
||||
return ..()
|
||||
|
||||
/obj/item/tent/MouseDrop(over_object, src_location, over_location)
|
||||
/obj/item/tent/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
. = ..()
|
||||
if(use_check(usr) || !Adjacent(usr))
|
||||
return
|
||||
@@ -254,7 +254,7 @@
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
/obj/structure/component/tent_canvas/MouseDrop(over_object, src_location, over_location)
|
||||
/obj/structure/component/tent_canvas/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
..()
|
||||
if(use_check(usr, USE_ALLOW_NON_ADJACENT) || (get_dist(usr, src) > 1)) // use_check() can't check for adjacency due to density issues, so we check range as well
|
||||
return
|
||||
@@ -328,7 +328,7 @@
|
||||
if(istype(T))
|
||||
unroll(T, user)
|
||||
|
||||
/obj/item/sleeping_bag/MouseDrop(over_object, src_location, over_location)
|
||||
/obj/item/sleeping_bag/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
. = ..()
|
||||
if(use_check(usr) || !Adjacent(usr))
|
||||
return
|
||||
@@ -374,7 +374,7 @@
|
||||
buckled.update_icon()
|
||||
. = ..()
|
||||
|
||||
/obj/structure/bed/sleeping_bag/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
||||
/obj/structure/bed/sleeping_bag/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
. = ..()
|
||||
if(use_check(usr) || !Adjacent(usr))
|
||||
return
|
||||
@@ -426,14 +426,14 @@
|
||||
/obj/structure/table/rack/folding_table/dismantle(obj/item/wrench/W, mob/user)
|
||||
return FALSE
|
||||
|
||||
/obj/structure/table/rack/folding_table/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
||||
/obj/structure/table/rack/folding_table/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
. = ..()
|
||||
if(use_check(usr) || !Adjacent(usr))
|
||||
if(use_check(user) || !Adjacent(user))
|
||||
return
|
||||
if(!ishuman(usr) && (!isrobot(usr) || isDrone(usr))) //Humans and borgs can collapse, but not drones
|
||||
if(!ishuman(user) && (!isrobot(user) || isDrone(user))) //Humans and borgs can collapse, but not drones
|
||||
return
|
||||
new /obj/item/material/folding_table(get_turf(src))
|
||||
usr.visible_message(SPAN_NOTICE("\The [usr] collapses \the [src]."))
|
||||
user.visible_message(SPAN_NOTICE("\The [user] collapses \the [src]."))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/material/stool/chair/folding/camping
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
to_chat(user, SPAN_WARNING("You need a free hand to hold the paddles!"))
|
||||
update_icon() //success
|
||||
|
||||
/obj/item/defibrillator/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
||||
/obj/item/defibrillator/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
. = ..()
|
||||
if(ismob(loc) && slot_flags)
|
||||
var/mob/M = src.loc
|
||||
@@ -106,11 +106,11 @@
|
||||
return
|
||||
if(!M.unEquip(src))
|
||||
return
|
||||
add_fingerprint(usr)
|
||||
add_fingerprint(user)
|
||||
M.put_in_active_hand(src)
|
||||
else
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(Adjacent(H))
|
||||
if(!H.put_in_active_hand(paddles))
|
||||
to_chat(H, SPAN_WARNING("You need a free hand to take out the paddles!"))
|
||||
|
||||
@@ -45,11 +45,11 @@
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/device/memorywiper/MouseDrop(over_object, src_location, over_location)
|
||||
/obj/item/device/memorywiper/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
..()
|
||||
if(use_check_and_message(usr))
|
||||
return
|
||||
if(in_range(src, usr) && isipc(over_object) && in_range(over_object, src))
|
||||
if(in_range(src, usr) && isipc(over) && in_range(over, src))
|
||||
if(attached)
|
||||
if(attached == usr)
|
||||
to_chat(usr, "You unplug \the [src] from your maintenace port.")
|
||||
@@ -58,13 +58,13 @@
|
||||
unplug()
|
||||
return
|
||||
else
|
||||
if(over_object == usr)
|
||||
plug(over_object)
|
||||
if(over == usr)
|
||||
plug(over)
|
||||
to_chat(usr, "You plug \the [src] into your maintenace port.")
|
||||
else
|
||||
visible_message("<b>[usr]</b> begins hunting for the maintenance port on \the [over_object]'s chassis.") // The age old question of "where do I put it in!?"
|
||||
visible_message("<b>[usr]</b> begins hunting for the maintenance port on \the [over]'s chassis.") // The age old question of "where do I put it in!?"
|
||||
if(do_after(usr, 5 SECONDS))
|
||||
plug(over_object)
|
||||
plug(over)
|
||||
visible_message("[usr] plugs \the [src] into \the [attached]'s maintenance port.")
|
||||
|
||||
/obj/item/device/memorywiper/attack_hand(user as mob)
|
||||
|
||||
@@ -41,17 +41,17 @@
|
||||
return
|
||||
project_at(get_turf(target))
|
||||
|
||||
/obj/item/storage/slide_projector/MouseDrop(atom/over)
|
||||
if(use_check_and_message(usr))
|
||||
/obj/item/storage/slide_projector/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(use_check_and_message(user))
|
||||
return
|
||||
|
||||
if(over == usr)
|
||||
interact(usr)
|
||||
if(over == user)
|
||||
interact(user)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(over)
|
||||
if(istype(T))
|
||||
afterattack(over, usr)
|
||||
afterattack(over, user)
|
||||
|
||||
/obj/item/storage/slide_projector/proc/set_slide(obj/item/new_slide)
|
||||
current_slide = new_slide
|
||||
|
||||
@@ -101,14 +101,14 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/glass_jar/MouseDrop(atom/over)
|
||||
if(usr != over || use_check_and_message(usr))
|
||||
/obj/item/glass_jar/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(user != over || use_check_and_message(user))
|
||||
return
|
||||
if(length(contained))
|
||||
switch(contains)
|
||||
if(JAR_GUMBALL)
|
||||
release(contained[1], usr)
|
||||
usr.put_in_hands(contained[1])
|
||||
release(contained[1], user)
|
||||
user.put_in_hands(contained[1])
|
||||
contained -= contained[1]
|
||||
|
||||
/obj/item/glass_jar/attackby(obj/item/attacking_item, mob/user)
|
||||
|
||||
@@ -243,9 +243,9 @@
|
||||
/obj/machinery/centrifuge/AltClick()
|
||||
remove_sample(usr)
|
||||
|
||||
/obj/machinery/centrifuge/MouseDrop(var/atom/other)
|
||||
if(usr == other)
|
||||
remove_sample(usr)
|
||||
/obj/machinery/centrifuge/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(user == over)
|
||||
remove_sample(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
else
|
||||
spirit_board_pick_letter(user)
|
||||
|
||||
/obj/item/spirit_board/MouseDrop(mob/user as mob)
|
||||
if((user == usr && (!use_check(user))) && (user.contents.Find(src) || in_range(src, user)))
|
||||
if(ishuman(usr))
|
||||
forceMove(get_turf(usr))
|
||||
usr.put_in_hands(src)
|
||||
/obj/item/spirit_board/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(user))
|
||||
forceMove(get_turf(user))
|
||||
user.put_in_hands(src)
|
||||
|
||||
/obj/item/spirit_board/attack_ghost(var/mob/abstract/ghost/user)
|
||||
spirit_board_pick_letter(user)
|
||||
|
||||
@@ -477,12 +477,12 @@
|
||||
else
|
||||
open(user)
|
||||
|
||||
/obj/item/storage/altar/MouseDrop(mob/user as mob)
|
||||
if(use_check_and_message(user))
|
||||
/obj/item/storage/altar/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(use_check_and_message(over))
|
||||
return
|
||||
if(ishuman(user))
|
||||
forceMove(get_turf(usr))
|
||||
usr.put_in_hands(src)
|
||||
if(ishuman(over))
|
||||
forceMove(get_turf(user))
|
||||
user.put_in_hands(src)
|
||||
|
||||
/obj/item/storage/altar/kraszar
|
||||
name = "\improper Kraszar altar"
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/item/storage/laundry_basket/MouseDrop(obj/over_object as obj)
|
||||
if(over_object == usr)
|
||||
/obj/item/storage/laundry_basket/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(over == user)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -70,9 +70,9 @@ ABSTRACT_TYPE(/obj/item/storage/secure)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/storage/secure/MouseDrop(over_object, src_location, over_location)
|
||||
/obj/item/storage/secure/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if (locked)
|
||||
src.add_fingerprint(usr)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
@@ -202,40 +202,40 @@
|
||||
if(isghost(user))
|
||||
. += "It contains: [counting_english_list(contents)]"
|
||||
|
||||
/obj/item/storage/MouseDrop(obj/over_object)
|
||||
/obj/item/storage/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 == src.equip_slot)
|
||||
return
|
||||
if(ishuman(usr) || issmall(usr)) //so monkeys can take off their backpacks -- Urist
|
||||
if(over_object == usr && Adjacent(usr)) // this must come before the screen objects only block
|
||||
src.open(usr)
|
||||
if(ishuman(user) || issmall(user)) //so monkeys can take off their backpacks -- Urist
|
||||
if(over == user && Adjacent(user)) // this must come before the screen objects only block
|
||||
src.open(user)
|
||||
return
|
||||
if(!(istype(over_object, /atom/movable/screen)))
|
||||
if(!(istype(over, /atom/movable/screen)))
|
||||
return ..()
|
||||
|
||||
//makes sure that the storage is equipped, so that we can't drag it into our hand from miles away.
|
||||
//there's got to be a better way of doing this.
|
||||
if(!(src.loc == usr) || (src.loc && src.loc.loc == usr))
|
||||
if(!(src.loc == user) || (src.loc && src.loc.loc == user))
|
||||
return
|
||||
if(use_check_and_message(usr))
|
||||
if(use_check_and_message(user))
|
||||
return
|
||||
if((src.loc == usr) && !usr.unEquip(src))
|
||||
if((src.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)
|
||||
src.add_fingerprint(usr)
|
||||
user.u_equip(src)
|
||||
user.equip_to_slot_if_possible(src, slot_l_hand)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
/obj/item/storage/AltClick(var/mob/usr)
|
||||
if(!canremove)
|
||||
|
||||
@@ -267,23 +267,24 @@
|
||||
if(ishuman(user))
|
||||
src.open(user)
|
||||
|
||||
/obj/item/storage/box/fancy/tray/MouseDrop(mob/user as mob)
|
||||
if((user && (!use_check(user))) && (user.contents.Find(src) || in_range(src, user)))
|
||||
if(ishuman(user) && !user.get_active_hand())
|
||||
/obj/item/storage/box/fancy/tray/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if((over && (!use_check(over))) && (over.contents.Find(src) || in_range(src, over)))
|
||||
var/mob/dropped_onto_mob = over
|
||||
if(ishuman(dropped_onto_mob) && !dropped_onto_mob.get_active_hand())
|
||||
var/mob/living/carbon/human/H = user
|
||||
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]."))
|
||||
to_chat(H, SPAN_NOTICE("You pick up the [src]."))
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
forceMove(get_turf(user))
|
||||
user.put_in_hands(src)
|
||||
forceMove(get_turf(H))
|
||||
H.put_in_hands(src)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -398,8 +398,8 @@
|
||||
return SPAN_NOTICE("You can secure the trap by using a screwdriver on it. This will anchor it to the floor, and ready it for deployment.")
|
||||
return SPAN_NOTICE("You can unsecure the trap by using a screwdriver on it. This will unanchor it from the floor, allowing it to be moved.")
|
||||
|
||||
/obj/item/trap/animal/MouseDrop_T(atom/dropping, mob/user)
|
||||
var/mob/living/capturing_mob = dropping
|
||||
/obj/item/trap/animal/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
var/mob/living/capturing_mob = dropped
|
||||
if(!istype(capturing_mob))
|
||||
return
|
||||
|
||||
@@ -704,16 +704,16 @@
|
||||
user.forceMove(loc)
|
||||
user.visible_message("[SPAN_BOLD("[user]")] successfully moves around \the [src] without triggering it.", SPAN_NOTICE("You successfully move around \the [src] without triggering it."))
|
||||
|
||||
/obj/item/trap/animal/MouseDrop(over_object, src_location, over_location)
|
||||
if(!isliving(usr) || !src.Adjacent(usr))
|
||||
/obj/item/trap/animal/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(!isliving(user) || !src.Adjacent(user))
|
||||
return
|
||||
|
||||
if(captured)
|
||||
pass_without_trace(usr) // It's full
|
||||
pass_without_trace(user) // It's full
|
||||
return
|
||||
|
||||
else if(iscarbon(usr))
|
||||
pass_without_trace(usr)
|
||||
else if(iscarbon(user))
|
||||
pass_without_trace(user)
|
||||
return
|
||||
|
||||
return ..()
|
||||
@@ -827,25 +827,25 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/trap/animal/large/MouseDrop(over_object, src_location, over_location)
|
||||
/obj/item/trap/animal/large/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(captured)
|
||||
to_chat(usr, SPAN_WARNING("The trap door's down, you can't get through there!"))
|
||||
to_chat(user, SPAN_WARNING("The trap door's down, you can't get through there!"))
|
||||
return
|
||||
|
||||
if(!src.Adjacent(usr))
|
||||
if(!src.Adjacent(user))
|
||||
return
|
||||
|
||||
if(!ishuman(usr))
|
||||
if(!ishuman(user))
|
||||
..()
|
||||
return
|
||||
|
||||
var/trigger_chance = 0
|
||||
if(usr.a_intent == I_HELP)
|
||||
if(user.a_intent == I_HELP)
|
||||
trigger_chance = 100
|
||||
else if(usr.a_intent != I_HURT)
|
||||
else if(user.a_intent != I_HURT)
|
||||
trigger_chance = 50
|
||||
|
||||
pass_without_trace(usr, trigger_chance)
|
||||
pass_without_trace(user, trigger_chance)
|
||||
|
||||
/obj/item/trap/animal/large/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(deployed)
|
||||
|
||||
@@ -102,11 +102,11 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/MouseDrop_T(mob/target, mob/user)
|
||||
/obj/structure/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
|
||||
var/mob/living/H = user
|
||||
if(istype(H) && can_climb(H) && target == user)
|
||||
do_climb(target)
|
||||
if(istype(H) && can_climb(H) && dropped == user)
|
||||
do_climb(dropped)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -73,20 +73,21 @@ LINEN BINS
|
||||
..()
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/bedsheet/MouseDrop(mob/user)
|
||||
if((user && (!use_check(user))) && (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
|
||||
/obj/item/bedsheet/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if((over && (!use_check(over))) && (over.contents.Find(src) || in_range(src, over)))
|
||||
if(!istype(over, /mob/living/carbon/slime) && !istype(over, /mob/living/simple_animal))
|
||||
var/mob/mouse_dropped_over = over
|
||||
if( !mouse_dropped_over.get_active_hand() ) //if active hand is empty
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
|
||||
if (H.hand)
|
||||
temp = H.organs_by_name["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/bedsheet/update_icon()
|
||||
|
||||
@@ -348,7 +348,7 @@
|
||||
if(opened)
|
||||
if(istype(attacking_item, /obj/item/grab))
|
||||
var/obj/item/grab/G = attacking_item
|
||||
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
||||
mouse_drop_receive(G.affecting, user) //act like they were dragged onto the closet
|
||||
return 0
|
||||
if(attacking_item.isscrewdriver()) // Moved here so you can only detach linked teleporters when the door is open. So you can like unscrew and bolt the locker normally in most circumstances.
|
||||
if(linked_teleporter)
|
||||
@@ -516,8 +516,8 @@
|
||||
|
||||
. = opened
|
||||
|
||||
/obj/structure/closet/MouseDrop_T(atom/dropping, mob/user)
|
||||
var/atom/movable/O = dropping
|
||||
/obj/structure/closet/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
var/atom/movable/screen/O = dropped
|
||||
if(istype(O, /atom/movable/screen)) //fix for HUD elements making their way into the world -Pete
|
||||
return
|
||||
if(O.loc == user)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
if(opened)
|
||||
if(istype(attacking_item, /obj/item/grab))
|
||||
var/obj/item/grab/G = attacking_item
|
||||
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
||||
mouse_drop_receive(G.affecting, user) //act like they were dragged onto the closet
|
||||
return 0
|
||||
if(!attacking_item.dropsafety())
|
||||
return
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
/obj/structure/closet/secure_closet/personal/attackby(obj/item/attacking_item, mob/user)
|
||||
if (opened)
|
||||
if (istype(attacking_item, /obj/item/grab))
|
||||
MouseDrop_T(attacking_item:affecting, user) //act like they were dragged onto the closet
|
||||
mouse_drop_receive(attacking_item:affecting, user) //act like they were dragged onto the closet
|
||||
if(attacking_item)
|
||||
user.drop_from_inventory(attacking_item,loc)
|
||||
else
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
visible_message(SPAN_DANGER("[user] strikes [src] with [attacking_item]."))
|
||||
check_health()
|
||||
|
||||
/obj/structure/closet/statue/MouseDrop_T()
|
||||
/obj/structure/closet/statue/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/relaymove(mob/living/user, direction)
|
||||
|
||||
@@ -146,9 +146,9 @@
|
||||
pixel_y = -4
|
||||
|
||||
//For putting on tables
|
||||
/obj/structure/closet/crate/MouseDrop(atom/over_object)
|
||||
if (istype(over_object, /obj/structure/table))
|
||||
put_on_table(over_object, usr)
|
||||
/obj/structure/closet/crate/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if (istype(over, /obj/structure/table))
|
||||
put_on_table(over, user)
|
||||
return TRUE
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -87,22 +87,22 @@
|
||||
return
|
||||
toggle_open(user)
|
||||
|
||||
/obj/structure/fireaxecabinet/MouseDrop(over_object, src_location, over_location)
|
||||
if(over_object == usr)
|
||||
var/mob/user = over_object
|
||||
if(!istype(user))
|
||||
/obj/structure/fireaxecabinet/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if(over == user)
|
||||
var/mob/mob_dropped_over = over
|
||||
if(!istype(mob_dropped_over))
|
||||
return
|
||||
|
||||
if(!open)
|
||||
to_chat(user, SPAN_NOTICE("\The [src] is closed."))
|
||||
to_chat(mob_dropped_over, SPAN_NOTICE("\The [src] is closed."))
|
||||
return
|
||||
|
||||
if(!fireaxe)
|
||||
to_chat(user, SPAN_NOTICE("\The [src] is empty."))
|
||||
to_chat(mob_dropped_over, SPAN_NOTICE("\The [src] is empty."))
|
||||
return
|
||||
|
||||
fireaxe.forceMove(get_turf(user))
|
||||
user.put_in_hands(fireaxe)
|
||||
fireaxe.forceMove(get_turf(mob_dropped_over))
|
||||
mob_dropped_over.put_in_hands(fireaxe)
|
||||
fireaxe = null
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -99,8 +99,8 @@
|
||||
//everything else is visible, so doesn't need to be mentioned
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/MouseDrop_T(atom/dropping, mob/user)
|
||||
var/atom/movable/O = dropping
|
||||
/obj/structure/janitorialcart/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
var/atom/movable/O = dropped
|
||||
if (istype(O, /obj/structure/mopbucket) && !mybucket)
|
||||
O.forceMove(src)
|
||||
mybucket = O
|
||||
|
||||
@@ -166,8 +166,8 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/m_tray/MouseDrop_T(atom/dropping, mob/user)
|
||||
var/atom/movable/O = dropping
|
||||
/obj/structure/m_tray/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
var/atom/movable/O = dropped
|
||||
if(!istype(O, /atom/movable) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O))
|
||||
return
|
||||
if(!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
|
||||
|
||||
@@ -492,27 +492,27 @@
|
||||
update_icon()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
|
||||
/obj/structure/bed/roller/MouseDrop(over_object, src_location, over_location)
|
||||
/obj/structure/bed/roller/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
..()
|
||||
if(use_check(usr) || !Adjacent(usr))
|
||||
if(use_check(user) || !Adjacent(user))
|
||||
return
|
||||
if(!ishuman(usr) && (!isrobot(usr) || isDrone(usr))) //Humans and borgs can collapse, but not drones
|
||||
if(!ishuman(user) && (!isrobot(user) || isDrone(user))) //Humans and borgs can collapse, but not drones
|
||||
return
|
||||
if(over_object == buckled && beaker)
|
||||
if(over == buckled && beaker)
|
||||
if(iv_attached)
|
||||
detach_iv(buckled, usr)
|
||||
detach_iv(buckled, user)
|
||||
else
|
||||
attach_iv(buckled, usr)
|
||||
attach_iv(buckled, user)
|
||||
return
|
||||
if(usr != over_object && ishuman(over_object))
|
||||
if(user_buckle(over_object, usr))
|
||||
attach_iv(buckled, usr)
|
||||
if(user != over && ishuman(over))
|
||||
if(user_buckle(over, user))
|
||||
attach_iv(buckled, user)
|
||||
return
|
||||
if(beaker)
|
||||
remove_beaker(usr)
|
||||
remove_beaker(user)
|
||||
return
|
||||
if(vitals)
|
||||
remove_vitals(usr)
|
||||
remove_vitals(user)
|
||||
return
|
||||
if(buckled)
|
||||
return
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
if(buckled)
|
||||
buckled.set_dir(dir)
|
||||
|
||||
/obj/structure/bed/stool/chair/MouseDrop_T(atom/dropping, mob/user)
|
||||
if(dropping == user && user.loc != loc && (REVERSE_DIR(dir) & angle2dir(get_angle(src, user))))
|
||||
/obj/structure/bed/stool/chair/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
if(dropped == user && user.loc != loc && (REVERSE_DIR(dir) & angle2dir(get_angle(src, user))))
|
||||
user.visible_message("<b>[user]</b> starts climbing over the back of \the [src]...", SPAN_NOTICE("You start climbing over the back of \the [src]..."))
|
||||
if(do_after(user, 2 SECONDS, do_flags = DO_UNIQUE))
|
||||
user.forceMove(loc)
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
. = ..()
|
||||
can_buckle = FALSE // Some idiot decided can_buckle should be a list...
|
||||
|
||||
/obj/structure/bed/stool/MouseDrop(over_object, src_location, over_location)
|
||||
/obj/structure/bed/stool/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(!held_item || use_check_and_message(usr) || buckled || (anchored && padding_material)) // Make sure held_item = null if you don't want it to get picked up.
|
||||
if(over == user && Adjacent(user))
|
||||
if(!held_item || use_check_and_message(user) || buckled || (anchored && padding_material)) // Make sure held_item = null if you don't want it to get picked up.
|
||||
return
|
||||
usr.visible_message(SPAN_NOTICE("[usr] [withdraw_verb]s \the [src.name]."), SPAN_NOTICE("You [withdraw_verb] \the [src.name]."))
|
||||
user.visible_message(SPAN_NOTICE("[user] [withdraw_verb]s \the [src.name]."), SPAN_NOTICE("You [withdraw_verb] \the [src.name]."))
|
||||
var/obj/item/material/stool/S = new held_item(src.loc, material.name, padding_material?.name, painted_colour) // Handles all the material code so you don't have to.
|
||||
TransferComponents(S)
|
||||
if(material_alteration & MATERIAL_ALTERATION_COLOR) // For snowflakes like wood chairs.
|
||||
@@ -33,8 +33,8 @@
|
||||
S.blood_DNA |= blood_DNA // Transfer blood, if any.
|
||||
S.add_blood()
|
||||
S.dir = dir
|
||||
S.add_fingerprint(usr)
|
||||
usr.put_in_hands(S)
|
||||
S.add_fingerprint(user)
|
||||
user.put_in_hands(S)
|
||||
S.update_icon()
|
||||
qdel(src)
|
||||
|
||||
@@ -197,19 +197,20 @@
|
||||
/obj/item/material/stool/AltClick(mob/user)
|
||||
deploy(user)
|
||||
|
||||
/obj/item/material/stool/MouseDrop(mob/user)
|
||||
if((user && (!use_check(user))) && (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
|
||||
/obj/item/material/stool/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
|
||||
if((over && (!use_check(over))) && (over.contents.Find(src)) || in_range(src, over))
|
||||
if(!istype(over, /mob/living/carbon/slime) && !istype(over, /mob/living/simple_animal))
|
||||
var/mob/mouse_dropped_over = over
|
||||
if( !mouse_dropped_over.get_active_hand() ) //if active hand is empty
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
|
||||
if (H.hand)
|
||||
temp = H.organs_by_name["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/material/stool/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if(icon_state == initial(icon_state))
|
||||
icon_state = pick(icon_states(icon) - icon_state)
|
||||
|
||||
/obj/structure/trash_pile/MouseDrop_T(atom/dropping, mob/user)
|
||||
/obj/structure/trash_pile/mouse_drop_receive(atom/dropped, mob/user, params)
|
||||
if(!Adjacent(user) || use_check_and_message(user))
|
||||
return
|
||||
user.visible_message("<b>[user]</b> starts climbing into \the [src]...", SPAN_NOTICE("You start climbing into \the [src]..."))
|
||||
|
||||
@@ -790,8 +790,8 @@ ABSTRACT_TYPE(/obj/structure/stairs/urban/road_ramp)
|
||||
/obj/item/storage/toolbox/cash_register_storage
|
||||
name = "cash compartment"
|
||||
|
||||
/obj/structure/cash_register/MouseDrop(atom/over)
|
||||
if(usr == over && ishuman(over))
|
||||
/obj/structure/cash_register/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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user