Skip to content

Commit

Permalink
Merge pull request #4503 from noelle-lavenza/feature/pyre-newwood
Browse files Browse the repository at this point in the history
Remap the Shaded Hills inn, retexture wood tables/pews
  • Loading branch information
MistakeNot4892 authored Oct 7, 2024
2 parents d706122 + 6fab485 commit bfee279
Show file tree
Hide file tree
Showing 36 changed files with 877 additions and 382 deletions.
12 changes: 11 additions & 1 deletion code/_global_vars/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,18 @@ var/global/list/light_strike_sound = list(
'sound/effects/hit_kick.ogg',
'sound/effects/hit_punch.ogg'
)

var/global/list/tray_hit_sound = list(
'sound/items/trayhit1.ogg',
'sound/items/trayhit2.ogg'
)

var/global/list/sweeping_sound = list(
'sound/foley/sweeping1.ogg',
'sound/foley/sweeping2.ogg',
'sound/foley/sweeping3.ogg',
'sound/foley/sweeping4.ogg',
'sound/foley/sweeping5.ogg',
'sound/foley/sweeping6.ogg',
'sound/foley/sweeping7.ogg',
)
4 changes: 2 additions & 2 deletions code/game/objects/items/weapons/broom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
if(isturf(A))
var/turf/cleaning = A
var/dirty = cleaning.get_dirt()
if(dirty)
if(dirty > 10) // a small amount so that you can't sweep immediately after someone walks somewhere
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.visible_message(SPAN_NOTICE("\The [user] sweeps \the [A]."))
// TODO: shff sound
playsound(A, "sweeping", 100, TRUE)
cleaning.remove_dirt(min(dirty, rand(20,30)))
else
to_chat(user, SPAN_WARNING("\The [cleaning] is not in need of sweeping."))
Expand Down
4 changes: 4 additions & 0 deletions code/game/objects/structures/banners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,17 @@
color = /decl/material/solid/organic/wood/ebony::color

/obj/structure/banner_frame/wall/ebony/red
banner = /obj/item/banner/red
color = /obj/item/banner/red::color // Mapping preview colour.

/obj/structure/banner_frame/wall/ebony/blue
banner = /obj/item/banner/blue
color = /obj/item/banner/blue::color

/obj/structure/banner_frame/wall/ebony/green
banner = /obj/item/banner/green
color = /obj/item/banner/green::color

/obj/structure/banner_frame/wall/ebony/woven
banner = /obj/item/banner/woven
color = /obj/item/banner/woven::color
2 changes: 1 addition & 1 deletion code/game/objects/structures/fires.dm
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@

/obj/structure/fire_source/CanPass(atom/movable/mover, turf/target, height, air_group)
. = ..()
if(lit && ismob(mover))
if(. && lit && ismob(mover))
var/mob/M = mover
if(!MOVING_QUICKLY(M))
to_chat(M, SPAN_WARNING("You refrain from stepping into \the [src]."))
Expand Down
18 changes: 17 additions & 1 deletion code/game/objects/structures/stool_bed_chair_nest_sofa/pew.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@

update_icon()

/obj/structure/bed/chair/bench/proc/get_material_icon()
return material?.bench_icon

/obj/structure/bed/chair/bench/update_materials()
. = ..()
var/icon/material_icon = get_material_icon()
if(material_icon)
icon = material_icon

/obj/structure/bed/chair/bench/mahogany
color = WOOD_COLOR_RICH
material = /decl/material/solid/organic/wood/mahogany
Expand All @@ -108,12 +117,19 @@
icon_state = "pew_standing"
base_icon = "pew"

/obj/structure/bed/chair/bench/pew/get_material_icon()
return material?.pew_icon

/obj/structure/bed/chair/bench/pew/single
name = "backed chair"
desc = "A tall chair with a sturdy back. Not very comfortable."
base_icon = "pew_standing"
connect_neighbors = FALSE

/obj/structure/bed/chair/bench/pew/mahogany
color = WOOD_COLOR_RICH
color = /decl/material/solid/organic/wood/mahogany::color
material = /decl/material/solid/organic/wood/mahogany

