and that just leaves the modules folder
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
var/atom/A = parent
|
||||
if((istype(W, /obj/item/storage/backpack/holding) || count_by_type(W.GetAllContents(), /obj/item/storage/backpack/holding)))
|
||||
var/safety = alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [A.name]?", "Abort", "Proceed")
|
||||
if(safety == "Abort" || !in_range(A, user) || !A || !W || user.incapacitated())
|
||||
if(safety != "Proceed" || QDELETED(A) || QDELETED(W) || QDELETED(user) || !user.canUseTopic(A, BE_CLOSE, iscarbon(user)))
|
||||
return
|
||||
var/turf/loccheck = get_turf(A)
|
||||
if(is_reebe(loccheck.z))
|
||||
|
||||
@@ -54,12 +54,18 @@
|
||||
/datum/component/storage/concrete/pockets/pocketprotector
|
||||
max_items = 3
|
||||
max_w_class = WEIGHT_CLASS_TINY
|
||||
var/atom/original_parent
|
||||
|
||||
/datum/component/storage/concrete/pockets/pocketprotector/Initialize()
|
||||
original_parent = parent
|
||||
. = ..()
|
||||
can_hold = typecacheof(list( //Same items as a PDA
|
||||
/obj/item/pen,
|
||||
/obj/item/toy/crayon,
|
||||
/obj/item/lipstick,
|
||||
/obj/item/flashlight/pen,
|
||||
/obj/item/clothing/mask/cigarette))
|
||||
/obj/item/clothing/mask/cigarette))
|
||||
|
||||
/datum/component/storage/concrete/pockets/pocketprotector/real_location()
|
||||
// if the component is reparented to a jumpsuit, the items still go in the protector
|
||||
return original_parent
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
allow_quick_gather = TRUE
|
||||
allow_quick_empty = TRUE
|
||||
click_gather = TRUE
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
max_w_class = WEIGHT_CLASS_BULKY // can fit vending refills
|
||||
max_combined_w_class = 800
|
||||
max_items = 400
|
||||
display_numerical_stacking = TRUE
|
||||
@@ -29,5 +29,5 @@
|
||||
. = ..()
|
||||
if(!I.get_part_rating())
|
||||
if (!stop_messages)
|
||||
to_chat(M, "<span class='warning'>[parent] only accepts machine par ts!</span>")
|
||||
to_chat(M, "<span class='warning'>[parent] only accepts machine parts!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
RegisterSignal(COMSIG_CLICK_ALT, .proc/on_alt_click)
|
||||
RegisterSignal(COMSIG_MOUSEDROP_ONTO, .proc/mousedrop_onto)
|
||||
RegisterSignal(COMSIG_MOUSEDROPPED_ONTO, .proc/mousedrop_recieve)
|
||||
RegisterSignal(COMSIG_MOUSEDROPPED_ONTO, .proc/mousedrop_receive)
|
||||
|
||||
update_actions()
|
||||
|
||||
@@ -125,11 +125,13 @@
|
||||
modeswitch_action.Grant(M)
|
||||
|
||||
/datum/component/storage/proc/change_master(datum/component/storage/concrete/new_master)
|
||||
if(!istype(new_master))
|
||||
if(new_master == src || (!isnull(new_master) && !istype(new_master)))
|
||||
return FALSE
|
||||
master.on_slave_unlink(src)
|
||||
if(master)
|
||||
master.on_slave_unlink(src)
|
||||
master = new_master
|
||||
master.on_slave_link(src)
|
||||
if(master)
|
||||
master.on_slave_link(src)
|
||||
return TRUE
|
||||
|
||||
/datum/component/storage/proc/master()
|
||||
@@ -149,7 +151,7 @@
|
||||
quick_empty(M)
|
||||
|
||||
/datum/component/storage/proc/preattack_intercept(obj/O, mob/M, params)
|
||||
if(!isitem(O) || !click_gather || O.SendSignal(COMSIG_CONTAINS_STORAGE))
|
||||
if(!isitem(O) || !click_gather || SEND_SIGNAL(O, COMSIG_CONTAINS_STORAGE))
|
||||
return FALSE
|
||||
. = COMPONENT_NO_ATTACK
|
||||
if(locked)
|
||||
@@ -466,7 +468,7 @@
|
||||
if(recursive)
|
||||
for(var/i in ret.Copy())
|
||||
var/atom/A = i
|
||||
A.SendSignal(COMSIG_TRY_STORAGE_RETURN_INVENTORY, ret, TRUE)
|
||||
SEND_SIGNAL(A, COMSIG_TRY_STORAGE_RETURN_INVENTORY, ret, TRUE)
|
||||
return ret
|
||||
|
||||
/datum/component/storage/proc/contents() //ONLY USE IF YOU NEED TO COPY CONTENTS OF REAL LOCATION, COPYING IS NOT AS FAST AS DIRECT ACCESS!
|
||||
@@ -517,19 +519,19 @@
|
||||
if(force || M.CanReach(parent, view_only = TRUE))
|
||||
show_to(M)
|
||||
|
||||
/datum/component/storage/proc/mousedrop_recieve(atom/movable/O, mob/M)
|
||||
/datum/component/storage/proc/mousedrop_receive(atom/movable/O, mob/M)
|
||||
if(isitem(O))
|
||||
var/obj/item/I = O
|
||||
if(iscarbon(M) || isdrone(M))
|
||||
var/mob/living/L = M
|
||||
if(!L.incapacitated() && I == L.get_active_held_item())
|
||||
if(!I.SendSignal(COMSIG_CONTAINS_STORAGE) && can_be_inserted(I, FALSE)) //If it has storage it should be trying to dump, not insert.
|
||||
if(!SEND_SIGNAL(I, COMSIG_CONTAINS_STORAGE) && can_be_inserted(I, FALSE)) //If it has storage it should be trying to dump, not insert.
|
||||
handle_item_insertion(I, FALSE, L)
|
||||
|
||||
//This proc return 1 if the item can be picked up and 0 if it can't.
|
||||
//Set the stop_messages to stop it from printing messages
|
||||
/datum/component/storage/proc/can_be_inserted(obj/item/I, stop_messages = FALSE, mob/M)
|
||||
if(!istype(I) || (I.flags_1 & ABSTRACT_1))
|
||||
if(!istype(I) || (I.item_flags & ABSTRACT))
|
||||
return FALSE //Not an item
|
||||
if(I == parent)
|
||||
return FALSE //no paradoxes for you
|
||||
@@ -573,7 +575,7 @@
|
||||
if(!stop_messages)
|
||||
to_chat(M, "<span class='warning'>[IP] cannot hold [I] as it's a storage item of the same size!</span>")
|
||||
return FALSE //To prevent the stacking of same sized storage items.
|
||||
if(I.flags_1 & NODROP_1) //SHOULD be handled in unEquip, but better safe than sorry.
|
||||
if(I.item_flags & NODROP) //SHOULD be handled in unEquip, but better safe than sorry.
|
||||
to_chat(M, "<span class='warning'>\the [I] is stuck to your hand, you can't put it in \the [host]!</span>")
|
||||
return FALSE
|
||||
var/datum/component/storage/concrete/master = master()
|
||||
@@ -639,10 +641,7 @@
|
||||
/datum/component/storage/proc/signal_take_type(type, atom/destination, amount = INFINITY, check_adjacent = FALSE, force = FALSE, mob/user, list/inserted)
|
||||
if(!force)
|
||||
if(check_adjacent)
|
||||
if(user)
|
||||
if(!user.CanReach(destination) || !user.CanReach(parent))
|
||||
return FALSE
|
||||
else if(!destination.CanReachStorage(parent))
|
||||
if(!user || !user.CanReach(destination) || !user.CanReach(parent))
|
||||
return FALSE
|
||||
var/list/taking = typecache_filter_list(contents(), typecacheof(type))
|
||||
if(length(taking) > amount)
|
||||
|
||||
Reference in New Issue
Block a user