Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating dev from staging. #4216

Merged
merged 9 commits into from
Jul 16, 2024
33 changes: 18 additions & 15 deletions code/datums/extensions/storage/_storage_ui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -106,28 +106,31 @@
_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)
if(I.on_found(user))
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

Expand Down
47 changes: 24 additions & 23 deletions code/game/objects/structures/fires.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions code/game/turfs/open/_open.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 2 additions & 4 deletions code/game/turfs/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 1 addition & 0 deletions code/modules/clothing/head/misc_special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..()

Expand Down
20 changes: 10 additions & 10 deletions code/modules/food/cooking/recipes/recipe_soup.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down
11 changes: 6 additions & 5 deletions code/modules/hydroponics/processed_grown.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 15 additions & 14 deletions code/modules/mob/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
7 changes: 5 additions & 2 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading