Skip to content

Commit

Permalink
Merge pull request #4516 from noelle-lavenza/feature/barrel-lid
Browse files Browse the repository at this point in the history
Add barrel lids and filling overlays, fix missing hoe, increase grass contrast
  • Loading branch information
MistakeNot4892 authored Oct 10, 2024
2 parents d43a689 + 5e79ba9 commit 5178787
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion code/game/objects/structures/_structure_materials.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
/obj/structure/proc/update_material_name(var/override_name)
var/base_name = override_name || initial(name)
if(istype(material))
SetName("[material.solid_name] [base_name]")
SetName("[material.adjective_name] [base_name]")
else
SetName(base_name)

Expand Down
18 changes: 15 additions & 3 deletions code/game/objects/structures/barrel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
icon = 'icons/obj/structures/barrel.dmi'
icon_state = ICON_STATE_WORLD
anchored = TRUE
atom_flags = ATOM_FLAG_CLIMBABLE | ATOM_FLAG_OPEN_CONTAINER
atom_flags = ATOM_FLAG_CLIMBABLE
matter = null
material = /decl/material/solid/organic/wood
color = /decl/material/solid/organic/wood::color
Expand Down Expand Up @@ -42,9 +42,21 @@
return
var/primary_mat = reagents?.get_primary_reagent_name()
if(primary_mat)
SetName("[material.solid_name] [initial(name)] of [primary_mat]")
update_material_name("[initial(name)] of [primary_mat]")
else
SetName("[material.solid_name] [initial(name)]")
update_material_name()
update_icon()

/obj/structure/reagent_dispensers/barrel/on_update_icon()
. = ..()
if(ATOM_IS_OPEN_CONTAINER(src))
if(reagents)
var/overlay_amount = NONUNIT_CEILING(reagents.total_liquid_volume / reagents.maximum_volume * 100, 10)
var/image/filling_overlay = overlay_image(icon, "[icon_state]-[overlay_amount]", reagents.get_color(), RESET_COLOR | RESET_ALPHA)
add_overlay(filling_overlay)
add_overlay(overlay_image(icon, "[icon_state]-lidopen", material.color, RESET_COLOR))
else
add_overlay(overlay_image(icon, "[icon_state]-lidclosed", material.color, RESET_COLOR))

/obj/structure/reagent_dispensers/barrel/ebony
material = /decl/material/solid/organic/wood/ebony
Expand Down
Binary file modified icons/obj/structures/barrel.dmi
Binary file not shown.
Binary file modified icons/turf/flooring/grass.dmi
Binary file not shown.
2 changes: 1 addition & 1 deletion maps/shaded_hills/shaded_hills-inn.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@
/obj/item/seeds/extracted/valerian,
/obj/item/seeds/extracted/yarrow,
/obj/item/seeds/extracted/yarrow,
/obj/item/tool/shovel/wood/walnut,
/obj/item/tool/hoe/wood/walnut,
/turf/floor/dirt,
/area/shaded_hills/outside/shrine)
"Ay" = (
Expand Down

0 comments on commit 5178787

Please sign in to comment.