Overhauls and 2/28 sync (#244)
* map tweaks/shuttle engines * helpers and defines * global/onclick * controllers and datums * mapping * game folder * some other stuff * some modules * modules that aren't mobs * some mob stuff * new player stuff * mob living * silicon stuff * simple animal things * carbon/ayylmao * update_icons * carbon/human * sounds and tools * icons and stuff * hippie grinder changes + tgui * kitchen.dmi * compile issues fixed * mapfix * Mapfixes 2.0 * mapedit2.0 * mapmerger pls * Revert "mapedit2.0" This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481. * clean up vore folder + 2 hotfixes * admin ticket refinement * Blob tweaks and LAZYADD * LAZYADD IS LAZY * Magic strings purged * DEFINES NEED HIGHER PRIORITIES * Only a sleepless idiot deals in absolute TRUE|FALSE * u h g * progress bar fix * reverts ticket logs * there's always that one guy * fixes and stuff * 2/27 fixes * game folder stuff * stats * some modules again * clothing stuff gets vg clothing out of the main files * everything not mobs again * mob stuff * maps, tgui, sql stuff * icons * additional fixes and compile errors * don't need this anymore * Oh right this isn't needed anymore * maint bar re-added * that doesn't need to be here * stupid events * wtfeven * probably makes Travis happy * don't care to fix the grinder atm * fixes vending sprites, changes turret * lethal, not lethals * overylays are finicky creatures * lazy fix for bleeding edgy (#252) * map tweaks/shuttle engines * helpers and defines * global/onclick * controllers and datums * mapping * game folder * some other stuff * some modules * modules that aren't mobs * some mob stuff * new player stuff * mob living * silicon stuff * simple animal things * carbon/ayylmao * update_icons * carbon/human * sounds and tools * icons and stuff * hippie grinder changes + tgui * kitchen.dmi * compile issues fixed * mapfix * Mapfixes 2.0 * mapedit2.0 * mapmerger pls * Revert "mapedit2.0" This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481. * clean up vore folder + 2 hotfixes * admin ticket refinement * Blob tweaks and LAZYADD * LAZYADD IS LAZY * Magic strings purged * DEFINES NEED HIGHER PRIORITIES * Only a sleepless idiot deals in absolute TRUE|FALSE * u h g * progress bar fix * reverts ticket logs * there's always that one guy * fixes and stuff * 2/27 fixes * game folder stuff * stats * some modules again * clothing stuff gets vg clothing out of the main files * everything not mobs again * mob stuff * maps, tgui, sql stuff * icons * additional fixes and compile errors * don't need this anymore * Oh right this isn't needed anymore * maint bar re-added * that doesn't need to be here * stupid events * wtfeven * probably makes Travis happy * don't care to fix the grinder atm * fixes vending sprites, changes turret * lethal, not lethals * overylays are finicky creatures
This commit is contained in:
@@ -81,12 +81,11 @@
|
||||
|
||||
//Object behaviour on storage dump
|
||||
/obj/item/weapon/storage/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
|
||||
for(var/obj/item/I in src_object)
|
||||
if(user.s_active != src_object)
|
||||
if(I.on_found(user))
|
||||
return
|
||||
if(can_be_inserted(I,0,user))
|
||||
handle_item_insertion(I, TRUE, user)
|
||||
var/list/things = src_object.contents.Copy()
|
||||
var/datum/progressbar/progress = new(user, things.len, src)
|
||||
while (do_after(user, 10, TRUE, src, FALSE, CALLBACK(src, .proc/handle_mass_item_insertion, things, src_object, user, progress)))
|
||||
sleep(1)
|
||||
qdel(progress)
|
||||
orient2hud(user)
|
||||
src_object.orient2hud(user)
|
||||
if(user.s_active) //refresh the HUD to show the transfered contents
|
||||
@@ -94,6 +93,23 @@
|
||||
user.s_active.show_to(user)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/storage/proc/handle_mass_item_insertion(list/things, obj/item/weapon/storage/src_object, mob/user, datum/progressbar/progress)
|
||||
for(var/obj/item/I in things)
|
||||
things -= I
|
||||
if(I.loc != src_object)
|
||||
continue
|
||||
if(user.s_active != src_object)
|
||||
if(I.on_found(user))
|
||||
break
|
||||
if(can_be_inserted(I,0,user))
|
||||
handle_item_insertion(I, TRUE, user)
|
||||
if (TICK_CHECK)
|
||||
progress.update(progress.goal - things.len)
|
||||
return TRUE
|
||||
|
||||
progress.update(progress.goal - things.len)
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/storage/proc/return_inv()
|
||||
var/list/L = list()
|
||||
L += contents
|
||||
@@ -453,8 +469,25 @@
|
||||
|
||||
if((!ishuman(usr) && (loc != usr)) || usr.stat || usr.restrained() ||!usr.canmove)
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/things = contents.Copy()
|
||||
var/datum/progressbar/progress = new(usr, things.len, T)
|
||||
while (do_after(usr, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress)))
|
||||
sleep(1)
|
||||
qdel(progress)
|
||||
|
||||
do_quick_empty()
|
||||
/obj/item/weapon/storage/proc/mass_remove_from_storage(atom/target, list/things, datum/progressbar/progress)
|
||||
for(var/obj/item/I in things)
|
||||
things -= I
|
||||
if (I.loc != src)
|
||||
continue
|
||||
remove_from_storage(I, target)
|
||||
if (TICK_CHECK)
|
||||
progress.update(progress.goal - things.len)
|
||||
return TRUE
|
||||
|
||||
progress.update(progress.goal - things.len)
|
||||
return FALSE
|
||||
|
||||
// Empty all the contents onto the current turf, without checking the user's status.
|
||||
/obj/item/weapon/storage/proc/do_quick_empty()
|
||||
|
||||
Reference in New Issue
Block a user