/obj/structure/bed/chair/bench/pew/ebony
color = /decl/material/solid/organic/wood/ebony::color
material = /decl/material/solid/organic/wood/ebony
1 change: 1 addition & 0 deletions code/game/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ var/global/const/FALLOFF_SOUNDS = 0.5
if ("chop") soundin = pick(global.chop_sound)
if ("glasscrack") soundin = pick(global.glasscrack_sound)
if ("tray_hit") soundin = pick(global.tray_hit_sound)
if ("sweeping") soundin = pick(global.sweeping_sound)
return soundin


Expand Down
13 changes: 13 additions & 0 deletions code/game/turfs/flooring/_flooring_decals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,19 @@ var/global/list/floor_decals = list()
/obj/effect/floor_decal/spline/fancy/wood/three_quarters
icon_state = "spline_fancy_full"

/obj/effect/floor_decal/spline/fancy/wood/walnut
name = "spline - walnut"
color = WOOD_COLOR_CHOCOLATE

/obj/effect/floor_decal/spline/fancy/wood/corner/walnut
color = WOOD_COLOR_CHOCOLATE

/obj/effect/floor_decal/spline/fancy/wood/cee/walnut
color = WOOD_COLOR_CHOCOLATE

/obj/effect/floor_decal/spline/fancy/wood/three_quarters/walnut
color = WOOD_COLOR_CHOCOLATE

/obj/effect/floor_decal/industrial
abstract_type = /obj/effect/floor_decal/industrial

Expand Down
19 changes: 19 additions & 0 deletions code/game/turfs/initialization/combo.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/// Runs multiple turf initialisers in sequence.
/decl/turf_initializer/combo
abstract_type = /decl/turf_initializer/combo
/// A list of initialisers to run, in sequence.
var/list/initialisers

/decl/turf_initializer/combo/Initialize()
. = ..()
var/list/new_initialisers = list()
for(var/initialiser in initialisers)
new_initialisers += GET_DECL(initialiser)
initialisers = new_initialisers
ASSERT(length(initialisers))

/decl/turf_initializer/combo/InitializeTurf(var/turf/tile)
if(!istype(tile) || !tile.simulated)
return
for(var/decl/turf_initializer/initialiser in initialisers)
initialiser.InitializeTurf(tile)
94 changes: 94 additions & 0 deletions code/game/turfs/initialization/indoors.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
// Makes indoor areas dirty and spawns webs in corners.
/decl/turf_initializer/spiderwebs
/// The chance a turf in a corner will attempt to place a web.
var/web_probability = 25
/// The chance a dormant spiderling will spawn in a placed web.
var/spiderling_probability = 5
/// The maximum amount of dirt added to a turf.
var/min_base_dirt = 0
/// The maximum amount of dirt added to a turf.
var/max_base_dirt = 40
/// The maximum amount of dirt added to each turf per dirty neighbour turf.
var/max_dirt_per_turf = 5


/decl/turf_initializer/spiderwebs/proc/get_dirt_amount()
return rand(min_base_dirt, max_base_dirt)

/decl/turf_initializer/spiderwebs/InitializeTurf(var/turf/tile)
if(!istype(tile) || tile.density || !tile.simulated)
return
// Quick and dirty check to avoid placing things inside windows
if(locate(/obj/structure/grille, tile))
return

var/add_dirt = get_dirt_amount()
// If a neighbor is dirty, then we get dirtier.
var/how_dirty = dirty_neighbors(tile)
for(var/i = 0; i < how_dirty; i++)
add_dirt += rand(0, max_dirt_per_turf)
tile.add_dirt(add_dirt)

if(prob(web_probability)) // Keep in mind that only "corners" get any sort of web
attempt_web(tile)

/// Returns the number of cardinally adjacent turfs with at least 25 dirt (halfway to visible)
/decl/turf_initializer/spiderwebs/proc/dirty_neighbors(var/turf/center)
var/how_dirty = 0
for(var/turf/neighbour in center.CardinalTurfs())
// Considered dirty if more than halfway to visible dirt
if(neighbour.get_dirt() > 25)
how_dirty++
return how_dirty

/decl/turf_initializer/spiderwebs/proc/attempt_web(var/turf/tile)
if(!istype(tile) || !tile.simulated)
return

var/turf/north_turf = get_step_resolving_mimic(tile, NORTH)
if(!north_turf || !north_turf.density)
return

