fixes
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
to_chat(M, "<span class='notice'>You start dumping out tier/cell rating [lowest_rating] parts from [parent].</span>")
|
to_chat(M, "<span class='notice'>You start dumping out tier/cell rating [lowest_rating] parts from [parent].</span>")
|
||||||
var/turf/T = get_turf(A)
|
var/turf/T = get_turf(A)
|
||||||
var/datum/progressbar/progress = new(M, length(things), T)
|
var/datum/progressbar/progress = new(M, length(things), T)
|
||||||
while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress)))
|
while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress, TRUE, M)))
|
||||||
stoplag(1)
|
stoplag(1)
|
||||||
qdel(progress)
|
qdel(progress)
|
||||||
A.do_squish(0.8, 1.2)
|
A.do_squish(0.8, 1.2)
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
to_chat(M, "<span class='notice'>You start dumping out tier/cell rating [lowest_rating] parts from [parent].</span>")
|
to_chat(M, "<span class='notice'>You start dumping out tier/cell rating [lowest_rating] parts from [parent].</span>")
|
||||||
var/turf/T = get_turf(A)
|
var/turf/T = get_turf(A)
|
||||||
var/datum/progressbar/progress = new(M, length(things), T)
|
var/datum/progressbar/progress = new(M, length(things), T)
|
||||||
while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress)))
|
while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress, TRUE, M)))
|
||||||
stoplag(1)
|
stoplag(1)
|
||||||
qdel(progress)
|
qdel(progress)
|
||||||
A.do_squish(0.8, 1.2)
|
A.do_squish(0.8, 1.2)
|
||||||
|
|||||||
@@ -271,20 +271,20 @@
|
|||||||
var/turf/T = get_turf(A)
|
var/turf/T = get_turf(A)
|
||||||
var/list/things = contents()
|
var/list/things = contents()
|
||||||
var/datum/progressbar/progress = new(M, length(things), T)
|
var/datum/progressbar/progress = new(M, length(things), T)
|
||||||
while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress)))
|
while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress, TRUE, M)))
|
||||||
stoplag(1)
|
stoplag(1)
|
||||||
qdel(progress)
|
qdel(progress)
|
||||||
A.do_squish(0.8, 1.2)
|
A.do_squish(0.8, 1.2)
|
||||||
|
|
||||||
/datum/component/storage/proc/mass_remove_from_storage(atom/target, list/things, datum/progressbar/progress, trigger_on_found = TRUE)
|
/datum/component/storage/proc/mass_remove_from_storage(atom/target, list/things, datum/progressbar/progress, trigger_on_found = TRUE, mob/user)
|
||||||
var/atom/real_location = real_location()
|
var/atom/real_location = real_location()
|
||||||
for(var/obj/item/I in things)
|
for(var/obj/item/I in things)
|
||||||
things -= I
|
things -= I
|
||||||
if(I.loc != real_location)
|
if(I.loc != real_location)
|
||||||
continue
|
continue
|
||||||
remove_from_storage(I, target)
|
if(trigger_on_found && user && (user.active_storage != src) && I.on_found(user))
|
||||||
if(trigger_on_found && I.on_found())
|
|
||||||
return FALSE
|
return FALSE
|
||||||
|
remove_from_storage(I, target)
|
||||||
if(TICK_CHECK)
|
if(TICK_CHECK)
|
||||||
progress.update(progress.goal - length(things))
|
progress.update(progress.goal - length(things))
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|||||||
@@ -800,6 +800,8 @@
|
|||||||
var/list/things = src_object.contents()
|
var/list/things = src_object.contents()
|
||||||
var/datum/progressbar/progress = new(user, things.len, src)
|
var/datum/progressbar/progress = new(user, things.len, src)
|
||||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||||
|
if(STR == src_object)
|
||||||
|
return
|
||||||
while (do_after(user, 10, TRUE, src, FALSE, CALLBACK(STR, /datum/component/storage.proc/handle_mass_item_insertion, things, src_object, user, progress)))
|
while (do_after(user, 10, TRUE, src, FALSE, CALLBACK(STR, /datum/component/storage.proc/handle_mass_item_insertion, things, src_object, user, progress)))
|
||||||
stoplag(1)
|
stoplag(1)
|
||||||
qdel(progress)
|
qdel(progress)
|
||||||
|
|||||||
@@ -386,7 +386,7 @@ GLOBAL_LIST_EMPTY(station_turfs)
|
|||||||
|
|
||||||
var/list/things = src_object.contents()
|
var/list/things = src_object.contents()
|
||||||
var/datum/progressbar/progress = new(user, things.len, src)
|
var/datum/progressbar/progress = new(user, things.len, src)
|
||||||
while (do_after(usr, 1 SECONDS, TRUE, src, FALSE, CALLBACK(src_object, /datum/component/storage.proc/mass_remove_from_storage, src, things, progress)))
|
while (do_after(usr, 1 SECONDS, TRUE, src, FALSE, CALLBACK(src_object, /datum/component/storage.proc/mass_remove_from_storage, src, things, progress, TRUE, user)))
|
||||||
stoplag(1)
|
stoplag(1)
|
||||||
qdel(progress)
|
qdel(progress)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user