Openturf fixes, dynamically lit holodeck, and quick-pickup tweaks (#2943)

changes:

The station's holodeck is now dynamically lit.
Improved quick-pickup's tick checking & converted to assoc lists instead of if (thing in list).
Fixed an edge case where openspace overlays would not properly cleanup on forceMove to a non-turf.
Fixes #2941.
This commit is contained in:
Lohikar
2017-07-06 23:34:55 +03:00
committed by skull132
parent 12425ef9a4
commit 2185094d35
3 changed files with 20 additions and 15 deletions
+12 -11
View File
@@ -189,23 +189,26 @@
var/obj/item/weapon/storage/S = W
if(S.use_to_pickup)
if(S.collection_mode) //Mode is set to collect all items on a tile and we clicked on a valid one.
if(isturf(src.loc))
if(isturf(loc))
var/list/rejections = list()
var/success = 0
var/failure = 0
var/success = FALSE
var/failure = FALSE
var/original_loc = user ? user.loc : null
for(var/obj/item/I in src.loc)
CHECK_TICK
for(var/obj/item/I in loc)
if (user && user.loc != original_loc)
break
if(I.type in rejections) // To limit bag spamming: any given type only complains once
if(rejections[I.type]) // To limit bag spamming: any given type only complains once
continue
if(!S.can_be_inserted(I)) // Note can_be_inserted still makes noise when the answer is no
rejections += I.type // therefore full bags are still a little spammy
failure = 1
rejections[I.type] = TRUE // therefore full bags are still a little spammy
failure = TRUE
CHECK_TICK
continue
success = 1
success = TRUE
S.handle_item_insertion(I, 1) //The 1 stops the "You put the [src] into [S]" insertion message from being displayed.
CHECK_TICK // Because people insist on picking up huge-ass piles of stuff.
@@ -219,8 +222,6 @@
else if(S.can_be_inserted(src))
S.handle_item_insertion(src)
return
/obj/item/proc/talk_into(mob/M as mob, text)
return