for(var/dir in list(WEST, EAST)) // For the sake of efficiency, west wins over east in the case of 1-tile valid spots, rather than doing pick()
var/turf/neighbour = get_step_resolving_mimic(tile, dir)
if(!neighbour || !neighbour.density)
continue
switch(dir)
if(WEST)
new /obj/effect/decal/cleanable/cobweb(tile)
if(EAST)
new /obj/effect/decal/cleanable/cobweb2(tile)
if(prob(spiderling_probability))
var/obj/effect/spider/spiderling/spiderling = new /obj/effect/spider/spiderling/mundane/dormant(tile)
spiderling.pixel_y = spiderling.shift_range
spiderling.pixel_x = dir == WEST ? -spiderling.shift_range : spiderling.shift_range
break // only place one web

/// Spawns random 'kitchen' grime near tables: flour spills, smashed eggs, fruit smudges, etc.
/decl/turf_initializer/kitchen
/// The probability of attempting to place clutter for a turf.
var/clutter_probability = 10
/// Clutter types to pick from when placing clutter on a turf.
var/list/clutter = list(
/obj/effect/decal/cleanable/flour,
/obj/effect/decal/cleanable/tomato_smudge,
/obj/effect/decal/cleanable/egg_smudge
)

/decl/turf_initializer/kitchen/InitializeTurf(var/turf/tile)
if(!istype(tile) || tile.density || !tile.simulated)
return
if(!prob(clutter_probability))
return
var/adjacent_tables = 0
for(var/obj/structure/table/table in orange(tile, 1))
adjacent_tables++
break
if(!adjacent_tables)
return
if(!prob(adjacent_tables * 25)) // far more likely in table corners with 3 or more tables adjacent
return
var/obj/clutter_to_spawn = pick(clutter)
if(!clutter_to_spawn)
return
new clutter_to_spawn(tile)
59 changes: 30 additions & 29 deletions code/game/turfs/initialization/maintenance.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,65 +14,66 @@
vermin_probability = 0
web_probability = 0

/decl/turf_initializer/maintenance/InitializeTurf(var/turf/T)
if(!istype(T) || T.density || !T.simulated)
/decl/turf_initializer/maintenance/InitializeTurf(var/turf/tile)
if(!istype(tile) || tile.density || !tile.simulated)
return
// Quick and dirty check to avoid placing things inside windows
if(locate(/obj/structure/grille, T))
if(locate(/obj/structure/grille, tile))
return

var/cardinal_turfs = T.CardinalTurfs()

var/add_dirt = get_dirt_amount()
// If a neighbor is dirty, then we get dirtier.
var/how_dirty = dirty_neighbors(cardinal_turfs)
var/how_dirty = dirty_neighbors(tile)
for(var/i = 0; i < how_dirty; i++)
add_dirt += rand(0,5)
T.add_dirt(add_dirt)
tile.add_dirt(add_dirt)

if(prob(oil_probability))
new /obj/effect/decal/cleanable/blood/oil(T)
new /obj/effect/decal/cleanable/blood/oil(tile)

if(prob(clutter_probability))
new /obj/random/junk(T)
new /obj/random/junk(tile)

if(prob(vermin_probability))
if(prob(80))
new /mob/living/simple_animal/passive/mouse(T)
new /mob/living/simple_animal/passive/mouse(tile)
else
new /mob/living/simple_animal/lizard(T)
new /mob/living/simple_animal/lizard(tile)

if(prob(web_probability)) // Keep in mind that only "corners" get any sort of web
attempt_web(T, cardinal_turfs)
attempt_web(tile)

/decl/turf_initializer/maintenance/proc/dirty_neighbors(var/list/cardinal_turfs)
/// Returns the number of cardinally adjacent turfs with at least 25 dirt (halfway to visible)
/decl/turf_initializer/maintenance/proc/dirty_neighbors(var/turf/center)
var/how_dirty = 0
for(var/turf/T in cardinal_turfs)
for(var/turf/neighbour in center.CardinalTurfs())
// Considered dirty if more than halfway to visible dirt
if(T.get_dirt() > 25)
if(neighbour.get_dirt() > 25)
how_dirty++
return how_dirty

