diff --git a/code/datums/extensions/storage/_storage_ui.dm b/code/datums/extensions/storage/_storage_ui.dm index 8723c682c91..cbdaae19700 100644 --- a/code/datums/extensions/storage/_storage_ui.dm +++ b/code/datums/extensions/storage/_storage_ui.dm @@ -106,6 +106,8 @@ _storage.close(other_user) /datum/storage_ui/default/show_to(mob/user) + if(!istype(user)) + return var/list/contents = _storage?.get_contents() if(user.active_storage != _storage) for(var/obj/item/I in contents) @@ -113,21 +115,22 @@ return if(user.active_storage) user.active_storage.hide_from(user) - user.client.screen -= boxes - user.client.screen -= storage_start - user.client.screen -= storage_continue - user.client.screen -= storage_end - user.client.screen -= closer - user.client.screen -= contents - user.client.screen += closer - if(length(contents)) - user.client.screen += contents - if(_storage.storage_slots) - user.client.screen += boxes - else - user.client.screen += storage_start - user.client.screen += storage_continue - user.client.screen += storage_end + if(user.client) + user.client.screen -= boxes + user.client.screen -= storage_start + user.client.screen -= storage_continue + user.client.screen -= storage_end + user.client.screen -= closer + user.client.screen -= contents + user.client.screen += closer + if(length(contents)) + user.client.screen += contents + if(_storage.storage_slots) + user.client.screen += boxes + else + user.client.screen += storage_start + user.client.screen += storage_continue + user.client.screen += storage_end LAZYDISTINCTADD(is_seeing, user) user.active_storage = _storage diff --git a/code/game/objects/structures/fires.dm b/code/game/objects/structures/fires.dm index e38befacb23..a39c6393883 100644 --- a/code/game/objects/structures/fires.dm +++ b/code/game/objects/structures/fires.dm @@ -412,6 +412,15 @@ /obj/structure/fire_source/spark_act(obj/effect/sparks/sparks) try_light(1000) +/obj/structure/fire_source/CanPass(atom/movable/mover, turf/target, height, air_group) + . = ..() + if(lit && ismob(mover)) + var/mob/M = mover + if(!MOVING_QUICKLY(M)) + to_chat(M, SPAN_WARNING("You refrain from stepping into \the [src].")) + return FALSE + return ..() + // Subtypes. /obj/structure/fire_source/firepit obj_flags = OBJ_FLAG_HOLLOW @@ -444,34 +453,26 @@ /obj/structure/fire_source/fireplace/grab_attack(obj/item/grab/G) return FALSE -/* Uncomment when 515 is the minimum version. #define MATERIAL_FIREPLACE(material_name) \ /obj/structure/fire_source/fireplace/##material_name { \ color = /decl/material/solid/stone/##material_name::color; \ material = /decl/material/solid/stone/##material_name; \ } -*/ - -/obj/structure/fire_source/fireplace/basalt - material = /decl/material/solid/stone/basalt - -/obj/structure/fire_source/fireplace/marble - material = /decl/material/solid/stone/marble - -/obj/structure/fire_source/fireplace/granite - material = /decl/material/solid/stone/granite - -/obj/structure/fire_source/fireplace/pottery - material = /decl/material/solid/stone/pottery - -/obj/structure/fire_source/firepit/basalt - material = /decl/material/solid/stone/basalt - -/obj/structure/fire_source/firepit/marble - material = /decl/material/solid/stone/marble - -/obj/structure/fire_source/firepit/granite - material = /decl/material/solid/stone/granite +MATERIAL_FIREPLACE(basalt) +MATERIAL_FIREPLACE(marble) +MATERIAL_FIREPLACE(granite) +MATERIAL_FIREPLACE(pottery) +#undef MATERIAL_FIREPLACE + +#define MATERIAL_FIREPIT(material_name) \ +/obj/structure/fire_source/firepit/##material_name { \ + color = /decl/material/solid/stone/##material_name::color; \ + material = /decl/material/solid/stone/##material_name; \ +} +MATERIAL_FIREPIT(basalt) +MATERIAL_FIREPIT(marble) +MATERIAL_FIREPIT(granite) +#undef MATERIAL_FIREPIT #undef FUEL_CONSUMPTION_CONSTANT #undef FIRE_LIT diff --git a/code/game/turfs/open/_open.dm b/code/game/turfs/open/_open.dm index 265509a7488..f9a8bd7012d 100644 --- a/code/game/turfs/open/_open.dm +++ b/code/game/turfs/open/_open.dm @@ -41,6 +41,7 @@ return TRUE /turf/open/attackby(obj/item/C, mob/user) + if(istype(C, /obj/item/stack/material/rods)) var/ladder = (locate(/obj/structure/ladder) in src) if(ladder) @@ -69,6 +70,12 @@ if(M.movable_flags & MOVABLE_FLAG_Z_INTERACT) return M.attackby(C, user) + if(istype(C, /obj/item/grab)) + var/obj/item/grab/G = C + if (G.affecting != G.assailant) + G.affecting.DoMove(get_dir(G.affecting.loc, src), user, TRUE) + return TRUE + return FALSE /turf/open/attack_hand(mob/user) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 38a5f021071..2dcf60c3af7 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -271,10 +271,8 @@ if(istype(W, /obj/item/grab)) var/obj/item/grab/G = W - if (G.affecting == G.assailant) - return TRUE - - step(G.affecting, get_dir(G.affecting.loc, src)) + if (G.affecting != G.assailant) + G.affecting.DoMove(get_dir(G.affecting.loc, src), user, TRUE) return TRUE if(IS_COIL(W) && try_build_cable(W, user)) diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 19065942ffb..bd8e7ca6ce0 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -167,6 +167,7 @@ ) for(var/i = 1 to slice_amount) new /obj/item/chems/food/processed_grown/chopped(loc, material?.type, plant) + qdel(src) return TRUE return ..() diff --git a/code/modules/food/cooking/recipes/recipe_soup.dm b/code/modules/food/cooking/recipes/recipe_soup.dm index 75f1adca474..1d10684e73f 100644 --- a/code/modules/food/cooking/recipes/recipe_soup.dm +++ b/code/modules/food/cooking/recipes/recipe_soup.dm @@ -4,16 +4,6 @@ container_categories = list(RECIPE_CATEGORY_POT) var/precursor_type -/decl/recipe/soup/stock - abstract_type = /decl/recipe/soup/stock - result_quantity = 10 - result = /decl/material/liquid/nutriment/soup/stock - reagents = list( - /decl/material/solid/sodiumchloride = 1, - /decl/material/liquid/water = 10 - ) - minimum_temperature = 100 CELSIUS - /decl/recipe/soup/get_result_data(atom/container, list/used_ingredients) . = list() @@ -66,6 +56,16 @@ if(soup_flags) .["soup_flags"] = soup_flags +/decl/recipe/soup/stock + abstract_type = /decl/recipe/soup/stock + result_quantity = 10 + result = /decl/material/liquid/nutriment/soup/stock + reagents = list( + /decl/material/solid/sodiumchloride = 1, + /decl/material/liquid/water = 10 + ) + minimum_temperature = 100 CELSIUS + /decl/recipe/soup/stock/meat display_name = "meat stock" items = list(/obj/item/chems/food/butchery) diff --git a/code/modules/hydroponics/processed_grown.dm b/code/modules/hydroponics/processed_grown.dm index e621e96c312..ea1b04f19b0 100644 --- a/code/modules/hydroponics/processed_grown.dm +++ b/code/modules/hydroponics/processed_grown.dm @@ -50,15 +50,16 @@ /obj/item/chems/food/processed_grown/on_update_icon() . = ..() - if(!istype(seed) || !draw_rind) + if(!istype(seed)) return icon_state = get_world_inventory_state() var/rind_colour = seed.get_trait(TRAIT_PRODUCT_COLOUR) color = seed.get_trait(TRAIT_FLESH_COLOUR) || rind_colour - var/image/rind = image(icon, "[icon_state]-rind") - rind.color = rind_colour || color - rind.appearance_flags |= RESET_COLOR - add_overlay(rind) + if(draw_rind) + var/image/rind = image(icon, "[icon_state]-rind") + rind.color = rind_colour || color + rind.appearance_flags |= RESET_COLOR + add_overlay(rind) // Fruit slices. TODO: seed color so orange slices don't get black seeds. /obj/item/chems/food/processed_grown/slice diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 6d4d3cd4495..b895edbd36c 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -304,22 +304,23 @@ return TRUE //Attemps to remove an object on a mob. -/mob/proc/remove_from_mob(var/obj/O, var/atom/target, var/play_dropsound = TRUE) - if(!O) // Nothing to remove, so we succeed. - return 1 - src.unequip(O) - if (src.client) - src.client.screen -= O - O.reset_plane_and_layer() - O.screen_loc = null - if(istype(O, /obj/item)) - var/obj/item/I = O +/mob/proc/remove_from_mob(var/obj/object, var/atom/target, var/play_dropsound = TRUE) + if(!istype(object)) // Nothing to remove, so we succeed. + return TRUE + unequip(object) + if(client) + client.screen -= object + object.reset_plane_and_layer() + object.screen_loc = null + if(!QDELETED(object)) if(target) - I.forceMove(target) + object.forceMove(target) else - I.dropInto(loc) - I.dropped(src, play_dropsound) - return 1 + object.dropInto(loc) + if(isitem(object)) + var/obj/item/item = object + item.dropped(src, play_dropsound) + return TRUE /mob/proc/drop_held_items() for(var/thing in get_held_items()) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index f30545b8453..eeb179a7f3b 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -449,8 +449,11 @@ default behaviour is: if(isturf(old_loc)) for(var/atom/movable/AM as anything in ret_grab()) if(AM != src && AM.loc != loc && !AM.anchored && old_loc.Adjacent(AM)) - AM.glide_size = glide_size // This is adjusted by grabs again from events/some of the procs below, but doing it here makes it more likely to work with recursive movement. - AM.DoMove(get_dir(get_turf(AM), old_loc), src, TRUE) + if(get_z(AM) <= get_z(src)) + AM.glide_size = glide_size // This is adjusted by grabs again from events/some of the procs below, but doing it here makes it more likely to work with recursive movement. + AM.DoMove(get_dir(get_turf(AM), old_loc), src, TRUE) + else // Hackfix for eternal bump due to grabber moving down through an openturf. + AM.dropInto(get_turf(src)) var/list/mygrabs = get_active_grabs() for(var/obj/item/grab/G as anything in mygrabs)