Skip to content

Commit

Permalink
balloon alerts and MORE COMMENTS
Browse files Browse the repository at this point in the history
  • Loading branch information
GenericDM committed Sep 28, 2023
1 parent fb57de0 commit 44fb553
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions code/game/objects/structures/crateshelf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
return load(crate, user)

/obj/structure/crate_shelf/proc/handle_visuals()
vis_contents = contents
vis_contents = contents // It really do be that shrimple.
return

/obj/structure/crate_shelf/proc/load(obj/structure/closet/crate/crate, mob/user)
Expand All @@ -73,12 +73,15 @@
/obj/structure/crate_shelf/proc/unload(obj/structure/closet/crate/crate, mob/user)
if(do_after(user, use_delay, target = crate))
var/turf/unload_turf = get_turf(get_step(user, user.dir)) // We'll unload the crate onto the turf directly in front of the user.
if(get_turf(src) == unload_turf)
return FALSE // If we're going to just drop it back onto the shelf, don't!
if(get_turf(src) == unload_turf) // If we're going to just drop it back onto the shelf, don't!
balloon_alert(user, "no room!")
return FALSE
if(!unload_turf.Adjacent(src))
balloon_alert(user, "too far!")
return FALSE
if(!unload_turf.Enter(crate, no_side_effects = TRUE)) // If moving the crate from the shelf to the desired turf would bump, don't do it! Thanks Kapu1178 for the help here. - Generic DM
balloon_alert(user, "no room!")
return FALSE
if(!unload_turf.Enter(crate, no_side_effects = TRUE))
return FALSE // If moving the crate from the shelf to the desired turf would bump, don't do it! Thanks Kapu1178 for the help here. - Generic DM
crate.layer = BELOW_OBJ_LAYER // Reset the crate back to having the default layer, otherwise we might get strange interactions.
crate.pixel_y = 0 // Reset the crate back to having no offset, otherwise it will be floating.
crate.forceMove(unload_turf)
Expand Down

0 comments on commit 44fb553

Please sign in to comment.