/decl/turf_initializer/maintenance/proc/attempt_web(var/turf/T)
/decl/turf_initializer/maintenance/proc/attempt_web(var/turf/tile)

if(!istype(T) || !T.simulated)
if(!istype(tile) || !tile.simulated)
return

var/turf/north_turf = get_step(T, NORTH)
var/turf/north_turf = get_step(tile, NORTH)
if(!north_turf || !north_turf.density)
return

for(var/dir in list(WEST, EAST)) // For the sake of efficiency, west wins over east in the case of 1-tile valid spots, rather than doing pick()
var/turf/neighbour = get_step(T, dir)
if(neighbour && neighbour.density)
if(dir == WEST)
new /obj/effect/decal/cleanable/cobweb(T)
if(dir == EAST)
new /obj/effect/decal/cleanable/cobweb2(T)
if(prob(web_probability))
var/obj/effect/spider/spiderling/spiderling = new /obj/effect/spider/spiderling/mundane/dormant(T)
spiderling.pixel_y = spiderling.shift_range
spiderling.pixel_x = dir == WEST ? -spiderling.shift_range : spiderling.shift_range
for(var/dir in list(WEST, EAST)) // For the sake of efficiency, west wins over east in the case of 1-tile valid spots, rather than doing pick()
var/turf/neighbour = get_step_resolving_mimic(tile, dir)
if(!neighbour || !neighbour.density)
continue
switch(dir)
if(WEST)
new /obj/effect/decal/cleanable/cobweb(tile)
if(EAST)
new /obj/effect/decal/cleanable/cobweb2(tile)
if(prob(web_probability))
var/obj/effect/spider/spiderling/spiderling = new /obj/effect/spider/spiderling/mundane/dormant(tile)
spiderling.pixel_y = spiderling.shift_range
spiderling.pixel_x = dir == WEST ? -spiderling.shift_range : spiderling.shift_range

/decl/turf_initializer/maintenance/proc/get_dirt_amount()
return rand(10, 50) + rand(0, 50)
Expand Down
15 changes: 15 additions & 0 deletions code/modules/butchery/butchery_products.dm
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@
slice_path = null
slice_num = null

/obj/item/food/butchery/offal/beef
meat_name = "beef"

/obj/item/food/butchery/offal/small/beef
meat_name = "beef"

/obj/item/food/butchery/haunch
name = "haunch"
desc = "A severed leg of some unfortunate beast, cleaned and ready for cooking."
Expand Down Expand Up @@ -192,9 +198,15 @@
var/decl/material/fat = GET_DECL(fat_material)
add_overlay(overlay_image(icon, "[icon_state]-fat", fat.color, RESET_COLOR))

/obj/item/food/butchery/haunch/beef
meat_name = "beef"

/obj/item/food/butchery/haunch/shoulder
name = "shoulder"

/obj/item/food/butchery/haunch/shoulder/beef
meat_name = "beef"

/obj/item/food/butchery/haunch/side
name = "side of meat"
desc = "Approximately half the torso and body of an unfortunate animal, split lengthways, cleaned, and ready for cooking."
Expand All @@ -210,6 +222,9 @@
meat_name = new_meat_name
SetName("side of [new_meat_name]")

/obj/item/food/butchery/haunch/side/beef
meat_name = "beef"

// TODO: unify with organ/internal/stomach?
/obj/item/food/butchery/stomach
name = "stomach"
Expand Down
4 changes: 4 additions & 0 deletions code/modules/butchery/butchery_products_cutlet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@
dried_type = /obj/item/food/jerky/cutlet
nutriment_amt = 2
material_alteration = MAT_FLAG_ALTERATION_COLOR

/obj/item/food/butchery/cutlet/raw/beef
meat_name = "beef"
desc = "A thin piece of raw beef."
4 changes: 4 additions & 0 deletions code/modules/food/utensils/utensil_chopsticks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@

/obj/item/utensil/chopsticks/aluminium
material = /decl/material/solid/metal/aluminium

/obj/item/utensil/chopsticks/bamboo
material = /decl/material/solid/organic/wood/bamboo
color = /decl/material/solid/organic/wood/bamboo::color
Loading

0 comments on commit bfee279

Please sign in to comment.