Mining performance fixes (#3387)

changes:

Mining ore bags are no longer painfully slow.
The ore summoner now sleeps instead of just giving up on TICK_CHECK.
This commit is contained in:
Lohikar
2017-09-03 00:47:01 +03:00
committed by Erki
parent c58fea0cf5
commit 06ea9d6ac2
6 changed files with 188 additions and 118 deletions
+1 -2
View File
@@ -1131,8 +1131,7 @@ var/list/total_extraction_beacons = list()
single_spark(O.loc)
do_teleport(O, user, 0)
if (TICK_CHECK)
return
CHECK_TICK
/******************************Sculpting*******************************/
/obj/item/weapon/autochisel
+4 -2
View File
@@ -16,12 +16,14 @@
src.contents += W
if (istype(W, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = W
S.hide_from(usr)
S.hide_from(user)
for(var/obj/item/weapon/ore/O in S.contents)
S.remove_from_storage(O, src) //This will move the item to this item's contents
S.remove_from_storage_deferred(O, src, user) //This will move the item to this item's contents
CHECK_TICK
S.post_remove_from_storage_deferred(loc, user)
user << span("notice", "You empty the satchel into the box.")
update_ore_count()